diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H
index 04cc2a83cadcee2acdcf9473a7ef40f3c3def1f3..335012c86849793ec51e73a5c003d4cc58096321 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    basicSubGrid
+    Foam::XiEqModels::basicSubGrid
 
 Description
     Basic sub-grid obstacle flame-wrinking enhancement factor model.
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H
index a455fd28b4963ce6ad2305230fdfee06dde245b3..d844dca34e93b7cfdfbb4a498a0e9d67d554665a 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    basicSubGrid
+    Foam::XiGModel::basicSubGrid
 
 
 Description
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H
index 3448d1166c4106a1cd50d652df134b75b94100bc..7177fca84761e6811e9a4d18d2c687b7872072bb 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    PDRDragModel
+    Foam::PDRDragModel
 
 Description
     Base-class for sub-grid obstacle drag models.
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H
index 05ec433919da7a247042a2011aecab79464f7691..889cd57fd69a99a52ca32e8d632043e2a23f7739 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    basic
+    Foam::PDRDragModels::basic
 
 Description
     Basic sub-grid obstacle drag model.
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H
index b35ef9151ea1c7fe633475a459d38a6ded55459d..b370c0b035b1f758efccafdbb85398a7761cf4c6 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    PDRkEpsilon
+    Foam::compressible::RASModels::PDRkEpsilon
 
 Description
     Standard k-epsilon turbulence model with additional source terms
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H
index d8bc58b1701a7559dc1741a093c3af7d1800819a..c361e819464be96229c43a8b69a6be67d4c7e59c 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Gulder
+    Foam::XiEqModels::Gulder
 
 Description
     Simple Gulder model for XiEq based on Gulders correlation
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H
index b9a45ffb636d2a818b0fa5fa7e1d079e9350e734..589060895c4111ae127e6e4e14091003a0867712 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H
@@ -23,10 +23,10 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    SCOPEBlend
+    Foam::XiEqModels::SCOPEBlend
 
 Description
-    
+
 SourceFiles
     SCOPEBlend.C
 
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H
index b2b2b35edf2e5f032d037fa3d6bc7c8afe0b5108..e8c4dea23c71f8558f01f3041db9a3ddaa8c1b94 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    SCOPEXiEq
+    Foam::XiEqModel::SCOPEXiEq
 
 Description
     Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H
index 2c35877f5e71b50b5ce8aaf0401fe103d4e9c6cc..9cbdcbe3da505e39a60548cbfcc9408577d8d727 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    XiEqModel
+    Foam::XiEqModel
 
 Description
     Base-class for all XiEq models used by the b-XiEq combustion model.
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H
index 455635dc0800c07bc16e3af27d424cbcfe98c9aa..b57cda5e281e637aa0c117caaa7a136923690302 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H
@@ -23,10 +23,10 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    instability
+    Foam::XiEqModels::instability
 
 Description
-    
+
 SourceFiles
     instability.C
 
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H
index 8884c00deb8fae91a539be2448d5abe33b3a5c00..93562557e9f901713e746f66b6f14a8531da7b4c 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    KTS
+    Foam::XiGModels::KTS
 
 Description
     Simple Kolmogorov time-scale model for the flame-wrinling generation rate.
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H
index 908dc3a623d4f764dca24920212b4b40e6034b6c..803644261e271c407b988b36e31fe8fc64e9dce3 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    XiGModel
+    Foam::XiGModel
 
 Description
     Base-class for all Xi generation models used by the b-Xi combustion model.
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H
index 596e86229b44b2eb733821219e4119a7489d6b91..fa6935382c6d09b04f8cea688c3c661ca3871305 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    instabilityG
+    Foam::XiGModels::instabilityG
 
 Description
     Flame-surface instabilityG flame-wrinking generation rate coefficient model.
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H
index 2b76f9bc92a498028aa3ee9d48061f415f5c130b..2447263f7bf34a7e8155a8d0ddec4e4869929e83 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    XiModel
+    Foam::XiModel
 
 Description
     Base-class for all Xi models used by the b-Xi combustion model.
@@ -102,8 +102,6 @@ namespace Foam
                           Class XiModel Declaration
 \*---------------------------------------------------------------------------*/
 
