diff --git a/applications/Allwmake b/applications/Allwmake
index 48e66941d301219c4d5d73f1ce9e8b3c584602de..9b8bf7d803aabcdef43b55746b493625d8b67ff3 100755
--- a/applications/Allwmake
+++ b/applications/Allwmake
@@ -10,7 +10,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
 
 set -x
 
-wmake all solvers
 wmake all utilities
+wmake all solvers
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H
index 27ddd2454486ad7b97faa5b9cbdc4a741005c664..10855d9cc60863753b7a126f010e7d341a6c6539 100644
--- a/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H
+++ b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H
@@ -11,7 +11,7 @@ forAll(patches, patchi)
 {
     const fvPatch& currPatch = patches[patchi];
 
-    if (isType<wallFvPatch>(currPatch))
+    if (isA<wallFvPatch>(currPatch))
     {
         const vectorField nf = currPatch.nf();
 
diff --git a/applications/test/fileName/fileNameTest.C b/applications/test/fileName/fileNameTest.C
index 81ebd5c255bd4dc1839b2d8200886b4b14d14e4f..3a2a134c80d316bd4418a249a8fc6c49463533f9 100644
--- a/applications/test/fileName/fileNameTest.C
+++ b/applications/test/fileName/fileNameTest.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ int main()
         word name;
 
         fileName path(SubList<word>(wrdList, wrdList.size()-start, start));
-        fileName path2 = "." / path;
+        fileName path2 = "."/path;
 
         IOobject::fileNameComponents
         (
diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
index f452a9f083b3f7449a45bf52575871d71cf460b8..6cbe8aac272d42eefc104880d0cc9bbecda636e5 100644
--- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
+++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
@@ -91,23 +91,20 @@ cspace                ","{space}
 
 alpha                 [_A-Za-z]
 digit                 [0-9]
-dec_digit             [0-9]
-octal_digit           [0-7]
-hex_digit             [0-9a-fA-F]
 
 identifier            {alpha}({alpha}|{digit})*
-integer               {dec_digit}+
-label                 [1-9]{dec_digit}*
+integer               {digit}+
+label                 [1-9]{digit}*
 
 exponent_part         [eE][-+]?{digit}+
 fractional_constant   [-+]?(({digit}*"."{digit}+)|({digit}+"."?))
 
-double                (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
+floatNum              (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
 
-x                     {double}
-y                     {double}
-z                     {double}
-value                 {double}
+x                     {floatNum}
+y                     {floatNum}
+z                     {floatNum}
+value                 {floatNum}
 
 node                  ^{space}"N"{cspace}
 element               ^{space}"EN"{cspace}
diff --git a/applications/utilities/mesh/conversion/foamToStarMesh/Make/options b/applications/utilities/mesh/conversion/foamToStarMesh/Make/options
index 15672901703919f27df1928dd6c4aa1b7d5f879b..e3af2fe661b0e1a9cc1f77fbe4b08a9923d2bd35 100644
--- a/applications/utilities/mesh/conversion/foamToStarMesh/Make/options
+++ b/applications/utilities/mesh/conversion/foamToStarMesh/Make/options
@@ -1,6 +1,7 @@
 EXE_INC = \
     -I$(LIB_SRC)/meshTools/lnInclude \
-    -I$(LIB_SRC)/conversion/lnInclude
+    -I$(LIB_SRC)/conversion/lnInclude \
+    -I$(LIB_SRC)/fileFormats/lnInclude
 
 EXE_LIBS = \
     -lconversion
diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
index 36be409753d3eb00afba9e1757615cc2e6cf6f19..6a4447e677900d27c06a968c46e41eb733e895fe 100644
--- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
+++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
@@ -95,24 +95,14 @@ int yyFlexLexer::yywrap()
 one_space             [ \t\f\r]
 space                 {one_space}*
 some_space            {one_space}+
-cspace                ","{space}
 spaceNl               ({space}|\n)*
 
 alpha                 [_[:alpha:]]
 digit                 [[:digit:]]
-dec_digit             [[:digit:]]
-octal_digit           [0-7]
-hex_digit             [[:xdigit:]]
-
-lbrac                      "("
-rbrac                      ")"
-quote                      \"
-dash                       "-"
-dotColonDash               [.:-]
-
-identifier            {alpha}({alpha}|{digit})*
-integer               {dec_digit}+
-label                 [0-9]{dec_digit}*
+
+dotColonDash          [.:-]
+
+label                 [0-9]{digit}*
 zeroLabel             {digit}*
 
 word                  ({alpha}|{digit}|{dotColonDash})*
@@ -120,14 +110,14 @@ word                  ({alpha}|{digit}|{dotColonDash})*
 exponent_part         [eE][-+]?{digit}+
 fractional_constant   [-+]?(({digit}*"."{digit}+)|({digit}+"."?))
 
-double                ((({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))|0)
+floatNum              ((({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))|0)
+
+x                     {floatNum}
+y                     {floatNum}
+z                     {floatNum}
 
-x                     {double}
-y                     {double}
-z                     {double}
-scalar                {double}
 labelListElement      {space}{zeroLabel}
-scalarListElement     {space}{double}
+scalarListElement     {space}{floatNum}
 labelList             ({labelListElement}+{space})
 scalarList            ({scalarListElement}+{space})
 
diff --git a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C
index 0ccb7a686202a727242ab81ba062d4a4a0db30ba..03832883cc0a8fd02e036f8b6a179d8e0e8be49a 100644
--- a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C
+++ b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C
@@ -358,9 +358,22 @@ int main(int argc, char *argv[])
     timeSelector::addOptions(true, false);
 
     argList::validArgs.append("feature angle[0-180]");
-    argList::addBoolOption("splitAllFaces");
-    argList::addBoolOption("concaveMultiCells");
-    argList::addBoolOption("doNotPreserveFaceZones");
+    argList::addBoolOption
+    (
+        "splitAllFaces",
+        "have multiple faces inbetween cells"
+    );
+    argList::addBoolOption
+    (
+        "concaveMultiCells",
+        "split cells on concave boundary edges into multiple cells"
+    );
+    argList::addBoolOption
+    (
+        "doNotPreserveFaceZones",
+        "disable the default behaviour of preserving faceZones by having"
+        " multiple faces inbetween cells"
+    );
 
 #   include "setRootCase.H"
 #   include "createTime.H"
diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C b/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C
index ba13659a183fb139ff5a6587a95674714d577282..ad4bffa3b7bde23a095413344c263e84b206c52f 100644
--- a/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C
+++ b/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C
@@ -884,7 +884,7 @@ void starMesh::createCoupleMatches()
                 << "newSlaveEdges: " << newSlaveEdges << endl;
 #           endif
 
-            edge startEdge;
+            edge startEdge(-1, -1);
 
             // Remember where the start edge was found:
             // 0 for not found
diff --git a/applications/utilities/mesh/conversion/star4ToFoam/Make/options b/applications/utilities/mesh/conversion/star4ToFoam/Make/options
index 15672901703919f27df1928dd6c4aa1b7d5f879b..e3af2fe661b0e1a9cc1f77fbe4b08a9923d2bd35 100644
--- a/applications/utilities/mesh/conversion/star4ToFoam/Make/options
+++ b/applications/utilities/mesh/conversion/star4ToFoam/Make/options
@@ -1,6 +1,7 @@
 EXE_INC = \
     -I$(LIB_SRC)/meshTools/lnInclude \
-    -I$(LIB_SRC)/conversion/lnInclude
+    -I$(LIB_SRC)/conversion/lnInclude \
+    -I$(LIB_SRC)/fileFormats/lnInclude
 
 EXE_LIBS = \
     -lconversion
diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake
index 1e116a3315fd9c00a0ae3d6d1bbf863a0b02fed5..ef0a57395196e4272fa337b27a8445ccde74a62d 100755
--- a/applications/utilities/mesh/manipulation/setSet/Allwmake
+++ b/applications/utilities/mesh/manipulation/setSet/Allwmake
@@ -1,15 +1,17 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
-READLINE=0
 if [ -f /usr/include/readline/readline.h ]
 then
     echo "Found readline/readline.h  --  enabling readline support."
-    READLINE=1
+    export READLINE=1
     export READLINELINK="-lreadline -lncurses"
-    break
+else
+    # no readline/readline.h  --  disabling readline support
+    export READLINE=0
+    unset READLINELINK
 fi
-export READLINE
+
 wmake
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/mesh/manipulation/setSet/Make/options b/applications/utilities/mesh/manipulation/setSet/Make/options
index dcb1b5910c2a4722f691f46ab49b03026ae18eeb..d56c2b57f7181281636c4db63cae61029ae1b874 100644
--- a/applications/utilities/mesh/manipulation/setSet/Make/options
+++ b/applications/utilities/mesh/manipulation/setSet/Make/options
@@ -1,5 +1,7 @@
+/* NB: trailing zero after define improves robustness */
+
 EXE_INC = \
-    -DREADLINE=$(READLINE) \
+    -DREADLINE=$(READLINE)0 \
     -I$(LIB_SRC)/meshTools/lnInclude
 
 EXE_LIBS = \
diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
index 2bc95be4e73deec99c19f971080eb130ffc55095..0333eca07909b884d21984c872a7b14b0eb7af13 100644
--- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
+++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
@@ -440,7 +440,7 @@ int main(int argc, char *argv[])
         (
             databases[procI].findInstance
             (
-                regionDir / polyMesh::meshSubDir,
+                regionDir/polyMesh::meshSubDir,
                 "points"
             )
         );
@@ -469,10 +469,10 @@ int main(int argc, char *argv[])
                 "points",
                 databases[procI].findInstance
                 (
-                    regionDir / polyMesh::meshSubDir,
+                    regionDir/polyMesh::meshSubDir,
                     "points"
                 ),
-                regionDir / polyMesh::meshSubDir,
+                regionDir/polyMesh::meshSubDir,
                 databases[procI],
                 IOobject::MUST_READ,
                 IOobject::NO_WRITE,
diff --git a/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options b/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options
index 45ab666e2496296d016b1c0fd4e64df9ecf0f4a0..8f8010fff73bcdf7fda382aa425bc3b1a4da8a2f 100644
--- a/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options
+++ b/applications/utilities/parallelProcessing/redistributeMeshPar/Make/options
@@ -8,5 +8,4 @@ EXE_LIBS = \
     -lfiniteVolume \
     -ldecompositionMethods \
     -lmeshTools \
-    -ldynamicMesh \
-    -L$(FOAM_MPI_LIBBIN) -lparMetisDecompositionMethod
+    -ldynamicMesh
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
index 18bccb0398ca89d61eed1e7a9166ee37c47b95f8..41aa21e674ff37b8a4320e8ea12bd656abc60c0e 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
@@ -82,6 +82,19 @@
       </Documentation>
     </IntVectorProperty>
 
+    <!-- Use VTK Polyhedron check-box -->
+    <IntVectorProperty
+      name="UseVTKPolyhedron"
+      command="SetUseVTKPolyhedron"
+      number_of_elements="1"
+      default_values="0"
+      animateable="0">
+      <BooleanDomain name="bool"/>
+      <Documentation>
+        Use vtkPolyhedron instead of decomposing polyhedra
+      </Documentation>
+    </IntVectorProperty>
+
     <!-- Include Sets check-box -->
     <IntVectorProperty
       name="UiIncludeSets"
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx
index 7d421cbedd0dc863e371e5c81ee08376580f5d00..7755a75d0f2c8b95a37b25d6d95b794a8e25f205 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2009-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2010-2009 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h
index 49a3e11edad26ca2b82e1aea9a260c7a75df569d..71f9faafdd68504b937d711d3ed4c80f0f14cb1e 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2009-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2010-2009 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
index 4e5806b99c6137fe7ca2b2dbbe411a362746d47b..35f0ec983a6f1af34fd765a7f11da7582e6d68ae 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,6 +83,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
 
     SkipZeroTime = 0;
     ExtrapolatePatches = 0;
+    UseVTKPolyhedron = 0;
     IncludeSets = 0;
     IncludeZones = 0;
     ShowPatchNames = 0;
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
index f3ac8a5d92958d69808af84d9435852c8e5efda9..a9db1d5a1594009066448ef84f565e9988b6cae4 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,6 +102,11 @@ public:
     vtkSetMacro(ExtrapolatePatches, int);
     vtkGetMacro(ExtrapolatePatches, int);
 
+    // Description:
+    // FOAM use vtkPolyhedron instead of decomposing polyhedra
+    vtkSetMacro(UseVTKPolyhedron, int);
+    vtkGetMacro(UseVTKPolyhedron, int);
+
     // Description:
     // FOAM read sets control
     virtual void SetIncludeSets(int);
@@ -217,6 +222,7 @@ private:
     int SkipZeroTime;
 
     int ExtrapolatePatches;
+    int UseVTKPolyhedron;
     int IncludeSets;
     int IncludeZones;
     int ShowPatchNames;
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H
index 6e90e75db006f1f4a2cd045ca2e7b26767c650d1..c84f7a4d717464f2382ce32309d865ebb50acf79 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMTupleRemap.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMTupleRemap.H
new file mode 100644
index 0000000000000000000000000000000000000000..d6d511a49f99dbd3033d3ca1b6b2ab4c7e3b23b5
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMTupleRemap.H
@@ -0,0 +1,72 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2010-2010 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+InClass
+    vtkPV3Foam
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef vtkOpenFOAMTupleRemap_H
+#define vtkOpenFOAMTupleRemap_H
+
+// OpenFOAM includes
+#include "StaticAssert.H"
+#include "Swap.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+template<class Type>
+inline void vtkOpenFOAMTupleRemap(float vec[]);
+
+
+// a symmTensor specialization to remap OpenFOAM -> ParaView naming order
+// Qt/Core/pqScalarBarRepresentation.cxx defines this order
+//     { "XX", "YY", "ZZ", "XY", "YZ", "XZ" }
+// in pqScalarBarRepresentation::getDefaultComponentLabel()
+// whereas OpenFOAM uses this order
+//     { XX, XY, XZ, YY, YZ, ZZ }
+//
+// for extra safety, assert that symmTensor indeed has 6 components
+StaticAssert(Foam::symmTensor::nComponents == 6);
+
+
+// Template specialization for symmTensor
+template<>
+inline void vtkOpenFOAMTupleRemap<Foam::symmTensor>(float vec[])
+{
+    Foam::Swap(vec[1], vec[3]);   // swap XY <-> YY
+    Foam::Swap(vec[2], vec[5]);   // swap XZ <-> ZZ
+}
+
+
+template<class Type>
+inline void vtkOpenFOAMTupleRemap(float vec[])
+{}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
index 41933d5ebfec7834e4596c962deb875dc80d1284..a78f380bcbc76acff545dce433e66b90366a2082 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
index 6037e78781f193928365cfcae265603383f2d776..577edfc31053b5af6206a8fdf0565b17d8395b15 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H
index b945d6c6a063a476e4f346a444dfbf34b6fb6c8d..3a4ea5673931a10383d08108be212a8c5b61c129 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H
index 68f551ae5a3979f16e7ddca13ce408a3e0950907..79c8b1aa97e37e36b4b84bf4484f1f737cf2343c 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,6 +36,8 @@ InClass
 #include "vtkMultiBlockDataSet.h"
 #include "vtkPolyData.h"
 
+#include "vtkOpenFOAMTupleRemap.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
@@ -80,7 +82,7 @@ void Foam::vtkPV3Foam::convertFaceField
         {
             Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]);
 
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
@@ -88,11 +90,12 @@ void Foam::vtkPV3Foam::convertFaceField
         else
         {
             const Type& t = tf[faceOwner[faceNo]];
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
         }
+        vtkOpenFOAMTupleRemap<Type>(vec);
 
         cellData->InsertTuple(faceI, vec);
     }
@@ -152,7 +155,7 @@ void Foam::vtkPV3Foam::convertFaceField
         {
             Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]);
 
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
@@ -160,11 +163,12 @@ void Foam::vtkPV3Foam::convertFaceField
         else
         {
             const Type& t = tf[faceOwner[faceNo]];
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
         }
+        vtkOpenFOAMTupleRemap<Type>(vec);
 
         cellData->InsertTuple(faceI, vec);
         ++faceI;
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C
index 936d1aed26d0a33b53de9c0c166338c19a300fbd..02319d9f1178162e0389b55e8ee77d08d84b580e 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H
index 9bd18ea3533b7a256bce796e03550504d7612dc9..c3013022e82f0843c0b927c52c7d5c3405c46edd 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,6 +32,8 @@ InClass
 
 #include "Cloud.H"
 
+#include "vtkOpenFOAMTupleRemap.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
@@ -86,10 +88,11 @@ void Foam::vtkPV3Foam::convertLagrangianField
     forAll(tf, i)
     {
         const Type& t = tf[i];
-        for (direction d=0; d<nComp; d++)
+        for (direction d=0; d<nComp; ++d)
         {
             vec[d] = component(t, d);
         }
+        vtkOpenFOAMTupleRemap<Type>(vec);
 
         pointData->InsertTuple(i, vec);
     }
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C
index cc78346b40443e9156c68a36c6f9b90727061e0a..14f85ad656b4c0b5cb9f2fb8bc0797befc538771 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C
index 25d31b64dcfbbc44ad67f3863a9a4e75da4ed56d..187daa46131308b9ff6fb350b2f20f215c2d66c8 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C
index ace25f527fafd2627a45379ee0d7b957abec9f7c..3039fd2552f8f4240d4adef0ace6f027d1ae2d0e 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C
index 431df1f9c5fefad23c4f7a781e59eb23aae2fe32..ab2e6fdc023052dbef095cfe70099fc54db4edd2 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C
index b39dfd453fed58af52ff4c64e5bcaa9f37719a46..8cba50347a8511704b2d0d8d8421b47941fb3811 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,6 +25,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "vtkPV3Foam.H"
+#include "vtkPV3FoamReader.h"
 
 // Foam includes
 #include "fvMesh.H"
@@ -33,6 +34,7 @@ License
 
 // VTK includes
 #include "vtkCellArray.h"
+#include "vtkIdTypeArray.h"
 #include "vtkUnstructuredGrid.h"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
@@ -79,35 +81,40 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
     {
         Info<< "... scanning" << endl;
     }
-    forAll(cellShapes, cellI)
+
+    // count number of cells to decompose
+    if (!reader_->GetUseVTKPolyhedron())
     {
-        const cellModel& model = cellShapes[cellI].model();
-
-        if
-        (
-            model != hex
-         && model != wedge
-         && model != prism
-         && model != pyr
-         && model != tet
-         && model != tetWedge
-        )
+        forAll(cellShapes, cellI)
         {
-            const cell& cFaces = mesh.cells()[cellI];
+            const cellModel& model = cellShapes[cellI].model();
 
-            forAll(cFaces, cFaceI)
+            if
+            (
+                model != hex
+             && model != wedge
+             && model != prism
+             && model != pyr
+             && model != tet
+             && model != tetWedge
+            )
             {
-                const face& f = mesh.faces()[cFaces[cFaceI]];
+                const cell& cFaces = mesh.cells()[cellI];
 
-                label nFacePoints = f.size();
+                forAll(cFaces, cFaceI)
+                {
+                    const face& f = mesh.faces()[cFaces[cFaceI]];
 
-                label nQuads = (nFacePoints - 2)/2;
-                label nTris = (nFacePoints - 2)%2;
-                nAddCells += nQuads + nTris;
-            }
+                    label nFacePoints = f.size();
+
+                    label nQuads = (nFacePoints - 2)/2;
+                    label nTris = (nFacePoints - 2)%2;
+                    nAddCells += nQuads + nTris;
+                }
 
-            nAddCells--;
-            nAddPoints++;
+                nAddCells--;
+                nAddPoints++;
+            }
         }
     }
 
@@ -155,7 +162,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
     // Set counters for additional points and additional cells
     label addPointI = 0, addCellI = 0;
 
-    // Create storage for points - needed for mapping from Foam to VTK
+    // Create storage for points - needed for mapping from OpenFOAM to VTK
     // data types - max 'order' = hex = 8 points
     vtkIdType nodeIds[8];
 
@@ -194,10 +201,15 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
         }
         else if (cellModel == prism)
         {
-            for (int j = 0; j < 6; j++)
-            {
-                nodeIds[j] = cellShape[j];
-            }
+            // VTK has a different node order - their triangles point outwards!
+
+            nodeIds[0] = cellShape[0];
+            nodeIds[1] = cellShape[2];
+            nodeIds[2] = cellShape[1];
+            nodeIds[3] = cellShape[3];
+            nodeIds[4] = cellShape[5];
+            nodeIds[5] = cellShape[4];
+
             vtkmesh->InsertNextCell
             (
                 VTK_WEDGE,
@@ -256,6 +268,80 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
                 nodeIds
             );
         }
+        else if (reader_->GetUseVTKPolyhedron())
+        {
+            // Polyhedral cell - use VTK_POLYHEDRON
+            const labelList& cFaces = mesh.cells()[cellI];
+
+            vtkIdType nFaces = cFaces.size();
+            vtkIdType nodeCount = 0;
+            vtkIdType nLabels = nFaces;
+
+            // count size for face stream
+            forAll(cFaces, cFaceI)
+            {
+                const face& f = mesh.faces()[cFaces[cFaceI]];
+                nLabels += f.size();
+            }
+
+            // unique node ids - approximately equal to the number of point ids
+            DynamicList<vtkIdType> uniqueNodeIds(nLabels-nFaces);
+
+            // zero-based index into uniqueNodeIds
+            DynamicList<vtkIdType> faceLabels(nLabels);
+
+            // localized point id within the cell
+            Map<label> mapLocalId(2*nLabels);
+
+            // establish the unique point ids,
+            // record the local mapping ids,
+            // create new face list
+            forAll(cFaces, cFaceI)
+            {
+                const face& f = mesh.faces()[cFaces[cFaceI]];
+                const label nFacePoints = f.size();
+
+                // number of labels for this face
+                faceLabels.append(nFacePoints);
+
+                forAll(f, fp)
+                {
+                    const label nodeId = f[fp];
+
+                    if (mapLocalId.insert(nodeId, nodeCount))
+                    {
+                        // insertion was successful (node Id was unique)
+                        uniqueNodeIds.append(nodeId);
+                        // map orig vertex id -> localized point label
+                        faceLabels.append(nodeCount);
+                        ++nodeCount;
+                    }
+                    else
+                    {
+                        // map orig vertex id -> localized point label
+                        faceLabels.append(mapLocalId[nodeId]);
+                    }
+                }
+            }
+
+#ifdef HAS_VTK_POLYHEDRON
+            vtkmesh->InsertNextCell
+            (
+                VTK_POLYHEDRON,
+                nodeCount,
+                uniqueNodeIds.data(),
+                faceCount,
+                faceLabels.data()
+            );
+#else
+            vtkmesh->InsertNextCell
+            (
+                VTK_CONVEX_POINT_SET,
+                nodeCount,
+                uniqueNodeIds.data()
+            );
+#endif
+        }
         else
         {
             // Polyhedral cell. Decompose into tets + prisms.
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
index 9b8bcb956d972328a7d1f7048cafdd94a580fa08..97b358f197d9e7bebcb78877a1b028d3ac2e8c26 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H
index 7e473a7c74950b842831cc054784262970a2390c..6276a73fa842e1a70a23aac2089a345f93f618cc 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,6 +37,8 @@ InClass
 #include "vtkPointData.h"
 #include "vtkPolyData.h"
 
+#include "vtkOpenFOAMTupleRemap.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
@@ -61,10 +63,12 @@ void Foam::vtkPV3Foam::convertPatchField
     forAll(ptf, i)
     {
         const Type& t = ptf[i];
-        for (direction d=0; d<nComp; d++)
+        for (direction d=0; d<nComp; ++d)
         {
             vec[d] = component(t, d);
         }
+        vtkOpenFOAMTupleRemap<Type>(vec);
+
         cellData->InsertTuple(i, vec);
     }
 
@@ -101,10 +105,11 @@ void Foam::vtkPV3Foam::convertPatchPointField
     forAll(pptf, i)
     {
         const Type& t = pptf[i];
-        for (direction d=0; d<nComp; d++)
+        for (direction d=0; d<nComp; ++d)
         {
             vec[d] = component(t, d);
         }
+        vtkOpenFOAMTupleRemap<Type>(vec);
 
         pointData->InsertTuple(i, vec);
     }
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H
index 697044bc6b9b96f881fc610327ed0c18bee4130c..1a4986682dbf99446ccf5bfc6aa5876d8a1b4187 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,6 +33,8 @@ InClass
 // Foam includes
 #include "interpolatePointToCell.H"
 
+#include "vtkOpenFOAMTupleRemap.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
@@ -210,10 +212,12 @@ void Foam::vtkPV3Foam::convertPointField
         forAll(pointMap, i)
         {
             const Type& t = ptf[pointMap[i]];
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
+            vtkOpenFOAMTupleRemap<Type>(vec);
+
             pointData->InsertTuple(i, vec);
         }
     }
@@ -222,10 +226,12 @@ void Foam::vtkPV3Foam::convertPointField
         forAll(ptf, i)
         {
             const Type& t = ptf[i];
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
+            vtkOpenFOAMTupleRemap<Type>(vec);
+
             pointData->InsertTuple(i, vec);
         }
     }
@@ -238,10 +244,12 @@ void Foam::vtkPV3Foam::convertPointField
         forAll(addPointCellLabels, apI)
         {
             const Type& t = tf[addPointCellLabels[apI]];
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
+            vtkOpenFOAMTupleRemap<Type>(vec);
+
             pointData->InsertTuple(i++, vec);
         }
     }
@@ -250,10 +258,12 @@ void Foam::vtkPV3Foam::convertPointField
         forAll(addPointCellLabels, apI)
         {
             Type t = interpolatePointToCell(ptf, addPointCellLabels[apI]);
-            for (direction d=0; d<nComp; d++)
+            for (direction d=0; d<nComp; ++d)
             {
                 vec[d] = component(t, d);
             }
+            vtkOpenFOAMTupleRemap<Type>(vec);
+
             pointData->InsertTuple(i++, vec);
         }
     }
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C
index 36086551ccf115d05eb309121e90a612279c5fbc..f83be3ee1548292c093168d8917580505a72f5e0 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H
index 4d35525efe56f52e83c8c6e716c0a9b5abd14ec1..a32ba585ad53494f7c8360daff8b3e1325c2b3e1 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C
index 74a57fb5597a987c79e5323d2ed821ac291cc15d..b1e1990cf16010319af90508780b819e59b381db 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
index e28e3940a8c08e600ba664bdfa64d99d5a0bdd76..3bcfefdb2ab3626326bc4cd215170641fa964b9b 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,6 +39,8 @@ InClass
 #include "vtkPV3FoamFaceField.H"
 #include "vtkPV3FoamPatchField.H"
 
+#include "vtkOpenFOAMTupleRemap.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
@@ -350,10 +352,12 @@ void Foam::vtkPV3Foam::convertVolField
     forAll(superCells, i)
     {
         const Type& t = tf[superCells[i]];
-        for (direction d=0; d<nComp; d++)
+        for (direction d=0; d<nComp; ++d)
         {
             vec[d] = component(t, d);
         }
+        vtkOpenFOAMTupleRemap<Type>(vec);
+
         celldata->InsertTuple(i, vec);
     }
 
diff --git a/bin/foamClearPolyMesh b/bin/foamClearPolyMesh
index 40689539abc6823c75538283989845630640953a..9f6b28f6517ad5dfd3cb59a2bca1059745014604 100755
--- a/bin/foamClearPolyMesh
+++ b/bin/foamClearPolyMesh
@@ -114,6 +114,7 @@ fi
 
 #
 # remove files (mesh itself, modifiers, snappyHexMesh ones) and subdirectories