-
-
 class XiModel
 {
 
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H
index 9da38cf00dd51919f3500bb83158c13f17bbddaa..70fde4a510c6cd9df4e8547f0ed8bbaf92340b31 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    algebraic
+    Foam::XiModels::algebraic
 
 Description
     Simple algebraic model for Xi based on Gulders correlation
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H
index 64c44fdff4c3819757acf1885afd18e481171e2a..3a9919259db275c355215c32091a8dda48ac05f3 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    fixed
+    Foam::XiModels::fixed
 
 Description
     Fixed value model for Xi.
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H
index db2a7255aafd0cfc590761fcb4f0e9417aacd1f1..3023ce272fb285813485922ba8d2e6fc05ba2b87 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H
+++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    transport
+    Foam::XiModels::transport
 
 Description
     Simple transport model for Xi based on Gulders correlation
diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H
index 8c65453b946f51b0b0d2810ea334bd1b13848712..029d31f25d851e8a1ba27c5e79d6718489d4e6d4 100644
--- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H
+++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    SCOPE
+    Foam::laminarFlameSpeedModels::SCOPE
 
 Description
     Laminar flame speed obtained from the SCOPE correlation.
diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C
index 11a180957567674655948c692551189aaf2a908f..e24de6658d057a4d3e4a34faf06a5537b4578679 100644
--- a/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C
+++ b/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C
@@ -74,24 +74,26 @@ int main(int argc, char *argv[])
 
         Info<< "Time = " << runTime.timeName() << nl << endl;
 
-        scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
+        {
+            // Store divU from the previous mesh for the correctPhi
+            volScalarField divU = fvc::div(phi);
 
-        // Do any mesh changes
-        mesh.update();
+            scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
 
-        if (mesh.changing())
-        {
-            Info<< "Execution time for mesh.update() = "
-                << runTime.elapsedCpuTime() - timeBeforeMeshUpdate
-                << " s" << endl;
+            // Do any mesh changes
+            mesh.update();
 
-            gh = g & mesh.C();
-            ghf = g & mesh.Cf();
-        }
+            if (mesh.changing())
+            {
+                Info<< "Execution time for mesh.update() = "
+                    << runTime.elapsedCpuTime() - timeBeforeMeshUpdate
+                    << " s" << endl;
+            }
 
-        if (mesh.changing() && correctPhi)
-        {
-            //***HGW#include "correctPhi.H"
+            if (mesh.changing() && correctPhi)
+            {
+                #include "correctPhi.H"
+            }
         }
 
         // Make the fluxes relative to the mesh motion
@@ -102,6 +104,12 @@ int main(int argc, char *argv[])
             #include "meshCourantNo.H"
         }
 
+        if (mesh.changing())
+        {
+            gh = g & mesh.C();
+            ghf = g & mesh.Cf();
+        }
+
         turbulence->correct();
 
         // --- Outer-corrector loop
diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H
new file mode 100644
index 0000000000000000000000000000000000000000..4152105784639530f725c53b7b561841b798c624
--- /dev/null
+++ b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H
@@ -0,0 +1,39 @@
+{
+    #include "continuityErrs.H"
+
+    volScalarField pcorr
+    (
+        IOobject
+        (
+            "pcorr",
+            runTime.timeName(),
+            mesh,
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        mesh,
+        dimensionedScalar("pcorr", pd.dimensions(), 0.0),
+        pcorrTypes
+    );
+
+    dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0);
+
+    adjustPhi(phi, U, pcorr);
+
+    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    {
+        fvScalarMatrix pcorrEqn
+        (
+            fvm::laplacian(rAUf, pcorr) == fvc::div(phi) - divU
+        );
+
+        pcorrEqn.solve();
+
+        if (nonOrth == nNonOrthCorr)
+        {
+            phi -= pcorrEqn.flux();
+        }
+    }
+
+    #include "continuityErrs.H"
+}
diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H
index 1f579d245bdcac21f647ac2a90a516b5f612b3c9..dc04fb454680bbeadec55c8946227270601651c7 100644
--- a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H
+++ b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H
@@ -150,3 +150,14 @@
     (
         incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
     );
+
+
+    wordList pcorrTypes(pd.boundaryField().types());
+
+    for (label i=0; i<pd.boundaryField().size(); i++)
+    {
+        if (pd.boundaryField()[i].fixesValue())
+        {
+            pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
+        }
+    }
diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H
index 013d8eb05f7e341ee0c8bf9fc5f1511e8d9c6dc6..b0f3378408fb76da41887cee0724a55e77afea11 100644
--- a/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H
@@ -21,7 +21,7 @@
     surfaceScalarField phiU
     (
         "phiU",
-        (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
+        (fvc::interpolate(U) & mesh.Sf())
     );
 
     phi = phiU +
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict
index 5777ae8a8a3680e6b502ba363731541fba9d1074..43d550f4068b72c6967430b49c0c63ac1516bc99 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict
+++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict
@@ -292,6 +292,7 @@ meshQualityControls
     minFlatness 0.5;
 
     //- Minimum pyramid volume. Is absolute volume of cell pyramid.
+    //  Set to a sensible fraction of the smallest cell volume expected.
     //  Set to very negative number (e.g. -1E30) to disable.
     minVol 1e-13;
 
diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake
index 3083370ad766706f4666510cfe47e1f6a0c4a85a..25886fbfaca1614b56d2ef07de7f5570aaac3205 100755
--- a/src/Pstream/Allwmake
+++ b/src/Pstream/Allwmake
@@ -5,7 +5,7 @@ set -x
 wmake libso dummy
 
 case "$WM_MPLIB" in
-LAM | OPENMPI | MPI | MPICH | MPICH-GM | HPMPI | MPIGAMMA )
+LAM | OPENMPI | MPI | MPICH | MPICH-GM | HPMPI )
    export WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
    set +x
    echo
diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C
index fdcd15f0e98d548b2d10647e81a3ef7001221a5a..950cc7251b4ae9afc89a1c52faced4e71cc6266d 100644
--- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C
+++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C
@@ -205,7 +205,7 @@ Foam::label Foam::meshRefinement::getBafflePatch
 
     WarningIn
     (
-        "meshRefinement::getBafflePatch(const labelList& const label)"
+        "meshRefinement::getBafflePatch(const labelList&, const label)"
     )   << "Could not find boundary face neighbouring internal face "
         << faceI << " with face centre " << mesh_.faceCentres()[faceI]
         << nl
@@ -1854,16 +1854,15 @@ void Foam::meshRefinement::findCellZoneTopo
         {
             break;
         }
-    }
-
 
-    // Synchronise regionToCellZone.
-    // Note:
-    // - region numbers are identical on all processors
-    // - keepRegion is identical ,,
-    // - cellZones are identical ,,
-    Pstream::listCombineGather(regionToCellZone, maxEqOp<label>());
-    Pstream::listCombineScatter(regionToCellZone);
+	// Synchronise regionToCellZone.
+	// Note:
+	// - region numbers are identical on all processors
+	// - keepRegion is identical ,,
+	// - cellZones are identical ,,
+	Pstream::listCombineGather(regionToCellZone, maxEqOp<label>());
+	Pstream::listCombineScatter(regionToCellZone);
+    }
 
 
     forAll(regionToCellZone, regionI)
diff --git a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C
index e74a5691e38ba712c8991707660917ed111c2287..39be5d1d2f375aaa7cfcafa5c584edbdffbd1ed3 100644
--- a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C
+++ b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C
@@ -70,7 +70,7 @@ void Foam::topoCellLooper::subsetList
                 << "startI:" << startI << "  freeI:" << freeI
                 << "  lst:" << lst << abort(FatalError);
         }
-        lst.setSize(freeI);
+        lst.setCapacity(freeI);
     }
     else
     {
@@ -88,7 +88,7 @@ void Foam::topoCellLooper::subsetList
                 << "  lst:" << lst << abort(FatalError);
         }
 
-        lst.setSize(freeI - startI);
+        lst.setCapacity(freeI - startI);
     }
 }
 
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
index d743891f94fc99a1fb16d487b09401640c21c71d..6ed3f0c14f5fd9cdd6506ede3ef1afbc859c83c6 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
@@ -734,25 +734,21 @@ void Foam::polyTopoChange::reorderCompactFaces
 )
 {
     reorder(oldToNew, faces_);
-    faces_.setSize(newSize);
-    faces_.shrink();
+    faces_.setCapacity(newSize);
 
     reorder(oldToNew, region_);
-    region_.setSize(newSize);
-    region_.shrink();
+    region_.setCapacity(newSize);
 
     reorder(oldToNew, faceOwner_);
-    faceOwner_.setSize(newSize);
-    faceOwner_.shrink();
+    faceOwner_.setCapacity(newSize);
 
     reorder(oldToNew, faceNeighbour_);
-    faceNeighbour_.setSize(newSize);
-    faceNeighbour_.shrink();
+    faceNeighbour_.setCapacity(newSize);
 
     // Update faceMaps.
     reorder(oldToNew, faceMap_);
-    faceMap_.setSize(newSize);
-    faceMap_.shrink();
+    faceMap_.setCapacity(newSize);
+
     renumberReverseMap(oldToNew, reverseFaceMap_);
 
     renumberKey(oldToNew, faceFromPoint_);
@@ -932,13 +928,11 @@ void Foam::polyTopoChange::compact
         }
 
         reorder(localPointMap, points_);
-        points_.setSize(newPointI);
-        points_.shrink();
+        points_.setCapacity(newPointI);
 
         // Update pointMaps
         reorder(localPointMap, pointMap_);