+# also remove .gz versions of the same files
 #
 echo "Clearing ${caseDir:-.}/$meshDir" 1>&2
 
@@ -134,25 +135,9 @@ for i in \
     pointLevel \
     refinementHistory \
     surfaceIndex \
-    points.gz \
-    faces.gz \
-    owner.gz \
-    neighbour.gz \
-    cells.gz \
-    boundary.gz \
-    pointZones.gz \
-    faceZones.gz \
-    cellZones.gz \
-    meshModifiers.gz \
-    parallelData.gz \
-    sets.gz \
-    cellLevel.gz \
-    pointLevel.gz \
-    refinementHistory.gz \
-    surfaceIndex.gz \
 ;
 do
-    rm -rf $meshDir/$i
+    rm -rf $meshDir/$i $meshDir/$i.gz
 done
 
 #------------------------------------------------------------------------------
diff --git a/bin/paraFoam b/bin/paraFoam
index 623030e16772342a1dc5b607c6facc11c68962bf..acff1d1139b07bc0bca397d9779f166e3ba2183d 100755
--- a/bin/paraFoam
+++ b/bin/paraFoam
@@ -44,6 +44,7 @@ options:
   -case <dir>       specify alternative case directory, default is the cwd
   -region <name>    specify alternative mesh region
   -touch            only create the file  (eg, .blockMesh, .OpenFOAM, etc)
+  -touchAll         create .blockMesh, .OpenFOAM files (and for all regions)
   -help             print the usage
 
 * start paraview $ParaView_VERSION with the OpenFOAM libraries
@@ -52,7 +53,7 @@ USAGE
     exit 1
 }
 
-unset regionName touchOnly
+unset regionName touchOpt
 
 # reader extension
 extension=OpenFOAM
@@ -83,7 +84,11 @@ do
         shift 2
         ;;
     -touch)
-        touchOnly=true
+        touchOpt=true
+        shift
+        ;;
+    -touchAll)
+        touchOpt=all
         shift
         ;;
     *)
@@ -103,12 +108,35 @@ then
     fvControls="$fvControls/$regionName"
 fi
 
-if [ -n "$touchOnly" ]
-then
+case "${touchOpt:-false}" in
+all)
+    extension=OpenFOAM
+    if [ -f constant/polyMesh/blockMeshDict ]
+    then
+        touch "$caseName.blockMesh"
+        echo "created '$caseName.blockMesh'"
+    fi
+    touch "$caseName.$extension"
+    echo "created '$caseName.$extension'"
+    # discover probable regions
+    for region in constant/*
+    do
+        if [ -d $region -a -d $region/polyMesh ]
+        then
+            regionName=${region##*/}
+            touch "$caseName{$regionName}.$extension"
+            echo "created '$caseName{$regionName}.$extension'"
+        fi
+    done
+    exit 0
+    ;;
+true)
     touch "$caseFile"
     echo "created '$caseFile'"
     exit 0
-fi
+    ;;
+esac
+
 
 # parent directory for normal or parallel results
 case "$caseName" in
diff --git a/etc/aliases.csh b/etc/aliases.csh
index fd7f183a368a39d2d60c7ba5d758bbc1af03a0f5..892bfbaabdbd90e3ec07e555af461a2ce5deb5ce 100644
--- a/etc/aliases.csh
+++ b/etc/aliases.csh
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+#   \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -56,6 +56,11 @@ alias app 'cd $FOAM_APP'
 alias util 'cd $FOAM_UTILITIES'
 alias sol 'cd $FOAM_SOLVERS'
 alias tut 'cd $FOAM_TUTORIALS'
+
+alias foamApps 'cd $FOAM_APP'
+alias foamSol 'cd $FOAM_SOLVERS'
+alias foamTuts 'cd $FOAM_TUTORIALS'
+alias foamUtils 'cd $FOAM_UTILITIES'
 alias foam3rdParty 'cd $WM_THIRD_PARTY_DIR'
 
 # -----------------------------------------------------------------------------
diff --git a/etc/aliases.sh b/etc/aliases.sh
index b193802246982261a6a18ade4442d2ed3cd5f036..9135fcad0f3d3a2ca6da3cad40e02885ff40e02e 100644
--- a/etc/aliases.sh
+++ b/etc/aliases.sh
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+#   \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -56,6 +56,11 @@ alias app='cd $FOAM_APP'
 alias util='cd $FOAM_UTILITIES'
 alias sol='cd $FOAM_SOLVERS'
 alias tut='cd $FOAM_TUTORIALS'
+
+alias foamApps='cd $FOAM_APP'
+alias foamSol='cd $FOAM_SOLVERS'
+alias foamTuts='cd $FOAM_TUTORIALS'
+alias foamUtils='cd $FOAM_UTILITIES'
 alias foam3rdParty='cd $WM_THIRD_PARTY_DIR'
 
 # -----------------------------------------------------------------------------
diff --git a/etc/apps/ensight/bashrc b/etc/apps/ensight/bashrc
index 100f65ae5db4efe53a673d032fddef3d74bc3241..f47c0f6ca39023b0f8a8b00d05a5ec3898d9c35e 100644
--- a/etc/apps/ensight/bashrc
+++ b/etc/apps/ensight/bashrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+#   \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -26,7 +26,7 @@
 #     ensight/bashrc
 #
 # Description
-#     Setup file for Ensight 8.?
+#     Setup file for Ensight
 #     Sourced from OpenFOAM-*/etc/bashrc
 #
 #------------------------------------------------------------------------------
@@ -40,7 +40,7 @@ fi
 if [ -r $CEI_HOME ]
 then
 
-    # special treatment for 32bit FOAM and 64bit Ensight
+    # special treatment for 32bit OpenFOAM and 64bit Ensight
     if [ "$WM_ARCH" = linux -a `uname -m` = x86_64 ]
     then
         export CEI_ARCH=linux_2.6_32
@@ -52,8 +52,8 @@ then
         export PATH=$CEI_HOME/bin:$PATH
     fi
 
-    export ENSIGHT8_INPUT=dummy
-    export ENSIGHT8_READER=$FOAM_LIBBIN
+    export ENSIGHT9_INPUT=dummy
+    export ENSIGHT9_READER=$FOAM_LIBBIN
 else
     unset CEI_HOME
 fi
diff --git a/etc/apps/ensight/cshrc b/etc/apps/ensight/cshrc
index ae7f3d6095763ddbbfd56fdae6023007d67115c2..0126a8ea500e969ba42f80b422308347e5bd94af 100644
--- a/etc/apps/ensight/cshrc
+++ b/etc/apps/ensight/cshrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+#   \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -26,7 +26,7 @@
 #     ensight/cshrc
 #
 # Description
-#     Setup file for Ensight 8.?
+#     Setup file for Ensight
 #     Sourced from OpenFOAM-*/etc/cshrc
 #
 #------------------------------------------------------------------------------
@@ -38,15 +38,16 @@ endif
 
 if ( -r $CEI_HOME ) then
 
-    # special treatment for 32bit FOAM and 64bit Ensight
-    if ($WM_ARCH == linux) then
-        setenv CEI_ARCH linux_linux_2.6_32
+    # special treatment for 32bit OpenFOAM and 64bit Ensight
+    if ($WM_ARCH == linux && `uname -m` == x86_64) then
+       setenv CEI_ARCH linux_2.6_32
     endif
 
-    set path=($path $CEI_HOME/bin)
+    # add to path
+    set path=($CEI_HOME/bin $path)
 
-    setenv ENSIGHT8_INPUT dummy
-    setenv ENSIGHT8_READER $FOAM_LIBBIN
+    setenv ENSIGHT9_INPUT dummy
+    setenv ENSIGHT9_READER $FOAM_LIBBIN
 else
     unsetenv CEI_HOME
 endif
diff --git a/etc/settings.csh b/etc/settings.csh
index d285e07ca29d5b6603f0188b0c8e13de5b19b9e6..78fd05490f24f722d6fe4e7fb6869a35ac1faf70 100644
--- a/etc/settings.csh
+++ b/etc/settings.csh
@@ -147,6 +147,30 @@ case OPENMPI:
     unset mpi_version
     breaksw
 
+case SYSTEMOPENMPI:
+
+    # This uses the installed openmpi. It needs mpicc installed!
+
+    set mpi_version=openmpi-system
+
+    # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
+    setenv PINC `mpicc --showme:compile` 
+    setenv PLIBS `mpicc --showme:link`
+    set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
+
+    if ($?FOAM_VERBOSE && $?prompt) then
+        echo "Using system installed MPI:"
+        echo "    compile flags : $PINC"
+        echo "    link flags    : $PLIBS"
+        echo "    libmpi dir    : $libDir"
+    endif
+
+    _foamAddLib $libDir
+
+    setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
+    unset mpi_version libDir
+    breaksw
+
 case MPICH:
     set mpi_version=mpich2-1.1.1p1
     setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
diff --git a/etc/settings.sh b/etc/settings.sh
index bb0d48df0e4160bc0311bd5433efa15a883b8eeb..43fc88434663df5fee5d6c7c9f2bb19619bccdf2 100644
--- a/etc/settings.sh
+++ b/etc/settings.sh
@@ -183,6 +183,28 @@ OPENMPI)
     unset mpi_version
     ;;
 
+SYSTEMOPENMPI)
+    mpi_version=openmpi-system
+
+    # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
+    export PINC=`mpicc --showme:compile` 
+    export PLIBS=`mpicc --showme:link`
+    libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
+
+    if [ "$FOAM_VERBOSE" -a "$PS1" ]
+    then
+        echo "Using system installed MPI:"
+        echo "    compile flags : $PINC"
+        echo "    link flags    : $PLIBS"
+        echo "    libmpi dir    : $libDir"
+    fi
+
+    _foamAddLib $libDir
+
+    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
+    unset mpi_version libDir
+    ;;
+
 MPICH)
     mpi_version=mpich2-1.1.1p1
     export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
diff --git a/src/Allwmake b/src/Allwmake
index f24f2f370d518127542e64f15adbb35b8311c7f7..6822aac23b81365eee4f78a38579536b3ba182e4 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -27,14 +27,18 @@ wmake libso edgeMesh
 wmake libso surfMesh
 wmake libso triSurface
 
-# Decomposition methods needed by meshTools
-wmake libso parallel/decompositionMethods
-wmake libso parallel/metisDecomp
+# Decomposition methods needed by dummyThirdParty
+parallel/AllwmakeLnInclude
+# dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
+dummyThirdParty/Allwmake
 
 wmake libso meshTools
 wmake libso finiteVolume
 wmake libso genericPatchFields
 
+# Build the proper scotchDecomp, metisDecomp etc.
+parallel/Allwmake
+
 wmake libso sampling
 
 wmake libso dynamicMesh
diff --git a/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C b/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C
index a85e071ba5e2fc6e1bc2b2c6a4044ce18332049c..017c20d692c6d205042050eabb8ae0bae43840b5 100644
--- a/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C
+++ b/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C
@@ -466,40 +466,6 @@ void Foam::FaceCellWave<Type>::transform
 }
 
 
-// Send face info to neighbour.
-template <class Type>
-void Foam::FaceCellWave<Type>::sendPatchInfo
-(
-    const label neighbour,
-    const label nFaces,
-    const labelList& faceLabels,
-    const List<Type>& faceInfo
-) const
-{
-    OPstream toNeighbour(Pstream::blocking, neighbour);
-
-    writeFaces(nFaces, faceLabels, faceInfo, toNeighbour);
-}
-
-
-// Receive face info from neighbour
-template <class Type>
-Foam::label Foam::FaceCellWave<Type>::receivePatchInfo
-(
-    const label neighbour,
-    labelList& faceLabels,
-    List<Type>& faceInfo
-) const
-{
-    IPstream fromNeighbour(Pstream::blocking, neighbour);
-
-    label nFaces = 0;
-    readFaces(nFaces, faceLabels, faceInfo, fromNeighbour);
-
-    return nFaces;
-}
-
-
 // Offset mesh face. Used for transferring from one cyclic half to the other.
 template <class Type>
 void Foam::FaceCellWave<Type>::offset
@@ -523,6 +489,8 @@ void Foam::FaceCellWave<Type>::handleProcPatches()
 {
     // Send all
 
+    PstreamBuffers pBufs(Pstream::nonBlocking);
+
     forAll(mesh_.boundaryMesh(), patchI)
     {
         const polyPatch& patch = mesh_.boundaryMesh()[patchI];
@@ -564,16 +532,13 @@ void Foam::FaceCellWave<Type>::handleProcPatches()
                     << endl;
             }
 
-            sendPatchInfo
-            (
-                procPatch.neighbProcNo(),
-                nSendFaces,
-                sendFaces,
-                sendFacesInfo
-            );
+            UOPstream toNeighbour(procPatch.neighbProcNo(), pBufs);
+            writeFaces(nSendFaces, sendFaces, sendFacesInfo, toNeighbour);
         }
     }
 
+    pBufs.finishedSends();
+
     // Receive all
 
     forAll(mesh_.boundaryMesh(), patchI)
@@ -586,16 +551,20 @@ void Foam::FaceCellWave<Type>::handleProcPatches()
                 refCast<const processorPolyPatch>(patch);
 
             // Allocate buffers
-            label nReceiveFaces;
+            label nReceiveFaces = 0;
             labelList receiveFaces(patch.size());
             List<Type> receiveFacesInfo(patch.size());
 