-        pointMap_.setSize(newPointI);
-        pointMap_.shrink();
+        pointMap_.setCapacity(newPointI);
         renumberReverseMap(localPointMap, reversePointMap_);
 
         renumberKey(localPointMap, pointZone_);
@@ -1038,13 +1032,11 @@ void Foam::polyTopoChange::compact
         if (orderCells || (newCellI != cellMap_.size()))
         {
             reorder(localCellMap, cellMap_);
-            cellMap_.setSize(newCellI);
-            cellMap_.shrink();
+            cellMap_.setCapacity(newCellI);
             renumberReverseMap(localCellMap, reverseCellMap_);
 
             reorder(localCellMap, cellZone_);
-            cellZone_.setSize(newCellI);
-            cellZone_.shrink();
+            cellZone_.setCapacity(newCellI);
 
             renumberKey(localCellMap, cellFromPoint_);
             renumberKey(localCellMap, cellFromEdge_);
@@ -2157,9 +2149,9 @@ void Foam::polyTopoChange::addMesh
         const pointField& points = mesh.points();
         const pointZoneMesh& pointZones = mesh.pointZones();
 
-        // Resize
-        points_.setSize(points_.size() + points.size());
-        pointMap_.setSize(pointMap_.size() + points.size());
+        // Extend
+        points_.setCapacity(points_.size() + points.size());
+        pointMap_.setCapacity(pointMap_.size() + points.size());
         pointZone_.resize(pointZone_.size() + points.size()/100);
 
         // Precalc offset zones
@@ -2198,11 +2190,11 @@ void Foam::polyTopoChange::addMesh
         // always equals nCells
         label nAllCells = mesh.nCells();
 
-        cellMap_.setSize(cellMap_.size() + nAllCells);
+        cellMap_.setCapacity(cellMap_.size() + nAllCells);
         cellFromPoint_.resize(cellFromPoint_.size() + nAllCells/100);
         cellFromEdge_.resize(cellFromEdge_.size() + nAllCells/100);
         cellFromFace_.resize(cellFromFace_.size() + nAllCells/100);
-        cellZone_.setSize(cellZone_.size() + nAllCells);
+        cellZone_.setCapacity(cellZone_.size() + nAllCells);
 
 
         // Precalc offset zones
@@ -2258,11 +2250,11 @@ void Foam::polyTopoChange::addMesh
         // Resize
         label nAllFaces = mesh.faces().size();
 
-        faces_.setSize(faces_.size() + nAllFaces);
-        region_.setSize(region_.size() + nAllFaces);
-        faceOwner_.setSize(faceOwner_.size() + nAllFaces);
-        faceNeighbour_.setSize(faceNeighbour_.size() + nAllFaces);
-        faceMap_.setSize(faceMap_.size() + nAllFaces);
+        faces_.setCapacity(faces_.size() + nAllFaces);
+        region_.setCapacity(region_.size() + nAllFaces);
+        faceOwner_.setCapacity(faceOwner_.size() + nAllFaces);
+        faceNeighbour_.setCapacity(faceNeighbour_.size() + nAllFaces);
+        faceMap_.setCapacity(faceMap_.size() + nAllFaces);
         faceFromPoint_.resize(faceFromPoint_.size() + nAllFaces/100);
         faceFromEdge_.resize(faceFromEdge_.size() + nAllFaces/100);
         flipFaceFlux_.resize(flipFaceFlux_.size() + nAllFaces/100);
@@ -3006,9 +2998,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
     {
         retiredPoints_.clear();
         retiredPoints_.resize(0);
-
-        region_.clear();
-        region_.setSize(0);
+        region_.clearStorage();
     }
 
 
@@ -3072,8 +3062,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
         faceZoneFlip_.clear();
         faceZoneFlip_.resize(0);
 
-        cellZone_.clear();
-        cellZone_.setSize(0);
+        cellZone_.clearStorage();
     }
 
 
@@ -3240,8 +3229,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
     {
         retiredPoints_.clear();
         retiredPoints_.resize(0);
-        region_.clear();
-        region_.setSize(0);
+        region_.clearStorage();
     }
 
 
@@ -3367,8 +3355,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
         faceZoneFlip_.clear();
         faceZoneFlip_.resize(0);
 
-        cellZone_.clear();
-        cellZone_.setSize(0);
+        cellZone_.clearStorage();
     }
 
     // Patch point renumbering
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.C
index aad79a3bcfdbb0ae5fa27e1dca92bb54cb466dda..d5f3ef05f294d64459539bf79cb151f22bef5dbc 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.C
@@ -352,6 +352,96 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                             << exit(FatalIOError);
                     }
                 }