-            nReceiveFaces = receivePatchInfo
-            (
-                procPatch.neighbProcNo(),
-                receiveFaces,
-                receiveFacesInfo
-            );
+            {
+                UIPstream fromNeighbour(procPatch.neighbProcNo(), pBufs);
+                readFaces
+                (
+                    nReceiveFaces,
+                    receiveFaces,
+                    receiveFacesInfo,
+                    fromNeighbour
+                );
+            }
 
             if (debug)
             {
diff --git a/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.H b/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.H
index 00c89d415bb944633c93dc11a9ea43fd9f739ecd..6bf08d8e92eab7a587c7eb3de5a3048564da4e8f 100644
--- a/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.H
+++ b/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.H
@@ -225,23 +225,6 @@ class FaceCellWave
                 List<Type>& faceInfo
             ) const;
 
-            //- Send info to neighbour
-            void sendPatchInfo
-            (
-                const label neighbour,
-                const label nFaces,
-                const labelList&,
-                const List<Type>&
-            ) const;
-
-            //- Receive info from neighbour. Returns number of faces received.
-            label receivePatchInfo
-            (
-                const label neighbour,
-                labelList&,
-                List<Type>&
-            ) const;
-
             //- Offset face labels by constant value
             static void offset
             (
diff --git a/src/OpenFOAM/global/foamDoc.H b/src/OpenFOAM/global/foamDoc.H
new file mode 100644
index 0000000000000000000000000000000000000000..82a85d8972541d93ba8af72ac2b4f5b0a33badaf
--- /dev/null
+++ b/src/OpenFOAM/global/foamDoc.H
@@ -0,0 +1,58 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2010-2010 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+@mainpage OpenFOAM&reg;: open source CFD
+
+@section about About OpenFOAM
+
+    OpenFOAM is a free, open source CFD software package produced by
+    a commercial company,
+    <a href="http://www.openfoam.com/about">OpenCFD Ltd</a>.
+    It has a
+    large user base across most areas of engineering and science,
+    from both commercial and academic organisations.  OpenFOAM has an
+    extensive range of features to solve anything from complex fluid
+    flows involving chemical reactions, turbulence and heat transfer,
+    to solid dynamics and electromagnetics.
+    <a href="http://www.openfoam.com/features">More ...</a>
+
+@section users Our commitment to the users
+
+    OpenFOAM comes with full commercial support from OpenCFD, including
+    <a href="http://www.openfoam.com/support/software.php">software support</a>,
+    <a href="http://www.openfoam.com/support/development.php">contracted developments</a> 
+    and a programme of <a href="http://www.openfoam.com/training">training courses</a>.
+    These activities fund the development, maintenance and release of
+    OpenFOAM to make it an extremely viable commercial open source product.
+
+@section opensource Our commitment to open source
+
+   OpenCFD is committed to open source software, continually developing and
+   maintaining OpenFOAM under the
+   <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public Licence</a>.
+   OpenFOAM will <strong>always</strong> be free of charge and open source.
+   In addition, we endeavour to support other viable open source initiatives
+   that will benefit science and engineering.
+
+\*---------------------------------------------------------------------------*/
diff --git a/src/OpenFOAM/global/foamVersion.H b/src/OpenFOAM/global/foamVersion.H
index 50bf27591c0fcba4300efde51605a55552b3eb22..4a479b279996991540a33c5383906871d7c43e30 100644
--- a/src/OpenFOAM/global/foamVersion.H
+++ b/src/OpenFOAM/global/foamVersion.H
@@ -44,40 +44,6 @@ Description
 SourceFiles
     global.Cver
 
-
-@mainpage OpenFOAM&reg;: open source CFD
-
-@section about About OpenFOAM
-
-    OpenFOAM is a free, open source CFD software package produced by
-    a commercial company,
-    <a href="http://www.openfoam.com/about">OpenCFD Ltd</a>.
-    It has a
-    large user base across most areas of engineering and science,
-    from both commercial and academic organisations.  OpenFOAM has an
-    extensive range of features to solve anything from complex fluid
-    flows involving chemical reactions, turbulence and heat transfer,
-    to solid dynamics and electromagnetics.
-    <a href="http://www.openfoam.com/features">More ...</a>
-
-@section users Our commitment to the users
-
-    OpenFOAM comes with full commercial support from OpenCFD, including
-    <a href="http://www.openfoam.com/support/software.php">software support</a>,
-    <a href="http://www.openfoam.com/support/development.php">contracted developments</a> and
-    a programme of <a href="http://www.openfoam.com/training">training courses</a>.
-    These activities fund the development, maintenance and release of
-    OpenFOAM to make it an extremely viable commercial open source product.
-
-@section opensource Our commitment to open source
-
-   OpenCFD is committed to open source software, continually developing and
-   maintaining OpenFOAM under the
-   <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public Licence</a>.
-   OpenFOAM will <strong>always</strong> be free of charge and open source.
-   In addition, we endeavour to support other viable open source initiatives
-   that will benefit science and engineering.
-
 \*---------------------------------------------------------------------------*/
 
 #ifndef foamVersion_H
diff --git a/src/OpenFOAM/include/addOverwriteOption.H b/src/OpenFOAM/include/addOverwriteOption.H
index c61548f06bbc894cc8dcfbf4a406e7a0042aa377..0c05c01c9367fd4523f62a9b6f6747ec124382da 100644
--- a/src/OpenFOAM/include/addOverwriteOption.H
+++ b/src/OpenFOAM/include/addOverwriteOption.H
@@ -2,7 +2,7 @@
 // addOverwriteOption.H
 // ~~~~~~~~~~~~~~~~~~~~
 
-    Foam::argList::addOption
+    Foam::argList::addBoolOption
     (
         "overwrite",
         "overwrite existing mesh/results files"
diff --git a/src/conversion/Make/options b/src/conversion/Make/options
index a3ae8da833177387e9eecf75b5e2675fc7b481f5..4ff461186ccfa78b8effcbd50daebaf0f1007595 100644
--- a/src/conversion/Make/options
+++ b/src/conversion/Make/options
@@ -1,7 +1,9 @@
 EXE_INC = \
+    -I$(LIB_SRC)/fileFormats/lnInclude \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
     -I$(LIB_SRC)/meshTools/lnInclude
 
 LIB_LIBS = \
+    -lfileFormats \
     -lfiniteVolume \
     -lmeshTools
diff --git a/src/conversion/ensight/file/ensightFile.C b/src/conversion/ensight/file/ensightFile.C
index af0ad554e8191a909fbd478bf56ec54f4723b9bb..5f7624f18f2281470eb2502188faf2be3b49a751 100644
--- a/src/conversion/ensight/file/ensightFile.C
+++ b/src/conversion/ensight/file/ensightFile.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/file/ensightFile.H b/src/conversion/ensight/file/ensightFile.H
index ca621141603473b23b41c127be152c5b1a8405fe..122f8647bf3dd5cfc68ac03bbaf73c28e0b08cf8 100644
--- a/src/conversion/ensight/file/ensightFile.H
+++ b/src/conversion/ensight/file/ensightFile.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/file/ensightGeoFile.C b/src/conversion/ensight/file/ensightGeoFile.C
index 86f7dca27b4fe4e8528d1398216947e36dabb086..ca2cd2466159b9928a4ff266c725a11667f432d0 100644
--- a/src/conversion/ensight/file/ensightGeoFile.C
+++ b/src/conversion/ensight/file/ensightGeoFile.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/file/ensightGeoFile.H b/src/conversion/ensight/file/ensightGeoFile.H
index 470f402db2f099f5efc4f48c6be1c7f1a93ea7b3..b1248a6a8ca45d1c87786abcd40cf7672591d4fd 100644
--- a/src/conversion/ensight/file/ensightGeoFile.H
+++ b/src/conversion/ensight/file/ensightGeoFile.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C
index a8b4e50308d7ae766709bb9aaae0def9cf9a597e..ddce37fbb27702ca72cb8b3b5e0c7ba6feb49101 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/part/ensightPart.H b/src/conversion/ensight/part/ensightPart.H
index 4c79416d07d4605d2784eabcb7254c7a3ab3c26e..73ef87693f084703397b0ef68815d8079e4bd527 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -150,7 +150,7 @@ protected:
         virtual void writeConnectivity
         (
             ensightGeoFile& os,
-            const string& key,
+            const word& key,
             const labelList& idList,
             const labelList& pointMap
         ) const
diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C
index 61d74937c958be236e0f0041271b7a6d043b9684..0bedb70cf194be9d5f49befc131655514908542d 100644
--- a/src/conversion/ensight/part/ensightPartCells.C
+++ b/src/conversion/ensight/part/ensightPartCells.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -345,7 +345,7 @@ Foam::ensightPart::localPoints Foam::ensightPartCells::calcLocalPoints() const
 void Foam::ensightPartCells::writeConnectivity
 (
     ensightGeoFile& os,
-    const string& key,
+    const word& key,
     const labelList& idList,
     const labelList& pointMap
 ) const
@@ -357,7 +357,7 @@ void Foam::ensightPartCells::writeConnectivity
     const polyMesh& mesh = *meshPtr_;
 
     // write polyhedral
-    if (word(key) == "nfaced")
+    if (key == "nfaced")
     {
         const faceList& meshFaces = mesh.faces();
 
diff --git a/src/conversion/ensight/part/ensightPartCells.H b/src/conversion/ensight/part/ensightPartCells.H
index 84fb776cac3771091b39b5b227ba60d20bdde66b..3f045693a7e9ff67f25ecbc91b6d4706a4473cf7 100644
--- a/src/conversion/ensight/part/ensightPartCells.H
+++ b/src/conversion/ensight/part/ensightPartCells.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,7 +70,7 @@ class ensightPartCells
         virtual void writeConnectivity
         (
             ensightGeoFile& os,
-            const string& key,
+            const word& key,
             const labelList& idList,
             const labelList& pointMap
         ) const;
diff --git a/src/conversion/ensight/part/ensightPartFaces.C b/src/conversion/ensight/part/ensightPartFaces.C
index 6ec82e671e262154b68989755252b5f699402301..9fbdefac2b23f77fb944b5be1bdcdc3125dab21a 100644
--- a/src/conversion/ensight/part/ensightPartFaces.C
+++ b/src/conversion/ensight/part/ensightPartFaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -206,7 +206,7 @@ Foam::ensightPart::localPoints Foam::ensightPartFaces::calcLocalPoints() const
 void Foam::ensightPartFaces::writeConnectivity
 (
     ensightGeoFile& os,
-    const string& key,
+    const word& key,
     const labelList& idList,
     const labelList& pointMap
 ) const
@@ -218,7 +218,7 @@ void Foam::ensightPartFaces::writeConnectivity
     const faceList& meshFaces = meshPtr_->faces();
 
     // write (polygon) face sizes
-    if (word(key) == "nsided")
+    if (key == "nsided")
     {
         // write the number of points per face
         forAll(idList, i)
diff --git a/src/conversion/ensight/part/ensightPartFaces.H b/src/conversion/ensight/part/ensightPartFaces.H
index 073a70bc58c01de7faff7cc8943695b8510a6b5e..9dd5ac0dbf9529ad3f9fada653c73580ddaf3c24 100644
--- a/src/conversion/ensight/part/ensightPartFaces.H
+++ b/src/conversion/ensight/part/ensightPartFaces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ class ensightPartFaces
         virtual void writeConnectivity
         (
             ensightGeoFile& os,
-            const string& key,
+            const word& key,
             const labelList& idList,
             const labelList& pointMap
         ) const;
diff --git a/src/conversion/ensight/part/ensightPartI.H b/src/conversion/ensight/part/ensightPartI.H
index c41abaedcba282490943496586e5dd9d51a87b94..c37d19412dc78bdade566d45ed6153406a62762c 100644
--- a/src/conversion/ensight/part/ensightPartI.H
+++ b/src/conversion/ensight/part/ensightPartI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/part/ensightPartIO.C b/src/conversion/ensight/part/ensightPartIO.C
index 4446fbb49b259f4bf57ca1a368e4f89f6e7c1dc1..1d6710cf9a5753d7be23ed67aea6358800ac5116 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/part/ensightParts.C b/src/conversion/ensight/part/ensightParts.C
index 36ee068312fd0bf046661065480fb8c97faa9a88..a8a2bd1f48aa993f42158978a238d3131963ede1 100644
--- a/src/conversion/ensight/part/ensightParts.C
+++ b/src/conversion/ensight/part/ensightParts.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/part/ensightParts.H b/src/conversion/ensight/part/ensightParts.H
index 83205dfbfa55153b5d40f67c739c6fcb5b9b058a..c59b37a9f816675d49a8bd063634b35fe2462dd7 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/ensight/part/ensightPartsI.H b/src/conversion/ensight/part/ensightPartsI.H
index a0ef408eeaa2f9538274be31863a8ad7c89aa6d5..b903d915563de3a911b444cc4c1e845f38b62dab 100644
--- a/src/conversion/ensight/part/ensightPartsI.H
+++ b/src/conversion/ensight/part/ensightPartsI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshReader/calcPointCells.C b/src/conversion/meshReader/calcPointCells.C
index 0efe47552b73225b3bf85fede3890f46d3436c3c..e8ac163b5af7d30bb5d19e8a0362c614a3f548c1 100644
--- a/src/conversion/meshReader/calcPointCells.C
+++ b/src/conversion/meshReader/calcPointCells.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshReader/createPolyBoundary.C b/src/conversion/meshReader/createPolyBoundary.C
index 954f8776df8557b78717c1915687f1fa81ba66bb..370c123da776587d8db79bbfdc8310e293e56c8d 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshReader/createPolyCells.C b/src/conversion/meshReader/createPolyCells.C
index 3fad08d29ec739760f2861abf9639841de12f69e..1872713af9fbaa3a03652c3e0acd191673ccb4e1 100644
--- a/src/conversion/meshReader/createPolyCells.C
+++ b/src/conversion/meshReader/createPolyCells.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshReader/meshReader.C b/src/conversion/meshReader/meshReader.C
index 0bb5ea612dcf14d9b97d4034cc021f0bc7ad55bf..0978ec32232cb06fd3a2e19cb25ccaed8f170940 100644
--- a/src/conversion/meshReader/meshReader.C
+++ b/src/conversion/meshReader/meshReader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshReader/meshReader.H b/src/conversion/meshReader/meshReader.H
index 1d2b875465361da261fbf34e549754fb6ec0135f..0869819e3fd3e090245b25ea5015422e522c6227 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshReader/meshReaderAux.C b/src/conversion/meshReader/meshReaderAux.C
index 9b1c9f2bdfa48334050a744dfa7ff64e0b547a35..a3b6fe992a09750072e5c6790d6ceabb0b18858f 100644
--- a/src/conversion/meshReader/meshReaderAux.C
+++ b/src/conversion/meshReader/meshReaderAux.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.C b/src/conversion/meshReader/starcd/STARCDMeshReader.C
index d1892f9c574ec4862e1fbf90358fca512ff6ea7a..5d8ae1883132d57173023fc7414bb3b6fa7362d4 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -237,7 +237,7 @@ Body:
 
 For primitive cell shapes, the number of vertices will never exceed 8 (hexa)
 and corresponds to <nLabels>.
-For polyhedral, <nLabels> includess an index table comprising beg/end pairs
+For polyhedral, <nLabels> includes an index table comprising beg/end pairs
 for each cell face.
 
 Strictly speaking, we only need the cellModeller for adding boundaries.
diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.H b/src/conversion/meshReader/starcd/STARCDMeshReader.H
index f4886664d3b503914f318aae89f64a1a1ff46a78..dc5d7fe2cee2da1b243e409e4ec34cf865ba6d0f 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshTables/boundaryRegion.C b/src/conversion/meshTables/boundaryRegion.C
index d933007c6e47c86c4ed4ae9fbadc068c1fc3ecfb..cfb5314b5492269a1521ad8a6a2218f0cecb2151 100644
--- a/src/conversion/meshTables/boundaryRegion.C
+++ b/src/conversion/meshTables/boundaryRegion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshTables/boundaryRegion.H b/src/conversion/meshTables/boundaryRegion.H
index 32a0d7cba46c9285e3048f257321429db678ce3c..d4c83c5448face7bac3a324188d5a284a218d8e7 100644
--- a/src/conversion/meshTables/boundaryRegion.H
+++ b/src/conversion/meshTables/boundaryRegion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshTables/cellTable.C b/src/conversion/meshTables/cellTable.C
index a07cbaf96d9d832524c07f0dd8520602eea99c42..48d8b92af0aaeca8f7617bdcf7189e390e1f0080 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshTables/cellTable.H b/src/conversion/meshTables/cellTable.H
index ff8c1fafb61f5314332b372c09dd9dce907892e7..c565a977c839ef4de40a7529455156a6f709f6ec 100644
--- a/src/conversion/meshTables/cellTable.H
+++ b/src/conversion/meshTables/cellTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshWriter/meshWriter.C b/src/conversion/meshWriter/meshWriter.C
index a51675adf1cd1d41e8a66518e151a5fe9e92dc59..4ff8ea1bd2fb87df5992ce4d02052d26cf794027 100644
--- a/src/conversion/meshWriter/meshWriter.C
+++ b/src/conversion/meshWriter/meshWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/meshWriter/starcd/STARCDMeshWriter.H b/src/conversion/meshWriter/starcd/STARCDMeshWriter.H
index 31f1acbfb44b95407d2a419a97b4eb32f5033457..b6b4a546cc7ef2f85c8fc9a7741c744aec938497 100644
--- a/src/conversion/meshWriter/starcd/STARCDMeshWriter.H
+++ b/src/conversion/meshWriter/starcd/STARCDMeshWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/polyDualMesh/polyDualMesh.C b/src/conversion/polyDualMesh/polyDualMesh.C
index 1d04252b1e726a74d14a8b0d8688c1c22378a08e..196f70d08137f250bfd610d0718f445a4c3c6cc4 100644
--- a/src/conversion/polyDualMesh/polyDualMesh.C
+++ b/src/conversion/polyDualMesh/polyDualMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/conversion/polyDualMesh/polyDualMesh.H b/src/conversion/polyDualMesh/polyDualMesh.H
index 06b9c65f50a258093ec93099bd7bd1e28592e2d7..4f32bf0a39fa17565465b8cdc31e50c6bfdf2973 100644
--- a/src/conversion/polyDualMesh/polyDualMesh.H
+++ b/src/conversion/polyDualMesh/polyDualMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/dummyThirdParty/Allwmake b/src/dummyThirdParty/Allwmake
new file mode 100755
index 0000000000000000000000000000000000000000..66298949096068443e16e663dd1baedab315285c
--- /dev/null
+++ b/src/dummyThirdParty/Allwmake
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+set -x
+
+wmake libso scotchDecomp
+wmake libso metisDecomp
+wmake libso parMetisDecomp
+wmake libso MGridGen
+
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/src/dummyThirdParty/MGridGen/Make/files b/src/dummyThirdParty/MGridGen/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..684d67331a328f3c8bd20af3515f8eba061d9c6d
--- /dev/null
+++ b/src/dummyThirdParty/MGridGen/Make/files
@@ -0,0 +1,3 @@
+dummyMGridGen.C
+
+LIB = $(FOAM_LIBBIN)/dummy/libMGridGen
diff --git a/src/dummyThirdParty/MGridGen/Make/options b/src/dummyThirdParty/MGridGen/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..4c3dd783cb4170feefb3f5385510a83257b43b18
--- /dev/null
+++ b/src/dummyThirdParty/MGridGen/Make/options
@@ -0,0 +1,3 @@
+EXE_INC =
+
+EXE_LIBS =
diff --git a/src/dummyThirdParty/MGridGen/dummyMGridGen.C b/src/dummyThirdParty/MGridGen/dummyMGridGen.C
new file mode 100644
index 0000000000000000000000000000000000000000..3fbf08b4602feca6c98f14dcc8705b5f5ce148f7
--- /dev/null
+++ b/src/dummyThirdParty/MGridGen/dummyMGridGen.C
@@ -0,0 +1,59 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2010-2010 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+\*---------------------------------------------------------------------------*/
+
+//extern "C"
+//{
+#include "mgridgen.h"
+//}
+
+#include "error.H"
+
+using namespace Foam;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+static const char* notImplementedMessage =
+"You are trying to use MGridGen but do not have the MGridGen library loaded.\n"
+"This message is from the dummy MGridGen stub library instead.\n"
+"\n"
+"Normally the MGridGen library will be loaded through the LD_LIBRARY_PATH\n"
+"environment variable but you are picking up this dummy library from the\n"
+"$FOAM_LIBBIN/dummy directory. Please install MGridGen and make sure the\n"
+"libMGridGen.so is in your LD_LIBRARY_PATH.";
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void MGridGen(int, idxtype *, realtype *, realtype *, idxtype *, realtype *,
+              int, int, int *, int *, int *, idxtype *)
+{
+    FatalErrorIn("MGridGen(..)")
+        << notImplementedMessage
+        << Foam::exit(Foam::FatalError);
+}
+
+
+// ************************************************************************* //
diff --git a/src/dummyThirdParty/MGridGen/mgridgen.h b/src/dummyThirdParty/MGridGen/mgridgen.h
new file mode 100644
index 0000000000000000000000000000000000000000..2a040431a667979178d1be581c35d0f90a2b1f5d
--- /dev/null
+++ b/src/dummyThirdParty/MGridGen/mgridgen.h
@@ -0,0 +1,64 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+Namespace
+    C linkage
+
+Description
+    Dummy stub for mgridgen library functions.
+    Only implements the absolute minimum we are using.
+
+SourceFiles
+    dummyMGridGen.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef mgridgen_H
+#define mgridgen_H
+
+#include "scalar.H"
+
+#ifndef idxtype
+#define idxtype int
+#define realtype Foam::scalar
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+/*---------------------------------------------------------------------------*\
+                           Class metis Declaration
+\*---------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void MGridGen(int, idxtype *, realtype *, realtype *, idxtype *, realtype *,
+              int, int, int *, int *, int *, idxtype *);
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/dummyThirdParty/metisDecomp/Make/files b/src/dummyThirdParty/metisDecomp/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..cdc9482e7d3317f9ea8e13c1eb62ce9738114e02
--- /dev/null
+++ b/src/dummyThirdParty/metisDecomp/Make/files
@@ -0,0 +1,3 @@
+dummyMetisDecomp.C
+
+LIB = $(FOAM_LIBBIN)/dummy/libmetisDecomp
diff --git a/src/dummyThirdParty/metisDecomp/Make/options b/src/dummyThirdParty/metisDecomp/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..05ee5feb9857c110cdce5251382e31d57d6946d6
--- /dev/null
+++ b/src/dummyThirdParty/metisDecomp/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+    -I$(FOAM_SRC)/parallel/decompositionMethods/lnInclude \
+    -I$(FOAM_SRC)/parallel/metisDecomp/lnInclude
+
+LIB_LIBS =
diff --git a/src/dummyThirdParty/metisDecomp/dummyMetisDecomp.C b/src/dummyThirdParty/metisDecomp/dummyMetisDecomp.C
new file mode 100644
index 0000000000000000000000000000000000000000..6167a7aa09277a5b25e1cd8ad594dbd9c9088a17
--- /dev/null
+++ b/src/dummyThirdParty/metisDecomp/dummyMetisDecomp.C
@@ -0,0 +1,156 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2010-2010 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+\*---------------------------------------------------------------------------*/
+
+#include "metisDecomp.H"
+#include "addToRunTimeSelectionTable.H"
+#include "Time.H"
+
+static const char* notImplementedMessage =
+"You are trying to use metis but do not have the metisDecomp library loaded."
+"\nThis message is from the dummy metisDecomp stub library instead.\n"
+"\n"
+"Please install metis and make sure that libmetis.so is in your "
+"LD_LIBRARY_PATH.\n"
+"The metisDecomp library can then be built in $FOAM_SRC/decompositionMethods/"
+"metisDecomp\n";
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    defineTypeNameAndDebug(metisDecomp, 0);
+
+    addToRunTimeSelectionTable
+    (
+        decompositionMethod,
+        metisDecomp,
+        dictionaryMesh
+    );
+}
+
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+Foam::label Foam::metisDecomp::decompose
+(
+    const List<int>& adjncy,
+    const List<int>& xadj,
+    const scalarField& cellWeights,
+    List<int>& finalDecomp
+)
+{
+    FatalErrorIn
+    (
+        "labelList metisDecomp::decompose"
+        "("
+            "const List<int>&, "
+            "const List<int>&, "
+            "const scalarField&, "
+            "List<int>&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return -1;
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::metisDecomp::metisDecomp
+(
+    const dictionary& decompositionDict,
+    const polyMesh& mesh
+)
+:
+    decompositionMethod(decompositionDict),
+    mesh_(mesh)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::labelList Foam::metisDecomp::decompose
+(
+    const pointField& points,
+    const scalarField& pointWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList metisDecomp::decompose"
+        "("
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList();
+}
+
+
+Foam::labelList Foam::metisDecomp::decompose
+(
+    const labelList& agglom,
+    const pointField& agglomPoints,
+    const scalarField& agglomWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList metisDecomp::decompose"
+        "("
+            "const labelList&, "
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList();
+}
+
+
+Foam::labelList Foam::metisDecomp::decompose
+(
+    const labelListList& globalCellCells,
+    const pointField& cellCentres,
+    const scalarField& cellWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList metisDecomp::decompose"
+        "("
+            "const labelListList&, "
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList();
+}
+
+
+// ************************************************************************* //
diff --git a/src/dummyThirdParty/parMetisDecomp/Make/files b/src/dummyThirdParty/parMetisDecomp/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..beb734541c09bb2dc40f67d8d5f507d2676e4af5
--- /dev/null
+++ b/src/dummyThirdParty/parMetisDecomp/Make/files
@@ -0,0 +1,3 @@
+dummyParMetisDecomp.C
+
+LIB = $(FOAM_LIBBIN)/dummy/libparMetisDecomp
diff --git a/src/dummyThirdParty/parMetisDecomp/Make/options b/src/dummyThirdParty/parMetisDecomp/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..2267e7a54280481231e96001226253c475ebd1bd
--- /dev/null
+++ b/src/dummyThirdParty/parMetisDecomp/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+    -I$(FOAM_SRC)/parallel/decompositionMethods/lnInclude \
+    -I$(FOAM_SRC)/parallel/parMetisDecomp/lnInclude
+
+LIB_LIBS =
diff --git a/src/dummyThirdParty/parMetisDecomp/dummyParMetisDecomp.C b/src/dummyThirdParty/parMetisDecomp/dummyParMetisDecomp.C
new file mode 100644
index 0000000000000000000000000000000000000000..7cf3663e6cd2d9e3339ebdb3893187a99989f15e
--- /dev/null
+++ b/src/dummyThirdParty/parMetisDecomp/dummyParMetisDecomp.C
@@ -0,0 +1,185 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2010-2010 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+\*---------------------------------------------------------------------------*/
+
+#include "parMetisDecomp.H"
+#include "addToRunTimeSelectionTable.H"
+#include "polyMesh.H"
+#include "Time.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    defineTypeNameAndDebug(parMetisDecomp, 0);
+
+    addToRunTimeSelectionTable
+    (
+        decompositionMethod,
+        parMetisDecomp,
+        dictionaryMesh
+    );
+}
+
+static const char* notImplementedMessage =
+"You are trying to use parMetis but do not have the parMetisDecomp library "
+"loaded.\n"
+"This message is from the dummy parMetisDecomp stub library instead.\n"
+"\n"
+"Please install parMetis and make sure that libparMetis.so is in your "
+"LD_LIBRARY_PATH.\n"
+"The parMetisDecomp library can then be built in $FOAM_SRC/decompositionMethods/"
+"parMetisDecomp\n";
+
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+//- Does prevention of 0 cell domains and calls parmetis.
+Foam::label Foam::parMetisDecomp::decompose
+(
+    Field<int>& xadj,
+    Field<int>& adjncy,
+    const pointField& cellCentres,
+    Field<int>& cellWeights,
+    Field<int>& faceWeights,
+    const List<int>& options,
+
+    List<int>& finalDecomp
+)
+{
+    FatalErrorIn
+    (
+        "label parMetisDecomp::decompose"
+        "("
+            "Field<int>&, "
+            "Field<int>&, "
+            "const pointField&, "
+            "Field<int>&, "
+            "Field<int>&, "
+            "const List<int>&, "
+            "List<int>&"
+        ")"
+    )<< notImplementedMessage << exit(FatalError);
+
+    return -1;
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::parMetisDecomp::parMetisDecomp
+(
+    const dictionary& decompositionDict,
+    const polyMesh& mesh
+)
+:
+    decompositionMethod(decompositionDict),
+    mesh_(mesh)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::labelList Foam::parMetisDecomp::decompose
+(
+    const pointField& cc,
+    const scalarField& cWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList parMetisDecomp::decompose"
+        "("
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList();
+}
+
+
+Foam::labelList Foam::parMetisDecomp::decompose
+(
+    const labelList& cellToRegion,
+    const pointField& regionPoints,
+    const scalarField& regionWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList parMetisDecomp::decompose"
+        "("
+            "const labelList&, "
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList();
+}
+
+
+Foam::labelList Foam::parMetisDecomp::decompose
+(
+    const labelListList& globalCellCells,
+    const pointField& cellCentres,
+    const scalarField& cWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList parMetisDecomp::decompose"
+        "("
+            "const labelListList&, "
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList();
+}
+
+
+void Foam::parMetisDecomp::calcMetisDistributedCSR
+(
+    const polyMesh& mesh,
+    List<int>& adjncy,
+    List<int>& xadj
+)
+{
+    FatalErrorIn
+    (
+        "void parMetisDecomp::calcMetisDistributedCSR"
+        "("
+            "const polyMesh&, "
+            "List<int>&, "
+            "List<int>&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+}
+
+
+// ************************************************************************* //
diff --git a/src/dummyThirdParty/scotchDecomp/Make/files b/src/dummyThirdParty/scotchDecomp/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..f8f7b50143cbfcdd62789de72199a2a4e7f7c5a4
--- /dev/null
+++ b/src/dummyThirdParty/scotchDecomp/Make/files
@@ -0,0 +1,3 @@
+dummyScotchDecomp.C
+
+LIB = $(FOAM_LIBBIN)/dummy/libscotchDecomp
diff --git a/src/dummyThirdParty/scotchDecomp/Make/options b/src/dummyThirdParty/scotchDecomp/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..e109fb6fce06014f8b269719c93d470c601699e3
--- /dev/null
+++ b/src/dummyThirdParty/scotchDecomp/Make/options
@@ -0,0 +1,6 @@
+EXE_INC = \ 
+    -I$(FOAM_SRC)/parallel/decompositionMethods/lnInclude \
+    -I$(FOAM_SRC)/parallel/scotchDecomp/lnInclude
+
+LIB_LIBS =
+ 
diff --git a/src/dummyThirdParty/scotchDecomp/dummyScotchDecomp.C b/src/dummyThirdParty/scotchDecomp/dummyScotchDecomp.C
new file mode 100644
index 0000000000000000000000000000000000000000..cefc26c5821d54410acbe11fd6458ded241d0375
--- /dev/null
+++ b/src/dummyThirdParty/scotchDecomp/dummyScotchDecomp.C
@@ -0,0 +1,280 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2010-2010 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+    From scotch forum:
+
+    By: Francois PELLEGRINI RE: Graph mapping 'strategy' string [ reply ]
+    2008-08-22 10:09 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:
+
+    b
+    {
+        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.005},
+                    org=f{move=80,pass=-1,bal=0.005},
+                    width=3
+                },
+                low=h{pass=10}f{move=80,pass=-1,bal=0.0005},
+                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.005},
+                    org=f{move=80,pass=-1,bal=0.005},
+                    width=3
+                },
+                low=h{pass=10}f{move=80,pass=-1,bal=0.0005},
+                type=h,
+                vert=80,
+                rat=0.8
+            }
+        )
+    }
+
+
+\*---------------------------------------------------------------------------*/
+
+#include "scotchDecomp.H"
+#include "addToRunTimeSelectionTable.H"
+#include "Time.H"
+
+static const char* notImplementedMessage =
+"You are trying to use scotch but do not have the scotchDecomp library loaded."
+"\nThis message is from the dummy scotchDecomp stub library instead.\n"
+"\n"
+"Please install scotch and make sure that libscotch.so is in your "
+"LD_LIBRARY_PATH.\n"
+"The scotchDecomp library can then be built in $FOAM_SRC/decompositionMethods/"
+"scotchDecomp\n";
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    defineTypeNameAndDebug(scotchDecomp, 0);
+
+    addToRunTimeSelectionTable
+    (
+        decompositionMethod,
+        scotchDecomp,
+        dictionaryMesh
+    );
+}
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+void Foam::scotchDecomp::check(const int retVal, const char* str)
+{}
+
+
+Foam::label Foam::scotchDecomp::decompose
+(
+    const List<int>& adjncy,
+    const List<int>& xadj,
+    const scalarField& cWeights,
+
+    List<int>& finalDecomp
+)
+{
+    FatalErrorIn
+    (
+        "label scotchDecomp::decompose"
+        "("
+            "const List<int>&, "
+            "const List<int>&, "
+            "const scalarField&, "
+            "List<int>&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return -1;
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::scotchDecomp::scotchDecomp
+(
+    const dictionary& decompositionDict,
+    const polyMesh& mesh
+)
+:
+    decompositionMethod(decompositionDict),
+    mesh_(mesh)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::labelList Foam::scotchDecomp::decompose
+(
+    const pointField& points,
+    const scalarField& pointWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList scotchDecomp::decompose"
+        "("
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList::null();
+}
+
+
+Foam::labelList Foam::scotchDecomp::decompose
+(
+    const labelList& agglom,
+    const pointField& agglomPoints,
+    const scalarField& pointWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList scotchDecomp::decompose"
+        "("
+            "const labelList&, "
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList::null();
+}
+
+
+Foam::labelList Foam::scotchDecomp::decompose
+(
+    const labelListList& globalCellCells,
+    const pointField& cellCentres,
+    const scalarField& cWeights
+)
+{
+    FatalErrorIn
+    (
+        "labelList scotchDecomp::decompose"
+        "("
+            "const labelListList&, "
+            "const pointField&, "
+            "const scalarField&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+
+    return labelList::null();
+}
+
+
+void Foam::scotchDecomp::calcCSR
+(
+    const polyMesh& mesh,
+    List<int>& adjncy,
+    List<int>& xadj
+)
+{
+    FatalErrorIn
+    (
+        "labelList scotchDecomp::decompose"
+        "("
+            "const polyMesh&, "
+            "const List<int>&, "
+            "const List<int>&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+}
+
+
+void Foam::scotchDecomp::calcCSR
+(
+    const labelListList& cellCells,
+    List<int>& adjncy,
+    List<int>& xadj
+)
+{
+    FatalErrorIn
+    (
+        "labelList scotchDecomp::decompose"
+        "("
+            "const labelListList&, "
+            "const List<int>&, "
+            "const List<int>&"
+        ")"
+    )   << notImplementedMessage << exit(FatalError);
+}
+
+
+// ************************************************************************* //
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
index b90eeec10ccfe6319a631fd1dcf7b7087800c90a..440a37a6e55ab934963bc2a24962a58df6d58f17 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
@@ -39,11 +39,6 @@ SourceFiles
 #ifndef ReactingParcel_H
 #define ReactingParcel_H
 
-#include "IOstream.H"
-#include "autoPtr.H"
-#include "interpolationCellPoint.H"
-#include "contiguous.H"
-
 #include "ThermoParcel.H"
 #include "ReactingCloud.H"
 #include "reactingParcel.H"
diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
index 024081e1168b024bedf4e7616756897be75eef78..a37e9d7de1e48b908073f1b676960db4e2584e8a 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
@@ -40,11 +40,6 @@ SourceFiles
 #ifndef ThermoParcel_H
 #define ThermoParcel_H
 
-#include "IOstream.H"
-#include "autoPtr.H"
-#include "interpolationCellPoint.H"
-#include "contiguous.H"
-
 #include "KinematicParcel.H"
 #include "ThermoCloud.H"
 
diff --git a/src/meshTools/Make/options b/src/meshTools/Make/options
index 6bf989d4f51e698d2a50738a0f0b0ef0720fbead..0ff22029260fd949e08c06a762e8352bcadf6d7c 100644
--- a/src/meshTools/Make/options
+++ b/src/meshTools/Make/options
@@ -6,5 +6,4 @@ EXE_INC = \
 LIB_LIBS = \
     -ltriSurface \
     -ldecompositionMethods \
-    -lmetisDecompositionMethod \
     -llagrangian
diff --git a/src/meshTools/indexedOctree/indexedOctree.C b/src/meshTools/indexedOctree/indexedOctree.C
index 1d444eff3dae4fe208ff2159ec1d0e5772395979..cb3b2ba780591193b72c8c88f60e960f916e7ba5 100644
--- a/src/meshTools/indexedOctree/indexedOctree.C
+++ b/src/meshTools/indexedOctree/indexedOctree.C
@@ -2433,7 +2433,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLineAny
 template <class Type>
 Foam::labelList Foam::indexedOctree<Type>::findBox
 (
-    const boundBox& searchBox
+    const treeBoundBox& searchBox
 ) const
 {
     // Storage for labels of shapes inside bb. Size estimate.
diff --git a/src/meshTools/indexedOctree/indexedOctree.H b/src/meshTools/indexedOctree/indexedOctree.H
index b653dc3e793bb4feca9d522195446e56d7952afe..6ad59847bb8f8f1ace2c1a49d61e5c83ab639148 100644
--- a/src/meshTools/indexedOctree/indexedOctree.H
+++ b/src/meshTools/indexedOctree/indexedOctree.H
@@ -546,7 +546,7 @@ public:
 
             //- Find (in no particular order) indices of all shapes inside or
             //  overlapping bounding box (i.e. all shapes not outside box)
-            labelList findBox(const boundBox& bb) const;
+            labelList findBox(const treeBoundBox& bb) const;
 
             //- Find deepest node (as parent+octant) containing point. Starts
             //  off from starting index in nodes_ (use 0 to start from top)
diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake
index 48c7d4162420750e74df2092668b90005a95fffd..5309e3481e49403951f043e193fb5220dd4c0112 100755
--- a/src/parallel/Allwmake
+++ b/src/parallel/Allwmake
@@ -2,7 +2,9 @@
 cd ${0%/*} || exit 1    # run from this directory
 set -x
 
-wmake libso decompositionMethods
+wmakeLnInclude decompositionMethods
+
+wmake libso scotchDecomp
 wmake libso metisDecomp
 wmake libso reconstruct
 
@@ -11,4 +13,7 @@ then
     ( WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB; wmake libso parMetisDecomp )
 fi
 
+wmake libso decompositionMethods
+
+
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/parallel/AllwmakeLnInclude b/src/parallel/AllwmakeLnInclude
new file mode 100755
index 0000000000000000000000000000000000000000..0737a7ffd45538a9c3c0bde78c75f0a1f93697df
--- /dev/null
+++ b/src/parallel/AllwmakeLnInclude
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+set -x
+
+wmakeLnInclude decompositionMethods
+wmakeLnInclude metisDecomp
+wmakeLnInclude parMetisDecomp
+wmakeLnInclude scotchDecomp
diff --git a/src/parallel/decompositionMethods/Make/files b/src/parallel/decompositionMethods/Make/files
index 751ebe90f2e99876ac1b34743f59cc9d4054bfef..43bb9a25c1ddcd504bf938804ff526b7e512fb39 100644
--- a/src/parallel/decompositionMethods/Make/files
+++ b/src/parallel/decompositionMethods/Make/files
@@ -4,6 +4,4 @@ simpleGeomDecomp/simpleGeomDecomp.C
 hierarchGeomDecomp/hierarchGeomDecomp.C
 manualDecomp/manualDecomp.C
 
-scotchDecomp/scotchDecomp.C
-
 LIB = $(FOAM_LIBBIN)/libdecompositionMethods
diff --git a/src/parallel/decompositionMethods/Make/options b/src/parallel/decompositionMethods/Make/options
index 11300da65cd7f9329c6642d84c194e790d142363..3af406f8acec181ba64125392889ecda4d120d33 100644
--- a/src/parallel/decompositionMethods/Make/options
+++ b/src/parallel/decompositionMethods/Make/options
@@ -1,7 +1,10 @@
-EXE_INC = \
-    -I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
-    -I../metisDecomp/lnInclude
+EXE_INC =
 
 LIB_LIBS = \
-    -lscotch -lscotcherrexit
+    -L$(FOAM_LIBBIN)/dummy \
+    -L$(FOAM_MPI_LIBBIN) \
+    -lscotchDecomp \
+    -lmetisDecomp \
+    -lparMetisDecomp
+
 
diff --git a/src/parallel/metisDecomp/Make/files b/src/parallel/metisDecomp/Make/files
index eb1e633e18bc833a024b0e47171344f09fd4fc11..39ee731e4d02e5c17cd2a3fb56fbe12606424ad7 100644
--- a/src/parallel/metisDecomp/Make/files
+++ b/src/parallel/metisDecomp/Make/files
@@ -1,3 +1,3 @@
 metisDecomp.C
 
-LIB = $(FOAM_LIBBIN)/libmetisDecompositionMethod
+LIB = $(FOAM_LIBBIN)/libmetisDecomp
diff --git a/src/parallel/metisDecomp/Make/options b/src/parallel/metisDecomp/Make/options
index a7d5398f0307436460a48f02107914159c18a1ec..2115beb95aaa457365f3098c862b7ad7c662639b 100644
--- a/src/parallel/metisDecomp/Make/options
+++ b/src/parallel/metisDecomp/Make/options
@@ -1,6 +1,7 @@
 EXE_INC = \
     -I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include \
-    -I../decompositionMethods/lnInclude
+    -I../decompositionMethods/lnInclude \
+    -I../scotchDecomp/lnInclude
 
 LIB_LIBS = \
     -lmetis \
diff --git a/src/parallel/parMetisDecomp/Make/files b/src/parallel/parMetisDecomp/Make/files
index 21d8080bc016a5937ec8ed4b5e9f7b25f88f6e77..7b771b81617013d333da4f0d3adacf2e814f7a2e 100644
--- a/src/parallel/parMetisDecomp/Make/files
+++ b/src/parallel/parMetisDecomp/Make/files
@@ -1,3 +1,3 @@
 parMetisDecomp.C
 
-LIB = $(FOAM_MPI_LIBBIN)/libparMetisDecompositionMethod
+LIB = $(FOAM_MPI_LIBBIN)/libparMetisDecomp
diff --git a/src/parallel/parMetisDecomp/Make/options b/src/parallel/parMetisDecomp/Make/options
index 79beb369af56c61636ac24c0c015c455629f2e2f..76a64be219392530a27fe55a2eeff59df044a288 100644
--- a/src/parallel/parMetisDecomp/Make/options
+++ b/src/parallel/parMetisDecomp/Make/options
@@ -5,7 +5,8 @@ EXE_INC = \
     -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1/ParMETISLib \
     -I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1 \
     -I../decompositionMethods/lnInclude \
-    -I../metisDecomp/lnInclude
+    -I../metisDecomp/lnInclude \
+    -I../scotchDecomp/lnInclude
 
 LIB_LIBS = \
     -L$(FOAM_MPI_LIBBIN) \
diff --git a/src/parallel/scotchDecomp/Make/files b/src/parallel/scotchDecomp/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..59717fa15c8d33b2b3e3389075356565d2da2726
--- /dev/null
+++ b/src/parallel/scotchDecomp/Make/files
@@ -0,0 +1,3 @@
+scotchDecomp.C
+
+LIB = $(FOAM_LIBBIN)/libscotchDecomp
diff --git a/src/parallel/scotchDecomp/Make/options b/src/parallel/scotchDecomp/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..96b64b8fdd1671bc56ed25d1c5632f067e73fd8f
--- /dev/null
+++ b/src/parallel/scotchDecomp/Make/options
@@ -0,0 +1,7 @@
+EXE_INC = \
+    -I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
+    -I/usr/include/scotch \
+    -I../decompositionMethods/lnInclude
+
+LIB_LIBS = \
+    -lscotch -lscotcherrexit
diff --git a/src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.C b/src/parallel/scotchDecomp/scotchDecomp.C
similarity index 100%
rename from src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.C
rename to src/parallel/scotchDecomp/scotchDecomp.C
diff --git a/src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.H b/src/parallel/scotchDecomp/scotchDecomp.H
similarity index 100%
rename from src/parallel/decompositionMethods/scotchDecomp/scotchDecomp.H
rename to src/parallel/scotchDecomp/scotchDecomp.H
diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
index 4bf7880c25d3a7724607355101d3f4aa440c3ba2..d7f6193803c950e32d4e41f0a3e2335493485fd0 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -152,18 +152,11 @@ STLASCIILexer::STLASCIILexer(istream* is, const label approxNpoints)
 one_space             [ \t\f\r]
 space                 {one_space}*
 some_space            {one_space}+
-cspace                ","{space}
 
 alpha                 [_A-Za-z]
 digit                 [0-9]
-dec_digit             [0-9]
-octal_digit           [0-7]
-hex_digit             [0-9a-fA-F]
-
-identifier            {alpha}({alpha}|{digit})*
-integer               {dec_digit}+
-label                 [1-9]{dec_digit}*
-zeroLabel             {digit}*
+
+integer               {digit}+
 signedInteger         [-+]?{integer}
 
 word                  ([[:alnum:]]|[[:punct:]])*
@@ -172,15 +165,14 @@ string                {word}({some_space}{word})*
 exponent_part         [eE][-+]?{digit}+
 fractional_constant   [-+]?(({digit}*"."{digit}+)|({digit}+"."?))
 
-double                (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
-float                 {double}
+floatNum              (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
 
-x                     {float}
-y                     {float}
-z                     {float}
+x                     {floatNum}
+y                     {floatNum}
+z                     {floatNum}
 
 solid                 {space}("solid"|"SOLID"){space}
-color                 {space}("color"|"COLOR"){some_space}{float}{some_space}{float}{some_space}{float}{space}
+color                 {space}("color"|"COLOR"){some_space}{floatNum}{some_space}{floatNum}{some_space}{floatNum}{space}
 facet                 {space}("facet"|"FACET"){space}
 normal                {space}("normal"|"NORMAL"){space}
 point                 {space}{x}{some_space}{y}{some_space}{z}{space}
@@ -337,7 +329,7 @@ endsolid              {space}("endsolid"|"ENDSOLID")({some_space}{word})*
         }
     }
 
-<readVertex>{space}{float}{space} {
+<readVertex>{space}{floatNum}{space} {
         vertex[cmpt++] = atof(YYText());
 
         if (cmpt == 3)
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
index 5c704720ae49f824d890a0869ca388653f586824..474152df2870806d7e0a5e78a8b0582e7de9dc69 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
@@ -1,8 +1,8 @@
-/*---------------------------------------------------------------------------*\
+/*--------------------------------*- C++ -*----------------------------------*\
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,26 +103,14 @@ Foam::word foamName(const Foam::string& s)
 one_space             [ \t\f\r]
 space                 {one_space}*
 some_space            {one_space}+
-cspace                ","{space}
 
 alpha                 [_A-Za-z]
 digit                 [0-9]
-dec_digit             [0-9]
-octal_digit           [0-7]
-hex_digit             [0-9a-fA-F]
-
-identifier            {alpha}({alpha}|{digit})*
-integer               {dec_digit}+
-label                 [1-9]{dec_digit}*
-zeroLabel             {digit}*
-
-word                  ([[:alnum:]]|[[:punct:]])+
-string                {word}({some_space}{word})*
 
 exponent_part         [eEdD][-+]?{digit}+
 fractional_constant   [-+]?(({digit}*"."{digit}+)|({digit}+"."?))
 
-double                (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
+floatNum              (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
 
 
 elements              {space}("ELEMENTS"|"ELEM"){space}
@@ -134,10 +122,10 @@ end                   {space}"END"{space}
 
 elementName           {space}([A-Z]|([A-Z][A-Z])){space}
 startIsotopeMolW      {space}"/"{space}
-isotopeMolW           {space}{double}{space}"/"{space}
+isotopeMolW           {space}{floatNum}{space}"/"{space}
 
 specieName            {space}[A-Za-z](([A-Za-z0-9)*+-])|("("[^+]))*{space}
-nMoles                {space}{double}{space}
+nMoles                {space}{floatNum}{space}
 
 thermoTemp            .{10}
 
@@ -160,13 +148,13 @@ reversibleReactionDelimiter {space}("="|"<=>"){space}
 irreversibleReactionDelimiter {space}"=>"{space}
 startPDependentSpecie {space}"("{space}"+"{space}
 pDependentSpecie      {specieName}")"{space}
-reactionCoeffs        {space}{double}{some_space}{double}{some_space}{double}{space}
+reactionCoeffs        {space}{floatNum}{some_space}{floatNum}{some_space}{floatNum}{space}
 reactionKeyword       {space}[A-Za-z](([A-Za-z0-9)*-])|("("[^+]))*{space}
 reactionKeywordSlash  {reactionKeyword}"/"{space}
-thirdBodyEfficiency   {space}{double}{space}"/"{space}
+thirdBodyEfficiency   {space}{floatNum}{space}"/"{space}
 startReactionCoeffs   {space}"/"{space}
 endReactionCoeffs     {space}"/"{space}
-reactionCoeff         {space}{double}{space}
+reactionCoeff         {space}{floatNum}{space}
 
 calPerMol             {space}"CAL/MOLE"{space}
 kcalPerMol            {space}"KCAL/MOLE"{space}
diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H
index 7e6a00d5d7136e55f4cbde5ba764525a81917b3a..b65266e8e41ac4e4898b7713a86aa67deee3c5f3 100644
--- a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H
+++ b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H
@@ -32,7 +32,12 @@ Class
     Foam::viscosityModel
 
 Description
-    An abstract base class for incompressible viscosityModels
+    An abstract base class for incompressible viscosityModels.
+
+    The strain rate is defined by:
+
+        mag(symm(grad(U)))
+
 
 SourceFiles
     viscosityModel.C
@@ -131,10 +136,9 @@ public:
         );
 
 
-    // Destructor
-
-        virtual ~viscosityModel()
-        {}
+    //- Destructor
+    virtual ~viscosityModel()
+    {}
 
 
     // Member Functions
@@ -145,7 +149,7 @@ public:
             return viscosityProperties_;
         }
 
-        //- Return the strain rate mag(grad(U))
+        //- Return the strain rate
         tmp<volScalarField> strainRate() const;
 
         //- Return the laminar viscosity
diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
index 2d04d3640757359bd2514d7c93a6f475323ce17a..59cf2a9c0042b1dd13e824303b26f08a05f736f6 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) 1991-2009 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -153,19 +153,12 @@ STLLexer::STLLexer(istream* is, const label approxNpoints)
 one_space             [ \t\f\r]
 space                 {one_space}*
 some_space            {one_space}+
-cspace                ","{space}
 
 alpha                 [_A-Za-z]
 digit                 [0-9]
-dec_digit             [0-9]
-octal_digit           [0-7]
-hex_digit             [0-9a-fA-F]
 
-identifier            {alpha}({alpha}|{digit})*
-integer               {dec_digit}+
-label                 [1-9]{dec_digit}*
-zeroLabel             {digit}*
-signedInteger         [-+]?{integer}
+integer               {digit}+
+signedInteger         [-+]?{digit}+
 
 word                  ([[:alnum:]]|[[:punct:]])*
 string                {word}({some_space}{word})*
@@ -173,15 +166,14 @@ string                {word}({some_space}{word})*
 exponent_part         [eE][-+]?{digit}+
 fractional_constant   [-+]?(({digit}*"."{digit}+)|({digit}+"."?))
 
-double                (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
-float                 {double}
+floatNum              (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))
 
-x                     {float}
-y                     {float}
-z                     {float}
+x                     {floatNum}
+y                     {floatNum}
+z                     {floatNum}
 
 solid                 {space}("solid"|"SOLID"){space}
-color                 {space}("color"|"COLOR"){some_space}{float}{some_space}{float}{some_space}{float}{space}
+color                 {space}("color"|"COLOR"){some_space}{floatNum}{some_space}{floatNum}{some_space}{floatNum}{space}
 facet                 {space}("facet"|"FACET"){space}
 normal                {space}("normal"|"NORMAL"){space}
 point                 {space}{x}{some_space}{y}{some_space}{z}{space}
@@ -320,7 +312,7 @@ endsolid              {space}("endsolid"|"ENDSOLID")({some_space}{word})*
         }
     }
 
-<readVertex>{space}{float}{space} {
+<readVertex>{space}{floatNum}{space} {
         vertex[cmpt++] = atof(YYText());
 
         if (cmpt == 3)
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
index 494a1e3257342bcca3647b3256b636ed8468e236..6edbac5049824917b2a54c2402dcb3f17a854f4f 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
@@ -42,71 +42,6 @@ namespace compressible
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-bool turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::interfaceOwner
-(
-    const polyMesh& nbrRegion,
-    const polyPatch& nbrPatch
-) const
-{
-    const fvMesh& myRegion = patch().boundaryMesh().mesh();
-
-    if (nbrRegion.name() == myRegion.name())
-    {
-        return patch().index() < nbrPatch.index();
-    }
-    else
-    {
-        const regionProperties& props =
-            myRegion.objectRegistry::parent().lookupObject<regionProperties>
-            (
-                "regionProperties"
-            );
-
-        label myIndex = findIndex(props.fluidRegionNames(), myRegion.name());
-        if (myIndex == -1)
-        {
-            label i = findIndex(props.solidRegionNames(), myRegion.name());
-
-            if (i == -1)
-            {
-                FatalErrorIn
-                (
-                    "turbulentTemperatureCoupledBaffleMixedFvPatchScalarField"
-                    "::interfaceOwner(const polyMesh&"
-                    ", const polyPatch&)const"
-                )   << "Cannot find region " << myRegion.name()
-                    << " neither in fluids " << props.fluidRegionNames()
-                    << " nor in solids " << props.solidRegionNames()
-                    << exit(FatalError);
-            }
-            myIndex = props.fluidRegionNames().size() + i;
-        }
-        label nbrIndex = findIndex
-        (
-            props.fluidRegionNames(),
-            nbrRegion.name()
-        );
-        if (nbrIndex == -1)
-        {
-            label i = findIndex(props.solidRegionNames(), nbrRegion.name());
-
-            if (i == -1)
-            {
-                FatalErrorIn
-                (
-                    "coupleManager::interfaceOwner"
-                    "(const polyMesh&, const polyPatch&) const"
-                )   << "Cannot find region " << nbrRegion.name()
-                    << " neither in fluids " << props.fluidRegionNames()
-                    << " nor in solids " << props.solidRegionNames()
-                    << exit(FatalError);
-            }
-            nbrIndex = props.fluidRegionNames().size() + i;
-        }
-        return myIndex < nbrIndex;
-    }
-}
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -124,7 +59,6 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
     this->refValue() = 0.0;
     this->refGrad() = 0.0;
     this->valueFraction() = 1.0;
-    this->fixesValue_ = true;
 }
 
 
@@ -139,8 +73,7 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
 :
     mixedFvPatchScalarField(ptf, p, iF, mapper),
     neighbourFieldName_(ptf.neighbourFieldName_),
-    KName_(ptf.KName_),
-    fixesValue_(ptf.fixesValue_)
+    KName_(ptf.KName_)
 {}
 
 
@@ -183,7 +116,6 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
         refValue() = scalarField("refValue", dict, p.size());
         refGrad() = scalarField("refGradient", dict, p.size());
         valueFraction() = scalarField("valueFraction", dict, p.size());
-        fixesValue_ = readBool(dict.lookup("fixesValue"));
     }
     else
     {
@@ -191,7 +123,6 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
         refValue() = *this;
         refGrad() = 0.0;
         valueFraction() = 1.0;
-        fixesValue_ = true;
     }
 }
 
@@ -205,8 +136,7 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
 :
     mixedFvPatchScalarField(wtcsf, iF),
     neighbourFieldName_(wtcsf.neighbourFieldName_),
-    KName_(wtcsf.KName_),
-    fixesValue_(wtcsf.fixesValue_)
+    KName_(wtcsf.KName_)
 {}
 
 
@@ -281,95 +211,80 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
 
     // Force recalculation of mapping and schedule
     const mapDistribute& distMap = mpp.map();
-    (void)distMap.schedule();
 
     tmp<scalarField> intFld = patchInternalField();
 
-    if (interfaceOwner(nbrMesh, nbrPatch.patch()))
-    {
-        // Note: other side information could be cached - it only needs
-        // to be updated the first time round the iteration (i.e. when
-        // switching regions) but unfortunately we don't have this information.
-
 
-        // Calculate the temperature by harmonic averaging
-        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Calculate the temperature by harmonic averaging
+    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-        const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField&
-        nbrField =
-        refCast
-        <
-            const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
-        >
-        (
-            nbrPatch.lookupPatchField<volScalarField, scalar>
-            (
-                neighbourFieldName_
-            )
-        );
-
-        // Swap to obtain full local values of neighbour internal field
-        scalarField nbrIntFld = nbrField.patchInternalField();
-        mapDistribute::distribute
-        (
-            Pstream::defaultCommsType,
-            distMap.schedule(),
-            distMap.constructSize(),
-            distMap.subMap(),           // what to send
-            distMap.constructMap(),     // what to receive
-            nbrIntFld
-        );
-
-        // Swap to obtain full local values of neighbour K*delta
-        scalarField nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs();
-        mapDistribute::distribute
-        (
-            Pstream::defaultCommsType,
-            distMap.schedule(),
-            distMap.constructSize(),
-            distMap.subMap(),           // what to send
-            distMap.constructMap(),     // what to receive
-            nbrKDelta
-        );
-
-        tmp<scalarField> myKDelta = K()*patch().deltaCoeffs();
-
-        // Calculate common wall temperature. Reuse *this to store common value.
-        scalarField Twall
-        (
-            (myKDelta()*intFld() + nbrKDelta*nbrIntFld)
-          / (myKDelta() + nbrKDelta)
-        );
-        // Assign to me
-        fvPatchScalarField::operator=(Twall);
-        // Distribute back and assign to neighbour
-        mapDistribute::distribute
-        (
-            Pstream::defaultCommsType,
-            distMap.schedule(),
-            nbrField.size(),
-            distMap.constructMap(),     // reverse : what to send
-            distMap.subMap(),
-            Twall
-        );
-        const_cast<turbulentTemperatureCoupledBaffleMixedFvPatchScalarField&>
+    const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField& nbrField =
+    refCast
+    <
+        const turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
+    >
+    (
+        nbrPatch.lookupPatchField<volScalarField, scalar>
         (
-            nbrField
-        ).fvPatchScalarField::operator=(Twall);
-    }
+            neighbourFieldName_
+        )
+    );
+
+    // Swap to obtain full local values of neighbour internal field
+    scalarField nbrIntFld = nbrField.patchInternalField();
+    mapDistribute::distribute
+    (
+        Pstream::defaultCommsType,
+        distMap.schedule(),
+        distMap.constructSize(),
+        distMap.subMap(),           // what to send
+        distMap.constructMap(),     // what to receive
+        nbrIntFld
+    );
 
+    // Swap to obtain full local values of neighbour K*delta
+    scalarField nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs();
+    mapDistribute::distribute
+    (
+        Pstream::defaultCommsType,
+        distMap.schedule(),
+        distMap.constructSize(),
+        distMap.subMap(),           // what to send
+        distMap.constructMap(),     // what to receive
+        nbrKDelta
+    );
 
-    // Switch between fixed value (of harmonic avg) or gradient
-    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    tmp<scalarField> myKDelta = K()*patch().deltaCoeffs();
 
-    label nFixed = 0;
 
-    // Like snGrad but bypass switching on refValue/refGrad.
-    tmp<scalarField> normalGradient = (*this-intFld())*patch().deltaCoeffs();
+    // Both sides agree on
+    // - temperature : (myKDelta*fld + nbrKDelta*nbrFld)/(myKDelta+nbrKDelta)
+    // - gradient    : (temperature-fld)*delta
+    // We've got a degree of freedom in how to implement this in a mixed bc.
+    // (what gradient, what fixedValue and mixing coefficient)
+    // Two reasonable choices:
+    // 1. specify above temperature on one side (preferentially the high side)
+    //    and above gradient on the other. So this will switch between pure
+    //    fixedvalue and pure fixedgradient
+    // 2. specify gradient and temperature such that the equations are the
+    //    same on both sides. This leads to the choice of
+    //    - refGradient = zero gradient
+    //    - refValue = neighbour value
+    //    - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())
+
+
+    this->refValue() = nbrIntFld;
+
+    this->refGrad() = 0.0;
+
+    this->valueFraction() = nbrKDelta / (nbrKDelta + myKDelta());
+
+    mixedFvPatchScalarField::updateCoeffs();
+
 
     if (debug)
     {
-        scalar Q = gSum(K()*patch().magSf()*normalGradient());
+        scalar Q = gSum(K()*patch().magSf()*snGrad());
 
         Info<< patch().boundaryMesh().mesh().name() << ':'
             << patch().name() << ':'
@@ -384,48 +299,6 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
             << " avg:" << gAverage(*this)
             << endl;
     }
-
-    forAll(*this, i)
-    {
-        // if outgoing flux use fixed value.
-        if (normalGradient()[i] < 0.0)
-        {
-            this->refValue()[i] = operator[](i);
-            this->refGrad()[i] = 0.0;   // not used by me
-            this->valueFraction()[i] = 1.0;
-            nFixed++;
-        }
-        else
-        {
-            // Fixed gradient. Make sure to have valid refValue (even though
-            // I am not using it - other boundary conditions might)
-            this->refValue()[i] = operator[](i);
-            this->refGrad()[i] = normalGradient()[i];
-            this->valueFraction()[i] = 0.0;
-        }
-    }
-
-    reduce(nFixed, sumOp<label>());
-
-    fixesValue_ = (nFixed > 0);
-
-    if (debug)
-    {
-        label nTotSize = returnReduce(this->size(), sumOp<label>());
-
-        Info<< patch().boundaryMesh().mesh().name() << ':'
-            << patch().name() << ':'
-            << this->dimensionedInternalField().name() << " -> "
-            << nbrMesh.name() << ':'
-            << nbrPatch.name() << ':'
-            << this->dimensionedInternalField().name() << " :"
-            << " patch:" << patch().name()
-            << " out of:" << nTotSize
-            << " fixedBC:" << nFixed
-            << " gradient:" << nTotSize-nFixed << endl;
-    }
-
-    mixedFvPatchScalarField::updateCoeffs();
 }
 
 
@@ -438,7 +311,6 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
     os.writeKeyword("neighbourFieldName")<< neighbourFieldName_
         << token::END_STATEMENT << nl;
     os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("fixesValue") << fixesValue_ << token::END_STATEMENT << nl;
 }
 
 
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H
index c4a6a7a7634bbbe289165a3222753e5b235d2a34..ee5c993e37e14a298ca129d54b439ef8a82fb1cf 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H
@@ -92,14 +92,6 @@ class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
         //- Name of thermal conductivity field
         const word KName_;
 
-        bool fixesValue_;
-
-
-    // Private Member Functions
-
-        //- Am I or neighbour owner of interface
-        bool interfaceOwner(const polyMesh&, const polyPatch&) const;
-
 
 public:
 
@@ -176,14 +168,6 @@ public:
         //- Get corresponding K field
         tmp<scalarField> K() const;
 
-        //- 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 fixesValue_;
-        }
-
         //- Update the coefficients associated with the patch field
         virtual void updateCoeffs();
 
diff --git a/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean b/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean
index f73c44df8a80af20311035b269db90ae9d88b7ea..35e38c65c54b6620f679d4494c76cc03f97cdd57 100755
--- a/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean
+++ b/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean
@@ -3,4 +3,4 @@
 # Clean time folders only
 
 rm -rf *[1-9]*
-rm log.*
+rm -f log.* 2>/dev/null
diff --git a/wmake/rules/General/mplibSYSTEMOPENMPI b/wmake/rules/General/mplibSYSTEMOPENMPI
new file mode 100644
index 0000000000000000000000000000000000000000..98fa814ce323af227f6c1a585feb5c9d5f1312b2
--- /dev/null
+++ b/wmake/rules/General/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+PFLAGS     = -DOMPI_SKIP_MPICXX
diff --git a/wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/dirToString b/wmake/rules/linux64Gcc/dirToString
new file mode 100755
index 0000000000000000000000000000000000000000..8a0125352dd2d2038723a69600ad144c85c8f24d
Binary files /dev/null and b/wmake/rules/linux64Gcc/dirToString differ
diff --git a/wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc/wmkdep b/wmake/rules/linux64Gcc/wmkdep
new file mode 100755
index 0000000000000000000000000000000000000000..949570b0bad43d2a7b7fc8e67cb6ed6ddffe468d
Binary files /dev/null and b/wmake/rules/linux64Gcc/wmkdep differ
diff --git a/wmake/rules/linux64Gcc42/dirToString b/wmake/rules/linux64Gcc42/dirToString
new file mode 100755
index 0000000000000000000000000000000000000000..0560cadf77f4b2a75f422fe207df6bbbb4c814d3
Binary files /dev/null and b/wmake/rules/linux64Gcc42/dirToString differ
diff --git a/wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linux64Gcc42/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc42/wmkdep b/wmake/rules/linux64Gcc42/wmkdep
new file mode 100755
index 0000000000000000000000000000000000000000..f37b2ea3d3deed1553f447a50fdcf557d383401f
Binary files /dev/null and b/wmake/rules/linux64Gcc42/wmkdep differ
diff --git a/wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linux64Icc/mplibSYSTEMOPENMPI b/wmake/rules/linux64Icc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linux64Icc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/dirToString b/wmake/rules/linuxGcc/dirToString
new file mode 100755
index 0000000000000000000000000000000000000000..f2244e3dca29490f592a9d1a9e8c9f96972426dc
Binary files /dev/null and b/wmake/rules/linuxGcc/dirToString differ
diff --git a/wmake/rules/linuxGcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxGcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc/wmkdep b/wmake/rules/linuxGcc/wmkdep
new file mode 100755
index 0000000000000000000000000000000000000000..ca4e0a882f7ad171c72583ccda19629d41b6a839
Binary files /dev/null and b/wmake/rules/linuxGcc/wmkdep differ
diff --git a/wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxGcc42/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI b/wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxIcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxIcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxIcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI b/wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/rules/solarisGcc/mplibSYSTEMOPENMPI b/wmake/rules/solarisGcc/mplibSYSTEMOPENMPI
new file mode 120000
index 0000000000000000000000000000000000000000..cc63a574c364d8150d41d98c3da13deaf139a1b3
--- /dev/null
+++ b/wmake/rules/solarisGcc/mplibSYSTEMOPENMPI
@@ -0,0 +1 @@
+../General/mplibSYSTEMOPENMPI
\ No newline at end of file
diff --git a/wmake/src/wmkdep.l b/wmake/src/wmkdep.l
index 43eb4899b78d69fb403e32bba1c9aba8f5b6051d..e4422104ad40d300e30def79386c1b38f2518344 100644
--- a/wmake/src/wmkdep.l
+++ b/wmake/src/wmkdep.l
@@ -1,9 +1,9 @@
 %{
-/*---------------------------------------------------------------------------*\
+/*---------------------------------*- C -*-----------------------------------*\
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 1991-2009 OpenCFD Ltd.
+   \\  /     A nd            | Copyright (C) 1991-2010 OpenCFD Ltd.
     \\/      M anipulation   |
 ------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ void nextFile(const char* fileName);
 void importFile(const char* fileName);
 void importDirectory(const char* dirName);
 
-#   undef yywrap	/* sometimes a macro by default */
+#   undef yywrap        /* sometimes a macro by default */
 
 %}
 
@@ -164,9 +164,11 @@ int main(int argc, char* argv[])
         (&sourceFile[strlen(sourceFile) - 1] - dotPtr)/sizeof(char)
     );
 
-    /* initialise depFile to zero and use strncat rather than strncpy
-       because there is a bug in the SGI strncat that if 0 preceeds the .
-       it inserts a space */
+    /*
+     * initialise depFile to zero and use strncat rather than strncpy
+     * because there is a bug in the SGI strncat that if 0 preceeds the '.'
+     * it inserts a space
+     */
     depFile = (char*)malloc(strlen(sourceFile) + 3);
     depFile[0] = 0;
     strncat(depFile, sourceFile, (dotPtr - sourceFile)/sizeof(char));
@@ -432,7 +434,7 @@ void importDirectory(const char* dirName)
 int yywrap()
 {
     /* Close the file for the buffer which has just reached EOF */
-    /* This causes strange problems
+    /* This causes strange problems on some systems
     fclose(yyin);
     yyin = 0;
     */