+                else if
+                (
+                    firstToken.isWord()
+                 && firstToken.wordToken() == "uniform"
+                )
+                {
+                    token fieldToken(is);
+
+                    if (!fieldToken.isPunctuation())
+                    {
+                        scalarFields_.insert
+                        (
+                            iter().keyword(),
+                            new scalarField
+                            (
+                                this->size(),
+                                fieldToken.scalarToken()
+                            )
+                        );
+                    }
+                    else
+                    {
+                        // Read as scalarList.
+                        is.putBack(fieldToken);
+
+                        scalarList l(is);
+
+                        if (l.size() == vector::nComponents)
+                        {
+                            vector vs(l[0], l[1], l[2]);
+
+                            vectorFields_.insert
+                            (
+                                iter().keyword(),
+                                new vectorField(this->size(), vs)
+                            );
+                        }
+                        else if (l.size() == sphericalTensor::nComponents)
+                        {
+                            sphericalTensor vs(l[0]);
+
+                            sphericalTensorFields_.insert
+                            (
+                                iter().keyword(),
+                                new sphericalTensorField(this->size(), vs)
+                            );
+                        }
+                        else if (l.size() == symmTensor::nComponents)
+                        {
+                            symmTensor vs(l[0], l[1], l[2], l[3], l[4], l[5]);
+
+                            symmTensorFields_.insert
+                            (
+                                iter().keyword(),
+                                new symmTensorField(this->size(), vs)
+                            );
+                        }
+                        else if (l.size() == tensor::nComponents)
+                        {
+                            tensor vs
+                            (
+                                l[0], l[1], l[2],
+                                l[3], l[4], l[5],
+                                l[6], l[7], l[8]
+                            );
+
+                            tensorFields_.insert
+                            (
+                                iter().keyword(),
+                                new tensorField(this->size(), vs)
+                            );
+                        }
+                        else
+                        {
+                            FatalIOErrorIn
+                            (
+                                "genericFvPatchField<Type>::genericFvPatchField"
+                                "(const fvPatch&, const Field<Type>&, "
+                                "const dictionary&)",
+                                dict
+                            )   << "\n    unrecognised native type " << l
+                                << "\n    on patch " << this->patch().name()
+                                << " of field "
+                                << this->dimensionedInternalField().name()
+                                << " in file "
+                                << this->dimensionedInternalField().objectPath()
+                                << exit(FatalIOError);
+                        }
+                    }
+                }
             }
         }
     }
@@ -557,7 +647,7 @@ void Foam::genericFvPatchField<Type>::rmap
         HashPtrTable<scalarField>::const_iterator dptfIter =
             dptf.scalarFields_.find(iter.key());
 
-        if (dptfIter != scalarFields_.end())
+        if (dptfIter != dptf.scalarFields_.end())
         {
             iter()->rmap(*dptfIter(), addr);
         }
@@ -573,7 +663,7 @@ void Foam::genericFvPatchField<Type>::rmap
         HashPtrTable<vectorField>::const_iterator dptfIter =
             dptf.vectorFields_.find(iter.key());
 
-        if (dptfIter != vectorFields_.end())
+        if (dptfIter != dptf.vectorFields_.end())
         {
             iter()->rmap(*dptfIter(), addr);
         }
@@ -590,7 +680,7 @@ void Foam::genericFvPatchField<Type>::rmap
         HashPtrTable<sphericalTensorField>::const_iterator dptfIter =
             dptf.sphericalTensorFields_.find(iter.key());
 
-        if (dptfIter != sphericalTensorFields_.end())
+        if (dptfIter != dptf.sphericalTensorFields_.end())
         {
             iter()->rmap(*dptfIter(), addr);
         }
@@ -607,7 +697,7 @@ void Foam::genericFvPatchField<Type>::rmap
         HashPtrTable<symmTensorField>::const_iterator dptfIter =
             dptf.symmTensorFields_.find(iter.key());
 
-        if (dptfIter != symmTensorFields_.end())
+        if (dptfIter != dptf.symmTensorFields_.end())
         {
             iter()->rmap(*dptfIter(), addr);
         }
@@ -623,7 +713,7 @@ void Foam::genericFvPatchField<Type>::rmap
         HashPtrTable<tensorField>::const_iterator dptfIter =
             dptf.tensorFields_.find(iter.key());
 
-        if (dptfIter != tensorFields_.end())
+        if (dptfIter != dptf.tensorFields_.end())
         {
             iter()->rmap(*dptfIter(), addr);
         }