diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev
index fa80518f35e59472fa16cce644746a880fc0404c..9ba620e2dc61d54cfad656133f30f87b088f687d 100644
--- a/ReleaseNotes-dev
+++ b/ReleaseNotes-dev
@@ -120,6 +120,8 @@
     + reuses tracking state in interpolation - improves consistency and speed
 *** *Updated* split cyclics into two separate patches.
     See [[./doc/changes/splitCyclic.txt]]
+  * *New* cyclics (and all coupled patches) have optional
+    matchTolerance entry to allow looser area matching tolerance.
   * *Updated* interpolation (volPointInterpolation) now works without the
     globalPointPatch. Moving mesh cases can now be run non-parallel and
     continued in parallel and reconstructed without any limitation.
@@ -312,8 +314,3 @@
 * Other
   + compilable with =clang=
     In your prefs.sh set the WM_COMPILER to Clang
-  + dlclose error: upon exit of e.g. paraFoam you can get the error
-    Inconsistency detected by ld.so: dl-close.c: 731: _dl_close: Assertion
-    `map->l_init_called' failed!
-    This seems to happen with a mix of system libraries and a thirdParty
-    compiler.
diff --git a/applications/solvers/multiphase/cavitatingFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/readControls.H
index 0dd2b7778078e43e987d7224c23c9f6d6ff878e7..234478955bf970e8f88f33a59dcf8dccac4dfccd 100644
--- a/applications/solvers/multiphase/cavitatingFoam/readControls.H
+++ b/applications/solvers/multiphase/cavitatingFoam/readControls.H
@@ -4,4 +4,3 @@ scalar maxAcousticCo
 (
     readScalar(runTime.controlDict().lookup("maxAcousticCo"))
 );
-
diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
index 4e9559a6d1b913b526b27f3e5bfca162feef3140..92af69626cb4eb3e378ca85dd5cbfac05292c712 100644
--- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
+++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
@@ -41,12 +41,27 @@ Description
 #include "faceSet.H"
 #include "DynamicList.H"
 
+#include <cassert>
 #include "MeshedSurfaces.H"
 
 using namespace Foam;
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+namespace Foam
+{
+    template<>
+    inline unsigned Hash<face>::operator()(const face& t, unsigned seed) const
+    {
+        return Hasher(t.cdata(),t.size()*sizeof(label), seed);
+    }
+
+    template<>
+    inline unsigned Hash<face>::operator()(const face& t) const
+    {
+        return Hash<face>::operator()(t, 0);
+    }
+}
 const string SEPARATOR("    -1");
 
 bool isSeparator(const string& line)
@@ -98,7 +113,7 @@ void readHeader(IFstream& is)
         }
         else
         {
-            Sout<< line << endl;
+            Info<< line << endl;
         }
     }
 }
@@ -107,7 +122,7 @@ void readHeader(IFstream& is)
 // Skip
 void skipSection(IFstream& is)
 {
-    Sout<< "Skipping section at line " << is.lineNumber() << '.' << endl;
+    Info<< "Skipping section at line " << is.lineNumber() << '.' << endl;
 
     string line;
 
@@ -119,10 +134,6 @@ void skipSection(IFstream& is)
         {
             break;
         }
-        else
-        {
-//            Sout<< line << endl;
-        }
     }
 }
 
@@ -148,19 +159,19 @@ void readUnits
     scalar& tempOffset
 )
 {
-    Sout<< "Starting reading units at line " << is.lineNumber() << '.' << endl;
+    Info<< "Starting reading units at line " << is.lineNumber() << '.' << endl;
 
     string line;
     is.getLine(line);
 
     label l = readLabel(IStringStream(line.substr(0, 10))());
-    Sout<< "l:" << l << endl;
+    Info<< "l:" << l << endl;
 
     string units(line.substr(10, 20));
-    Sout<< "units:" << units << endl;
+    Info<< "units:" << units << endl;
 
     label unitType = readLabel(IStringStream(line.substr(30, 10))());
-    Sout<< "unitType:" << unitType << endl;
+    Info<< "unitType:" << unitType << endl;
 
     // Read lengthscales
     is.getLine(line);
@@ -172,7 +183,7 @@ void readUnits
     is.getLine(line);
     tempOffset = readUnvScalar(line.substr(0, 25));
 
-    Sout<< "Unit factors:" << nl
+    Info<< "Unit factors:" << nl
         << "    Length scale       : " << lengthScale << nl
         << "    Force scale        : " << forceScale << nl
         << "    Temperature scale  : " << tempScale << nl
@@ -189,7 +200,7 @@ void readPoints
     DynamicList<label>& unvPointID  // unv index
 )
 {
-    Sout<< "Starting reading points at line " << is.lineNumber() << '.' << endl;
+    Info<< "Starting reading points at line " << is.lineNumber() << '.' << endl;
 
     static bool hasWarned = false;
 
@@ -232,9 +243,22 @@ void readPoints
     points.shrink();
     unvPointID.shrink();
 
-    Sout<< "Read " << points.size() << " points." << endl;
+    Info<< "Read " << points.size() << " points." << endl;
 }
 
+void addAndExtend
+(
+    DynamicList<label>& indizes,
+    label cellI,
+    label val
+)
+{
+    if (indizes.size() < (cellI+1))
+    {
+        indizes.setSize(cellI+1,-1);
+    }
+    indizes[cellI] = val;
+}
 
 // Reads cells section. Read region as well? Not handled yet but should just
 // be a matter of reading corresponding to boundaryFaces the correct property
@@ -245,10 +269,21 @@ void readCells
     DynamicList<cellShape>& cellVerts,
     DynamicList<label>& cellMaterial,
     DynamicList<label>& boundaryFaceIndices,
-    DynamicList<face>& boundaryFaces
+    DynamicList<face>& boundaryFaces,
+    DynamicList<label>& cellCorrespondence,
+    DynamicList<label>& unvPointID  // unv index
 )
 {
-    Sout<< "Starting reading cells at line " << is.lineNumber() << '.' << endl;
+    Info<< "Starting reading cells at line " << is.lineNumber() << '.' << endl;
+
+    // Invert point numbering.
+    label maxUnvPoint = 0;
+    forAll(unvPointID, pointI)
+    {
+        maxUnvPoint = max(maxUnvPoint, unvPointID[pointI]);
+    }
+    labelList unvToFoam(invert(maxUnvPoint+1, unvPointID));
+
 
     const cellModel& hex = *(cellModeller::lookup("hex"));
     const cellModel& prism = *(cellModeller::lookup("prism"));
@@ -328,6 +363,7 @@ void readCells
 
             cellVerts.append(cellShape(tet, cVerts, true));
             cellMaterial.append(physProp);
+            addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1);
 
             if (cellVerts.last().size() != cVerts.size())
             {
@@ -352,6 +388,7 @@ void readCells
 
             cellVerts.append(cellShape(prism, cVerts, true));
             cellMaterial.append(physProp);
+            addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1);
 
             if (cellVerts.last().size() != cVerts.size())
             {
@@ -376,10 +413,11 @@ void readCells
 
             cellVerts.append(cellShape(hex, cVerts, true));
             cellMaterial.append(physProp);
+            addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1);
 
             if (cellVerts.last().size() != cVerts.size())
             {
-                Pout<< "Line:" << is.lineNumber()
+                Info<< "Line:" << is.lineNumber()
                     << " element:" << cellI
                     << " type:" << feID
                     << " collapsed from " << cVerts << nl
@@ -407,6 +445,7 @@ void readCells
 
             cellVerts.append(cellShape(tet, cVerts, true));
             cellMaterial.append(physProp);
+            addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1);
 
             if (cellVerts.last().size() != cVerts.size())
             {
@@ -433,20 +472,21 @@ void readCells
     cellMaterial.shrink();
     boundaryFaces.shrink();
     boundaryFaceIndices.shrink();
+    cellCorrespondence.shrink();
 
-    Sout<< "Read " << cellVerts.size() << " cells"
+    Info<< "Read " << cellVerts.size() << " cells"
         << " and " << boundaryFaces.size() << " boundary faces." << endl;
 }
 
 
-void readPatches
+void readSets
 (
     IFstream& is,
     DynamicList<word>& patchNames,
     DynamicList<labelList>& patchFaceIndices
 )
 {
-    Sout<< "Starting reading patches at line " << is.lineNumber() << '.'
+    Info<< "Starting reading patches at line " << is.lineNumber() << '.'
         << endl;
 
     while (true)
@@ -509,7 +549,7 @@ void readPatches
         }
         else
         {
-            IOWarningIn("readPatches(..)", is)
+            IOWarningIn("readSets(..)", is)
                 << "When reading patches expect entity type code 8"
                 << nl << "    Skipping group code " << groupType
                 << endl;
@@ -530,7 +570,7 @@ void readDOFS
     DynamicList<labelList>& dofVertices
 )
 {
-    Sout<< "Starting reading contraints at line " << is.lineNumber() << '.'
+    Info<< "Starting reading contraints at line " << is.lineNumber() << '.'
         << endl;
 
     string line;
@@ -636,6 +676,9 @@ int main(int argc, char *argv[])
     }
 
 
+    // Switch on additional debug info
+    const bool verbose = false; //true;
+
     // Unit scale factors
     scalar lengthScale = 1;
     scalar forceScale = 1;
@@ -650,6 +693,7 @@ int main(int argc, char *argv[])
     // Cells
     DynamicList<cellShape> cellVerts;
     DynamicList<label> cellMat;
+    DynamicList<label> cellCorrespondence;
 
     // Boundary faces
     DynamicList<label> boundaryFaceIndices;
@@ -670,7 +714,7 @@ int main(int argc, char *argv[])
             break;
         }
 
-        Sout<< "Processing tag:" << tag << endl;
+        Info<< "Processing tag:" << tag << endl;
 
         switch (tag)
         {
@@ -700,13 +744,15 @@ int main(int argc, char *argv[])
                     cellVerts,
                     cellMat,
                     boundaryFaceIndices,
-                    boundaryFaces
+                    boundaryFaces,
+                    cellCorrespondence,
+                    unvPointID
                 );
             break;
 
             case 2452:
             case 2467:
-                readPatches
+                readSets
                 (
                     inFile,
                     patchNames,
@@ -724,12 +770,12 @@ int main(int argc, char *argv[])
             break;
 
             default:
-                Sout<< "Skipping tag " << tag << " on line "
+                Info<< "Skipping tag " << tag << " on line "
                     << inFile.lineNumber() << endl;
                 skipSection(inFile);
             break;
         }
-        Sout<< endl;
+        Info<< endl;
     }
 
 
@@ -798,6 +844,58 @@ int main(int argc, char *argv[])
 
     List<faceList> patchFaceVerts;
 
+    labelList nrFaceCells(boundaryFaces.size(),0);
+    HashTable<label,label> faceToCell[2];
+
+    {
+        HashTable<label, face, Hash<face> > faceToFaceID(boundaryFaces.size());
+        forAll(boundaryFaces, faceI)
+        {
+            SortableList<label> foo(boundaryFaces[faceI]);
+            face theFace(foo);
+            faceToFaceID.insert(theFace,faceI);
+        }
+
+        forAll(cellVerts, cellI)
+        {
+            faceList faces = cellVerts[cellI].faces();
+            forAll(faces, i)
+            {
+                SortableList<label> foo(faces[i]);
+                face theFace(foo);
+                if (faceToFaceID.found(theFace))
+                {
+                    label faceI = faceToFaceID[theFace];
+                    if (nrFaceCells[faceI] < 2)
+                    {
+                        faceToCell[nrFaceCells[faceI]].insert(faceI,cellI);
+                    }
+                    nrFaceCells[faceI]++;
+                }
+            }
+        }
+
+        label cnt = 0;
+        forAll(nrFaceCells, faceI)
+        {
+            assert(nrFaceCells[faceI] == 1 || nrFaceCells[faceI] == 2);
+            if (nrFaceCells[faceI]>1)
+            {
+                cnt++;
+            }
+        }
+
+        if (cnt>0)
+        {
+            Info << "Of " << boundaryFaces.size() << " so-called"
+                << " boundary faces " << cnt << " belong to two cells "
+                << "and are therefore internal" << endl;
+        }
+    }
+
+    HashTable<labelList,word> cellZones;
+    HashTable<labelList,word> faceZones;
+    List<bool> isAPatch(patchNames.size(),true);
 
     if (dofVertIndices.size())
     {
@@ -867,6 +965,10 @@ int main(int argc, char *argv[])
 
         Info<< "Sorting boundary faces according to group (patch)" << endl;
 
+        // make sure that no face is used twice on the boundary
+        // (possible for boundary-only faceZones)
+        labelHashSet alreadyOnBoundary;
+
         // Construct map from boundaryFaceIndices
         Map<label> boundaryFaceToIndex(boundaryFaceIndices.size());
 
@@ -877,16 +979,101 @@ int main(int argc, char *argv[])
 
         forAll(patchFaceVerts, patchI)
         {
+            Info << patchI << ": " << patchNames[patchI] << " is " << flush;
+
             faceList& patchFaces = patchFaceVerts[patchI];
             const labelList& faceIndices = patchFaceIndices[patchI];
 
             patchFaces.setSize(faceIndices.size());
 
+            bool duplicateFaces = false;
+
+            label cnt = 0;
             forAll(patchFaces, i)
             {
-                label bFaceI = boundaryFaceToIndex[faceIndices[i]];
+                if (boundaryFaceToIndex.found(faceIndices[i]))
+                {
+                    label bFaceI = boundaryFaceToIndex[faceIndices[i]];
+                    if (nrFaceCells[bFaceI] == 1)
+                    {
+                        patchFaces[cnt] = boundaryFaces[bFaceI];
+                        cnt++;
+                        if (alreadyOnBoundary.found(bFaceI))
+                        {
+                            duplicateFaces = true;
+                        }
+                    }
+                }
+            }
 
-                patchFaces[i] = boundaryFaces[bFaceI];
+            if (cnt != patchFaces.size() || duplicateFaces)
+            {
+                isAPatch[patchI] = false;
+
+                if (verbose)
+                {
+                    if (cnt != patchFaces.size())
+                    {
+                        WarningIn(args.executable())
+                            << "For patch " << patchI << " there were "
+                            << patchFaces.size()-cnt
+                            << " faces not used because they seem"
+                            << " to be internal. "
+                            << "This seems to be a face or a cell-zone"
+                            << endl;
+                    }
+                    else
+                    {
+                        WarningIn(args.executable())
+                            << "Patch "
+                            << patchI << " has faces that are already "
+                            << " in use on other boundary-patches,"
+                            << " Assuming faceZoneset." << endl;
+                    }
+                }
+
+                patchFaces.setSize(0); // Assume that this is no patch at all
+
+                if (cellCorrespondence[faceIndices[0]] >= 0)
+                {
+                    Info << "cellZone" << endl;
+                    labelList theCells(faceIndices.size());
+                    forAll(faceIndices, i)
+                    {
+                        if (cellCorrespondence[faceIndices[0]] < 0)
+                        {
+                            FatalErrorIn(args.executable())
+                                << "The face index " << faceIndices[i]
+                                << " was not found amongst the cells."
+                                << " This kills the theory that "
+                                << patchNames[patchI] << " is a cell zone"
+                                << endl
+                                << abort(FatalError);
+                        }
+                        theCells[i] = cellCorrespondence[faceIndices[i]];
+                    }
+                    cellZones.insert(patchNames[patchI], theCells);
+                }
+                else
+                {
+                    Info << "faceZone" << endl;
+                    labelList theFaces(faceIndices.size());
+                    forAll(faceIndices, i)
+                    {
+                        theFaces[i] = boundaryFaceToIndex[faceIndices[i]];
+                    }
+                    faceZones.insert(patchNames[patchI],theFaces);
+                }
+            }
+            else
+            {
+                Info << "patch" << endl;
+
+                forAll(patchFaces, i)
+                {
+                    label bFaceI = boundaryFaceToIndex[faceIndices[i]];
+                    alreadyOnBoundary.insert(bFaceI);
+                }
             }
         }
     }
@@ -920,12 +1107,23 @@ int main(int argc, char *argv[])
     }
 
 
-    Info<< "Constructing mesh with non-default patches of size:" << nl;
+    Info<< "\nConstructing mesh with non-default patches of size:" << nl;
+    DynamicList<word> usedPatchNames;
+    DynamicList<faceList> usedPatchFaceVerts;
+
     forAll(patchNames, patchI)
     {
-        Info<< "    " << patchNames[patchI] << '\t'
-            << patchFaceVerts[patchI].size() << nl;
+        if (isAPatch[patchI])
+        {
+            Info<< "    " << patchNames[patchI] << '\t'
+                << patchFaceVerts[patchI].size() << nl;
+            usedPatchNames.append(patchNames[patchI]);
+            usedPatchFaceVerts.append(patchFaceVerts[patchI]);
+        }
     }
+    usedPatchNames.shrink();
+    usedPatchFaceVerts.shrink();
+
     Info<< endl;
 
 
@@ -941,14 +1139,124 @@ int main(int argc, char *argv[])
         ),
         xferMove(polyPoints),
         cellVerts,
-        patchFaceVerts,             // boundaryFaces,
-        patchNames,                 // boundaryPatchNames,
+        usedPatchFaceVerts,             // boundaryFaces,
+        usedPatchNames,                 // boundaryPatchNames,
         wordList(patchNames.size(), polyPatch::typeName), // boundaryPatchTypes,
         "defaultFaces",             // defaultFacesName
         polyPatch::typeName,        // defaultFacesType,
         wordList(0)                 // boundaryPatchPhysicalTypes
     );
 
+
+    if (faceZones.size() > 0 || cellZones.size() > 0)
+    {
+        Info << "Adding cell and face zones" << endl;
+
+        List<pointZone*> pZones(0);
+        List<faceZone*> fZones(faceZones.size());
+        List<cellZone*> cZones(cellZones.size());
+
+        if (cellZones.size() > 0)
+        {
+            forAll(cellZones.toc(), cnt)
+            {
+                word name = cellZones.toc()[cnt];
+                Info<< " Cell Zone " << name << " " << tab
+                    << cellZones[name].size() << endl;
+
+                cZones[cnt] = new cellZone
+                (
+                    name,
+                    cellZones[name],
+                    cnt,
+                    mesh.cellZones()
+                );
+            }
+        }
+        if (faceZones.size() > 0)
+        {
+            const labelList& own = mesh.faceOwner();
+            const labelList& nei = mesh.faceNeighbour();
+            const pointField& centers = mesh.faceCentres();
+            const pointField& points = mesh.points();
+
+            forAll(faceZones.toc(), cnt)
+            {
+                word name = faceZones.toc()[cnt];
+                const labelList& oldIndizes = faceZones[name];
+                labelList indizes(oldIndizes.size());
+
+                Info<< " Face Zone " << name << " " << tab
+                    << oldIndizes.size() << endl;
+
+                forAll(indizes, i)
+                {
+                    const label old = oldIndizes[i];
+                    label noveau = -1;
+                    label c1 = -1, c2 = -1;
+                    if (faceToCell[0].found(old))
+                    {
+                        c1 = faceToCell[0][old];
+                    }
+                    if (faceToCell[1].found(old))
+                    {
+                        c2 = faceToCell[1][old];
+                    }
+                    if (c1 < c2)
+                    {
+                        label tmp = c1;
+                        c1 = c2;
+                        c2 = tmp;
+                    }
+                    if (c2 == -1)
+                    {
+                        // Boundary face is part of the faceZone
+                        forAll(own, j)
+                        {
+                            if (own[j] == c1)
+                            {
+                                const face& f = boundaryFaces[old];
+                                if (mag(centers[j]- f.centre(points)) < SMALL)
+                                {
+                                    noveau = j;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        forAll(nei, j)
+                        {
+                            if
+                            (
+                                (c1 == own[j] && c2 == nei[j])
+                             || (c2 == own[j] && c1 == nei[j])
+                            )
+                            {
+                                noveau = j;
+                                break;
+                            }
+                        }
+                    }
+                    assert(noveau > -1);
+                    indizes[i] = noveau;
+                }
+                fZones[cnt] = new faceZone
+                (
+                    faceZones.toc()[cnt],
+                    indizes,
+                    boolList(indizes.size(),false),
+                    cnt,
+                    mesh.faceZones()
+                );
+            }
+        }
+        mesh.addZones(pZones, fZones, cZones);
+
+        Info << endl;
+    }
+
     mesh.write();
 
     Info<< "End\n" << endl;
diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/threeZonesAll.unv b/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/threeZonesAll.unv
new file mode 100644
index 0000000000000000000000000000000000000000..68467bfe9b56ac1dabc14399cdf73af0f58749c1
--- /dev/null
+++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/threeZonesAll.unv
@@ -0,0 +1,2251 @@
+    -1
+  2411
+         1         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   0.0000000000000000E+00
+         2         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   2.0000000000000000E+02
+         3         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   0.0000000000000000E+00
+         4         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   2.0000000000000000E+02
+         5         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   0.0000000000000000E+00
+         6         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   2.0000000000000000E+02
+         7         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   0.0000000000000000E+00
+         8         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   2.0000000000000000E+02
+         9         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   4.0000000000000000E+02
+        10         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   4.0000000000000000E+02
+        11         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   4.0000000000000000E+02
+        12         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   4.0000000000000000E+02
+        13         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   6.0000000000000000E+02
+        14         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   6.0000000000000000E+02
+        15         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   6.0000000000000000E+02
+        16         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   6.0000000000000000E+02
+        17         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   5.0000000000000000E+01
+        18         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   1.0000000000000000E+02
+        19         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   1.5000000000000000E+02
+        20         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   0.0000000000000000E+00
+        21         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   0.0000000000000000E+00
+        22         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   0.0000000000000000E+00
+        23         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   2.0000000000000000E+02
+        24         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   2.0000000000000000E+02
+        25         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   2.0000000000000000E+02
+        26         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   5.0000000000000000E+01
+        27         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   1.0000000000000000E+02
+        28         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   1.5000000000000000E+02
+        29         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   5.0000000000000000E+01
+        30         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   1.0000000000000000E+02
+        31         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   1.5000000000000000E+02
+        32         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   0.0000000000000000E+00
+        33         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   0.0000000000000000E+00
+        34         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   0.0000000000000000E+00
+        35         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   2.0000000000000000E+02
+        36         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   2.0000000000000000E+02
+        37         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   2.0000000000000000E+02
+        38         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   0.0000000000000000E+00
+        39         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   0.0000000000000000E+00
+        40         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   0.0000000000000000E+00
+        41         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   0.0000000000000000E+00
+        42         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   0.0000000000000000E+00
+        43         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   0.0000000000000000E+00
+        44         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   2.0000000000000000E+02
+        45         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   2.0000000000000000E+02
+        46         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   2.0000000000000000E+02
+        47         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   2.0000000000000000E+02
+        48         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   2.0000000000000000E+02
+        49         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   2.0000000000000000E+02
+        50         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   5.0000000000000000E+01
+        51         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   1.0000000000000000E+02
+        52         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   1.5000000000000000E+02
+        53         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   2.5000000000000000E+02
+        54         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   3.0000000000000000E+02
+        55         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   3.5000000000000000E+02
+        56         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   4.0000000000000000E+02
+        57         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   4.0000000000000000E+02
+        58         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   4.0000000000000000E+02
+        59         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   2.5000000000000000E+02
+        60         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   3.0000000000000000E+02
+        61         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   3.5000000000000000E+02
+        62         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   2.5000000000000000E+02
+        63         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   3.0000000000000000E+02
+        64         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   3.5000000000000000E+02
+        65         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   4.0000000000000000E+02
+        66         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   4.0000000000000000E+02
+        67         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   4.0000000000000000E+02
+        68         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   4.0000000000000000E+02
+        69         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   4.0000000000000000E+02
+        70         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   4.0000000000000000E+02
+        71         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   4.0000000000000000E+02
+        72         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   4.0000000000000000E+02
+        73         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   4.0000000000000000E+02
+        74         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   2.5000000000000000E+02
+        75         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   3.0000000000000000E+02
+        76         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   3.5000000000000000E+02
+        77         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   4.5000000000000000E+02
+        78         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   5.0000000000000000E+02
+        79         0         0         0
+   0.0000000000000000E+00   0.0000000000000000E+00   5.5000000000000000E+02
+        80         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   6.0000000000000000E+02
+        81         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   6.0000000000000000E+02
+        82         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   6.0000000000000000E+02
+        83         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   4.5000000000000000E+02
+        84         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   5.0000000000000000E+02
+        85         0         0         0
+   0.0000000000000000E+00   2.0000000000000000E+02   5.5000000000000000E+02
+        86         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   4.5000000000000000E+02
+        87         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   5.0000000000000000E+02
+        88         0         0         0
+   2.0000000000000000E+02   0.0000000000000000E+00   5.5000000000000000E+02
+        89         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   6.0000000000000000E+02
+        90         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   6.0000000000000000E+02
+        91         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   6.0000000000000000E+02
+        92         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   6.0000000000000000E+02
+        93         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   6.0000000000000000E+02
+        94         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   6.0000000000000000E+02
+        95         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   6.0000000000000000E+02
+        96         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   6.0000000000000000E+02
+        97         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   6.0000000000000000E+02
+        98         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   4.5000000000000000E+02
+        99         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   5.0000000000000000E+02
+       100         0         0         0
+   2.0000000000000000E+02   2.0000000000000000E+02   5.5000000000000000E+02
+       101         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   5.0000000000000000E+01
+       102         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   5.0000000000000000E+01
+       103         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   5.0000000000000000E+01
+       104         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   1.0000000000000000E+02
+       105         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   1.0000000000000000E+02
+       106         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   1.0000000000000000E+02
+       107         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   1.5000000000000000E+02
+       108         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   1.5000000000000000E+02
+       109         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   1.5000000000000000E+02
+       110         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   5.0000000000000000E+01
+       111         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   5.0000000000000000E+01
+       112         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   5.0000000000000000E+01
+       113         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   1.0000000000000000E+02
+       114         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   1.0000000000000000E+02
+       115         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   1.0000000000000000E+02
+       116         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   1.5000000000000000E+02
+       117         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   1.5000000000000000E+02
+       118         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   1.5000000000000000E+02
+       119         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   0.0000000000000000E+00
+       120         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   0.0000000000000000E+00
+       121         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   0.0000000000000000E+00
+       122         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   0.0000000000000000E+00
+       123         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   0.0000000000000000E+00
+       124         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   0.0000000000000000E+00
+       125         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   0.0000000000000000E+00
+       126         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   0.0000000000000000E+00
+       127         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   0.0000000000000000E+00
+       128         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   2.0000000000000000E+02
+       129         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   2.0000000000000000E+02
+       130         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   2.0000000000000000E+02
+       131         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   2.0000000000000000E+02
+       132         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   2.0000000000000000E+02
+       133         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   2.0000000000000000E+02
+       134         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   2.0000000000000000E+02
+       135         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   2.0000000000000000E+02
+       136         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   2.0000000000000000E+02
+       137         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   1.5000000000000000E+02
+       138         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   1.5000000000000000E+02
+       139         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   1.5000000000000000E+02
+       140         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   1.0000000000000000E+02
+       141         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   1.0000000000000000E+02
+       142         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   1.0000000000000000E+02
+       143         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   5.0000000000000000E+01
+       144         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   5.0000000000000000E+01
+       145         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   5.0000000000000000E+01
+       146         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   1.5000000000000000E+02
+       147         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   1.5000000000000000E+02
+       148         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   1.5000000000000000E+02
+       149         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   1.0000000000000000E+02
+       150         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   1.0000000000000000E+02
+       151         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   1.0000000000000000E+02
+       152         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   5.0000000000000000E+01
+       153         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   5.0000000000000000E+01
+       154         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   5.0000000000000000E+01
+       155         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   2.5000000000000000E+02
+       156         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   2.5000000000000000E+02
+       157         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   2.5000000000000000E+02
+       158         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   3.0000000000000000E+02
+       159         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   3.0000000000000000E+02
+       160         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   3.0000000000000000E+02
+       161         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   3.5000000000000000E+02
+       162         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   3.5000000000000000E+02
+       163         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   3.5000000000000000E+02
+       164         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   2.5000000000000000E+02
+       165         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   2.5000000000000000E+02
+       166         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   2.5000000000000000E+02
+       167         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   3.0000000000000000E+02
+       168         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   3.0000000000000000E+02
+       169         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   3.0000000000000000E+02
+       170         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   3.5000000000000000E+02
+       171         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   3.5000000000000000E+02
+       172         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   3.5000000000000000E+02
+       173         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   4.0000000000000000E+02
+       174         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   4.0000000000000000E+02
+       175         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   4.0000000000000000E+02
+       176         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   4.0000000000000000E+02
+       177         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   4.0000000000000000E+02
+       178         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   4.0000000000000000E+02
+       179         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   4.0000000000000000E+02
+       180         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   4.0000000000000000E+02
+       181         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   4.0000000000000000E+02
+       182         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   3.5000000000000000E+02
+       183         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   3.5000000000000000E+02
+       184         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   3.5000000000000000E+02
+       185         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   3.0000000000000000E+02
+       186         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   3.0000000000000000E+02
+       187         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   3.0000000000000000E+02
+       188         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   2.5000000000000000E+02
+       189         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   2.5000000000000000E+02
+       190         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   2.5000000000000000E+02
+       191         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   3.5000000000000000E+02
+       192         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   3.5000000000000000E+02
+       193         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   3.5000000000000000E+02
+       194         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   3.0000000000000000E+02
+       195         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   3.0000000000000000E+02
+       196         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   3.0000000000000000E+02
+       197         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   2.5000000000000000E+02
+       198         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   2.5000000000000000E+02
+       199         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   2.5000000000000000E+02
+       200         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   4.5000000000000000E+02
+       201         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   4.5000000000000000E+02
+       202         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   4.5000000000000000E+02
+       203         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   5.0000000000000000E+02
+       204         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   5.0000000000000000E+02
+       205         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   5.0000000000000000E+02
+       206         0         0         0
+   0.0000000000000000E+00   5.0000000000000000E+01   5.5000000000000000E+02
+       207         0         0         0
+   0.0000000000000000E+00   1.0000000000000000E+02   5.5000000000000000E+02
+       208         0         0         0
+   0.0000000000000000E+00   1.5000000000000000E+02   5.5000000000000000E+02
+       209         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   4.5000000000000000E+02
+       210         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   4.5000000000000000E+02
+       211         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   4.5000000000000000E+02
+       212         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   5.0000000000000000E+02
+       213         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   5.0000000000000000E+02
+       214         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   5.0000000000000000E+02
+       215         0         0         0
+   1.5000000000000000E+02   0.0000000000000000E+00   5.5000000000000000E+02
+       216         0         0         0
+   1.0000000000000000E+02   0.0000000000000000E+00   5.5000000000000000E+02
+       217         0         0         0
+   5.0000000000000000E+01   0.0000000000000000E+00   5.5000000000000000E+02
+       218         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   6.0000000000000000E+02
+       219         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   6.0000000000000000E+02
+       220         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   6.0000000000000000E+02
+       221         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   6.0000000000000000E+02
+       222         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   6.0000000000000000E+02
+       223         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   6.0000000000000000E+02
+       224         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   6.0000000000000000E+02
+       225         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   6.0000000000000000E+02
+       226         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   6.0000000000000000E+02
+       227         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   5.5000000000000000E+02
+       228         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   5.5000000000000000E+02
+       229         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   5.5000000000000000E+02
+       230         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   5.0000000000000000E+02
+       231         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   5.0000000000000000E+02
+       232         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   5.0000000000000000E+02
+       233         0         0         0
+   1.5000000000000000E+02   2.0000000000000000E+02   4.5000000000000000E+02
+       234         0         0         0
+   1.0000000000000000E+02   2.0000000000000000E+02   4.5000000000000000E+02
+       235         0         0         0
+   5.0000000000000000E+01   2.0000000000000000E+02   4.5000000000000000E+02
+       236         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   5.5000000000000000E+02
+       237         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   5.5000000000000000E+02
+       238         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   5.5000000000000000E+02
+       239         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   5.0000000000000000E+02
+       240         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   5.0000000000000000E+02
+       241         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   5.0000000000000000E+02
+       242         0         0         0
+   2.0000000000000000E+02   5.0000000000000000E+01   4.5000000000000000E+02
+       243         0         0         0
+   2.0000000000000000E+02   1.0000000000000000E+02   4.5000000000000000E+02
+       244         0         0         0
+   2.0000000000000000E+02   1.5000000000000000E+02   4.5000000000000000E+02
+       245         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   5.0000000000000000E+01
+       246         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   5.0000000000000000E+01
+       247         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   5.0000000000000000E+01
+       248         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   5.0000000000000000E+01
+       249         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   5.0000000000000000E+01
+       250         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   5.0000000000000000E+01
+       251         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   5.0000000000000000E+01
+       252         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   5.0000000000000000E+01
+       253         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   5.0000000000000000E+01
+       254         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   1.0000000000000000E+02
+       255         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   1.0000000000000000E+02
+       256         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   1.0000000000000000E+02
+       257         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   1.0000000000000000E+02
+       258         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   1.0000000000000000E+02
+       259         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   1.0000000000000000E+02
+       260         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   1.0000000000000000E+02
+       261         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   1.0000000000000000E+02
+       262         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   1.0000000000000000E+02
+       263         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   1.5000000000000000E+02
+       264         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   1.5000000000000000E+02
+       265         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   1.5000000000000000E+02
+       266         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   1.5000000000000000E+02
+       267         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   1.5000000000000000E+02
+       268         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   1.5000000000000000E+02
+       269         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   1.5000000000000000E+02
+       270         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   1.5000000000000000E+02
+       271         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   1.5000000000000000E+02
+       272         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   2.5000000000000000E+02
+       273         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   2.5000000000000000E+02
+       274         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   2.5000000000000000E+02
+       275         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   2.5000000000000000E+02
+       276         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   2.5000000000000000E+02
+       277         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   2.5000000000000000E+02
+       278         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   2.5000000000000000E+02
+       279         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   2.5000000000000000E+02
+       280         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   2.5000000000000000E+02
+       281         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   3.0000000000000000E+02
+       282         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   3.0000000000000000E+02
+       283         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   3.0000000000000000E+02
+       284         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   3.0000000000000000E+02
+       285         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   3.0000000000000000E+02
+       286         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   3.0000000000000000E+02
+       287         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   3.0000000000000000E+02
+       288         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   3.0000000000000000E+02
+       289         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   3.0000000000000000E+02
+       290         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   3.5000000000000000E+02
+       291         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   3.5000000000000000E+02
+       292         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   3.5000000000000000E+02
+       293         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   3.5000000000000000E+02
+       294         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   3.5000000000000000E+02
+       295         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   3.5000000000000000E+02
+       296         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   3.5000000000000000E+02
+       297         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   3.5000000000000000E+02
+       298         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   3.5000000000000000E+02
+       299         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   4.5000000000000000E+02
+       300         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   4.5000000000000000E+02
+       301         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   4.5000000000000000E+02
+       302         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   4.5000000000000000E+02
+       303         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   4.5000000000000000E+02
+       304         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   4.5000000000000000E+02
+       305         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   4.5000000000000000E+02
+       306         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   4.5000000000000000E+02
+       307         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   4.5000000000000000E+02
+       308         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   5.0000000000000000E+02
+       309         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   5.0000000000000000E+02
+       310         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   5.0000000000000000E+02
+       311         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   5.0000000000000000E+02
+       312         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   5.0000000000000000E+02
+       313         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   5.0000000000000000E+02
+       314         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   5.0000000000000000E+02
+       315         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   5.0000000000000000E+02
+       316         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   5.0000000000000000E+02
+       317         0         0         0
+   5.0000000000000000E+01   5.0000000000000000E+01   5.5000000000000000E+02
+       318         0         0         0
+   5.0000000000000000E+01   1.0000000000000000E+02   5.5000000000000000E+02
+       319         0         0         0
+   5.0000000000000000E+01   1.5000000000000000E+02   5.5000000000000000E+02
+       320         0         0         0
+   1.0000000000000000E+02   5.0000000000000000E+01   5.5000000000000000E+02
+       321         0         0         0
+   1.0000000000000000E+02   1.0000000000000000E+02   5.5000000000000000E+02
+       322         0         0         0
+   1.0000000000000000E+02   1.5000000000000000E+02   5.5000000000000000E+02
+       323         0         0         0
+   1.5000000000000000E+02   5.0000000000000000E+01   5.5000000000000000E+02
+       324         0         0         0
+   1.5000000000000000E+02   1.0000000000000000E+02   5.5000000000000000E+02
+       325         0         0         0
+   1.5000000000000000E+02   1.5000000000000000E+02   5.5000000000000000E+02
+    -1
+    -1
+  2412
+         1        11         2         1         7         2
+         0         0         0
+         1        17
+         2        11         2         1         7         2
+         0         0         0
+        17        18
+         3        11         2         1         7         2
+         0         0         0
+        18        19
+         4        11         2         1         7         2
+         0         0         0
+        19         2
+         5        11         2         1         7         2
+         0         0         0
+         1        20
+         6        11         2         1         7         2
+         0         0         0
+        20        21
+         7        11         2         1         7         2
+         0         0         0
+        21        22
+         8        11         2         1         7         2
+         0         0         0
+        22         3
+         9        11         2         1         7         2
+         0         0         0
+         4        23
+        10        11         2         1         7         2
+         0         0         0
+        23        24
+        11        11         2         1         7         2
+         0         0         0
+        24        25
+        12        11         2         1         7         2
+         0         0         0
+        25         2
+        13        11         2         1         7         2
+         0         0         0
+         3        26
+        14        11         2         1         7         2
+         0         0         0
+        26        27
+        15        11         2         1         7         2
+         0         0         0
+        27        28
+        16        11         2         1         7         2
+         0         0         0
+        28         4
+        17        11         2         1         7         2
+         0         0         0
+         5        29
+        18        11         2         1         7         2
+         0         0         0
+        29        30
+        19        11         2         1         7         2
+         0         0         0
+        30        31
+        20        11         2         1         7         2
+         0         0         0
+        31         6
+        21        11         2         1         7         2
+         0         0         0
+         1        32
+        22        11         2         1         7         2
+         0         0         0
+        32        33
+        23        11         2         1         7         2
+         0         0         0
+        33        34
+        24        11         2         1         7         2
+         0         0         0
+        34         5
+        25        11         2         1         7         2
+         0         0         0
+         2        35
+        26        11         2         1         7         2
+         0         0         0
+        35        36
+        27        11         2         1         7         2
+         0         0         0
+        36        37
+        28        11         2         1         7         2
+         0         0         0
+        37         6
+        29        11         2         1         7         2
+         0         0         0
+         3        38
+        30        11         2         1         7         2
+         0         0         0
+        38        39
+        31        11         2         1         7         2
+         0         0         0
+        39        40
+        32        11         2         1         7         2
+         0         0         0
+        40         7
+        33        11         2         1         7         2
+         0         0         0
+         5        41
+        34        11         2         1         7         2
+         0         0         0
+        41        42
+        35        11         2         1         7         2
+         0         0         0
+        42        43
+        36        11         2         1         7         2
+         0         0         0
+        43         7
+        37        11         2         1         7         2
+         0         0         0
+         4        44
+        38        11         2         1         7         2
+         0         0         0
+        44        45
+        39        11         2         1         7         2
+         0         0         0
+        45        46
+        40        11         2         1         7         2
+         0         0         0
+        46         8
+        41        11         2         1         7         2
+         0         0         0
+         8        47
+        42        11         2         1         7         2
+         0         0         0
+        47        48
+        43        11         2         1         7         2
+         0         0         0
+        48        49
+        44        11         2         1         7         2
+         0         0         0
+        49         6
+        45        11         2         1         7         2
+         0         0         0
+         7        50
+        46        11         2         1         7         2
+         0         0         0
+        50        51
+        47        11         2         1         7         2
+         0         0         0
+        51        52
+        48        11         2         1         7         2
+         0         0         0
+        52         8
+        49        11         2         1         7         2
+         0         0         0
+         2        53
+        50        11         2         1         7         2
+         0         0         0
+        53        54
+        51        11         2         1         7         2
+         0         0         0
+        54        55
+        52        11         2         1         7         2
+         0         0         0
+        55         9
+        53        11         2         1         7         2
+         0         0         0
+        10        56
+        54        11         2         1         7         2
+         0         0         0
+        56        57
+        55        11         2         1         7         2
+         0         0         0
+        57        58
+        56        11         2         1         7         2
+         0         0         0
+        58         9
+        57        11         2         1         7         2
+         0         0         0
+         4        59
+        58        11         2         1         7         2
+         0         0         0
+        59        60
+        59        11         2         1         7         2
+         0         0         0
+        60        61
+        60        11         2         1         7         2
+         0         0         0
+        61        10
+        61        11         2         1         7         2
+         0         0         0
+         6        62
+        62        11         2         1         7         2
+         0         0         0
+        62        63
+        63        11         2         1         7         2
+         0         0         0
+        63        64
+        64        11         2         1         7         2
+         0         0         0
+        64        11
+        65        11         2         1         7         2
+         0         0         0
+         9        65
+        66        11         2         1         7         2
+         0         0         0
+        65        66
+        67        11         2         1         7         2
+         0         0         0
+        66        67
+        68        11         2         1         7         2
+         0         0         0
+        67        11
+        69        11         2         1         7         2
+         0         0         0
+        10        68
+        70        11         2         1         7         2
+         0         0         0
+        68        69
+        71        11         2         1         7         2
+         0         0         0
+        69        70
+        72        11         2         1         7         2
+         0         0         0
+        70        12
+        73        11         2         1         7         2
+         0         0         0
+        12        71
+        74        11         2         1         7         2
+         0         0         0
+        71        72
+        75        11         2         1         7         2
+         0         0         0
+        72        73
+        76        11         2         1         7         2
+         0         0         0
+        73        11
+        77        11         2         1         7         2
+         0         0         0
+         8        74
+        78        11         2         1         7         2
+         0         0         0
+        74        75
+        79        11         2         1         7         2
+         0         0         0
+        75        76
+        80        11         2         1         7         2
+         0         0         0
+        76        12
+        81        11         2         1         7         2
+         0         0         0
+         9        77
+        82        11         2         1         7         2
+         0         0         0
+        77        78
+        83        11         2         1         7         2
+         0         0         0
+        78        79
+        84        11         2         1         7         2
+         0         0         0
+        79        13
+        85        11         2         1         7         2
+         0         0         0
+        13        80
+        86        11         2         1         7         2
+         0         0         0
+        80        81
+        87        11         2         1         7         2
+         0         0         0
+        81        82
+        88        11         2         1         7         2
+         0         0         0
+        82        14
+        89        11         2         1         7         2
+         0         0         0
+        10        83
+        90        11         2         1         7         2
+         0         0         0
+        83        84
+        91        11         2         1         7         2
+         0         0         0
+        84        85
+        92        11         2         1         7         2
+         0         0         0
+        85        14
+        93        11         2         1         7         2
+         0         0         0
+        11        86
+        94        11         2         1         7         2
+         0         0         0
+        86        87
+        95        11         2         1         7         2
+         0         0         0
+        87        88
+        96        11         2         1         7         2
+         0         0         0
+        88        15
+        97        11         2         1         7         2
+         0         0         0
+        13        89
+        98        11         2         1         7         2
+         0         0         0
+        89        90
+        99        11         2         1         7         2
+         0         0         0
+        90        91
+       100        11         2         1         7         2
+         0         0         0
+        91        15
+       101        11         2         1         7         2
+         0         0         0
+        14        92
+       102        11         2         1         7         2
+         0         0         0
+        92        93
+       103        11         2         1         7         2
+         0         0         0
+        93        94
+       104        11         2         1         7         2
+         0         0         0
+        94        16
+       105        11         2         1         7         2
+         0         0         0
+        15        95
+       106        11         2         1         7         2
+         0         0         0
+        95        96
+       107        11         2         1         7         2
+         0         0         0
+        96        97
+       108        11         2         1         7         2
+         0         0         0
+        97        16
+       109        11         2         1         7         2
+         0         0         0
+        12        98
+       110        11         2         1         7         2
+         0         0         0
+        98        99
+       111        11         2         1         7         2
+         0         0         0
+        99       100
+       112        11         2         1         7         2
+         0         0         0
+       100        16
+       113        44         2         1         7         4
+         1        17       101        20
+       114        44         2         1         7         4
+        20       101       102        21
+       115        44         2         1         7         4
+        21       102       103        22
+       116        44         2         1         7         4
+        22       103        26         3
+       117        44         2         1         7         4
+        17        18       104       101
+       118        44         2         1         7         4
+       101       104       105       102
+       119        44         2         1         7         4
+       102       105       106       103
+       120        44         2         1         7         4
+       103       106        27        26
+       121        44         2         1         7         4
+        18        19       107       104
+       122        44         2         1         7         4
+       104       107       108       105
+       123        44         2         1         7         4
+       105       108       109       106
+       124        44         2         1         7         4
+       106       109        28        27
+       125        44         2         1         7         4
+        19         2        25       107
+       126        44         2         1         7         4
+       107        25        24       108
+       127        44         2         1         7         4
+       108        24        23       109
+       128        44         2         1         7         4
+       109        23         4        28
+       129        44         2         1         7         4
+         5        29       110        34
+       130        44         2         1         7         4
+        34       110       111        33
+       131        44         2         1         7         4
+        33       111       112        32
+       132        44         2         1         7         4
+        32       112        17         1
+       133        44         2         1         7         4
+        29        30       113       110
+       134        44         2         1         7         4
+       110       113       114       111
+       135        44         2         1         7         4
+       111       114       115       112
+       136        44         2         1         7         4
+       112       115        18        17
+       137        44         2         1         7         4
+        30        31       116       113
+       138        44         2         1         7         4
+       113       116       117       114
+       139        44         2         1         7         4
+       114       117       118       115
+       140        44         2         1         7         4
+       115       118        19        18
+       141        44         2         1         7         4
+        31         6        37       116
+       142        44         2         1         7         4
+       116        37        36       117
+       143        44         2         1         7         4
+       117        36        35       118
+       144        44         2         1         7         4
+       118        35         2        19
+       145        44         2         1         7         4
+         1        20       119        32
+       146        44         2         1         7         4
+        32       119       120        33
+       147        44         2         1         7         4
+        33       120       121        34
+       148        44         2         1         7         4
+        34       121        41         5
+       149        44         2         1         7         4
+        20        21       122       119
+       150        44         2         1         7         4
+       119       122       123       120
+       151        44         2         1         7         4
+       120       123       124       121
+       152        44         2         1         7         4
+       121       124        42        41
+       153        44         2         1         7         4
+        21        22       125       122
+       154        44         2         1         7         4
+       122       125       126       123
+       155        44         2         1         7         4
+       123       126       127       124
+       156        44         2         1         7         4
+       124       127        43        42
+       157        44         2         1         7         4
+        22         3        38       125
+       158        44         2         1         7         4
+       125        38        39       126
+       159        44         2         1         7         4
+       126        39        40       127
+       160        44         2         1         7         4
+       127        40         7        43
+       161        44         2         1         7         4
+         8        46       128        47
+       162        44         2         1         7         4
+        47       128       129        48
+       163        44         2         1         7         4
+        48       129       130        49
+       164        44         2         1         7         4
+        49       130        37         6
+       165        44         2         1         7         4
+        46        45       131       128
+       166        44         2         1         7         4
+       128       131       132       129
+       167        44         2         1         7         4
+       129       132       133       130
+       168        44         2         1         7         4
+       130       133        36        37
+       169        44         2         1         7         4
+        45        44       134       131
+       170        44         2         1         7         4
+       131       134       135       132
+       171        44         2         1         7         4
+       132       135       136       133
+       172        44         2         1         7         4
+       133       136        35        36
+       173        44         2         1         7         4
+        44         4        23       134
+       174        44         2         1         7         4
+       134        23        24       135
+       175        44         2         1         7         4
+       135        24        25       136
+       176        44         2         1         7         4
+       136        25         2        35
+       177        44         2         1         7         4
+         8        52       137        46
+       178        44         2         1         7         4
+        46       137       138        45
+       179        44         2         1         7         4
+        45       138       139        44
+       180        44         2         1         7         4
+        44       139        28         4
+       181        44         2         1         7         4
+        52        51       140       137
+       182        44         2         1         7         4
+       137       140       141       138
+       183        44         2         1         7         4
+       138       141       142       139
+       184        44         2         1         7         4
+       139       142        27        28
+       185        44         2         1         7         4
+        51        50       143       140
+       186        44         2         1         7         4
+       140       143       144       141
+       187        44         2         1         7         4
+       141       144       145       142
+       188        44         2         1         7         4
+       142       145        26        27
+       189        44         2         1         7         4
+        50         7        40       143
+       190        44         2         1         7         4
+       143        40        39       144
+       191        44         2         1         7         4
+       144        39        38       145
+       192        44         2         1         7         4
+       145        38         3        26
+       193        44         2         1         7         4
+         6        31       146        49
+       194        44         2         1         7         4
+        49       146       147        48
+       195        44         2         1         7         4
+        48       147       148        47
+       196        44         2         1         7         4
+        47       148        52         8
+       197        44         2         1         7         4
+        31        30       149       146
+       198        44         2         1         7         4
+       146       149       150       147
+       199        44         2         1         7         4
+       147       150       151       148
+       200        44         2         1         7         4
+       148       151        51        52
+       201        44         2         1         7         4
+        30        29       152       149
+       202        44         2         1         7         4
+       149       152       153       150
+       203        44         2         1         7         4
+       150       153       154       151
+       204        44         2         1         7         4
+       151       154        50        51
+       205        44         2         1         7         4
+        29         5        41       152
+       206        44         2         1         7         4
+       152        41        42       153
+       207        44         2         1         7         4
+       153        42        43       154
+       208        44         2         1         7         4
+       154        43         7        50
+       209        44         2         1         7         4
+         2        53       155        25
+       210        44         2         1         7         4
+        25       155       156        24
+       211        44         2         1         7         4
+        24       156       157        23
+       212        44         2         1         7         4
+        23       157        59         4
+       213        44         2         1         7         4
+        53        54       158       155
+       214        44         2         1         7         4
+       155       158       159       156
+       215        44         2         1         7         4
+       156       159       160       157
+       216        44         2         1         7         4
+       157       160        60        59
+       217        44         2         1         7         4
+        54        55       161       158
+       218        44         2         1         7         4
+       158       161       162       159
+       219        44         2         1         7         4
+       159       162       163       160
+       220        44         2         1         7         4
+       160       163        61        60
+       221        44         2         1         7         4
+        55         9        58       161
+       222        44         2         1         7         4
+       161        58        57       162
+       223        44         2         1         7         4
+       162        57        56       163
+       224        44         2         1         7         4
+       163        56        10        61
+       225        44         2         1         7         4
+         6        62       164        37
+       226        44         2         1         7         4
+        37       164       165        36
+       227        44         2         1         7         4
+        36       165       166        35
+       228        44         2         1         7         4
+        35       166        53         2
+       229        44         2         1         7         4
+        62        63       167       164
+       230        44         2         1         7         4
+       164       167       168       165
+       231        44         2         1         7         4
+       165       168       169       166
+       232        44         2         1         7         4
+       166       169        54        53
+       233        44         2         1         7         4
+        63        64       170       167
+       234        44         2         1         7         4
+       167       170       171       168
+       235        44         2         1         7         4
+       168       171       172       169
+       236        44         2         1         7         4
+       169       172        55        54
+       237        44         2         1         7         4
+        64        11        67       170
+       238        44         2         1         7         4
+       170        67        66       171
+       239        44         2         1         7         4
+       171        66        65       172
+       240        44         2         1         7         4
+       172        65         9        55
+       241        44         2         1         7         4
+        12        70       173        71
+       242        44         2         1         7         4
+        71       173       174        72
+       243        44         2         1         7         4
+        72       174       175        73
+       244        44         2         1         7         4
+        73       175        67        11
+       245        44         2         1         7         4
+        70        69       176       173
+       246        44         2         1         7         4
+       173       176       177       174
+       247        44         2         1         7         4
+       174       177       178       175
+       248        44         2         1         7         4
+       175       178        66        67
+       249        44         2         1         7         4
+        69        68       179       176
+       250        44         2         1         7         4
+       176       179       180       177
+       251        44         2         1         7         4
+       177       180       181       178
+       252        44         2         1         7         4
+       178       181        65        66
+       253        44         2         1         7         4
+        68        10        56       179
+       254        44         2         1         7         4
+       179        56        57       180
+       255        44         2         1         7         4
+       180        57        58       181
+       256        44         2         1         7         4
+       181        58         9        65
+       257        44         2         1         7         4
+        12        76       182        70
+       258        44         2         1         7         4
+        70       182       183        69
+       259        44         2         1         7         4
+        69       183       184        68
+       260        44         2         1         7         4
+        68       184        61        10
+       261        44         2         1         7         4
+        76        75       185       182
+       262        44         2         1         7         4
+       182       185       186       183
+       263        44         2         1         7         4
+       183       186       187       184
+       264        44         2         1         7         4
+       184       187        60        61
+       265        44         2         1         7         4
+        75        74       188       185
+       266        44         2         1         7         4
+       185       188       189       186
+       267        44         2         1         7         4
+       186       189       190       187
+       268        44         2         1         7         4
+       187       190        59        60
+       269        44         2         1         7         4
+        74         8        46       188
+       270        44         2         1         7         4
+       188        46        45       189
+       271        44         2         1         7         4
+       189        45        44       190
+       272        44         2         1         7         4
+       190        44         4        59
+       273        44         2         1         7         4
+        11        64       191        73
+       274        44         2         1         7         4
+        73       191       192        72
+       275        44         2         1         7         4
+        72       192       193        71
+       276        44         2         1         7         4
+        71       193        76        12
+       277        44         2         1         7         4
+        64        63       194       191
+       278        44         2         1         7         4
+       191       194       195       192
+       279        44         2         1         7         4
+       192       195       196       193
+       280        44         2         1         7         4
+       193       196        75        76
+       281        44         2         1         7         4
+        63        62       197       194
+       282        44         2         1         7         4
+       194       197       198       195
+       283        44         2         1         7         4
+       195       198       199       196
+       284        44         2         1         7         4
+       196       199        74        75
+       285        44         2         1         7         4
+        62         6        49       197
+       286        44         2         1         7         4
+       197        49        48       198
+       287        44         2         1         7         4
+       198        48        47       199
+       288        44         2         1         7         4
+       199        47         8        74
+       289        44         2         1         7         4
+         9        77       200        58
+       290        44         2         1         7         4
+        58       200       201        57
+       291        44         2         1         7         4
+        57       201       202        56
+       292        44         2         1         7         4
+        56       202        83        10
+       293        44         2         1         7         4
+        77        78       203       200
+       294        44         2         1         7         4
+       200       203       204       201
+       295        44         2         1         7         4
+       201       204       205       202
+       296        44         2         1         7         4
+       202       205        84        83
+       297        44         2         1         7         4
+        78        79       206       203
+       298        44         2         1         7         4
+       203       206       207       204
+       299        44         2         1         7         4
+       204       207       208       205
+       300        44         2         1         7         4
+       205       208        85        84
+       301        44         2         1         7         4
+        79        13        80       206
+       302        44         2         1         7         4
+       206        80        81       207
+       303        44         2         1         7         4
+       207        81        82       208
+       304        44         2         1         7         4
+       208        82        14        85
+       305        44         2         1         7         4
+        11        86       209        67
+       306        44         2         1         7         4
+        67       209       210        66
+       307        44         2         1         7         4
+        66       210       211        65
+       308        44         2         1         7         4
+        65       211        77         9
+       309        44         2         1         7         4
+        86        87       212       209
+       310        44         2         1         7         4
+       209       212       213       210
+       311        44         2         1         7         4
+       210       213       214       211
+       312        44         2         1         7         4
+       211       214        78        77
+       313        44         2         1         7         4
+        87        88       215       212
+       314        44         2         1         7         4
+       212       215       216       213
+       315        44         2         1         7         4
+       213       216       217       214
+       316        44         2         1         7         4
+       214       217        79        78
+       317        44         2         1         7         4
+        88        15        91       215
+       318        44         2         1         7         4
+       215        91        90       216
+       319        44         2         1         7         4
+       216        90        89       217
+       320        44         2         1         7         4
+       217        89        13        79
+       321        44         2         1         7         4
+        14        82       218        92
+       322        44         2         1         7         4
+        92       218       219        93
+       323        44         2         1         7         4
+        93       219       220        94
+       324        44         2         1         7         4
+        94       220        97        16
+       325        44         2         1         7         4
+        82        81       221       218
+       326        44         2         1         7         4
+       218       221       222       219
+       327        44         2         1         7         4
+       219       222       223       220
+       328        44         2         1         7         4
+       220       223        96        97
+       329        44         2         1         7         4
+        81        80       224       221
+       330        44         2         1         7         4
+       221       224       225       222
+       331        44         2         1         7         4
+       222       225       226       223
+       332        44         2         1         7         4
+       223       226        95        96
+       333        44         2         1         7         4
+        80        13        89       224
+       334        44         2         1         7         4
+       224        89        90       225
+       335        44         2         1         7         4
+       225        90        91       226
+       336        44         2         1         7         4
+       226        91        15        95
+       337        44         2         1         7         4
+        16       100       227        94
+       338        44         2         1         7         4
+        94       227       228        93
+       339        44         2         1         7         4
+        93       228       229        92
+       340        44         2         1         7         4
+        92       229        85        14
+       341        44         2         1         7         4
+       100        99       230       227
+       342        44         2         1         7         4
+       227       230       231       228
+       343        44         2         1         7         4
+       228       231       232       229
+       344        44         2         1         7         4
+       229       232        84        85
+       345        44         2         1         7         4
+        99        98       233       230
+       346        44         2         1         7         4
+       230       233       234       231
+       347        44         2         1         7         4
+       231       234       235       232
+       348        44         2         1         7         4
+       232       235        83        84
+       349        44         2         1         7         4
+        98        12        70       233
+       350        44         2         1         7         4
+       233        70        69       234
+       351        44         2         1         7         4
+       234        69        68       235
+       352        44         2         1         7         4
+       235        68        10        83
+       353        44         2         1         7         4
+        15        88       236        95
+       354        44         2         1         7         4
+        95       236       237        96
+       355        44         2         1         7         4
+        96       237       238        97
+       356        44         2         1         7         4
+        97       238       100        16
+       357        44         2         1         7         4
+        88        87       239       236
+       358        44         2         1         7         4
+       236       239       240       237
+       359        44         2         1         7         4
+       237       240       241       238
+       360        44         2         1         7         4
+       238       241        99       100
+       361        44         2         1         7         4
+        87        86       242       239
+       362        44         2         1         7         4
+       239       242       243       240
+       363        44         2         1         7         4
+       240       243       244       241
+       364        44         2         1         7         4
+       241       244        98        99
+       365        44         2         1         7         4
+        86        11        73       242
+       366        44         2         1         7         4
+       242        73        72       243
+       367        44         2         1         7         4
+       243        72        71       244
+       368        44         2         1         7         4
+       244        71        12        98
+       369       115         2         1         7         8
+         1        17       112        32        20       101       245       119
+       370       115         2         1         7         8
+        20       101       245       119        21       102       246       122
+       371       115         2         1         7         8
+        21       102       246       122        22       103       247       125
+       372       115         2         1         7         8
+        22       103       247       125         3        26       145        38
+       373       115         2         1         7         8
+        32       112       111        33       119       245       248       120
+       374       115         2         1         7         8
+       119       245       248       120       122       246       249       123
+       375       115         2         1         7         8
+       122       246       249       123       125       247       250       126
+       376       115         2         1         7         8
+       125       247       250       126        38       145       144        39
+       377       115         2         1         7         8
+        33       111       110        34       120       248       251       121
+       378       115         2         1         7         8
+       120       248       251       121       123       249       252       124
+       379       115         2         1         7         8
+       123       249       252       124       126       250       253       127
+       380       115         2         1         7         8
+       126       250       253       127        39       144       143        40
+       381       115         2         1         7         8
+        34       110        29         5       121       251       152        41
+       382       115         2         1         7         8
+       121       251       152        41       124       252       153        42
+       383       115         2         1         7         8
+       124       252       153        42       127       253       154        43
+       384       115         2         1         7         8
+       127       253       154        43        40       143        50         7
+       385       115         2         1         7         8
+        17        18       115       112       101       104       254       245
+       386       115         2         1         7         8
+       101       104       254       245       102       105       255       246
+       387       115         2         1         7         8
+       102       105       255       246       103       106       256       247
+       388       115         2         1         7         8
+       103       106       256       247        26        27       142       145
+       389       115         2         1         7         8
+       112       115       114       111       245       254       257       248
+       390       115         2         1         7         8
+       245       254       257       248       246       255       258       249
+       391       115         2         1         7         8
+       246       255       258       249       247       256       259       250
+       392       115         2         1         7         8
+       247       256       259       250       145       142       141       144
+       393       115         2         1         7         8
+       111       114       113       110       248       257       260       251
+       394       115         2         1         7         8
+       248       257       260       251       249       258       261       252
+       395       115         2         1         7         8
+       249       258       261       252       250       259       262       253
+       396       115         2         1         7         8
+       250       259       262       253       144       141       140       143
+       397       115         2         1         7         8
+       110       113        30        29       251       260       149       152
+       398       115         2         1         7         8
+       251       260       149       152       252       261       150       153
+       399       115         2         1         7         8
+       252       261       150       153       253       262       151       154
+       400       115         2         1         7         8
+       253       262       151       154       143       140        51        50
+       401       115         2         1         7         8
+        18        19       118       115       104       107       263       254
+       402       115         2         1         7         8
+       104       107       263       254       105       108       264       255
+       403       115         2         1         7         8
+       105       108       264       255       106       109       265       256
+       404       115         2         1         7         8
+       106       109       265       256        27        28       139       142
+       405       115         2         1         7         8
+       115       118       117       114       254       263       266       257
+       406       115         2         1         7         8
+       254       263       266       257       255       264       267       258
+       407       115         2         1         7         8
+       255       264       267       258       256       265       268       259
+       408       115         2         1         7         8
+       256       265       268       259       142       139       138       141
+       409       115         2         1         7         8
+       114       117       116       113       257       266       269       260
+       410       115         2         1         7         8
+       257       266       269       260       258       267       270       261
+       411       115         2         1         7         8
+       258       267       270       261       259       268       271       262
+       412       115         2         1         7         8
+       259       268       271       262       141       138       137       140
+       413       115         2         1         7         8
+       113       116        31        30       260       269       146       149
+       414       115         2         1         7         8
+       260       269       146       149       261       270       147       150
+       415       115         2         1         7         8
+       261       270       147       150       262       271       148       151
+       416       115         2         1         7         8
+       262       271       148       151       140       137        52        51
+       417       115         2         1         7         8
+        19         2        35       118       107        25       136       263
+       418       115         2         1         7         8
+       107        25       136       263       108        24       135       264
+       419       115         2         1         7         8
+       108        24       135       264       109        23       134       265
+       420       115         2         1         7         8
+       109        23       134       265        28         4        44       139
+       421       115         2         1         7         8
+       118        35        36       117       263       136       133       266
+       422       115         2         1         7         8
+       263       136       133       266       264       135       132       267
+       423       115         2         1         7         8
+       264       135       132       267       265       134       131       268
+       424       115         2         1         7         8
+       265       134       131       268       139        44        45       138
+       425       115         2         1         7         8
+       117        36        37       116       266       133       130       269
+       426       115         2         1         7         8
+       266       133       130       269       267       132       129       270
+       427       115         2         1         7         8
+       267       132       129       270       268       131       128       271
+       428       115         2         1         7         8
+       268       131       128       271       138        45        46       137
+       429       115         2         1         7         8
+       116        37         6        31       269       130        49       146
+       430       115         2         1         7         8
+       269       130        49       146       270       129        48       147
+       431       115         2         1         7         8
+       270       129        48       147       271       128        47       148
+       432       115         2         1         7         8
+       271       128        47       148       137        46         8        52
+       433       115         2         1         7         8
+         2        53       166        35        25       155       272       136
+       434       115         2         1         7         8
+        25       155       272       136        24       156       273       135
+       435       115         2         1         7         8
+        24       156       273       135        23       157       274       134
+       436       115         2         1         7         8
+        23       157       274       134         4        59       190        44
+       437       115         2         1         7         8
+        35       166       165        36       136       272       275       133
+       438       115         2         1         7         8
+       136       272       275       133       135       273       276       132
+       439       115         2         1         7         8
+       135       273       276       132       134       274       277       131
+       440       115         2         1         7         8
+       134       274       277       131        44       190       189        45
+       441       115         2         1         7         8
+        36       165       164        37       133       275       278       130
+       442       115         2         1         7         8
+       133       275       278       130       132       276       279       129
+       443       115         2         1         7         8
+       132       276       279       129       131       277       280       128
+       444       115         2         1         7         8
+       131       277       280       128        45       189       188        46
+       445       115         2         1         7         8
+        37       164        62         6       130       278       197        49
+       446       115         2         1         7         8
+       130       278       197        49       129       279       198        48
+       447       115         2         1         7         8
+       129       279       198        48       128       280       199        47
+       448       115         2         1         7         8
+       128       280       199        47        46       188        74         8
+       449       115         2         1         7         8
+        53        54       169       166       155       158       281       272
+       450       115         2         1         7         8
+       155       158       281       272       156       159       282       273
+       451       115         2         1         7         8
+       156       159       282       273       157       160       283       274
+       452       115         2         1         7         8
+       157       160       283       274        59        60       187       190
+       453       115         2         1         7         8
+       166       169       168       165       272       281       284       275
+       454       115         2         1         7         8
+       272       281       284       275       273       282       285       276
+       455       115         2         1         7         8
+       273       282       285       276       274       283       286       277
+       456       115         2         1         7         8
+       274       283       286       277       190       187       186       189
+       457       115         2         1         7         8
+       165       168       167       164       275       284       287       278
+       458       115         2         1         7         8
+       275       284       287       278       276       285       288       279
+       459       115         2         1         7         8
+       276       285       288       279       277       286       289       280
+       460       115         2         1         7         8
+       277       286       289       280       189       186       185       188
+       461       115         2         1         7         8
+       164       167        63        62       278       287       194       197
+       462       115         2         1         7         8
+       278       287       194       197       279       288       195       198
+       463       115         2         1         7         8
+       279       288       195       198       280       289       196       199
+       464       115         2         1         7         8
+       280       289       196       199       188       185        75        74
+       465       115         2         1         7         8
+        54        55       172       169       158       161       290       281
+       466       115         2         1         7         8
+       158       161       290       281       159       162       291       282
+       467       115         2         1         7         8
+       159       162       291       282       160       163       292       283
+       468       115         2         1         7         8
+       160       163       292       283        60        61       184       187
+       469       115         2         1         7         8
+       169       172       171       168       281       290       293       284
+       470       115         2         1         7         8
+       281       290       293       284       282       291       294       285
+       471       115         2         1         7         8
+       282       291       294       285       283       292       295       286
+       472       115         2         1         7         8
+       283       292       295       286       187       184       183       186
+       473       115         2         1         7         8
+       168       171       170       167       284       293       296       287
+       474       115         2         1         7         8
+       284       293       296       287       285       294       297       288
+       475       115         2         1         7         8
+       285       294       297       288       286       295       298       289
+       476       115         2         1         7         8
+       286       295       298       289       186       183       182       185
+       477       115         2         1         7         8
+       167       170        64        63       287       296       191       194
+       478       115         2         1         7         8
+       287       296       191       194       288       297       192       195
+       479       115         2         1         7         8
+       288       297       192       195       289       298       193       196
+       480       115         2         1         7         8
+       289       298       193       196       185       182        76        75
+       481       115         2         1         7         8
+        55         9        65       172       161        58       181       290
+       482       115         2         1         7         8
+       161        58       181       290       162        57       180       291
+       483       115         2         1         7         8
+       162        57       180       291       163        56       179       292
+       484       115         2         1         7         8
+       163        56       179       292        61        10        68       184
+       485       115         2         1         7         8
+       172        65        66       171       290       181       178       293
+       486       115         2         1         7         8
+       290       181       178       293       291       180       177       294
+       487       115         2         1         7         8
+       291       180       177       294       292       179       176       295
+       488       115         2         1         7         8
+       292       179       176       295       184        68        69       183
+       489       115         2         1         7         8
+       171        66        67       170       293       178       175       296
+       490       115         2         1         7         8
+       293       178       175       296       294       177       174       297
+       491       115         2         1         7         8
+       294       177       174       297       295       176       173       298
+       492       115         2         1         7         8
+       295       176       173       298       183        69        70       182
+       493       115         2         1         7         8
+       170        67        11        64       296       175        73       191
+       494       115         2         1         7         8
+       296       175        73       191       297       174        72       192
+       495       115         2         1         7         8
+       297       174        72       192       298       173        71       193
+       496       115         2         1         7         8
+       298       173        71       193       182        70        12        76
+       497       115         2         1         7         8
+         9        77       211        65        58       200       299       181
+       498       115         2         1         7         8
+        58       200       299       181        57       201       300       180
+       499       115         2         1         7         8
+        57       201       300       180        56       202       301       179
+       500       115         2         1         7         8
+        56       202       301       179        10        83       235        68
+       501       115         2         1         7         8
+        65       211       210        66       181       299       302       178
+       502       115         2         1         7         8
+       181       299       302       178       180       300       303       177
+       503       115         2         1         7         8
+       180       300       303       177       179       301       304       176
+       504       115         2         1         7         8
+       179       301       304       176        68       235       234        69
+       505       115         2         1         7         8
+        66       210       209        67       178       302       305       175
+       506       115         2         1         7         8
+       178       302       305       175       177       303       306       174
+       507       115         2         1         7         8
+       177       303       306       174       176       304       307       173
+       508       115         2         1         7         8
+       176       304       307       173        69       234       233        70
+       509       115         2         1         7         8
+        67       209        86        11       175       305       242        73
+       510       115         2         1         7         8
+       175       305       242        73       174       306       243        72
+       511       115         2         1         7         8
+       174       306       243        72       173       307       244        71
+       512       115         2         1         7         8
+       173       307       244        71        70       233        98        12
+       513       115         2         1         7         8
+        77        78       214       211       200       203       308       299
+       514       115         2         1         7         8
+       200       203       308       299       201       204       309       300
+       515       115         2         1         7         8
+       201       204       309       300       202       205       310       301
+       516       115         2         1         7         8
+       202       205       310       301        83        84       232       235
+       517       115         2         1         7         8
+       211       214       213       210       299       308       311       302
+       518       115         2         1         7         8
+       299       308       311       302       300       309       312       303
+       519       115         2         1         7         8
+       300       309       312       303       301       310       313       304
+       520       115         2         1         7         8
+       301       310       313       304       235       232       231       234
+       521       115         2         1         7         8
+       210       213       212       209       302       311       314       305
+       522       115         2         1         7         8
+       302       311       314       305       303       312       315       306
+       523       115         2         1         7         8
+       303       312       315       306       304       313       316       307
+       524       115         2         1         7         8
+       304       313       316       307       234       231       230       233
+       525       115         2         1         7         8
+       209       212        87        86       305       314       239       242
+       526       115         2         1         7         8
+       305       314       239       242       306       315       240       243
+       527       115         2         1         7         8
+       306       315       240       243       307       316       241       244
+       528       115         2         1         7         8
+       307       316       241       244       233       230        99        98
+       529       115         2         1         7         8
+        78        79       217       214       203       206       317       308
+       530       115         2         1         7         8
+       203       206       317       308       204       207       318       309
+       531       115         2         1         7         8
+       204       207       318       309       205       208       319       310
+       532       115         2         1         7         8
+       205       208       319       310        84        85       229       232
+       533       115         2         1         7         8
+       214       217       216       213       308       317       320       311
+       534       115         2         1         7         8
+       308       317       320       311       309       318       321       312
+       535       115         2         1         7         8
+       309       318       321       312       310       319       322       313
+       536       115         2         1         7         8
+       310       319       322       313       232       229       228       231
+       537       115         2         1         7         8
+       213       216       215       212       311       320       323       314
+       538       115         2         1         7         8
+       311       320       323       314       312       321       324       315
+       539       115         2         1         7         8
+       312       321       324       315       313       322       325       316
+       540       115         2         1         7         8
+       313       322       325       316       231       228       227       230
+       541       115         2         1         7         8
+       212       215        88        87       314       323       236       239
+       542       115         2         1         7         8
+       314       323       236       239       315       324       237       240
+       543       115         2         1         7         8
+       315       324       237       240       316       325       238       241
+       544       115         2         1         7         8
+       316       325       238       241       230       227       100        99
+       545       115         2         1         7         8
+        79        13        89       217       206        80       224       317
+       546       115         2         1         7         8
+       206        80       224       317       207        81       221       318
+       547       115         2         1         7         8
+       207        81       221       318       208        82       218       319
+       548       115         2         1         7         8
+       208        82       218       319        85        14        92       229
+       549       115         2         1         7         8
+       217        89        90       216       317       224       225       320
+       550       115         2         1         7         8
+       317       224       225       320       318       221       222       321
+       551       115         2         1         7         8
+       318       221       222       321       319       218       219       322
+       552       115         2         1         7         8
+       319       218       219       322       229        92        93       228
+       553       115         2         1         7         8
+       216        90        91       215       320       225       226       323
+       554       115         2         1         7         8
+       320       225       226       323       321       222       223       324
+       555       115         2         1         7         8
+       321       222       223       324       322       219       220       325
+       556       115         2         1         7         8
+       322       219       220       325       228        93        94       227
+       557       115         2         1         7         8
+       215        91        15        88       323       226        95       236
+       558       115         2         1         7         8
+       323       226        95       236       324       223        96       237
+       559       115         2         1         7         8
+       324       223        96       237       325       220        97       238
+       560       115         2         1         7         8
+       325       220        97       238       227        94        16       100
+    -1
+    -1
+  2467
+         0         0         0         0         0         0         0        64
+Solid_1
+         8       369         0         0         8       370         0         0
+         8       371         0         0         8       372         0         0
+         8       373         0         0         8       374         0         0
+         8       375         0         0         8       376         0         0
+         8       377         0         0         8       378         0         0
+         8       379         0         0         8       380         0         0
+         8       381         0         0         8       382         0         0
+         8       383         0         0         8       384         0         0
+         8       385         0         0         8       386         0         0
+         8       387         0         0         8       388         0         0
+         8       389         0         0         8       390         0         0
+         8       391         0         0         8       392         0         0
+         8       393         0         0         8       394         0         0
+         8       395         0         0         8       396         0         0
+         8       397         0         0         8       398         0         0
+         8       399         0         0         8       400         0         0
+         8       401         0         0         8       402         0         0
+         8       403         0         0         8       404         0         0
+         8       405         0         0         8       406         0         0
+         8       407         0         0         8       408         0         0
+         8       409         0         0         8       410         0         0
+         8       411         0         0         8       412         0         0
+         8       413         0         0         8       414         0         0
+         8       415         0         0         8       416         0         0
+         8       417         0         0         8       418         0         0
+         8       419         0         0         8       420         0         0
+         8       421         0         0         8       422         0         0
+         8       423         0         0         8       424         0         0
+         8       425         0         0         8       426         0         0
+         8       427         0         0         8       428         0         0
+         8       429         0         0         8       430         0         0
+         8       431         0         0         8       432         0         0
+         1         0         0         0         0         0         0       192
+Partition_2
+         8       433         0         0         8       434         0         0
+         8       435         0         0         8       436         0         0
+         8       437         0         0         8       438         0         0
+         8       439         0         0         8       440         0         0
+         8       441         0         0         8       442         0         0
+         8       443         0         0         8       444         0         0
+         8       445         0         0         8       446         0         0
+         8       447         0         0         8       448         0         0
+         8       449         0         0         8       450         0         0
+         8       451         0         0         8       452         0         0
+         8       453         0         0         8       454         0         0
+         8       455         0         0         8       456         0         0
+         8       457         0         0         8       458         0         0
+         8       459         0         0         8       460         0         0
+         8       461         0         0         8       462         0         0
+         8       463         0         0         8       464         0         0
+         8       465         0         0         8       466         0         0
+         8       467         0         0         8       468         0         0
+         8       469         0         0         8       470         0         0
+         8       471         0         0         8       472         0         0
+         8       473         0         0         8       474         0         0
+         8       475         0         0         8       476         0         0
+         8       477         0         0         8       478         0         0
+         8       479         0         0         8       480         0         0
+         8       481         0         0         8       482         0         0
+         8       483         0         0         8       484         0         0
+         8       485         0         0         8       486         0         0
+         8       487         0         0         8       488         0         0
+         8       489         0         0         8       490         0         0
+         8       491         0         0         8       492         0         0
+         8       493         0         0         8       494         0         0
+         8       495         0         0         8       496         0         0
+         8       497         0         0         8       498         0         0
+         8       499         0         0         8       500         0         0
+         8       501         0         0         8       502         0         0
+         8       503         0         0         8       504         0         0
+         8       505         0         0         8       506         0         0
+         8       507         0         0         8       508         0         0
+         8       509         0         0         8       510         0         0
+         8       511         0         0         8       512         0         0
+         8       513         0         0         8       514         0         0
+         8       515         0         0         8       516         0         0
+         8       517         0         0         8       518         0         0
+         8       519         0         0         8       520         0         0
+         8       521         0         0         8       522         0         0
+         8       523         0         0         8       524         0         0
+         8       525         0         0         8       526         0         0
+         8       527         0         0         8       528         0         0
+         8       529         0         0         8       530         0         0
+         8       531         0         0         8       532         0         0
+         8       533         0         0         8       534         0         0
+         8       535         0         0         8       536         0         0
+         8       537         0         0         8       538         0         0
+         8       539         0         0         8       540         0         0
+         8       541         0         0         8       542         0         0
+         8       543         0         0         8       544         0         0
+         8       545         0         0         8       546         0         0
+         8       547         0         0         8       548         0         0
+         8       549         0         0         8       550         0         0
+         8       551         0         0         8       552         0         0
+         8       553         0         0         8       554         0         0
+         8       555         0         0         8       556         0         0
+         8       557         0         0         8       558         0         0
+         8       559         0         0         8       560         0         0
+         8       369         0         0         8       370         0         0
+         8       371         0         0         8       372         0         0
+         8       373         0         0         8       374         0         0
+         8       375         0         0         8       376         0         0
+         8       377         0         0         8       378         0         0
+         8       379         0         0         8       380         0         0
+         8       381         0         0         8       382         0         0
+         8       383         0         0         8       384         0         0
+         8       385         0         0         8       386         0         0
+         8       387         0         0         8       388         0         0
+         8       389         0         0         8       390         0         0
+         8       391         0         0         8       392         0         0
+         8       393         0         0         8       394         0         0
+         8       395         0         0         8       396         0         0
+         8       397         0         0         8       398         0         0
+         8       399         0         0         8       400         0         0
+         8       401         0         0         8       402         0         0
+         8       403         0         0         8       404         0         0
+         8       405         0         0         8       406         0         0
+         8       407         0         0         8       408         0         0
+         8       409         0         0         8       410         0         0
+         8       411         0         0         8       412         0         0
+         8       413         0         0         8       414         0         0
+         8       415         0         0         8       416         0         0
+         8       417         0         0         8       418         0         0
+         8       419         0         0         8       420         0         0
+         8       421         0         0         8       422         0         0
+         8       423         0         0         8       424         0         0
+         8       425         0         0         8       426         0         0
+         8       427         0         0         8       428         0         0
+         8       429         0         0         8       430         0         0
+         8       431         0         0         8       432         0         0
+         2         0         0         0         0         0         0        64
+Solid_2
+         8       433         0         0         8       434         0         0
+         8       435         0         0         8       436         0         0
+         8       437         0         0         8       438         0         0
+         8       439         0         0         8       440         0         0
+         8       441         0         0         8       442         0         0
+         8       443         0         0         8       444         0         0
+         8       445         0         0         8       446         0         0
+         8       447         0         0         8       448         0         0
+         8       449         0         0         8       450         0         0
+         8       451         0         0         8       452         0         0
+         8       453         0         0         8       454         0         0
+         8       455         0         0         8       456         0         0
+         8       457         0         0         8       458         0         0
+         8       459         0         0         8       460         0         0
+         8       461         0         0         8       462         0         0
+         8       463         0         0         8       464         0         0
+         8       465         0         0         8       466         0         0
+         8       467         0         0         8       468         0         0
+         8       469         0         0         8       470         0         0
+         8       471         0         0         8       472         0         0
+         8       473         0         0         8       474         0         0
+         8       475         0         0         8       476         0         0
+         8       477         0         0         8       478         0         0
+         8       479         0         0         8       480         0         0
+         8       481         0         0         8       482         0         0
+         8       483         0         0         8       484         0         0
+         8       485         0         0         8       486         0         0
+         8       487         0         0         8       488         0         0
+         8       489         0         0         8       490         0         0
+         8       491         0         0         8       492         0         0
+         8       493         0         0         8       494         0         0
+         8       495         0         0         8       496         0         0
+         3         0         0         0         0         0         0        64
+Solid_3
+         8       497         0         0         8       498         0         0
+         8       499         0         0         8       500         0         0
+         8       501         0         0         8       502         0         0
+         8       503         0         0         8       504         0         0
+         8       505         0         0         8       506         0         0
+         8       507         0         0         8       508         0         0
+         8       509         0         0         8       510         0         0
+         8       511         0         0         8       512         0         0
+         8       513         0         0         8       514         0         0
+         8       515         0         0         8       516         0         0
+         8       517         0         0         8       518         0         0
+         8       519         0         0         8       520         0         0
+         8       521         0         0         8       522         0         0
+         8       523         0         0         8       524         0         0
+         8       525         0         0         8       526         0         0
+         8       527         0         0         8       528         0         0
+         8       529         0         0         8       530         0         0
+         8       531         0         0         8       532         0         0
+         8       533         0         0         8       534         0         0
+         8       535         0         0         8       536         0         0
+         8       537         0         0         8       538         0         0
+         8       539         0         0         8       540         0         0
+         8       541         0         0         8       542         0         0
+         8       543         0         0         8       544         0         0
+         8       545         0         0         8       546         0         0
+         8       547         0         0         8       548         0         0
+         8       549         0         0         8       550         0         0
+         8       551         0         0         8       552         0         0
+         8       553         0         0         8       554         0         0
+         8       555         0         0         8       556         0         0
+         8       557         0         0         8       558         0         0
+         8       559         0         0         8       560         0         0
+         4         0         0         0         0         0         0        16
+Face_1
+         8       113         0         0         8       114         0         0
+         8       115         0         0         8       116         0         0
+         8       117         0         0         8       118         0         0
+         8       119         0         0         8       120         0         0
+         8       121         0         0         8       122         0         0
+         8       123         0         0         8       124         0         0
+         8       125         0         0         8       126         0         0
+         8       127         0         0         8       128         0         0
+         5         0         0         0         0         0         0        16
+Face_2
+         8       209         0         0         8       210         0         0
+         8       211         0         0         8       212         0         0
+         8       213         0         0         8       214         0         0
+         8       215         0         0         8       216         0         0
+         8       217         0         0         8       218         0         0
+         8       219         0         0         8       220         0         0
+         8       221         0         0         8       222         0         0
+         8       223         0         0         8       224         0         0
+         6         0         0         0         0         0         0        16
+Face_3
+         8       289         0         0         8       290         0         0
+         8       291         0         0         8       292         0         0
+         8       293         0         0         8       294         0         0
+         8       295         0         0         8       296         0         0
+         8       297         0         0         8       298         0         0
+         8       299         0         0         8       300         0         0
+         8       301         0         0         8       302         0         0
+         8       303         0         0         8       304         0         0
+         7         0         0         0         0         0         0        16
+Face_4
+         8       129         0         0         8       130         0         0
+         8       131         0         0         8       132         0         0
+         8       133         0         0         8       134         0         0
+         8       135         0         0         8       136         0         0
+         8       137         0         0         8       138         0         0
+         8       139         0         0         8       140         0         0
+         8       141         0         0         8       142         0         0
+         8       143         0         0         8       144         0         0
+         8         0         0         0         0         0         0        16
+Face_5
+         8       225         0         0         8       226         0         0
+         8       227         0         0         8       228         0         0
+         8       229         0         0         8       230         0         0
+         8       231         0         0         8       232         0         0
+         8       233         0         0         8       234         0         0
+         8       235         0         0         8       236         0         0
+         8       237         0         0         8       238         0         0
+         8       239         0         0         8       240         0         0
+         9         0         0         0         0         0         0        16
+Face_6
+         8       305         0         0         8       306         0         0
+         8       307         0         0         8       308         0         0
+         8       309         0         0         8       310         0         0
+         8       311         0         0         8       312         0         0
+         8       313         0         0         8       314         0         0
+         8       315         0         0         8       316         0         0
+         8       317         0         0         8       318         0         0
+         8       319         0         0         8       320         0         0
+        10         0         0         0         0         0         0        16
+Face_7
+         8       145         0         0         8       146         0         0
+         8       147         0         0         8       148         0         0
+         8       149         0         0         8       150         0         0
+         8       151         0         0         8       152         0         0
+         8       153         0         0         8       154         0         0
+         8       155         0         0         8       156         0         0
+         8       157         0         0         8       158         0         0
+         8       159         0         0         8       160         0         0
+        11         0         0         0         0         0         0        16
+inter1
+         8       161         0         0         8       162         0         0
+         8       163         0         0         8       164         0         0
+         8       165         0         0         8       166         0         0
+         8       167         0         0         8       168         0         0
+         8       169         0         0         8       170         0         0
+         8       171         0         0         8       172         0         0
+         8       173         0         0         8       174         0         0
+         8       175         0         0         8       176         0         0
+        12         0         0         0         0         0         0        16
+inter2
+         8       241         0         0         8       242         0         0
+         8       243         0         0         8       244         0         0
+         8       245         0         0         8       246         0         0
+         8       247         0         0         8       248         0         0
+         8       249         0         0         8       250         0         0
+         8       251         0         0         8       252         0         0
+         8       253         0         0         8       254         0         0
+         8       255         0         0         8       256         0         0
+        13         0         0         0         0         0         0        16
+Face_10
+         8       321         0         0         8       322         0         0
+         8       323         0         0         8       324         0         0
+         8       325         0         0         8       326         0         0
+         8       327         0         0         8       328         0         0
+         8       329         0         0         8       330         0         0
+         8       331         0         0         8       332         0         0
+         8       333         0         0         8       334         0         0
+         8       335         0         0         8       336         0         0
+        14         0         0         0         0         0         0        16
+Face_11
+         8       177         0         0         8       178         0         0
+         8       179         0         0         8       180         0         0
+         8       181         0         0         8       182         0         0
+         8       183         0         0         8       184         0         0
+         8       185         0         0         8       186         0         0
+         8       187         0         0         8       188         0         0
+         8       189         0         0         8       190         0         0
+         8       191         0         0         8       192         0         0
+        15         0         0         0         0         0         0        16
+Face_12
+         8       257         0         0         8       258         0         0
+         8       259         0         0         8       260         0         0
+         8       261         0         0         8       262         0         0
+         8       263         0         0         8       264         0         0
+         8       265         0         0         8       266         0         0
+         8       267         0         0         8       268         0         0
+         8       269         0         0         8       270         0         0
+         8       271         0         0         8       272         0         0
+        16         0         0         0         0         0         0        16
+Face_13
+         8       337         0         0         8       338         0         0
+         8       339         0         0         8       340         0         0
+         8       341         0         0         8       342         0         0
+         8       343         0         0         8       344         0         0
+         8       345         0         0         8       346         0         0
+         8       347         0         0         8       348         0         0
+         8       349         0         0         8       350         0         0
+         8       351         0         0         8       352         0         0
+        17         0         0         0         0         0         0        16
+Face_14
+         8       193         0         0         8       194         0         0
+         8       195         0         0         8       196         0         0
+         8       197         0         0         8       198         0         0
+         8       199         0         0         8       200         0         0
+         8       201         0         0         8       202         0         0
+         8       203         0         0         8       204         0         0
+         8       205         0         0         8       206         0         0
+         8       207         0         0         8       208         0         0
+        18         0         0         0         0         0         0        16
+Face_15
+         8       273         0         0         8       274         0         0
+         8       275         0         0         8       276         0         0
+         8       277         0         0         8       278         0         0
+         8       279         0         0         8       280         0         0
+         8       281         0         0         8       282         0         0
+         8       283         0         0         8       284         0         0
+         8       285         0         0         8       286         0         0
+         8       287         0         0         8       288         0         0
+        19         0         0         0         0         0         0        16
+Face_16
+         8       353         0         0         8       354         0         0
+         8       355         0         0         8       356         0         0
+         8       357         0         0         8       358         0         0
+         8       359         0         0         8       360         0         0
+         8       361         0         0         8       362         0         0
+         8       363         0         0         8       364         0         0
+         8       365         0         0         8       366         0         0
+         8       367         0         0         8       368         0         0
+    -1
diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
index 5a3a649f05ec25139ebe4a5eb701f4c89c92018e..465f6ae90a05807321cab2bbd5522814a2dcb958 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
@@ -526,13 +526,6 @@ int main(int argc, char *argv[])
     // Whether to synchronise points
     const Switch pointSync(dict.lookup("pointSync"));
 
-
-    // Set the matching tolerance so we can read illegal meshes
-    scalar tol = readScalar(dict.lookup("matchTolerance"));
-    Info<< "Using relative tolerance " << tol
-        << " to match up faces and points" << nl << endl;
-    coupledPolyPatch::matchTol = tol;
-
 #   include "createNamedPolyMesh.H"
 
     const word oldInstance = mesh.pointsInstance();
diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict
index 600c46816ef9f5ac019fb0508d9d9a218d090cf4..60719b72c37963bb612a10c0d4664af4dd1ee6b7 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict
@@ -34,19 +34,15 @@ FoamFile
 // This will usually fail upon loading:
 //  "face 0 area does not match neighbour 2 by 0.0100005%"
 //  " -- possible face ordering problem."
-// - change patch type from 'cyclic' to 'patch' in the polyMesh/boundary file.
-// - loosen match tolerance to get case to load
-// - regenerate cyclic as above
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
 
 
-// Tolerance used in matching faces. Absolute tolerance is span of
-// face times this factor. To load incorrectly matches meshes set this
-// to a higher value.
-matchTolerance 1E-3;
-
 // Do a synchronisation of coupled points after creation of any patches.
 // Note: this does not work with points that are on multiple coupled patches
-//       with transformations.
+//       with transformations (i.e. cyclics).
 pointSync false;
 
 // Patches to create.
@@ -67,6 +63,12 @@ patches
             transform rotational;
             rotationAxis (1 0 0);
             rotationCentre (0 0 0);
+            // transform translational;
+            // separationVector (1 0 0);
+
+            // Optional non-default tolerance to be able to define cyclics
+            // on bad meshes
+            //matchTolerance 1E-2;
         }
 
         // How to construct: either from 'patches' or 'set'
diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
index fc9d2c4ff1d73ea6d098a1ff6bf5f0403bf3a363..4882c118a0bded103994f2264c9ff2169acdc4e1 100644
--- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
+++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -160,8 +160,10 @@ bool Foam::domainDecomposition::writeDecomposition()
     }
 
 
+    label maxProcCells = 0;
     label totProcFaces = 0;
     label maxProcPatches = 0;
+    label totProcPatches = 0;
     label maxProcFaces = 0;
 
 
@@ -749,6 +751,8 @@ bool Foam::domainDecomposition::writeDecomposition()
             << "    Number of cells = " << procMesh.nCells()
             << endl;
 
+        maxProcCells = max(maxProcCells, procMesh.nCells());
+
         label nBoundaryFaces = 0;
         label nProcPatches = 0;
         label nProcFaces = 0;
@@ -780,6 +784,7 @@ bool Foam::domainDecomposition::writeDecomposition()
             << "    Number of boundary faces = " << nBoundaryFaces << endl;
 
         totProcFaces += nProcFaces;
+        totProcPatches += nProcPatches;
         maxProcPatches = max(maxProcPatches, nProcPatches);
         maxProcFaces = max(maxProcFaces, nProcFaces);
 
@@ -851,10 +856,21 @@ bool Foam::domainDecomposition::writeDecomposition()
         boundaryProcAddressing.write();
     }
 
+    scalar avgProcCells = scalar(nCells())/nProcs_;
+    scalar avgProcPatches = scalar(totProcPatches)/nProcs_;
+    scalar avgProcFaces = scalar(totProcFaces)/nProcs_;
+
     Info<< nl
         << "Number of processor faces = " << totProcFaces/2 << nl
-        << "Max number of processor patches = " << maxProcPatches << nl
+        << "Max number of cells = " << maxProcCells
+        << " (" << 100.0*(maxProcCells-avgProcCells)/avgProcCells
+        << "% above average " << avgProcCells << ")" << nl
+        << "Max number of processor patches = " << maxProcPatches
+        << " (" << 100.0*(maxProcPatches-avgProcPatches)/avgProcPatches
+        << "% above average " << avgProcPatches << ")" << nl
         << "Max number of faces between processors = " << maxProcFaces
+        << " (" << 100.0*(maxProcFaces-avgProcFaces)/avgProcFaces
+        << "% above average " << avgProcFaces << ")" << nl
         << endl;
 
     return true;
diff --git a/applications/utilities/postProcessing/sampling/sample/sampleDict b/applications/utilities/postProcessing/sampling/sample/sampleDict
index 87abe5926de588811fc928fc510a54f76b05a067..e413b94cc4df8812b5ceb5d5439b9d057e06ef3e 100644
--- a/applications/utilities/postProcessing/sampling/sample/sampleDict
+++ b/applications/utilities/postProcessing/sampling/sample/sampleDict
@@ -23,6 +23,7 @@ FoamFile
 //      gnuplot
 //      raw
 //      vtk
+//      csv
 setFormat raw;
 
 // Surface output format. Choice of
diff --git a/bin/foamJob b/bin/foamJob
index 06d56b9f06d4aa96276ddef244c4b85ccf0a5b2e..4380b3e14731b0dbcfb816b23b337cb839564139 100755
--- a/bin/foamJob
+++ b/bin/foamJob
@@ -237,8 +237,6 @@ else
         echo "Executing: $APPLICATION $@ > log 2>&1 &"
         $APPLICATION $@ > log 2>&1 &
     fi
-else
-
 fi
 
 #------------------------------------------------------------------------------
diff --git a/bin/foamPackBinAll b/bin/foamPackBinAll
index 18f67129ed57fe4436b9405e74403068c178c0d4..408ea2248be45d4c9a317bcec9ef177ba4325d48 100755
--- a/bin/foamPackBinAll
+++ b/bin/foamPackBinAll
@@ -67,6 +67,7 @@ then
     done
 
 elif [ -d $packDir/platforms ]
+then
 
     # obtain archOptions types from platforms/<archOptions>/lib
     for archOptions in $packDir/platforms/*/lib
diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files
index 432f6ccc0e23a24262ba36924f1cde81997a76e2..52de21702b5abea64dc1e5780b974c74bb5c6440 100644
--- a/src/OpenFOAM/Make/files
+++ b/src/OpenFOAM/Make/files
@@ -571,6 +571,10 @@ interpolations = interpolations
 interpolation = $(interpolations)/interpolation
 $(interpolations)/patchToPatchInterpolation/PatchToPatchInterpolationName.C
 
+$(interpolations)/interpolationTable/tableReaders/tableReaders.C
+$(interpolations)/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C
+$(interpolations)/interpolationTable/tableReaders/csv/csvTableReaders.C
+
 algorithms/MeshWave/MeshWaveName.C
 algorithms/MeshWave/FaceCellWaveName.C
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
index c881af33f56a413f0b87ec8f1a8c810a1a910941..95f4701730339a5946951a17ba64bebab3b8e6f1 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,6 +25,7 @@ License
 
 #include "interpolationTable.H"
 #include "IFstream.H"
+#include "openFoamTableReader.H"
 
 // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
 
@@ -38,19 +39,19 @@ void Foam::interpolationTable<Type>::readTable()
     fName.expand();
 
     // Read data from file
-    IFstream(fName)() >> *this;
-
-    // Check that the data are okay
-    check();
+    reader_()(fName, *this);
 
     if (this->empty())
     {
         FatalErrorIn
         (
             "Foam::interpolationTable<Type>::readTable()"
-        )   << "table is empty" << nl
+        )   << "table read from " << fName << " is empty" << nl
             << exit(FatalError);
     }
+
+    // Check that the data are okay
+    check();
 }
 
 
@@ -61,7 +62,8 @@ Foam::interpolationTable<Type>::interpolationTable()
 :
     List<Tuple2<scalar, Type> >(),
     boundsHandling_(interpolationTable::WARN),
-    fileName_("fileNameIsUndefined")
+    fileName_("fileNameIsUndefined"),
+    reader_(NULL)
 {}
 
 
@@ -75,7 +77,8 @@ Foam::interpolationTable<Type>::interpolationTable
 :
     List<Tuple2<scalar, Type> >(values),
     boundsHandling_(bounds),
-    fileName_(fName)
+    fileName_(fName),
+    reader_(NULL)
 {}
 
 
@@ -84,7 +87,8 @@ Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
 :
     List<Tuple2<scalar, Type> >(),
     boundsHandling_(interpolationTable::WARN),
-    fileName_(fName)
+    fileName_(fName),
+    reader_(new openFoamTableReader<Type>())
 {
     readTable();
 }
@@ -95,7 +99,8 @@ Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
 :
     List<Tuple2<scalar, Type> >(),
     boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))),
-    fileName_(dict.lookup("fileName"))
+    fileName_(dict.lookup("fileName")),
+    reader_(tableReader<Type>::New(dict))
 {
     readTable();
 }
@@ -109,7 +114,8 @@ Foam::interpolationTable<Type>::interpolationTable
 :
     List<Tuple2<scalar, Type> >(interpTable),
     boundsHandling_(interpTable.boundsHandling_),
-    fileName_(interpTable.fileName_)
+    fileName_(interpTable.fileName_),
+    reader_(interpTable.reader_)    // note: steals reader. Used in write().
 {}
 
 
@@ -233,6 +239,10 @@ void Foam::interpolationTable<Type>::write(Ostream& os) const
         << fileName_ << token::END_STATEMENT << nl;
     os.writeKeyword("outOfBounds")
         << boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl;
+    if (reader_.valid())
+    {
+        reader_->write(os);
+    }
 }
 
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H
index a7f62c1748064472e226ec4a7b4a73302ade61bc..4395269dfa6d6e1994f2aa73949f63f22d191303 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H
+++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H
@@ -34,6 +34,19 @@ Description
     If \a REPEAT is chosen for the out-of-bounds handling, the final time
     value is treated as being equivalent to time=0 for the following periods.
 
+
+    The construct from dictionary reads a filename from a dictionary and
+    has an optional readerType. Default is to read OpenFOAM format. The only
+    other format is csv (comma separated values):
+
+    Read csv format:
+        readerType      csv;
+        fileName        "$FOAM_CASE/constant/p0vsTime.csv";
+        hasHeaderLine   true;   // skip first line
+        timeColumn      0;      // time is in column 0
+        valueColumns    (1);    // value starts in column 1
+
+
 Note
     - Accessing an empty list results in an error.
     - Accessing a list with a single element always returns the same value.
@@ -49,6 +62,9 @@ SourceFiles
 #include "List.H"
 #include "Tuple2.H"
 
+#include "tableReader.H"
+#include "autoPtr.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
@@ -87,6 +103,8 @@ private:
         //- File name
         fileName fileName_;
 
+        //- the actual reader
+        autoPtr<tableReader<Type> > reader_;
 
     // Private Member Functions
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
new file mode 100644
index 0000000000000000000000000000000000000000..3e8618c17fa73f767f2c9fcd4f378802ea7a51f1
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
@@ -0,0 +1,181 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "csvTableReader.H"
+#include "IFstream.H"
+#include "DynamicList.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::csvTableReader<Type>::csvTableReader(const dictionary& dict)
+:
+    tableReader<Type>(dict),
+    headerLine_(readBool(dict.lookup("hasHeaderLine"))),
+    timeColumn_(readLabel(dict.lookup("timeColumn"))),
+    componentColumns_(dict.lookup("valueColumns")),
+    separator_(dict.lookupOrDefault<string>("separator", string(","))[0])
+{
+    if (componentColumns_.size() != pTraits<Type>::nComponents)
+    {
+        FatalErrorIn("csvTableReader<Type>::csvTableReader(const dictionary&)")
+            << componentColumns_ << " does not have the expected length "
+            << pTraits<Type>::nComponents << endl
+            << exit(FatalError);
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::csvTableReader<Type>::~csvTableReader()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    // doesn't recognize specialization otherwise
+    template<>
+    scalar csvTableReader<scalar>::readValue(const List<string>& splitted)
+    {
+        if (componentColumns_[0] >= splitted.size())
+        {
+            FatalErrorIn
+            (
+                "csvTableReader<scalar>::readValue(const List<string>&)"
+            )   << "No column " << componentColumns_[0] << " in "
+                << splitted << endl
+                << exit(FatalError);
+        }
+
+        return readScalar(IStringStream(splitted[componentColumns_[0]])());
+    }
+
+
+    template<class Type>
+    Type csvTableReader<Type>::readValue(const List<string>& splitted)
+    {
+        Type result;
+
+        for(label i = 0;i < pTraits<Type>::nComponents; i++)
+        {
+            if (componentColumns_[i] >= splitted.size())
+            {
+                FatalErrorIn
+                (
+                    "csvTableReader<Type>::readValue(const List<string>&)"
+                )   << "No column " << componentColumns_[i] << " in "
+                    << splitted << endl
+                    << exit(FatalError);
+            }
+
+            result[i] = readScalar
+            (
+                IStringStream(splitted[componentColumns_[i]])()
+            );
+        }
+
+        return result;
+    }
+}
+
+
+template<class Type>
+void Foam::csvTableReader<Type>::operator()
+(
+    const fileName& fName,
+    List<Tuple2<scalar, Type> >& data
+)
+{
+    IFstream in(fName);
+
+    DynamicList<Tuple2<scalar, Type> > values;
+
+    // Skip header
+    if (headerLine_)
+    {
+        string line;
+        in.getLine(line);
+    }
+
+    while (in.good())
+    {
+        string line;
+        in.getLine(line);
+
+        DynamicList<string> splitted;
+
+        std::size_t pos = 0;
+        while (pos != std::string::npos)
+        {
+            std::size_t nPos = line.find(separator_, pos);
+
+            if (nPos == std::string::npos)
+            {
+                splitted.append(line.substr(pos));
+                pos=nPos;
+            }
+            else
+            {
+                splitted.append(line.substr(pos, nPos-pos));
+                pos=nPos+1;
+            }
+        }
+
+        if (splitted.size() <= 1)
+        {
+            break;
+        }
+
+        scalar time = readScalar(IStringStream(splitted[timeColumn_])());
+        Type value = readValue(splitted);
+
+        values.append(Tuple2<scalar,Type>(time, value));
+    }
+
+    data.transfer(values);
+}
+
+
+template<class Type>
+void Foam::csvTableReader<Type>::write(Ostream& os) const
+{
+    tableReader<Type>::write(os);
+
+    os.writeKeyword("hasHeaderLine")
+        << headerLine_ << token::END_STATEMENT << nl;
+    os.writeKeyword("timeColumn")
+        << timeColumn_ << token::END_STATEMENT << nl;
+    os.writeKeyword("valueColumns")
+        << componentColumns_ << token::END_STATEMENT << nl;
+    os.writeKeyword("separator")
+        << string(separator_) << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H
new file mode 100644
index 0000000000000000000000000000000000000000..3c823f2e194930a3d956fd5ca5c95de90c215d24
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H
@@ -0,0 +1,123 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::tableReader
+
+Description
+    Reads an interpolation table from a file - CSV-format
+
+SourceFiles
+    tableReader.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef csvTableReader_H
+#define csvTableReader_H
+
+#include "tableReader.H"
+#include "labelList.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class csvTableReader Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class csvTableReader
+:
+    public tableReader<Type>
+{
+    //- does the file have a header line?
+    const bool headerLine_;
+
+    //- column of the time
+    const label timeColumn_;
+
+    //- labels of the components
+    const labelList componentColumns_;
+
+    //- read the next value from the splitted string
+    Type readValue(const List<string>&);
+
+    //- separator character
+    const char separator_;
+
+public:
+
+    //- Runtime type information
+    TypeName("csv");
+
+    // Constructors
+
+        //- Construct from dictionary
+        csvTableReader(const dictionary& dict);
+
+        //- Construct and return a copy
+        virtual autoPtr<tableReader<Type> > clone() const
+        {
+            return autoPtr<tableReader<Type> >
+            (
+                new csvTableReader<Type>
+                (
+                    *this
+                )
+            );
+        }
+
+
+    //- Destructor
+
+        virtual ~csvTableReader();
+
+
+    // Member Functions
+
+        //- Read the table
+        virtual void operator()(const fileName&, List<Tuple2<scalar, Type> >&);
+
+        //- write the remaining parameters
+        virtual void write(Ostream& os) const;
+
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+#   include "csvTableReader.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReaders.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReaders.C
new file mode 100644
index 0000000000000000000000000000000000000000..5893436dd9de51c2900c85c3f02bcfe49dd4bea0
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReaders.C
@@ -0,0 +1,37 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "csvTableReader.H"
+#include "tableReaders.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makeTableReaders(csvTableReader);
+}
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C
new file mode 100644
index 0000000000000000000000000000000000000000..3ad1a87510e4dcd5a9a4ed4ddd43957125ed8b08
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C
@@ -0,0 +1,59 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "openFoamTableReader.H"
+#include "IFstream.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::openFoamTableReader<Type>::openFoamTableReader(const dictionary& dict)
+:
+    tableReader<Type>(dict)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::openFoamTableReader<Type>::~openFoamTableReader()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::openFoamTableReader<Type>::operator()
+(
+    const fileName& fName,
+    List<Tuple2<scalar, Type> >& data
+)
+{
+    // Read data from file
+    IFstream(fName)() >> data;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H
new file mode 100644
index 0000000000000000000000000000000000000000..dd04df78d6a6c3f3a9aeb50d82355cf337fce408
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H
@@ -0,0 +1,106 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::tableReader
+
+Description
+    Reads an interpolation table from a file - OpenFOAM-format
+
+SourceFiles
+    tableReader.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef openFoamTableReader_H
+#define openFoamTableReader_H
+
+#include "tableReader.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class openFoamTableReader Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class openFoamTableReader
+:
+    public tableReader<Type>
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("openFoam");
+
+    // Constructors
+
+        //- Construct from dictionary
+        openFoamTableReader(const dictionary &dict);
+
+        //- Construct and return a copy
+        virtual autoPtr<tableReader<Type> > clone() const
+        {
+            return autoPtr<tableReader<Type> >
+            (
+                new openFoamTableReader<Type>
+                (
+                    *this
+                )
+            );
+        }
+
+
+    //- Destructor
+
+        virtual ~openFoamTableReader();
+
+
+    // Member functions
+
+        //- Read the table
+        virtual void operator()(const fileName&, List<Tuple2<scalar, Type> > &);
+
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+#   include "openFoamTableReader.C"
+#endif
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C
new file mode 100644
index 0000000000000000000000000000000000000000..8dd7db0a9f9a4054394099b2bad1b53f93bfa8ec
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C
@@ -0,0 +1,37 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "openFoamTableReader.H"
+#include "tableReaders.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makeTableReaders(openFoamTableReader);
+}
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
new file mode 100644
index 0000000000000000000000000000000000000000..bcad2aa965e3ce19773eb657aa1a67b2d77597e8
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
@@ -0,0 +1,89 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "tableReader.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::autoPtr<Foam::tableReader<Type> > Foam::tableReader<Type>::New
+(
+    const dictionary& spec
+)
+{
+    const word readerType = spec.lookupOrDefault<word>
+    (
+        "readerType",
+        "openFoam"
+    );
+
+    typename dictionaryConstructorTable::iterator cstrIter =
+        dictionaryConstructorTablePtr_
+            ->find(readerType);
+
+    if (cstrIter == dictionaryConstructorTablePtr_->end())
+    {
+        FatalErrorIn
+        (
+            "tableReader::New(const dictionary&)"
+        )   << "Unknown reader type " << readerType
+            << nl << nl
+            << "Valid reader types : " << nl
+            << dictionaryConstructorTablePtr_->sortedToc()
+            << exit(FatalError);
+    }
+
+    return autoPtr<tableReader<Type> >(cstrIter()(spec));
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::tableReader<Type>::tableReader(const dictionary&)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::tableReader<Type>::~tableReader()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::tableReader<Type>::write(Ostream& os) const
+{
+    if (this->type() != "openFoam")
+    {
+        os.writeKeyword("readerType")
+            << this->type() << token::END_STATEMENT << nl;
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H
new file mode 100644
index 0000000000000000000000000000000000000000..b85af66c101243c0cc9446f14154ee6326798924
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H
@@ -0,0 +1,128 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::tableReader
+
+Description
+    Base class to read table data for the interpolationTable
+
+SourceFiles
+    tableReader.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef tableReader_H
+#define tableReader_H
+
+#include "fileName.H"
+#include "wordList.H"
+#include "vector.H"
+#include "tensor.H"
+#include "typeInfo.H"
+#include "runTimeSelectionTables.H"
+#include "autoPtr.H"
+#include "dictionary.H"
+#include "Tuple2.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class tableReader Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class tableReader
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("tableReader");
+
+    // Declare run-time constructor selection table
+
+        declareRunTimeSelectionTable
+        (
+            autoPtr,
+            tableReader,
+            dictionary,
+            (const dictionary& dict),
+            (dict)
+        );
+
+
+    // Constructors
+
+        //- Construct from dictionary
+        tableReader(const dictionary& dict);
+
+        //- Construct and return a clone
+        virtual autoPtr<tableReader<Type> > clone() const = 0;
+
+
+    // Selectors
+
+        //- Return a reference to the selected tableReader
+        static autoPtr<tableReader> New(const dictionary& spec);
+
+
+    //- Destructor
+
+        virtual ~tableReader();
+
+
+    // Member functions
+
+        //- Read the table
+        virtual void operator()
+        (
+            const fileName&,
+            List<Tuple2<scalar, Type> >&
+        ) = 0;
+
+        //- Write additional information
+        virtual void write(Ostream& os) const;
+
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+#   include "tableReader.C"
+#endif
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C
new file mode 100644
index 0000000000000000000000000000000000000000..a28c83218f3b8cd722b8e7ae418f75075385cd54
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C
@@ -0,0 +1,50 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "tableReaders.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+#define defineTableReaderType(dataType)                                       \
+    defineNamedTemplateTypeNameAndDebug(tableReader<dataType >, 0);           \
+    defineTemplatedRunTimeSelectionTable(tableReader, dictionary, dataType);
+
+defineTableReaderType(scalar);
+defineTableReaderType(vector);
+defineTableReaderType(sphericalTensor);
+defineTableReaderType(symmTensor);
+defineTableReaderType(tensor);
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H
new file mode 100644
index 0000000000000000000000000000000000000000..9507ac2bfb5ab9fbdd8b030515cc3257dd33d65f
--- /dev/null
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H
@@ -0,0 +1,78 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2004-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::tableReader
+
+SourceFiles
+    tableReaders.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef tableReaders_H
+#define tableReaders_H
+
+#include "tableReader.H"
+#include "fieldTypes.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Only used internally
+#define makeTypeTableReadersTypeName(typeTableReader, dataType)               \
+                                                                              \
+    defineNamedTemplateTypeNameAndDebug(typeTableReader< dataType >, 0)
+
+// Sometimes used externally
+#define makeTableReadersTypeName(typeTableReader)                             \
+                                                                              \
+    makeTypeTableReadersTypeName(typeTableReader, scalar);                    \
+    makeTypeTableReadersTypeName(typeTableReader, vector);                    \
+    makeTypeTableReadersTypeName(typeTableReader, sphericalTensor);           \
+    makeTypeTableReadersTypeName(typeTableReader, symmTensor);                \
+    makeTypeTableReadersTypeName(typeTableReader, tensor)
+
+// Define type info for single dataType template instantiation (eg, vector)
+#define makeTableReaderType(typeTableReader, dataType)                        \
+                                                                              \
+    defineNamedTemplateTypeNameAndDebug(typeTableReader< dataType >, 0);      \
+    addTemplatedToRunTimeSelectionTable                                       \
+    (                                                                         \
+        tableReader, typeTableReader, dataType, dictionary                    \
+    )
+
+
+// Define type info for scalar, vector etc. instantiations
+#define makeTableReaders(typeTableReader)                                     \
+                                                                              \
+    makeTableReaderType(typeTableReader, scalar);                             \
+    makeTableReaderType(typeTableReader, vector);                             \
+    makeTableReaderType(typeTableReader, sphericalTensor);                    \
+    makeTableReaderType(typeTableReader, symmTensor);                         \
+    makeTableReaderType(typeTableReader, tensor)
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C
index b26b225690fb3c5e9e80c286cbac290e62a655ac..545ce686b8ded2b0342f2409c10b3ab6d85fc8bd 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C
@@ -34,7 +34,7 @@ namespace Foam
 {
     defineTypeNameAndDebug(coupledPolyPatch, 0);
 
-    scalar coupledPolyPatch::matchTol = 1E-3;
+    const scalar coupledPolyPatch::defaultMatchTol_ = 1E-4;
 
     template<>
     const char* NamedEnum<coupledPolyPatch::transformType, 4>::names[] =
@@ -145,6 +145,7 @@ Foam::pointField Foam::coupledPolyPatch::getAnchorPoints
 
 Foam::scalarField Foam::coupledPolyPatch::calcFaceTol
 (
+    const scalar matchTol,
     const UList<face>& faces,
     const pointField& points,
     const pointField& faceCentres
@@ -313,7 +314,7 @@ void Foam::coupledPolyPatch::calcTransformTensors
             forwardT_.setSize(0);
             reverseT_.setSize(0);
 
-            separation_ = (nf&(Cr - Cf))*nf;
+            separation_ = Cr - Cf;
 
             collocated_.setSize(separation_.size());
 
@@ -401,7 +402,8 @@ Foam::coupledPolyPatch::coupledPolyPatch
     const polyBoundaryMesh& bm
 )
 :
-    polyPatch(name, size, start, index, bm)
+    polyPatch(name, size, start, index, bm),
+    matchTolerance_(defaultMatchTol_)
 {}
 
 
@@ -413,7 +415,8 @@ Foam::coupledPolyPatch::coupledPolyPatch
     const polyBoundaryMesh& bm
 )
 :
-    polyPatch(name, dict, index, bm)
+    polyPatch(name, dict, index, bm),
+    matchTolerance_(dict.lookupOrDefault("matchTolerance", defaultMatchTol_))
 {}
 
 
@@ -423,7 +426,8 @@ Foam::coupledPolyPatch::coupledPolyPatch
     const polyBoundaryMesh& bm
 )
 :
-    polyPatch(pp, bm)
+    polyPatch(pp, bm),
+    matchTolerance_(pp.matchTolerance_)
 {}
 
 
@@ -436,7 +440,8 @@ Foam::coupledPolyPatch::coupledPolyPatch
     const label newStart
 )
 :
-    polyPatch(pp, bm, index, newSize, newStart)
+    polyPatch(pp, bm, index, newSize, newStart),
+    matchTolerance_(pp.matchTolerance_)
 {}
 
 
@@ -449,7 +454,8 @@ Foam::coupledPolyPatch::coupledPolyPatch
     const label newStart
 )
 :
-    polyPatch(pp, bm, index, mapAddressing, newStart)
+    polyPatch(pp, bm, index, mapAddressing, newStart),
+    matchTolerance_(pp.matchTolerance_)
 {}
 
 
@@ -459,4 +465,17 @@ Foam::coupledPolyPatch::~coupledPolyPatch()
 {}
 
 
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::coupledPolyPatch::write(Ostream& os) const
+{
+    polyPatch::write(os);
+    //if (matchTolerance_ != defaultMatchTol_)
+    {
+        os.writeKeyword("matchTolerance") << matchTolerance_
+            << token::END_STATEMENT << nl;
+    }
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H
index 8a90ad9d532f059f7f7d05dfff8ca9de717965aa..58cb8e66fa2b6c58c1146131d3d07363592edfad 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H
@@ -69,6 +69,12 @@ private:
 
     // Private data
 
+        //- default matching tolerance
+        static const scalar defaultMatchTol_;
+
+        //- local matching tolerance
+        const scalar matchTolerance_;
+
         //- offset (distance) vector from one side of the couple to the other
         mutable vectorField separation_;
 
@@ -81,14 +87,6 @@ private:
         //- Are faces collocated. Either size 0,1 or length of patch.
         mutable boolList collocated_;
 
-public:
-
-    // Static data members
-
-        //- Relative tolerance (for geometric matching).
-        static scalar matchTol;
-
-
 protected:
 
     // Protected Member Functions
@@ -105,7 +103,7 @@ protected:
             const vectorField& nf,
             const vectorField& nr,
             const scalarField& smallDist,
-            const scalar absTol = matchTol,
+            const scalar absTol,
             const transformType = UNKNOWN
         ) const;
 
@@ -162,6 +160,7 @@ protected:
         //  from face centre to any of the face vertices.
         static scalarField calcFaceTol
         (
+            const scalar matchTol,
             const UList<face>& faces,
             const pointField& points,
             const pointField& faceCentres
@@ -295,6 +294,11 @@ public:
                 return collocated_;
             }
 
+            scalar matchTolerance() const
+            {
+                return matchTolerance_;
+            }
+
 
         //- Calculate the patch geometry
         virtual void calcGeometry
@@ -328,6 +332,9 @@ public:
             labelList& faceMap,
             labelList& rotation
         ) const = 0;
+
+        //- Write the polyPatch data as a dictionary
+        virtual void write(Ostream&) const;
 };
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
index 359c6510200252f3d76396864e055ffc8e76ded6..352a826cab07fb1a5ee482b24931ab04c485e526 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
@@ -150,6 +150,7 @@ void Foam::cyclicPolyPatch::calcTransforms
     }
 
 
+    // Some sanity checks
 
     if (half0Ctrs.size() != half1Ctrs.size())
     {
@@ -163,11 +164,30 @@ void Foam::cyclicPolyPatch::calcTransforms
             << exit(FatalError);
     }
 
+    if (transform_ != neighbPatch().transform_)
+    {
+        FatalErrorIn
+        (
+            "cyclicPolyPatch::calcTransforms()"
+        )   << "Patch " << name()
+            << " has transform type " << transformTypeNames[transform_]
+            << ", neighbour patch " << neighbPatchName_
+            << " has transform type "
+            << neighbPatch().transformTypeNames[transform_]
+            << exit(FatalError);
+    }
+
+
+    // Calculate transformation tensors
+
     if (half0Ctrs.size() > 0)
     {
         vectorField half0Normals(half0Areas.size());
         vectorField half1Normals(half1Areas.size());
 
+        scalar maxAreaDiff = -GREAT;
+        label maxAreaFacei = -1;
+
         forAll(half0, facei)
         {
             scalar magSf = mag(half0Areas[facei]);
@@ -182,35 +202,62 @@ void Foam::cyclicPolyPatch::calcTransforms
                 half0Normals[facei] = point(1, 0, 0);
                 half1Normals[facei] = half0Normals[facei];
             }
-            else if (mag(magSf - nbrMagSf)/avSf > coupledPolyPatch::matchTol)
-            {
-                FatalErrorIn
-                (
-                    "cyclicPolyPatch::calcTransforms()"
-                )   << "face " << facei << " area does not match neighbour by "
-                    << 100*mag(magSf - nbrMagSf)/avSf
-                    << "% -- possible face ordering problem." << endl
-                    << "patch:" << name()
-                    << " my area:" << magSf
-                    << " neighbour area:" << nbrMagSf
-                    << " matching tolerance:" << coupledPolyPatch::matchTol
-                     << endl
-                    << "Mesh face:" << start()+facei
-                    << " fc:" << half0Ctrs[facei]
-                    << endl
-                    << "Neighbour fc:" << half1Ctrs[facei]
-                    << endl
-                    << "Rerun with cyclic debug flag set"
-                    << " for more information." << exit(FatalError);
-            }
             else
             {
-                half0Normals[facei] = half0Areas[facei] / magSf;
-                half1Normals[facei] = half1Areas[facei] / nbrMagSf;
+                scalar areaDiff = mag(magSf - nbrMagSf)/avSf;
+
+                if (areaDiff > maxAreaDiff)
+                {
+                    maxAreaDiff = areaDiff;
+                    maxAreaFacei = facei;
+                }
+
+                if (areaDiff > matchTolerance())
+                {
+                    FatalErrorIn
+                    (
+                        "cyclicPolyPatch::calcTransforms()"
+                    )   << "face " << facei
+                        << " area does not match neighbour by "
+                        << 100*areaDiff
+                        << "% -- possible face ordering problem." << endl
+                        << "patch:" << name()
+                        << " my area:" << magSf
+                        << " neighbour area:" << nbrMagSf
+                        << " matching tolerance:" << matchTolerance()
+                         << endl
+                        << "Mesh face:" << start()+facei
+                        << " fc:" << half0Ctrs[facei]
+                        << endl
+                        << "Neighbour fc:" << half1Ctrs[facei]
+                        << endl
+                        << "If you are certain your matching is correct"
+                        << " you can increase the 'matchTolerance' setting"
+                        << " in the patch dictionary in the boundary file."
+                        << endl
+                        << "Rerun with cyclic debug flag set"
+                        << " for more information." << exit(FatalError);
+                }
+                else
+                {
+                    half0Normals[facei] = half0Areas[facei] / magSf;
+                    half1Normals[facei] = half1Areas[facei] / nbrMagSf;
+                }
             }
         }
 
 
+        // Print area match
+        if (debug)
+        {
+            Pout<< "cyclicPolyPatch::calcTransforms :"
+                << " Max area error:" << 100*maxAreaDiff << "% at face:"
+                << maxAreaFacei << " at:" << half0Ctrs[maxAreaFacei]
+                << " coupled face at:" << half1Ctrs[maxAreaFacei]
+                << endl;
+        }
+
+
         // Calculate transformation tensors
 
         if (transform_ == ROTATIONAL)
@@ -259,6 +306,7 @@ void Foam::cyclicPolyPatch::calcTransforms
             (
                 calcFaceTol
                 (
+                    matchTolerance(),
                     half0,
                     half0.points(),
                     static_cast<const pointField&>(half0Ctrs)
@@ -272,9 +320,74 @@ void Foam::cyclicPolyPatch::calcTransforms
                 half0Normals,
                 half1Normals,
                 half0Tols,
-                matchTol,
+                matchTolerance(),
                 transform_
             );
+
+
+            if (transform_ == TRANSLATIONAL)
+            {
+                if (debug)
+                {
+                    Pout<< "cyclicPolyPatch::calcTransforms :"
+                        << " Specified separation vector : "
+                        << separationVector_ << endl;
+                }
+
+                // Check that separation vectors are same.
+                const scalar avgTol = average(half0Tols);
+                if
+                (
+                    mag(separationVector_ + neighbPatch().separationVector_)
+                  > avgTol
+                )
+                {
+                    WarningIn
+                    (
+                        "cyclicPolyPatch::calcTransforms()"
+                    )   << "Specified separation vector " << separationVector_
+                        << " differs by that of neighbouring patch "
+                        << neighbPatch().separationVector_
+                        << " by more than tolerance " << avgTol << endl
+                        << "patch:" << name()
+                        << " neighbour:" << neighbPatchName_
+                        << endl;
+                }
+
+
+                // Override computed transform with specified.
+                if
+                (
+                    separation().size() != 1
+                 || mag(separation()[0] - separationVector_) > avgTol
+                )
+                {
+                    WarningIn
+                    (
+                        "cyclicPolyPatch::calcTransforms()"
+                    )   << "Specified separationVector " << separationVector_
+                        << " differs from computed separation vector "
+                        << separation() << endl
+                        << "This probably means your geometry is not consistent"
+                        << " with the specified separation and might lead"
+                        << " to problems." << endl
+                        << "Continuing with specified separation vector "
+                        << separationVector_ << endl
+                        << "patch:" << name()
+                        << " neighbour:" << neighbPatchName_
+                        << endl;
+                }
+
+                // Set tensors
+                const_cast<tensorField&>(forwardT()).clear();
+                const_cast<tensorField&>(reverseT()).clear();
+                const_cast<vectorField&>(separation()) = vectorField
+                (
+                    1,
+                    separationVector_
+                );
+                const_cast<boolList&>(collocated()) = boolList(1, false);
+            }
         }
     }
 }
@@ -299,6 +412,16 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
     anchors0 = getAnchorPoints(pp0, pp0.points());
     half1Ctrs = pp1.faceCentres();
 
+    if (debug)
+    {
+        Pout<< "cyclicPolyPatch::getCentresAndAnchors :"
+            << " patch:" << name() << nl
+            << "half0 untransformed faceCentres (avg) : "
+            << gAverage(half0Ctrs) << nl
+            << "half1 untransformed faceCentres (avg) : "
+            << gAverage(half1Ctrs) << endl;
+    }
+
     switch (transform_)
     {
         case ROTATIONAL:
@@ -355,23 +478,24 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
 
             break;
         }
-        //- Problem: usually specified translation is not accurate enough
-        //- to get proper match so keep automatic determination over here.
-        //case TRANSLATIONAL:
-        //{
-        //    // Transform 0 points.
-        //
-        //    if (debug)
-        //    {
-        //        Pout<< "cyclicPolyPatch::getCentresAndAnchors :"
-        //            << "Specified translation : " << separationVector_
-        //            << endl;
-        //    }
-        //
-        //    half0Ctrs += separationVector_;
-        //    anchors0 += separationVector_;
-        //    break;
-        //}
+        case TRANSLATIONAL:
+        {
+            // Transform 0 points.
+
+            if (debug)
+            {
+                Pout<< "cyclicPolyPatch::getCentresAndAnchors :"
+                    << "Specified translation : " << separationVector_
+                    << endl;
+            }
+
+            // Note: getCentresAndAnchors gets called on the slave side
+            // so separationVector is owner-slave points.
+
+            half0Ctrs -= separationVector_;
+            anchors0 -= separationVector_;
+            break;
+        }
         default:
         {
             // Assumes that cyclic is planar. This is also the initial
@@ -387,7 +511,7 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
             vector n1 = pp1[max1I].normal(pp1.points());
             n1 /= mag(n1) + VSMALL;
 
-            if (mag(n0 & n1) < 1-coupledPolyPatch::matchTol)
+            if (mag(n0 & n1) < 1-matchTolerance())
             {
                 if (debug)
                 {
@@ -438,7 +562,7 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
 
 
     // Calculate typical distance per face
-    tols = calcFaceTol(pp1, pp1.points(), half1Ctrs);
+    tols = calcFaceTol(matchTolerance(), pp1, pp1.points(), half1Ctrs);
 }
 
 
@@ -743,6 +867,9 @@ void Foam::cyclicPolyPatch::transformPosition(pointField& l) const
     }
     else if (separated())
     {
+        // transformPosition gets called on the receiving side,
+        // separation gets calculated on the sending side so subtract.
+
         const vectorField& s = separation();
         if (s.size() == 1)
         {
@@ -1132,6 +1259,13 @@ bool Foam::cyclicPolyPatch::order
     labelList& rotation
 ) const
 {
+    if (debug)
+    {
+        Pout<< "order : of " << pp.size()
+            << " faces of patch:" << name()
+            << " neighbour:" << neighbPatchName_
+            << endl;
+    }
     faceMap.setSize(pp.size());
     faceMap = -1;
 
@@ -1174,6 +1308,14 @@ bool Foam::cyclicPolyPatch::order
             tols
         );
 
+        if (debug)
+        {
+            Pout<< "half0 transformed faceCentres (avg)   : "
+                << gAverage(half0Ctrs) << nl
+                << "half1 untransformed faceCentres (avg) : "
+                << gAverage(half1Ctrs) << endl;
+        }
+
         // Geometric match of face centre vectors
         bool matchedAll = matchPoints
         (
@@ -1308,7 +1450,7 @@ bool Foam::cyclicPolyPatch::order
 
 void Foam::cyclicPolyPatch::write(Ostream& os) const
 {
-    polyPatch::write(os);
+    coupledPolyPatch::write(os);
     os.writeKeyword("neighbourPatch") << neighbPatchName_
         << token::END_STATEMENT << nl;
     switch (transform_)
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
index 4f782c4d309033f0352416806392f8cfc5e4e417..7081ca79889407eed4bac208f572327863eb0f55 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
@@ -386,7 +386,7 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors
             vector n1 = half1Faces[max1I].normal(pp.points());
             n1 /= mag(n1) + VSMALL;
 
-            if (mag(n0 & n1) < 1-coupledPolyPatch::matchTol)
+            if (mag(n0 & n1) < 1-matchTolerance())
             {
                 if (debug)
                 {
@@ -444,7 +444,7 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors
 
 
     // Calculate typical distance per face
-    tols = calcFaceTol(half1Faces, pp.points(), half1Ctrs);
+    tols = calcFaceTol(matchTolerance(), half1Faces, pp.points(), half1Ctrs);
 }
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
index d1aac00d57cbb4b615d92a0b15d287a9134689f8..c448305c51304e5e4e772204c6506ce1b15c1ff5 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -194,7 +194,7 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs)
                 faceNormals[facei] = point(1, 0, 0);
                 nbrFaceNormals[facei] = faceNormals[facei];
             }
-            else if (mag(magSf - nbrMagSf)/avSf > coupledPolyPatch::matchTol)
+            else if (mag(magSf - nbrMagSf)/avSf > matchTolerance())
             {
                 fileName nm
                 (
@@ -214,12 +214,16 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs)
                     << "patch:" << name()
                     << " my area:" << magSf
                     << " neighbour area:" << nbrMagSf
-                    << " matching tolerance:" << coupledPolyPatch::matchTol
+                    << " matching tolerance:" << matchTolerance()
                     << endl
                     << "Mesh face:" << start()+facei
                     << " vertices:"
                     << UIndirectList<point>(points(), operator[](facei))()
                     << endl
+                    << "If you are certain your matching is correct"
+                    << " you can increase the 'matchTolerance' setting"
+                    << " in the patch dictionary in the boundary file."
+                    << endl
                     << "Rerun with processor debug flag set for"
                     << " more information." << exit(FatalError);
             }
@@ -236,7 +240,8 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs)
             neighbFaceCentres_,
             faceNormals,
             nbrFaceNormals,
-            calcFaceTol(*this, points(), faceCentres())
+            calcFaceTol(matchTolerance(), *this, points(), faceCentres()),
+            matchTolerance()
         );
     }
 }
@@ -538,7 +543,10 @@ bool Foam::processorPolyPatch::order
         }
 
         // Calculate typical distance from face centre
-        scalarField tols(calcFaceTol(pp, pp.points(), pp.faceCentres()));
+        scalarField tols
+        (
+            calcFaceTol(matchTolerance(), pp, pp.points(), pp.faceCentres())
+        );
 
         if (debug || masterCtrs.size() != pp.size())
         {
@@ -697,7 +705,7 @@ bool Foam::processorPolyPatch::order
 
 void Foam::processorPolyPatch::write(Ostream& os) const
 {
-    polyPatch::write(os);
+    coupledPolyPatch::write(os);
     os.writeKeyword("myProcNo") << myProcNo_
         << token::END_STATEMENT << nl;
     os.writeKeyword("neighbProcNo") << neighbProcNo_
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C
index 6bcbf3102437277ce14e7d3f76dcebc90255b338..7032e74a745ca5558ae13f043bfd7f4faa787565 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C
@@ -125,6 +125,7 @@ void Foam::globalIndexAndTransform::determineTransforms()
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
     transforms_ = List<vectorTensorTransform>(6);
+    scalarField maxTol(6);
 
     label nextTrans = 0;
 
@@ -148,8 +149,6 @@ void Foam::globalIndexAndTransform::determineTransforms()
 
                     if (mag(sepVec) > SMALL)
                     {
-                        scalar tol = coupledPolyPatch::matchTol;
-
                         vectorTensorTransform transform(sepVec);
 
                         if
@@ -159,12 +158,13 @@ void Foam::globalIndexAndTransform::determineTransforms()
                                 transforms_,
                                 dummyMatch,
                                 transform,
-                                tol,
+                                cpp.matchTolerance(),
                                 false
                             ) == 0
                         )
                         {
-                            transforms_[nextTrans++] = transform;
+                            transforms_[nextTrans] = transform;
+                            maxTol[nextTrans++] = cpp.matchTolerance();
                         }
 
                         if (nextTrans > 6)
@@ -191,8 +191,6 @@ void Foam::globalIndexAndTransform::determineTransforms()
 
                     if (mag(transT - I) > SMALL)
                     {
-                        scalar tol = coupledPolyPatch::matchTol;
-
                         vectorTensorTransform transform(transT);
 
                         if
@@ -202,12 +200,13 @@ void Foam::globalIndexAndTransform::determineTransforms()
                                 transforms_,
                                 dummyMatch,
                                 transform,
-                                tol,
+                                cpp.matchTolerance(),
                                 false
                             ) == 0
                         )
                         {
-                            transforms_[nextTrans++] = transform;
+                            transforms_[nextTrans] = transform;
+                            maxTol[nextTrans++] = cpp.matchTolerance();
                         }
 
                         if (nextTrans > 6)
@@ -227,12 +226,18 @@ void Foam::globalIndexAndTransform::determineTransforms()
         }
     }
 
-    List<List<vectorTensorTransform> > allTransforms(Pstream::nProcs());
 
-    allTransforms[Pstream::myProcNo()] = transforms_;
+    // Collect transforms on master
 
+    List<List<vectorTensorTransform> > allTransforms(Pstream::nProcs());
+    allTransforms[Pstream::myProcNo()] = transforms_;
     Pstream::gatherList(allTransforms);
 
+    // Collect matching tolerance on master
+    List<scalarField> allTols(Pstream::nProcs());
+    allTols[Pstream::myProcNo()] = maxTol;
+    Pstream::gatherList(allTols);
+
     if (Pstream::master())
     {
         transforms_ = List<vectorTensorTransform>(3);
@@ -250,8 +255,6 @@ void Foam::globalIndexAndTransform::determineTransforms()
 
                 if (mag(transform.t()) > SMALL || transform.hasR())
                 {
-                    scalar tol = coupledPolyPatch::matchTol;
-
                     if
                     (
                         matchTransform
@@ -259,7 +262,7 @@ void Foam::globalIndexAndTransform::determineTransforms()
                             transforms_,
                             dummyMatch,
                             transform,
-                            tol,
+                            allTols[procI][pSVI],
                             true
                         ) ==  0
                     )
@@ -378,8 +381,6 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign()
 
                     if (mag(sepVec) > SMALL)
                     {
-                        scalar tol = coupledPolyPatch::matchTol;
-
                         vectorTensorTransform t(sepVec);
 
                         label sign = matchTransform
@@ -387,7 +388,7 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign()
                             transforms_,
                             matchTransI,
                             t,
-                            tol,
+                            cpp.matchTolerance(),
                             true
                         );
 
@@ -424,8 +425,6 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign()
 
                     if (mag(transT - I) > SMALL)
                     {
-                        scalar tol = coupledPolyPatch::matchTol;
-
                         vectorTensorTransform t(transT);
 
                         label sign = matchTransform
@@ -433,7 +432,7 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign()
                             transforms_,
                             matchTransI,
                             t,
-                            tol,
+                            cpp.matchTolerance(),
                             true
                         );
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H
index e270695ca19b97affed0d8beb2aa5cd53ec69ddd..459c055806c68bbf1820604e0c3bfb4b7d9af9b7 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H
@@ -25,7 +25,9 @@ Class
     Foam::timeVaryingFlowRateInletVelocityFvPatchVectorField
 
 Description
-    A time-varying form of a flow normal vector boundary condition.
+    A time-varying form of a flow normal vector boundary condition. The
+    variation is specified as an interpolationTable (see
+    Foam::interpolationTable).
 
     Example of the boundary condition specification:
     \verbatim
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H
index 81ae7aefec10947454b741d5dfe0e8f79f8e81d7..e165e7fb9562baee686fced63dc1a75f96144c68 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H
@@ -25,7 +25,9 @@ Class
     Foam::timeVaryingUniformFixedValueFvPatchField
 
 Description
-    A time-varying form of a uniform fixed value boundary condition.
+    A time-varying form of a uniform fixed value boundary condition. The
+    variation is specified as an interpolationTable (see
+    Foam::interpolationTable for read options).
 
     Example of the boundary condition specification:
     \verbatim
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformTotalPressure/timeVaryingUniformTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformTotalPressure/timeVaryingUniformTotalPressureFvPatchScalarField.H
index ee44a98a8d0c886e326306179fc099229dd53242..3c59ffb4b3a8ff589f8b980ef2f412d6bead7af7 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformTotalPressure/timeVaryingUniformTotalPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformTotalPressure/timeVaryingUniformTotalPressureFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,9 @@ Class
     Foam::timeVaryingUniformTotalPressureFvPatchScalarField
 
 Description
-    A time-varying form of a uniform total pressure boundary condition.
+    A time-varying form of a uniform total pressure boundary condition. The
+    variation is specified as an interpolationTable (see
+    Foam::interpolationTable).
 
 See Also
     Foam::timeVaryingUniformFixedValueFvPatchField
diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C
index 51bbf8f9ed6b0fdf3dcf2bbe956ae0acc28c2d64..0ae9dd1344d465f8f68be2da303f6fd044aee4c5 100644
--- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C
+++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,17 +52,6 @@ void Foam::cyclicFvPatch::makeWeights(scalarField& w) const
 
     forAll(magFa, facei)
     {
-        scalar avFa = (magFa[facei] + nbrMagFa[facei])/2.0;
-
-        if (mag(magFa[facei] - nbrMagFa[facei])/avFa > 1e-4)
-        {
-            FatalErrorIn("cyclicFvPatch::makeWeights(scalarField&) const")
-                << "face " << facei << " areas do not match by "
-                << 100*mag(magFa[facei] - nbrMagFa[facei])/avFa
-                << "% -- possible face ordering problem"
-                << abort(FatalError);
-        }
-
         scalar di = deltas[facei];
         scalar dni = nbrDeltas[facei];
 
diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake
index c4313c1a470d5271de0ab063e186c26e516d6690..aa039078e914fa8a6436426d6e24b8fb65ff4363 100755
--- a/src/fvAgglomerationMethods/Allwmake
+++ b/src/fvAgglomerationMethods/Allwmake
@@ -10,6 +10,6 @@ then
     wmake $makeType MGridGenGamgAgglomeration
 fi
 
-wmake libso pairPatchAgglomeration
+wmake $makeType pairPatchAgglomeration
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
index a1e274d2c0862e4f95237a8f38728267d578461b..39d56e22686dc79cbcfb7ea4bc4e5c05c47329c0 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
+++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
@@ -251,6 +251,7 @@ void Foam::autoLayerDriver::handleNonManifolds
 (
     const indirectPrimitivePatch& pp,
     const labelList& meshEdges,
+    const labelListList& edgeGlobalFaces,
     pointField& patchDisp,
     labelList& patchNLayers,
     List<extrudeMode>& extrudeStatus
@@ -268,11 +269,50 @@ void Foam::autoLayerDriver::handleNonManifolds
     // 1. Local check
     checkManifold(pp, nonManifoldPoints);
 
+    // 2. Remote check for boundary edges on coupled boundaries
+    forAll(edgeGlobalFaces, edgeI)
+    {
+        if
+        (
+            pp.edgeFaces()[edgeI].size() == 1
+         && edgeGlobalFaces[edgeI].size() > 2
+        )
+        {
+            // So boundary edges that are connected to more than 2 processors
+            // i.e. a non-manifold edge which is exactly on a processor
+            // boundary.
+            const edge& e = pp.edges()[edgeI];
+            nonManifoldPoints.insert(pp.meshPoints()[e[0]]);
+            nonManifoldPoints.insert(pp.meshPoints()[e[1]]);
+        }
+    }
+
+
     label nNonManif = returnReduce(nonManifoldPoints.size(), sumOp<label>());
 
     Info<< "Outside of local patch is multiply connected across edges or"
         << " points at " << nNonManif << " points." << endl;
 
+    if (nNonManif > 0)
+    {
+        const labelList& meshPoints = pp.meshPoints();
+
+        forAll(meshPoints, patchPointI)
+        {
+            if (nonManifoldPoints.found(meshPoints[patchPointI]))
+            {
+                unmarkExtrusion
+                (
+                    patchPointI,
+                    patchDisp,
+                    patchNLayers,
+                    extrudeStatus
+                );
+            }
+        }
+    }
+
+
     Info<< "Set displacement to zero for all " << nNonManif
         << " non-manifold points" << endl;
 }
@@ -1309,11 +1349,109 @@ void Foam::autoLayerDriver::getPatchDisplacement
 }
 
 
+bool Foam::autoLayerDriver::sameEdgeNeighbour
+(
+    const labelListList& globalEdgeFaces,
+    const label myGlobalFaceI,
+    const label nbrGlobFaceI,
+    const label edgeI
+) const
+{
+    const labelList& eFaces = globalEdgeFaces[edgeI];
+    if (eFaces.size() == 2)
+    {
+        return edge(myGlobalFaceI, nbrGlobFaceI) == edge(eFaces[0], eFaces[1]);
+    }
+    else
+    {
+        return false;
+    }
+}
+
+
+void Foam::autoLayerDriver::getVertexString
+(
+    const indirectPrimitivePatch& pp,
+    const labelListList& globalEdgeFaces,
+    const label faceI,
+    const label edgeI,
+    const label myGlobFaceI,
+    const label nbrGlobFaceI,
+    DynamicList<label>& vertices
+) const
+{
+    const labelList& fEdges = pp.faceEdges()[faceI];
+    label fp = findIndex(fEdges, edgeI);
+
+    if (fp == -1)
+    {
+        FatalErrorIn("autoLayerDriver::getVertexString(..)")
+            << "problem." << abort(FatalError);
+    }
+
+    // Search back
+    label startFp = fp;
+
+    forAll(fEdges, i)
+    {
+        label prevFp = fEdges.rcIndex(startFp);
+        if
+        (
+           !sameEdgeNeighbour
+            (
+                globalEdgeFaces,
+                myGlobFaceI,
+                nbrGlobFaceI,
+                fEdges[prevFp]
+            )
+        )
+        {
+            break;
+        }
+        startFp = prevFp;
+    }
+
+    label endFp = fp;
+    forAll(fEdges, i)
+    {
+        label nextFp = fEdges.fcIndex(endFp);
+        if
+        (
+           !sameEdgeNeighbour
+            (
+                globalEdgeFaces,
+                myGlobFaceI,
+                nbrGlobFaceI,
+                fEdges[nextFp]
+            )
+        )
+        {
+            break;
+        }
+        endFp = nextFp;
+    }
+
+    const face& f = pp.localFaces()[faceI];
+    vertices.clear();
+    fp = startFp;
+    while (fp != endFp)
+    {
+        vertices.append(f[fp]);
+        fp = f.fcIndex(fp);
+    }
+    vertices.append(f[fp]);
+    fp = f.fcIndex(fp);
+    vertices.append(f[fp]);
+}
+
+
 // Truncates displacement
 // - for all patchFaces in the faceset displacement gets set to zero
 // - all displacement < minThickness gets set to zero
 Foam::label Foam::autoLayerDriver::truncateDisplacement
 (
+    const globalIndex& globalFaces,
+    const labelListList& edgeGlobalFaces,
     const motionSmoother& meshMover,
     const scalarField& minThickness,
     const faceSet& illegalPatchFaces,
@@ -1405,6 +1543,10 @@ Foam::label Foam::autoLayerDriver::truncateDisplacement
             extrudeStatus
         );
 
+
+        // Pinch
+        // ~~~~~
+
         // Make sure that a face doesn't have two non-consecutive areas
         // not extruded (e.g. quad where vertex 0 and 2 are not extruded
         // but 1 and 3 are) since this gives topological errors.
@@ -1457,6 +1599,112 @@ Foam::label Foam::autoLayerDriver::truncateDisplacement
             << " faces due to non-consecutive vertices being extruded." << endl;
 
 
+        // Butterfly
+        // ~~~~~~~~~
+
+        // Make sure that a string of edges becomes a single face so
+        // not a butterfly. Occassionally an 'edge' will have a single dangling
+        // vertex due to face combining. These get extruded as a single face
+        // (with a dangling vertex) so make sure this extrusion forms a single
+        // shape.
+        //  - continuous i.e. no butterfly:
+        //      +     +
+        //      |\   /|
+        //      | \ / |
+        //      +--+--+
+        //  - extrudes from all but the endpoints i.e. no partial
+        //    extrude
+        //            +
+        //           /|
+        //          / |
+        //      +--+--+
+        // The common error topology is a pinch somewhere in the middle
+        label nButterFly = 0;
+        {
+            DynamicList<label> stringedVerts;
+            forAll(pp.edges(), edgeI)
+            {
+                const labelList& globFaces = edgeGlobalFaces[edgeI];
+
+                if (globFaces.size() == 2)
+                {
+                    label myFaceI = pp.edgeFaces()[edgeI][0];
+                    label myGlobalFaceI = globalFaces.toGlobal
+                    (
+                        pp.addressing()[myFaceI]
+                    );
+                    label nbrGlobalFaceI =
+                    (
+                        globFaces[0] != myGlobalFaceI
+                      ? globFaces[0]
+                      : globFaces[1]
+                    );
+                    getVertexString
+                    (
+                        pp,
+                        edgeGlobalFaces,
+                        myFaceI,
+                        edgeI,
+                        myGlobalFaceI,
+                        nbrGlobalFaceI,
+                        stringedVerts
+                    );
+
+                    if
+                    (
+                        extrudeStatus[stringedVerts[0]] != NOEXTRUDE
+                     || extrudeStatus[stringedVerts.last()] != NOEXTRUDE
+                    )
+                    {
+                        // Any pinch in the middle
+                        bool pinch = false;
+                        for (label i = 1; i < stringedVerts.size()-1; i++)
+                        {
+                            if
+                            (
+                                extrudeStatus[stringedVerts[i]] == NOEXTRUDE
+                            )
+                            {
+                                pinch = true;
+                                break;
+                            }
+                        }
+                        if (pinch)
+                        {
+                            forAll(stringedVerts, i)
+                            {
+                                if
+                                (
+                                    unmarkExtrusion
+                                    (
+                                        stringedVerts[i],
+                                        patchDisp,
+                                        patchNLayers,
+                                        extrudeStatus
+                                    )
+                                )
+                                {
+                                    nButterFly++;
+                                    nChanged++;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        reduce(nButterFly, sumOp<label>());
+
+        Info<< "truncateDisplacement : Unextruded " << nButterFly
+            << " faces due to stringed edges with inconsistent extrusion."
+            << endl;
+
+
+
+        // Consistent number of layers
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
         // Make sure that a face has consistent number of layers for all
         // its vertices.
 
@@ -1504,7 +1752,7 @@ Foam::label Foam::autoLayerDriver::truncateDisplacement
         //Info<< "truncateDisplacement : Unextruded " << nDiffering
         //    << " faces due to having differing number of layers." << endl;
 
-        if (nPinched+nDiffering == 0)
+        if (nPinched+nButterFly+nDiffering == 0)
         {
             break;
         }
@@ -1536,7 +1784,7 @@ void Foam::autoLayerDriver::setupLayerInfoTruncation
         Info<< nl << "Performing no layer truncation."
             << " nBufferCellsNoExtrude set to less than 0  ..." << endl;
 
-        // Face layers if any point get extruded
+        // Face layers if any point gets extruded
         forAll(pp.localFaces(), patchFaceI)
         {
             const face& f = pp.localFaces()[patchFaceI];
@@ -2066,6 +2314,7 @@ void Foam::autoLayerDriver::addLayers
         (
             pp,
             meshEdges,
+            edgeGlobalFaces,
 
             patchDisp,
             patchNLayers,
@@ -2408,10 +2657,13 @@ void Foam::autoLayerDriver::addLayers
         }
 
         // Truncate displacements that are too small (this will do internal
-        // ones, coupled ones have already been truncated by syncPatch)
+        // ones, coupled ones have already been truncated by
+        // syncPatchDisplacement)
         faceSet dummySet(mesh, "wrongPatchFaces", 0);
         truncateDisplacement
         (
+            globalFaces,
+            edgeGlobalFaces,
             meshMover(),
             minThickness,
             dummySet,
@@ -2467,9 +2719,9 @@ void Foam::autoLayerDriver::addLayers
         // (first layer = layer of cells next to the original mesh)
         vectorField firstDisp(patchNLayers.size(), vector::zero);
 
-        forAll(patchNLayers, i)
+        forAll(nPatchPointLayers, i)
         {
-            if (patchNLayers[i] > 0)
+            if (nPatchPointLayers[i] > 0)
             {
                 if (expansionRatio[i] == 1.0)
                 {
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H
index ff3586c42266a0744c8e67110200b355ab1a8edd..83083d04f8b93e375c9b08aab7ede4e52e2e17e9 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H
+++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H
@@ -153,6 +153,7 @@ class autoLayerDriver
                 (
                     const indirectPrimitivePatch& pp,
                     const labelList& meshEdges,
+                    const labelListList& edgeGlobalFaces,
                     pointField& patchDisp,
                     labelList& patchNLayers,
                     List<extrudeMode>& extrudeStatus
@@ -261,12 +262,36 @@ class autoLayerDriver
                     List<extrudeMode>& extrudeStatus
                 ) const;
 
+                //- for truncateDisplacement: find strings of edges
+                bool sameEdgeNeighbour
+                (
+                    const labelListList& globalEdgeFaces,
+                    const label myGlobalFaceI,
+                    const label nbrGlobFaceI,
+                    const label edgeI
+                ) const;
+
+                //- for truncateDisplacement: find strings of edges
+                void getVertexString
+                (
+                    const indirectPrimitivePatch& pp,
+                    const labelListList& globalEdgeFaces,
+                    const label faceI,
+                    const label edgeI,
+                    const label myGlobFaceI,
+                    const label nbrGlobFaceI,
+                    DynamicList<label>& vertices
+                ) const;
+
                 //- Truncates displacement
                 // - for all patchFaces in the faceset displacement gets set
                 //   to zero
                 // - all displacement < minThickness gets set to zero
+                // - all non-consecutive extrusions get set to 0
                 label truncateDisplacement
                 (
+                    const globalIndex& globalFaces,
+                    const labelListList& edgeGlobalFaces,
                     const motionSmoother& meshMover,
                     const scalarField& minThickness,
                     const faceSet& illegalPatchFaces,
diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake
index 7713ded586a3b86c9dac8648bf41cb7de13d79fb..b8b7bce119300adb0b47eaf866e19bc4396a7305 100755
--- a/src/regionModels/Allwmake
+++ b/src/regionModels/Allwmake
@@ -1,11 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+makeType=${1:-libso}
 set -x
 
-wmake libso regionModel
-#wmake libso pyrolysisModels
-wmake libso surfaceFilmModels
-#wmake libso regionCoupling
+wmake $makeType regionModel
+#wmake $makeType pyrolysisModels
+wmake $makeType surfaceFilmModels
+#wmake $makeType regionCoupling
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
index d5c5471e66e9a9e04e60bccc587df89c2c5deb4c..81bc701c4ed71daec07cb3618cced34cb9d649a6 100644
--- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
+++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
@@ -1,1131 +1,1131 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2009-2011 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 "kinematicSingleLayer.H"
-#include "fvm.H"
-#include "fvcDiv.H"
-#include "fvcLaplacian.H"
-#include "fvcSnGrad.H"
-#include "fvcReconstruct.H"
-#include "fvcVolumeIntegrate.H"
-#include "addToRunTimeSelectionTable.H"
-#include "directMappedWallPolyPatch.H"
-#include "mapDistribute.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-namespace regionModels
-{
-namespace surfaceFilmModels
-{
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-defineTypeNameAndDebug(kinematicSingleLayer, 0);
-
-addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh);
-
-// * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
-
-bool kinematicSingleLayer::read()
-{
-    if (surfaceFilmModel::read())
-    {
-        const dictionary& solution = this->solution().subDict("PISO");
-        solution.lookup("momentumPredictor") >> momentumPredictor_;
-        solution.lookup("nOuterCorr") >> nOuterCorr_;
-        solution.lookup("nCorr") >> nCorr_;
-        solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
-
-        coeffs_.lookup("Cf") >> Cf_;
-
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-
-void kinematicSingleLayer::correctThermoFields()
-{
-    if (thermoModel_ == tmConstant)
-    {
-        rho_ == dimensionedScalar(coeffs_.lookup("rho0"));
-        mu_ == dimensionedScalar(coeffs_.lookup("mu0"));
-        sigma_ == dimensionedScalar(coeffs_.lookup("sigma0"));
-    }
-    else
-    {
-        FatalErrorIn
-        (
-            "void Foam::surfaceFilmModels::kinematicSingleLayer::"
-            "correctThermo()"
-        )   << "Kinematic surface film must use "
-            << thermoModelTypeNames_[thermoModel_] << "thermodynamics" << endl;
-    }
-}
-
-
-void kinematicSingleLayer::resetPrimaryRegionSourceTerms()
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::resetPrimaryRegionSourceTerms()" << endl;
-    }
-
-    rhoSpPrimary_ == dimensionedScalar("zero", rhoSp_.dimensions(), 0.0);
-    USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), vector::zero);
-    pSpPrimary_ == dimensionedScalar("zero", pSp_.dimensions(), 0.0);
-}
-
-
-void kinematicSingleLayer::transferPrimaryRegionThermoFields()
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::"
-            << "transferPrimaryRegionThermoFields()" << endl;
-    }
-    // Update fields from primary region via direct mapped
-    // (coupled) boundary conditions
-    UPrimary_.correctBoundaryConditions();
-    pPrimary_.correctBoundaryConditions();
-    rhoPrimary_.correctBoundaryConditions();
-    muPrimary_.correctBoundaryConditions();
-}
-
-
-void kinematicSingleLayer::transferPrimaryRegionSourceFields()
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::"
-            << "transferPrimaryRegionSourceFields()" << endl;
-    }
-
-    // Retrieve the source fields from the primary region via direct mapped
-    // (coupled) boundary conditions
-    // - fields require transfer of values for both patch AND to push the
-    //   values into the first layer of internal cells
-    rhoSp_.correctBoundaryConditions();
-    USp_.correctBoundaryConditions();
-    pSp_.correctBoundaryConditions();
-
-    // Convert accummulated source terms into per unit area per unit time
-    // Note: boundary values will still have original (neat) values
-    const scalar deltaT = time_.deltaTValue();
-    rhoSp_.field() /= magSf()*deltaT;
-    USp_.field() /= magSf()*deltaT;
-    pSp_.field() /= magSf()*deltaT;
-}
-
-
-tmp<volScalarField> kinematicSingleLayer::pu()
-{
-    return tmp<volScalarField>
-    (
-        new volScalarField
-        (
-            IOobject
-            (
-                "pu",
-                time_.timeName(),
-                regionMesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE
-            ),
-            pPrimary_                  // pressure (mapped from primary region)
-          - pSp_                           // accumulated particle impingement
-          - fvc::laplacian(sigma_, delta_) // surface tension
-        )
-    );
-}
-
-
-tmp<volScalarField> kinematicSingleLayer::pp()
-{
-    return tmp<volScalarField>
-    (
-        new volScalarField
-        (
-            IOobject
-            (
-                "pp",
-                time_.timeName(),
-                regionMesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE
-            ),
-           -rho_*gNormClipped() // hydrostatic effect only
-        )
-    );
-}
-
-
-void kinematicSingleLayer::updateSubmodels()
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::updateSubmodels()" << endl;
-    }
-
-    // Update injection model - mass returned is mass available for injection
-    injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
-
-    // Update source fields
-    const dimensionedScalar deltaT = time().deltaT();
-    rhoSp_ += cloudMassTrans_/magSf()/deltaT;
-}
-
-
-void kinematicSingleLayer::continuityCheck()
-{
-    const volScalarField deltaRho0(deltaRho_);
-
-    solveContinuity();
-
-    if (debug)
-    {
-        const volScalarField mass(deltaRho_*magSf());
-        const dimensionedScalar totalMass =
-            fvc::domainIntegrate(mass)
-          + dimensionedScalar("SMALL", dimMass*dimVolume, ROOTVSMALL);
-
-        const scalar sumLocalContErr =
-            (
-                fvc::domainIntegrate(mag(mass - magSf()*deltaRho0))/totalMass
-            ).value();
-
-       const scalar globalContErr =
-            (
-                fvc::domainIntegrate(mass - magSf()*deltaRho0)/totalMass
-            ).value();
-
-        cumulativeContErr_ += globalContErr;
-
-        Info<< "Surface film: " << type() << nl
-            << "    time step continuity errors: sum local = "
-            << sumLocalContErr << ", global = " << globalContErr
-            << ", cumulative = " << cumulativeContErr_ << endl;
-    }
-}
-
-
-void kinematicSingleLayer::solveContinuity()
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::solveContinuity()" << endl;
-    }
-
-    solve
-    (
-        fvm::ddt(deltaRho_)
-      + fvc::div(phi_)
-     ==
-      - rhoSp_
-    );
-}
-
-
-void kinematicSingleLayer::updateSurfaceVelocities()
-{
-    // Push boundary film velocity values into internal field
-    for (label i=0; i<intCoupledPatchIDs_.size(); i++)
-    {
-        label patchI = intCoupledPatchIDs_[i];
-        const polyPatch& pp = regionMesh().boundaryMesh()[patchI];
-        UIndirectList<vector>(Uw_, pp.faceCells()) =
-            U_.boundaryField()[patchI];
-    }
-    Uw_ -= nHat()*(Uw_ & nHat());
-    Uw_.correctBoundaryConditions();
-
-    // TODO: apply quadratic profile to determine surface velocity
-    Us_ = U_;
-    Us_.correctBoundaryConditions();
-}
-
-
-tmp<fvVectorMatrix> kinematicSingleLayer::tau(volVectorField& U) const
-{
-    // Calculate shear stress
-    volScalarField Cs("Cs", rho_*Cf_*mag(Us_ - U));
-    volScalarField Cw
-    (
-        "Cw",
-        mu_/(0.3333*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL)))
-    );
-    Cw.min(1.0e+06);
-
-    return
-    (
-       - fvm::Sp(Cs, U) + Cs*Us_ // surface contribution
-       - fvm::Sp(Cw, U) + Cw*Uw_ // wall contribution
-    );
-}
-
-
-tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
-(
-    const volScalarField& pu,
-    const volScalarField& pp
-)
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::solveMomentum()" << endl;
-    }
-
-    updateSurfaceVelocities();
-
-    // Momentum
-    tmp<fvVectorMatrix> tUEqn
-    (
-        fvm::ddt(deltaRho_, U_)
-      + fvm::div(phi_, U_)
-     ==
-      - USp_
-      + tau(U_)
-      + fvc::grad(sigma_)
-      - fvm::SuSp(rhoSp_, U_)
-    );
-
-    fvVectorMatrix& UEqn = tUEqn();
-
-    UEqn.relax();
-
-    if (momentumPredictor_)
-    {
-        solve
-        (
-            UEqn
-         ==
-            fvc::reconstruct
-            (
-              - fvc::interpolate(delta_)
-              * (
-                    regionMesh().magSf()
-                  * (
-                        fvc::snGrad(pu, "snGrad(p)")
-                      + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
-                      + fvc::snGrad(delta_)*fvc::interpolate(pp)
-                    )
-                  - (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
-                )
-            )
-        );
-
-        // Remove any patch-normal components of velocity
-        U_ -= nHat()*(nHat() & U_);
-        U_.correctBoundaryConditions();
-    }
-
-    return tUEqn;
-}
-
-
-void kinematicSingleLayer::solveThickness
-(
-    const volScalarField& pu,
-    const volScalarField& pp,
-    const fvVectorMatrix& UEqn
-)
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::solveThickness()" << endl;
-    }
-
-    volScalarField rUA(1.0/UEqn.A());
-    U_ = rUA*UEqn.H();
-
-    surfaceScalarField deltarUAf(fvc::interpolate(delta_*rUA));
-    surfaceScalarField rhof(fvc::interpolate(rho_));
-
-    surfaceScalarField phiAdd
-    (
-        "phiAdd",
-        regionMesh().magSf()
-      * (
-            fvc::snGrad(pu, "snGrad(p)")
-          + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
-        )
-      - (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
-    );
-    constrainFilmField(phiAdd, 0.0);
-
-    surfaceScalarField phid
-    (
-        "phid",
-        (fvc::interpolate(U_*rho_) & regionMesh().Sf())
-      - deltarUAf*phiAdd*rhof
-    );
-    constrainFilmField(phid, 0.0);
-
-    surfaceScalarField ddrhorUAppf
-    (
-        "deltaCoeff",
-        fvc::interpolate(delta_)*deltarUAf*rhof*fvc::interpolate(pp)
-    );
-//    constrainFilmField(ddrhorUAppf, 0.0);
-
-    for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++)
-    {
-        // Film thickness equation
-        fvScalarMatrix deltaEqn
-        (
-            fvm::ddt(rho_, delta_)
-          + fvm::div(phid, delta_)
-          - fvm::laplacian(ddrhorUAppf, delta_)
-         ==
-          - rhoSp_
-        );
-
-        deltaEqn.solve();
-
-        if (nonOrth == nNonOrthCorr_)
-        {
-            phiAdd +=
-                fvc::interpolate(pp)
-              * fvc::snGrad(delta_)
-              * regionMesh().magSf();
-
-            phi_ == deltaEqn.flux();
-        }
-    }
-
-    // Bound film thickness by a minimum of zero
-    delta_.max(0.0);
-
-    // Update U field
-    U_ -= fvc::reconstruct(deltarUAf*phiAdd);
-
-    // Remove any patch-normal components of velocity
-    U_ -= nHat()*(nHat() & U_);
-
-    U_.correctBoundaryConditions();
-
-    // Continuity check
-    continuityCheck();
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-kinematicSingleLayer::kinematicSingleLayer
-(
-    const word& modelType,
-    const fvMesh& mesh,
-    const dimensionedVector& g,
-    const bool readFields
-)
-:
-    surfaceFilmModel(modelType, mesh, g),
-
-    momentumPredictor_(solution().subDict("PISO").lookup("momentumPredictor")),
-    nOuterCorr_(readLabel(solution().subDict("PISO").lookup("nOuterCorr"))),
-    nCorr_(readLabel(solution().subDict("PISO").lookup("nCorr"))),
-    nNonOrthCorr_
-    (
-        readLabel(solution().subDict("PISO").lookup("nNonOrthCorr"))
-    ),
-
-    cumulativeContErr_(0.0),
-
-    Cf_(readScalar(coeffs().lookup("Cf"))),
-
-    rho_
-    (
-        IOobject
-        (
-            "rhof",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::AUTO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimDensity, 0.0),
-        zeroGradientFvPatchScalarField::typeName
-    ),
-    mu_
-    (
-        IOobject
-        (
-            "muf",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::AUTO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimPressure*dimTime, 0.0),
-        zeroGradientFvPatchScalarField::typeName
-    ),
-    sigma_
-    (
-        IOobject
-        (
-            "sigmaf",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::AUTO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimMass/sqr(dimTime), 0.0),
-        zeroGradientFvPatchScalarField::typeName
-    ),
-
-    delta_
-    (
-        IOobject
-        (
-            "deltaf",
-            time().timeName(),
-            regionMesh(),
-            IOobject::MUST_READ,
-            IOobject::AUTO_WRITE
-        ),
-        regionMesh()
-    ),
-    U_
-    (
-        IOobject
-        (
-            "Uf",
-            time().timeName(),
-            regionMesh(),
-            IOobject::MUST_READ,
-            IOobject::AUTO_WRITE
-        ),
-        regionMesh()
-    ),
-    Us_
-    (
-        IOobject
-        (
-            "Usf",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        U_,
-        zeroGradientFvPatchScalarField::typeName
-    ),
-    Uw_
-    (
-        IOobject
-        (
-            "Uwf",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        U_,
-        zeroGradientFvPatchScalarField::typeName
-    ),
-    deltaRho_
-    (
-        IOobject
-        (
-            delta_.name() + "*" + rho_.name(),
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", delta_.dimensions()*rho_.dimensions(), 0.0),
-        zeroGradientFvPatchScalarField::typeName
-    ),
-
-    phi_
-    (
-        IOobject
-        (
-            "phi",
-            time().timeName(),
-            regionMesh(),
-            IOobject::READ_IF_PRESENT,
-            IOobject::AUTO_WRITE
-        ),
-        regionMesh(),
-        dimLength*dimMass/dimTime
-    ),
-
-    primaryMassTrans_
-    (
-        IOobject
-        (
-            "primaryMassTrans",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimMass, 0.0),
-        zeroGradientFvPatchScalarField::typeName
-    ),
-    cloudMassTrans_
-    (
-        IOobject
-        (
-            "cloudMassTrans",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimMass, 0.0),
-        zeroGradientFvPatchScalarField::typeName
-    ),
-    cloudDiameterTrans_
-    (
-        IOobject
-        (
-            "cloudDiameterTrans",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimLength, -1.0),
-        zeroGradientFvPatchScalarField::typeName
-    ),
-
-    USp_
-    (
-        IOobject
-        (
-            "USpf",
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedVector
-        (
-            "zero", dimMass*dimVelocity/dimArea/dimTime, vector::zero
-        ),
-        this->mappedPushedFieldPatchTypes<vector>()
-    ),
-    pSp_
-    (
-        IOobject
-        (
-            "pSpf",
-            time_.timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimPressure, 0.0),
-        this->mappedPushedFieldPatchTypes<scalar>()
-    ),
-    rhoSp_
-    (
-        IOobject
-        (
-            "rhoSpf",
-            time_.timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimMass/dimTime/dimArea, 0.0),
-        this->mappedPushedFieldPatchTypes<scalar>()
-    ),
-
-    USpPrimary_
-    (
-        IOobject
-        (
-            USp_.name(), // must have same name as USp_ to enable mapping
-            time().timeName(),
-            primaryMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        primaryMesh(),
-        dimensionedVector("zero", USp_.dimensions(), vector::zero)
-    ),
-    pSpPrimary_
-    (
-        IOobject
-        (
-            pSp_.name(), // must have same name as pSp_ to enable mapping
-            time().timeName(),
-            primaryMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        primaryMesh(),
-        dimensionedScalar("zero", pSp_.dimensions(), 0.0)
-    ),
-    rhoSpPrimary_
-    (
-        IOobject
-        (
-            rhoSp_.name(), // must have same name as rhoSp_ to enable mapping
-            time().timeName(),
-            primaryMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        primaryMesh(),
-        dimensionedScalar("zero", rhoSp_.dimensions(), 0.0)
-    ),
-
-    UPrimary_
-    (
-        IOobject
-        (
-            "U", // must have same name as U to enable mapping
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedVector("zero", dimVelocity, vector::zero),
-        this->mappedFieldAndInternalPatchTypes<vector>()
-    ),
-    pPrimary_
-    (
-        IOobject
-        (
-            "p", // must have same name as p to enable mapping
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimPressure, 0.0),
-        this->mappedFieldAndInternalPatchTypes<scalar>()
-    ),
-    rhoPrimary_
-    (
-        IOobject
-        (
-            "rho", // must have same name as rho to enable mapping
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimDensity, 0.0),
-        this->mappedFieldAndInternalPatchTypes<scalar>()
-    ),
-    muPrimary_
-    (
-        IOobject
-        (
-            "mu", // must have same name as mu to enable mapping
-            time().timeName(),
-            regionMesh(),
-            IOobject::NO_READ,
-            IOobject::NO_WRITE
-        ),
-        regionMesh(),
-        dimensionedScalar("zero", dimPressure*dimTime, 0.0),
-        this->mappedFieldAndInternalPatchTypes<scalar>()
-    ),
-
-    availableMass_(regionMesh().nCells(), 0.0),
-
-    injection_(*this, coeffs_),
-
-    addedMassTotal_(0.0)
-{
-    if (readFields)
-    {
-        transferPrimaryRegionThermoFields();
-
-        correctThermoFields();
-
-        deltaRho_ == delta_*rho_;
-        phi_ = fvc::interpolate(deltaRho_*U_) & regionMesh().Sf();
-    }
-}
-
-
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-kinematicSingleLayer::~kinematicSingleLayer()
-{}
-
-
-// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
-
-void kinematicSingleLayer::addSources
-(
-    const label patchI,
-    const label faceI,
-    const scalar massSource,
-    const vector& momentumSource,
-    const scalar pressureSource,
-    const scalar energySource
-)
-{
-    if (debug)
-    {
-        Info<< "\nSurface film: " << type() << ": adding to film source:" << nl
-            << "    mass     = " << massSource << nl
-            << "    momentum = " << momentumSource << nl
-            << "    pressure = " << pressureSource << endl;
-    }
-
-    rhoSpPrimary_.boundaryField()[patchI][faceI] -= massSource;
-    USpPrimary_.boundaryField()[patchI][faceI] -= momentumSource;
-    pSpPrimary_.boundaryField()[patchI][faceI] -= pressureSource;
-
-    addedMassTotal_ += massSource;
-}
-
-
-void kinematicSingleLayer::preEvolveRegion()
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::preEvolveRegion()" << endl;
-    }
-
-    transferPrimaryRegionThermoFields();
-
-    correctThermoFields();
-
-    transferPrimaryRegionSourceFields();
-
-    // Reset transfer fields
-//    availableMass_ = mass();
-    availableMass_ = netMass();
-    cloudMassTrans_ == dimensionedScalar("zero", dimMass, 0.0);
-    cloudDiameterTrans_ == dimensionedScalar("zero", dimLength, -1.0);
-}
-
-
-void kinematicSingleLayer::evolveRegion()
-{
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::evolveRegion()" << endl;
-    }
-
-    updateSubmodels();
-
-    // Solve continuity for deltaRho_
-    solveContinuity();
-
-    // Implicit pressure source coefficient - constant
-    tmp<volScalarField> tpp(this->pp());
-
-    for (int oCorr=0; oCorr<nOuterCorr_; oCorr++)
-    {
-        // Explicit pressure source contribution - varies with delta_
-        tmp<volScalarField> tpu(this->pu());
-
-        // Solve for momentum for U_
-        tmp<fvVectorMatrix> UEqn = solveMomentum(tpu(), tpp());
-
-        // Film thickness correction loop
-        for (int corr=1; corr<=nCorr_; corr++)
-        {
-            // Solve thickness for delta_
-            solveThickness(tpu(), tpp(), UEqn());
-        }
-    }
-
-    // Update deltaRho_ with new delta_
-    deltaRho_ == delta_*rho_;
-
-    // Update film wall and surface velocities
-    updateSurfaceVelocities();
-
-    // Reset source terms for next time integration
-    resetPrimaryRegionSourceTerms();
-}
-
-
-scalar kinematicSingleLayer::CourantNumber() const
-{
-    scalar CoNum = 0.0;
-
-    if (regionMesh().nInternalFaces() > 0)
-    {
-        const scalar deltaT = time_.deltaTValue();
-
-        const surfaceScalarField SfUfbyDelta
-        (
-            regionMesh().surfaceInterpolation::deltaCoeffs()*mag(phi_)
-        );
-        const surfaceScalarField rhoDelta(fvc::interpolate(rho_*delta_));
-        const surfaceScalarField& magSf = regionMesh().magSf();
-
-        forAll(rhoDelta, i)
-        {
-            if (rhoDelta[i] > ROOTVSMALL)
-            {
-                CoNum = max(CoNum, SfUfbyDelta[i]/rhoDelta[i]/magSf[i]*deltaT);
-            }
-        }
-    }
-
-    reduce(CoNum, maxOp<scalar>());
-
-    Info<< "Film max Courant number: " << CoNum << endl;
-
-    return CoNum;
-}
-
-
-const volVectorField& kinematicSingleLayer::U() const
-{
-    return U_;
-}
-
-
-const volVectorField& kinematicSingleLayer::Us() const
-{
-    return Us_;
-}
-
-
-const volVectorField& kinematicSingleLayer::Uw() const
-{
-    return Uw_;
-}
-
-
-const surfaceScalarField& kinematicSingleLayer::phi() const
-{
-    return phi_;
-}
-
-
-const volScalarField& kinematicSingleLayer::rho() const
-{
-    return rho_;
-}
-
-
-const volScalarField& kinematicSingleLayer::T() const
-{
-    FatalErrorIn
-    (
-        "const volScalarField& kinematicSingleLayer::T() const"
-    )   << "T field not available for " << type() << abort(FatalError);
-
-    return volScalarField::null();
-}
-
-
-const volScalarField& kinematicSingleLayer::Ts() const
-{
-    FatalErrorIn
-    (
-        "const volScalarField& kinematicSingleLayer::Ts() const"
-    )   << "Ts field not available for " << type() << abort(FatalError);
-
-    return volScalarField::null();
-}
-
-
-const volScalarField& kinematicSingleLayer::Tw() const
-{
-    FatalErrorIn
-    (
-        "const volScalarField& kinematicSingleLayer::Tw() const"
-    )   << "Tw field not available for " << type() << abort(FatalError);
-
-    return volScalarField::null();
-}
-
-
-const volScalarField& kinematicSingleLayer::Cp() const
-{
-    FatalErrorIn
-    (
-        "const volScalarField& kinematicSingleLayer::Cp() const"
-    )   << "Cp field not available for " << type() << abort(FatalError);
-
-    return volScalarField::null();
-}
-
-
-const volScalarField& kinematicSingleLayer::kappa() const
-{
-    FatalErrorIn
-    (
-        "const volScalarField& kinematicSingleLayer::kappa() const"
-    )   << "kappa field not available for " << type() << abort(FatalError);
-
-    return volScalarField::null();
-}
-
-
-tmp<volScalarField> kinematicSingleLayer::primaryMassTrans() const
-{
-    return tmp<volScalarField>
-    (
-        new volScalarField
-        (
-            IOobject
-            (
-                "kinematicSingleLayer::primaryMassTrans",
-                time().timeName(),
-                primaryMesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE,
-                false
-            ),
-            primaryMesh(),
-            dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
-        )
-    );
-}
-
-
-const volScalarField& kinematicSingleLayer::cloudMassTrans() const
-{
-    return cloudMassTrans_;
-}
-
-
-const volScalarField& kinematicSingleLayer::cloudDiameterTrans() const
-{
-    return cloudDiameterTrans_;
-}
-
-
-void kinematicSingleLayer::info() const
-{
-    Info<< "\nSurface film: " << type() << endl;
-
-    Info<< indent << "added mass         = "
-        << returnReduce<scalar>(addedMassTotal_, sumOp<scalar>()) << nl
-        << indent << "current mass       = "
-        << gSum((deltaRho_*magSf())()) << nl
-        << indent << "min/max(mag(U))    = " << min(mag(U_)).value() << ", "
-        << max(mag(U_)).value() << nl
-        << indent << "min/max(delta)     = " << min(delta_).value() << ", "
-        << max(delta_).value() << nl;
-
-    injection_.info(Info);
-}
-
-
-tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho() const
-{
-    return tmp<DimensionedField<scalar, volMesh> >
-    (
-        new DimensionedField<scalar, volMesh>
-        (
-            IOobject
-            (
-                "kinematicSingleLayer::Srho",
-                time().timeName(),
-                primaryMesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE,
-                false
-            ),
-            primaryMesh(),
-            dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
-        )
-    );
-}
-
-
-tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho
-(
-    const label i
-) const
-{
-    return tmp<DimensionedField<scalar, volMesh> >
-    (
-        new DimensionedField<scalar, volMesh>
-        (
-            IOobject
-            (
-                "kinematicSingleLayer::Srho(" + Foam::name(i) + ")",
-                time().timeName(),
-                primaryMesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE,
-                false
-            ),
-            primaryMesh(),
-            dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
-        )
-    );
-}
-
-
-tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Sh() const
-{
-    return tmp<DimensionedField<scalar, volMesh> >
-    (
-        new DimensionedField<scalar, volMesh>
-        (
-            IOobject
-            (
-                "kinematicSingleLayer::Sh",
-                time().timeName(),
-                primaryMesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE,
-                false
-            ),
-            primaryMesh(),
-            dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
-        )
-    );
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace surfaceFilmModels
-} // End namespace regionModels
-} // End namespace Foam
-
-// ************************************************************************* //
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2009-2011 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 "kinematicSingleLayer.H"
+#include "fvm.H"
+#include "fvcDiv.H"
+#include "fvcLaplacian.H"
+#include "fvcSnGrad.H"
+#include "fvcReconstruct.H"
+#include "fvcVolumeIntegrate.H"
+#include "addToRunTimeSelectionTable.H"
+#include "directMappedWallPolyPatch.H"
+#include "mapDistribute.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace regionModels
+{
+namespace surfaceFilmModels
+{
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+defineTypeNameAndDebug(kinematicSingleLayer, 0);
+
+addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh);
+
+// * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
+
+bool kinematicSingleLayer::read()
+{
+    if (surfaceFilmModel::read())
+    {
+        const dictionary& solution = this->solution().subDict("PISO");
+        solution.lookup("momentumPredictor") >> momentumPredictor_;
+        solution.lookup("nOuterCorr") >> nOuterCorr_;
+        solution.lookup("nCorr") >> nCorr_;
+        solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
+
+        coeffs_.lookup("Cf") >> Cf_;
+
+        return true;
+    }
+    else
+    {
+        return false;
+    }
+}
+
+
+void kinematicSingleLayer::correctThermoFields()
+{
+    if (thermoModel_ == tmConstant)
+    {
+        rho_ == dimensionedScalar(coeffs_.lookup("rho0"));
+        mu_ == dimensionedScalar(coeffs_.lookup("mu0"));
+        sigma_ == dimensionedScalar(coeffs_.lookup("sigma0"));
+    }
+    else
+    {
+        FatalErrorIn
+        (
+            "void Foam::surfaceFilmModels::kinematicSingleLayer::"
+            "correctThermo()"
+        )   << "Kinematic surface film must use "
+            << thermoModelTypeNames_[thermoModel_] << "thermodynamics" << endl;
+    }
+}
+
+
+void kinematicSingleLayer::resetPrimaryRegionSourceTerms()
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::resetPrimaryRegionSourceTerms()" << endl;
+    }
+
+    rhoSpPrimary_ == dimensionedScalar("zero", rhoSp_.dimensions(), 0.0);
+    USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), vector::zero);
+    pSpPrimary_ == dimensionedScalar("zero", pSp_.dimensions(), 0.0);
+}
+
+
+void kinematicSingleLayer::transferPrimaryRegionThermoFields()
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::"
+            << "transferPrimaryRegionThermoFields()" << endl;
+    }
+    // Update fields from primary region via direct mapped
+    // (coupled) boundary conditions
+    UPrimary_.correctBoundaryConditions();
+    pPrimary_.correctBoundaryConditions();
+    rhoPrimary_.correctBoundaryConditions();
+    muPrimary_.correctBoundaryConditions();
+}
+
+
+void kinematicSingleLayer::transferPrimaryRegionSourceFields()
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::"
+            << "transferPrimaryRegionSourceFields()" << endl;
+    }
+
+    // Retrieve the source fields from the primary region via direct mapped
+    // (coupled) boundary conditions
+    // - fields require transfer of values for both patch AND to push the
+    //   values into the first layer of internal cells
+    rhoSp_.correctBoundaryConditions();
+    USp_.correctBoundaryConditions();
+    pSp_.correctBoundaryConditions();
+
+    // Convert accummulated source terms into per unit area per unit time
+    // Note: boundary values will still have original (neat) values
+    const scalar deltaT = time_.deltaTValue();
+    rhoSp_.field() /= magSf()*deltaT;
+    USp_.field() /= magSf()*deltaT;
+    pSp_.field() /= magSf()*deltaT;
+}
+
+
+tmp<volScalarField> kinematicSingleLayer::pu()
+{
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "pu",
+                time_.timeName(),
+                regionMesh(),
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            pPrimary_                  // pressure (mapped from primary region)
+          - pSp_                           // accumulated particle impingement
+          - fvc::laplacian(sigma_, delta_) // surface tension
+        )
+    );
+}
+
+
+tmp<volScalarField> kinematicSingleLayer::pp()
+{
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "pp",
+                time_.timeName(),
+                regionMesh(),
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+           -rho_*gNormClipped() // hydrostatic effect only
+        )
+    );
+}
+
+
+void kinematicSingleLayer::updateSubmodels()
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::updateSubmodels()" << endl;
+    }
+
+    // Update injection model - mass returned is mass available for injection
+    injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
+
+    // Update source fields
+    const dimensionedScalar deltaT = time().deltaT();
+    rhoSp_ += cloudMassTrans_/magSf()/deltaT;
+}
+
+
+void kinematicSingleLayer::continuityCheck()
+{
+    const volScalarField deltaRho0(deltaRho_);
+
+    solveContinuity();
+
+    if (debug)
+    {
+        const volScalarField mass(deltaRho_*magSf());
+        const dimensionedScalar totalMass =
+            fvc::domainIntegrate(mass)
+          + dimensionedScalar("SMALL", dimMass*dimVolume, ROOTVSMALL);
+
+        const scalar sumLocalContErr =
+            (
+                fvc::domainIntegrate(mag(mass - magSf()*deltaRho0))/totalMass
+            ).value();
+
+       const scalar globalContErr =
+            (
+                fvc::domainIntegrate(mass - magSf()*deltaRho0)/totalMass
+            ).value();
+
+        cumulativeContErr_ += globalContErr;
+
+        Info<< "Surface film: " << type() << nl
+            << "    time step continuity errors: sum local = "
+            << sumLocalContErr << ", global = " << globalContErr
+            << ", cumulative = " << cumulativeContErr_ << endl;
+    }
+}
+
+
+void kinematicSingleLayer::solveContinuity()
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::solveContinuity()" << endl;
+    }
+
+    solve
+    (
+        fvm::ddt(deltaRho_)
+      + fvc::div(phi_)
+     ==
+      - rhoSp_
+    );
+}
+
+
+void kinematicSingleLayer::updateSurfaceVelocities()
+{
+    // Push boundary film velocity values into internal field
+    for (label i=0; i<intCoupledPatchIDs_.size(); i++)
+    {
+        label patchI = intCoupledPatchIDs_[i];
+        const polyPatch& pp = regionMesh().boundaryMesh()[patchI];
+        UIndirectList<vector>(Uw_, pp.faceCells()) =
+            U_.boundaryField()[patchI];
+    }
+    Uw_ -= nHat()*(Uw_ & nHat());
+    Uw_.correctBoundaryConditions();
+
+    // TODO: apply quadratic profile to determine surface velocity
+    Us_ = U_;
+    Us_.correctBoundaryConditions();
+}
+
+
+tmp<fvVectorMatrix> kinematicSingleLayer::tau(volVectorField& U) const
+{
+    // Calculate shear stress
+    volScalarField Cs("Cs", rho_*Cf_*mag(Us_ - U));
+    volScalarField Cw
+    (
+        "Cw",
+        mu_/(0.3333*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL)))
+    );
+    Cw.min(1.0e+06);
+
+    return
+    (
+       - fvm::Sp(Cs, U) + Cs*Us_ // surface contribution
+       - fvm::Sp(Cw, U) + Cw*Uw_ // wall contribution
+    );
+}
+
+
+tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
+(
+    const volScalarField& pu,
+    const volScalarField& pp
+)
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::solveMomentum()" << endl;
+    }
+
+    updateSurfaceVelocities();
+
+    // Momentum
+    tmp<fvVectorMatrix> tUEqn
+    (
+        fvm::ddt(deltaRho_, U_)
+      + fvm::div(phi_, U_)
+     ==
+      - USp_
+      + tau(U_)
+      + fvc::grad(sigma_)
+      - fvm::SuSp(rhoSp_, U_)
+    );
+
+    fvVectorMatrix& UEqn = tUEqn();
+
+    UEqn.relax();
+
+    if (momentumPredictor_)
+    {
+        solve
+        (
+            UEqn
+         ==
+            fvc::reconstruct
+            (
+              - fvc::interpolate(delta_)
+              * (
+                    regionMesh().magSf()
+                  * (
+                        fvc::snGrad(pu, "snGrad(p)")
+                      + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
+                      + fvc::snGrad(delta_)*fvc::interpolate(pp)
+                    )
+                  - (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
+                )
+            )
+        );
+
+        // Remove any patch-normal components of velocity
+        U_ -= nHat()*(nHat() & U_);
+        U_.correctBoundaryConditions();
+    }
+
+    return tUEqn;
+}
+
+
+void kinematicSingleLayer::solveThickness
+(
+    const volScalarField& pu,
+    const volScalarField& pp,
+    const fvVectorMatrix& UEqn
+)
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::solveThickness()" << endl;
+    }
+
+    volScalarField rUA(1.0/UEqn.A());
+    U_ = rUA*UEqn.H();
+
+    surfaceScalarField deltarUAf(fvc::interpolate(delta_*rUA));
+    surfaceScalarField rhof(fvc::interpolate(rho_));
+
+    surfaceScalarField phiAdd
+    (
+        "phiAdd",
+        regionMesh().magSf()
+      * (
+            fvc::snGrad(pu, "snGrad(p)")
+          + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
+        )
+      - (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
+    );
+    constrainFilmField(phiAdd, 0.0);
+
+    surfaceScalarField phid
+    (
+        "phid",
+        (fvc::interpolate(U_*rho_) & regionMesh().Sf())
+      - deltarUAf*phiAdd*rhof
+    );
+    constrainFilmField(phid, 0.0);
+
+    surfaceScalarField ddrhorUAppf
+    (
+        "deltaCoeff",
+        fvc::interpolate(delta_)*deltarUAf*rhof*fvc::interpolate(pp)
+    );
+//    constrainFilmField(ddrhorUAppf, 0.0);
+
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++)
+    {
+        // Film thickness equation
+        fvScalarMatrix deltaEqn
+        (
+            fvm::ddt(rho_, delta_)
+          + fvm::div(phid, delta_)
+          - fvm::laplacian(ddrhorUAppf, delta_)
+         ==
+          - rhoSp_
+        );
+
+        deltaEqn.solve();
+
+        if (nonOrth == nNonOrthCorr_)
+        {
+            phiAdd +=
+                fvc::interpolate(pp)
+              * fvc::snGrad(delta_)
+              * regionMesh().magSf();
+
+            phi_ == deltaEqn.flux();
+        }
+    }
+
+    // Bound film thickness by a minimum of zero
+    delta_.max(0.0);
+
+    // Update U field
+    U_ -= fvc::reconstruct(deltarUAf*phiAdd);
+
+    // Remove any patch-normal components of velocity
+    U_ -= nHat()*(nHat() & U_);
+
+    U_.correctBoundaryConditions();
+
+    // Continuity check
+    continuityCheck();
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+kinematicSingleLayer::kinematicSingleLayer
+(
+    const word& modelType,
+    const fvMesh& mesh,
+    const dimensionedVector& g,
+    const bool readFields
+)
+:
+    surfaceFilmModel(modelType, mesh, g),
+
+    momentumPredictor_(solution().subDict("PISO").lookup("momentumPredictor")),
+    nOuterCorr_(readLabel(solution().subDict("PISO").lookup("nOuterCorr"))),
+    nCorr_(readLabel(solution().subDict("PISO").lookup("nCorr"))),
+    nNonOrthCorr_
+    (
+        readLabel(solution().subDict("PISO").lookup("nNonOrthCorr"))
+    ),
+
+    cumulativeContErr_(0.0),
+
+    Cf_(readScalar(coeffs().lookup("Cf"))),
+
+    rho_
+    (
+        IOobject
+        (
+            "rhof",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::AUTO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimDensity, 0.0),
+        zeroGradientFvPatchScalarField::typeName
+    ),
+    mu_
+    (
+        IOobject
+        (
+            "muf",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::AUTO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimPressure*dimTime, 0.0),
+        zeroGradientFvPatchScalarField::typeName
+    ),
+    sigma_
+    (
+        IOobject
+        (
+            "sigmaf",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::AUTO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimMass/sqr(dimTime), 0.0),
+        zeroGradientFvPatchScalarField::typeName
+    ),
+
+    delta_
+    (
+        IOobject
+        (
+            "deltaf",
+            time().timeName(),
+            regionMesh(),
+            IOobject::MUST_READ,
+            IOobject::AUTO_WRITE
+        ),
+        regionMesh()
+    ),
+    U_
+    (
+        IOobject
+        (
+            "Uf",
+            time().timeName(),
+            regionMesh(),
+            IOobject::MUST_READ,
+            IOobject::AUTO_WRITE
+        ),
+        regionMesh()
+    ),
+    Us_
+    (
+        IOobject
+        (
+            "Usf",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        U_,
+        zeroGradientFvPatchScalarField::typeName
+    ),
+    Uw_
+    (
+        IOobject
+        (
+            "Uwf",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        U_,
+        zeroGradientFvPatchScalarField::typeName
+    ),
+    deltaRho_
+    (
+        IOobject
+        (
+            delta_.name() + "*" + rho_.name(),
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", delta_.dimensions()*rho_.dimensions(), 0.0),
+        zeroGradientFvPatchScalarField::typeName
+    ),
+
+    phi_
+    (
+        IOobject
+        (
+            "phi",
+            time().timeName(),
+            regionMesh(),
+            IOobject::READ_IF_PRESENT,
+            IOobject::AUTO_WRITE
+        ),
+        regionMesh(),
+        dimLength*dimMass/dimTime
+    ),
+
+    primaryMassTrans_
+    (
+        IOobject
+        (
+            "primaryMassTrans",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimMass, 0.0),
+        zeroGradientFvPatchScalarField::typeName
+    ),
+    cloudMassTrans_
+    (
+        IOobject
+        (
+            "cloudMassTrans",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimMass, 0.0),
+        zeroGradientFvPatchScalarField::typeName
+    ),
+    cloudDiameterTrans_
+    (
+        IOobject
+        (
+            "cloudDiameterTrans",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimLength, -1.0),
+        zeroGradientFvPatchScalarField::typeName
+    ),
+
+    USp_
+    (
+        IOobject
+        (
+            "USpf",
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedVector
+        (
+            "zero", dimMass*dimVelocity/dimArea/dimTime, vector::zero
+        ),
+        this->mappedPushedFieldPatchTypes<vector>()
+    ),
+    pSp_
+    (
+        IOobject
+        (
+            "pSpf",
+            time_.timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimPressure, 0.0),
+        this->mappedPushedFieldPatchTypes<scalar>()
+    ),
+    rhoSp_
+    (
+        IOobject
+        (
+            "rhoSpf",
+            time_.timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimMass/dimTime/dimArea, 0.0),
+        this->mappedPushedFieldPatchTypes<scalar>()
+    ),
+
+    USpPrimary_
+    (
+        IOobject
+        (
+            USp_.name(), // must have same name as USp_ to enable mapping
+            time().timeName(),
+            primaryMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        primaryMesh(),
+        dimensionedVector("zero", USp_.dimensions(), vector::zero)
+    ),
+    pSpPrimary_
+    (
+        IOobject
+        (
+            pSp_.name(), // must have same name as pSp_ to enable mapping
+            time().timeName(),
+            primaryMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        primaryMesh(),
+        dimensionedScalar("zero", pSp_.dimensions(), 0.0)
+    ),
+    rhoSpPrimary_
+    (
+        IOobject
+        (
+            rhoSp_.name(), // must have same name as rhoSp_ to enable mapping
+            time().timeName(),
+            primaryMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        primaryMesh(),
+        dimensionedScalar("zero", rhoSp_.dimensions(), 0.0)
+    ),
+
+    UPrimary_
+    (
+        IOobject
+        (
+            "U", // must have same name as U to enable mapping
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedVector("zero", dimVelocity, vector::zero),
+        this->mappedFieldAndInternalPatchTypes<vector>()
+    ),
+    pPrimary_
+    (
+        IOobject
+        (
+            "p", // must have same name as p to enable mapping
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimPressure, 0.0),
+        this->mappedFieldAndInternalPatchTypes<scalar>()
+    ),
+    rhoPrimary_
+    (
+        IOobject
+        (
+            "rho", // must have same name as rho to enable mapping
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimDensity, 0.0),
+        this->mappedFieldAndInternalPatchTypes<scalar>()
+    ),
+    muPrimary_
+    (
+        IOobject
+        (
+            "mu", // must have same name as mu to enable mapping
+            time().timeName(),
+            regionMesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        regionMesh(),
+        dimensionedScalar("zero", dimPressure*dimTime, 0.0),
+        this->mappedFieldAndInternalPatchTypes<scalar>()
+    ),
+
+    availableMass_(regionMesh().nCells(), 0.0),
+
+    injection_(*this, coeffs_),
+
+    addedMassTotal_(0.0)
+{
+    if (readFields)
+    {
+        transferPrimaryRegionThermoFields();
+
+        correctThermoFields();
+
+        deltaRho_ == delta_*rho_;
+        phi_ = fvc::interpolate(deltaRho_*U_) & regionMesh().Sf();
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+kinematicSingleLayer::~kinematicSingleLayer()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void kinematicSingleLayer::addSources
+(
+    const label patchI,
+    const label faceI,
+    const scalar massSource,
+    const vector& momentumSource,
+    const scalar pressureSource,
+    const scalar energySource
+)
+{
+    if (debug)
+    {
+        Info<< "\nSurface film: " << type() << ": adding to film source:" << nl
+            << "    mass     = " << massSource << nl
+            << "    momentum = " << momentumSource << nl
+            << "    pressure = " << pressureSource << endl;
+    }
+
+    rhoSpPrimary_.boundaryField()[patchI][faceI] -= massSource;
+    USpPrimary_.boundaryField()[patchI][faceI] -= momentumSource;
+    pSpPrimary_.boundaryField()[patchI][faceI] -= pressureSource;
+
+    addedMassTotal_ += massSource;
+}
+
+
+void kinematicSingleLayer::preEvolveRegion()
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::preEvolveRegion()" << endl;
+    }
+
+    transferPrimaryRegionThermoFields();
+
+    correctThermoFields();
+
+    transferPrimaryRegionSourceFields();
+
+    // Reset transfer fields
+//    availableMass_ = mass();
+    availableMass_ = netMass();
+    cloudMassTrans_ == dimensionedScalar("zero", dimMass, 0.0);
+    cloudDiameterTrans_ == dimensionedScalar("zero", dimLength, -1.0);
+}
+
+
+void kinematicSingleLayer::evolveRegion()
+{
+    if (debug)
+    {
+        Info<< "kinematicSingleLayer::evolveRegion()" << endl;
+    }
+
+    updateSubmodels();
+
+    // Solve continuity for deltaRho_
+    solveContinuity();
+
+    // Implicit pressure source coefficient - constant
+    tmp<volScalarField> tpp(this->pp());
+
+    for (int oCorr=0; oCorr<nOuterCorr_; oCorr++)
+    {
+        // Explicit pressure source contribution - varies with delta_
+        tmp<volScalarField> tpu(this->pu());
+
+        // Solve for momentum for U_
+        tmp<fvVectorMatrix> UEqn = solveMomentum(tpu(), tpp());
+
+        // Film thickness correction loop
+        for (int corr=1; corr<=nCorr_; corr++)
+        {
+            // Solve thickness for delta_
+            solveThickness(tpu(), tpp(), UEqn());
+        }
+    }
+
+    // Update deltaRho_ with new delta_
+    deltaRho_ == delta_*rho_;
+
+    // Update film wall and surface velocities
+    updateSurfaceVelocities();
+
+    // Reset source terms for next time integration
+    resetPrimaryRegionSourceTerms();
+}
+
+
+scalar kinematicSingleLayer::CourantNumber() const
+{
+    scalar CoNum = 0.0;
+
+    if (regionMesh().nInternalFaces() > 0)
+    {
+        const scalar deltaT = time_.deltaTValue();
+
+        const surfaceScalarField SfUfbyDelta
+        (
+            regionMesh().surfaceInterpolation::deltaCoeffs()*mag(phi_)
+        );
+        const surfaceScalarField rhoDelta(fvc::interpolate(rho_*delta_));
+        const surfaceScalarField& magSf = regionMesh().magSf();
+
+        forAll(rhoDelta, i)
+        {
+            if (rhoDelta[i] > ROOTVSMALL)
+            {
+                CoNum = max(CoNum, SfUfbyDelta[i]/rhoDelta[i]/magSf[i]*deltaT);
+            }
+        }
+    }
+
+    reduce(CoNum, maxOp<scalar>());
+
+    Info<< "Film max Courant number: " << CoNum << endl;
+
+    return CoNum;
+}
+
+
+const volVectorField& kinematicSingleLayer::U() const
+{
+    return U_;
+}
+
+
+const volVectorField& kinematicSingleLayer::Us() const
+{
+    return Us_;
+}
+
+
+const volVectorField& kinematicSingleLayer::Uw() const
+{
+    return Uw_;
+}
+
+
+const surfaceScalarField& kinematicSingleLayer::phi() const
+{
+    return phi_;
+}
+
+
+const volScalarField& kinematicSingleLayer::rho() const
+{
+    return rho_;
+}
+
+
+const volScalarField& kinematicSingleLayer::T() const
+{
+    FatalErrorIn
+    (
+        "const volScalarField& kinematicSingleLayer::T() const"
+    )   << "T field not available for " << type() << abort(FatalError);
+
+    return volScalarField::null();
+}
+
+
+const volScalarField& kinematicSingleLayer::Ts() const
+{
+    FatalErrorIn
+    (
+        "const volScalarField& kinematicSingleLayer::Ts() const"
+    )   << "Ts field not available for " << type() << abort(FatalError);
+
+    return volScalarField::null();
+}
+
+
+const volScalarField& kinematicSingleLayer::Tw() const
+{
+    FatalErrorIn
+    (
+        "const volScalarField& kinematicSingleLayer::Tw() const"
+    )   << "Tw field not available for " << type() << abort(FatalError);
+
+    return volScalarField::null();
+}
+
+
+const volScalarField& kinematicSingleLayer::Cp() const
+{
+    FatalErrorIn
+    (
+        "const volScalarField& kinematicSingleLayer::Cp() const"
+    )   << "Cp field not available for " << type() << abort(FatalError);
+
+    return volScalarField::null();
+}
+
+
+const volScalarField& kinematicSingleLayer::kappa() const
+{
+    FatalErrorIn
+    (
+        "const volScalarField& kinematicSingleLayer::kappa() const"
+    )   << "kappa field not available for " << type() << abort(FatalError);
+
+    return volScalarField::null();
+}
+
+
+tmp<volScalarField> kinematicSingleLayer::primaryMassTrans() const
+{
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "kinematicSingleLayer::primaryMassTrans",
+                time().timeName(),
+                primaryMesh(),
+                IOobject::NO_READ,
+                IOobject::NO_WRITE,
+                false
+            ),
+            primaryMesh(),
+            dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
+        )
+    );
+}
+
+
+const volScalarField& kinematicSingleLayer::cloudMassTrans() const
+{
+    return cloudMassTrans_;
+}
+
+
+const volScalarField& kinematicSingleLayer::cloudDiameterTrans() const
+{
+    return cloudDiameterTrans_;
+}
+
+
+void kinematicSingleLayer::info() const
+{
+    Info<< "\nSurface film: " << type() << endl;
+
+    Info<< indent << "added mass         = "
+        << returnReduce<scalar>(addedMassTotal_, sumOp<scalar>()) << nl
+        << indent << "current mass       = "
+        << gSum((deltaRho_*magSf())()) << nl
+        << indent << "min/max(mag(U))    = " << min(mag(U_)).value() << ", "
+        << max(mag(U_)).value() << nl
+        << indent << "min/max(delta)     = " << min(delta_).value() << ", "
+        << max(delta_).value() << nl;
+
+    injection_.info(Info);
+}
+
+
+tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho() const
+{
+    return tmp<DimensionedField<scalar, volMesh> >
+    (
+        new DimensionedField<scalar, volMesh>
+        (
+            IOobject
+            (
+                "kinematicSingleLayer::Srho",
+                time().timeName(),
+                primaryMesh(),
+                IOobject::NO_READ,
+                IOobject::NO_WRITE,
+                false
+            ),
+            primaryMesh(),
+            dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
+        )
+    );
+}
+
+
+tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho
+(
+    const label i
+) const
+{
+    return tmp<DimensionedField<scalar, volMesh> >
+    (
+        new DimensionedField<scalar, volMesh>
+        (
+            IOobject
+            (
+                "kinematicSingleLayer::Srho(" + Foam::name(i) + ")",
+                time().timeName(),
+                primaryMesh(),
+                IOobject::NO_READ,
+                IOobject::NO_WRITE,
+                false
+            ),
+            primaryMesh(),
+            dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
+        )
+    );
+}
+
+
+tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Sh() const
+{
+    return tmp<DimensionedField<scalar, volMesh> >
+    (
+        new DimensionedField<scalar, volMesh>
+        (
+            IOobject
+            (
+                "kinematicSingleLayer::Sh",
+                time().timeName(),
+                primaryMesh(),
+                IOobject::NO_READ,
+                IOobject::NO_WRITE,
+                false
+            ),
+            primaryMesh(),
+            dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
+        )
+    );
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace surfaceFilmModels
+} // End namespace regionModels
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H
index 361593ed0da9002d6c3d76140554c597464b29b0..f59bc649e96db2fe27389108671bf3946593079b 100644
--- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H
+++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H
@@ -1,523 +1,523 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2009-2011 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
-
-Class
-    Foam::kinematicSingleLayer
-
-Description
-    Kinematic form of single-cell layer surface film model
-
-SourceFiles
-    kinematicSingleLayer.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef kinematicSingleLayer_H
-#define kinematicSingleLayer_H
-
-#include "surfaceFilmModel.H"
-#include "fvMesh.H"
-#include "volFields.H"
-#include "surfaceFields.H"
-#include "fvMatrices.H"
-
-#include "injectionModelList.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-namespace regionModels
-{
-namespace surfaceFilmModels
-{
-
-/*---------------------------------------------------------------------------*\
-                   Class kinematicSingleLayer Declaration
-\*---------------------------------------------------------------------------*/
-
-class kinematicSingleLayer
-:
-    public surfaceFilmModel
-{
-private:
-
-    // Private member functions
-
-        //- Disallow default bitwise copy construct
-        kinematicSingleLayer(const kinematicSingleLayer&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const kinematicSingleLayer&);
-
-
-protected:
-
-    // Protected data
-
-        // Solution parameters
-
-            //- Momentum predictor
-            Switch momentumPredictor_;
-
-            //- Number of outer correctors
-            label nOuterCorr_;
-
-            //- Number of PISO-like correctors
-            label nCorr_;
-
-            //- Number of non-orthogonal correctors
-            label nNonOrthCorr_;
-
-            //- Cumulative continuity error
-            scalar cumulativeContErr_;
-
-
-        // Model parameters
-
-            //- Skin frition coefficient for film/primary region interface
-            scalar Cf_;
-
-
-        // Thermo properties
-
-            // Fields
-
-                //- Density / [kg/m3]
-                volScalarField rho_;
-
-                //- Dynamic viscosity / [Pa.s]
-                volScalarField mu_;
-
-                //- Surface tension / [m/s2]
-                volScalarField sigma_;
-
-
-        // Fields
-
-            //- Film thickness / [m]
-            volScalarField delta_;
-
-            //- Velocity - mean / [m/s]
-            volVectorField U_;
-
-            //- Velocity - surface / [m/s]
-            volVectorField Us_;
-
-            //- Velocity - wall / [m/s]
-            volVectorField Uw_;
-
-            //- Film thickness*density (helper field) / [kg/m2]
-            volScalarField deltaRho_;
-
-            //- Mass flux (includes film thickness) / [kg.m/s]
-            surfaceScalarField phi_;
-
-
-            // Transfer fields
-
-                //- Film mass available for transfer to the primary region
-                volScalarField primaryMassTrans_;
-
-                //- Film mass available for transfer to cloud
-                volScalarField cloudMassTrans_;
-
-                //- Parcel diameters originating from film to cloud
-                volScalarField cloudDiameterTrans_;
-
-
-        // Source term fields
-
-            // Film region - registered to the film region mesh
-            // Note: need boundary value mapped from primary region, and then
-            // pushed into the patch internal field
-
-                //- Momementum / [kg/m/s2]
-                volVectorField USp_;
-
-                //- Pressure / [Pa]
-                volScalarField pSp_;
-
-                //- Mass / [kg/m2/s]
-                volScalarField rhoSp_;
-
-
-            // Primary region - registered to the primary region mesh
-            // Internal use only - not read-in
-
-                //- Momementum / [kg/m/s2]
-                volVectorField USpPrimary_;
-
-                //- Pressure / [Pa]
-                volScalarField pSpPrimary_;
-
-                //- Mass / [kg/m2/s]
-                volScalarField rhoSpPrimary_;
-
-
-        // Fields mapped from primary region - registered to the film region
-        // Note: need both boundary AND patch internal fields to be mapped
-
-            //- Velocity / [m/s]
-            volVectorField UPrimary_;
-
-            //- Pressure / [Pa]
-            volScalarField pPrimary_;
-
-            //- Density / [kg/m3]
-            volScalarField rhoPrimary_;
-
-            //- Viscosity / [Pa.s]
-            volScalarField muPrimary_;
-
-
-        // Sub-models
-
-            //- Available mass for transfer via sub-models
-            scalarField availableMass_;
-
-            //- Cloud injection
-            injectionModelList injection_;
-
-
-       // Checks
-
-           //- Cumulative mass added via sources [kg]
-           scalar addedMassTotal_;
-
-
-    // Protected member functions
-
-        //- Read control parameters from dictionary
-        virtual bool read();
-
-        //- Correct the thermo fields
-        virtual void correctThermoFields();
-
-        //- Reset source term fields
-        virtual void resetPrimaryRegionSourceTerms();
-
-        //- Transfer thermo fields from the primary region to the film region
-        virtual void transferPrimaryRegionThermoFields();
-
-        //- Transfer source fields from the primary region to the film region
-        virtual void transferPrimaryRegionSourceFields();
-
-        // Explicit pressure source contribution
-        virtual tmp<volScalarField> pu();
-
-        // Implicit pressure source coefficient
-        virtual tmp<volScalarField> pp();
-
-        //- Update the film sub-models
-        virtual void updateSubmodels();
-
-        //- Continuity check
-        virtual void continuityCheck();
-
-        //- Update film surface velocities
-        virtual void updateSurfaceVelocities();
-
-        //- Return the stress term for the momentum equation
-        virtual tmp<fvVectorMatrix> tau(volVectorField& dU) const;
-
-        //- Constrain a film region master/slave boundaries of a field to a
-        //  given value
-        template<class Type>
-        void constrainFilmField
-        (
-            Type& field,
-            const typename Type::cmptType& value
-        );
-
-
-        // Equations
-
-            //- Solve continuity equation
-            virtual void solveContinuity();
-
-            //- Solve for film velocity
-            virtual tmp<fvVectorMatrix> solveMomentum
-            (
-                const volScalarField& pu,
-                const volScalarField& pp
-            );
-
-            //- Solve coupled velocity-thickness equations
-            virtual void solveThickness
-            (
-                const volScalarField& pu,
-                const volScalarField& pp,
-                const fvVectorMatrix& UEqn
-            );
-
-
-public:
-
-    //- Runtime type information
-    TypeName("kinematicSingleLayer");
-
-
-    // Constructors
-
-        //- Construct from components
-        kinematicSingleLayer
-        (
-            const word& modelType,
-            const fvMesh& mesh,
-            const dimensionedVector& g,
-            const bool readFields = true
-        );
-
-
-    //- Destructor
-    virtual ~kinematicSingleLayer();
-
-
-    // Member Functions
-
-        // Solution parameters
-
-            //- Courant number evaluation
-            virtual scalar CourantNumber() const;
-
-            //- Return the momentum predictor
-            inline const Switch& momentumPredictor() const;
-
-            //- Return the number of outer correctors
-            inline label nOuterCorr() const;
-
-            //- Return the number of PISO correctors
-            inline label nCorr() const;
-
-            //- Return the number of non-orthogonal correctors
-            inline label nNonOrthCorr() const;
-
-
-        // Model parameters
-
-            //- Return the skin friction coefficient
-            inline scalar Cf() const;
-
-
-        // Thermo properties
-
-            //- Return const access to the dynamic viscosity / [Pa.s]
-            inline const volScalarField& mu() const;
-
-            //- Return const access to the surface tension / [m/s2]
-            inline const volScalarField& sigma() const;
-
-
-        // Fields
-
-            //- Return const access to the film thickness / [m]
-            inline const volScalarField& delta() const;
-
-            //- Return the film velocity [m/s]
-            virtual const volVectorField& U() const;
-
-            //- Return the film surface velocity [m/s]
-            virtual const volVectorField& Us() const;
-
-            //- Return the film wall velocity [m/s]
-            virtual const volVectorField& Uw() const;
-
-            //- Return the film flux [kg.m/s]
-            virtual const surfaceScalarField& phi() const;
-
-            //- Return the film density [kg/m3]
-            virtual const volScalarField& rho() const;
-
-            //- Return the film mean temperature [K]
-            virtual const volScalarField& T() const;
-
-            //- Return the film surface temperature [K]
-            virtual const volScalarField& Ts() const;
-
-            //- Return the film wall temperature [K]
-            virtual const volScalarField& Tw() const;
-
-            //- Return the film specific heat capacity [J/kg/K]
-            virtual const volScalarField& Cp() const;
-
-            //- Return the film thermal conductivity [W/m/K]
-            virtual const volScalarField& kappa() const;
-
-
-            // Transfer fields - to the primary region
-
-                //- Return mass transfer source - Eulerian phase only
-                virtual tmp<volScalarField> primaryMassTrans() const;
-
-                //- Return the film mass available for transfer to cloud
-                virtual const volScalarField& cloudMassTrans() const;
-
-                //- Return the parcel diameters originating from film to cloud
-                virtual const volScalarField& cloudDiameterTrans() const;
-
-
-        // External helper functions
-
-            //- External hook to add sources to the film
-            virtual void addSources
-            (
-                const label patchI,            // patchI on primary region
-                const label faceI,             // faceI of patchI
-                const scalar massSource,       // [kg]
-                const vector& momentumSource,  // [kg.m/s] (tang'l momentum)
-                const scalar pressureSource,   // [kg.m/s] (normal momentum)
-                const scalar energySource = 0  // [J]
-            );
-
-
-         // Source fields (read/write access)
-
-            // Primary region
-
-                //- Momementum / [kg/m/s2]
-                inline volVectorField& USpPrimary();
-
-                //- Pressure / [Pa]
-                inline volScalarField& pSpPrimary();
-
-                //- Mass / [kg/m2/s]
-                inline volScalarField& rhoSpPrimary();
-
-
-            // Film region
-
-                //- Momentum / [kg/m/s2]
-                inline volVectorField& USp();
-
-                //- Pressure / [Pa]
-                inline volScalarField& pSp();
-
-                //- Mass / [kg/m2/s]
-                inline volScalarField& rhoSp();
-
-                //- Momentum / [kg/m/s2]
-                inline const volVectorField& USp() const;
-
-                //- Pressure / [Pa]
-                inline const volScalarField& pSp() const;
-
-                //- Mass / [kg/m2/s]
-                inline const volScalarField& rhoSp() const;
-
-
-        // Fields mapped from primary region
-
-            //- Velocity / [m/s]
-            inline const volVectorField& UPrimary() const;
-
-            //- Pressure / [Pa]
-            inline const volScalarField& pPrimary() const;
-
-            //- Density / [kg/m3]
-            inline const volScalarField& rhoPrimary() const;
-
-            //- Viscosity / [Pa.s]
-            inline const volScalarField& muPrimary() const;
-
-
-        // Sub-models
-
-            //- Injection
-            inline injectionModelList& injection();
-
-
-        // Helper functions
-
-            //- Return the current film mass
-            inline tmp<volScalarField> mass() const;
-
-            //- Return the net film mass available over the next integration
-            inline tmp<volScalarField> netMass() const;
-
-            //- Return the gravity normal-to-patch component contribution
-            inline tmp<volScalarField> gNorm() const;
-
-            //- Return the gravity normal-to-patch component contribution
-            //  Clipped so that only non-zero if g & nHat_ < 0
-            inline tmp<volScalarField> gNormClipped() const;
-
-            //- Return the gravity tangential component contributions
-            inline tmp<volVectorField> gTan() const;
-
-
-        // Evolution
-
-            //- Pre-evolve film hook
-            virtual void preEvolveRegion();
-
-            //- Evolve the film equations
-            virtual void evolveRegion();
-
-
-        // Source fields
-
-            // Mapped into primary region
-
-                //- Return total mass source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho() const;
-
-                //- Return mass source for specie i - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho
-                (
-                    const label i
-                ) const;
-
-                //- Return enthalpy source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
-
-
-        // I-O
-
-            //- Provide some feedback
-            virtual void info() const;
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace surfaceFilmModels
-} // End namespace regionModels
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#ifdef NoRepository
-#   include "kinematicSingleLayerTemplates.C"
-#endif
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#include "kinematicSingleLayerI.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2009-2011 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
+
+Class
+    Foam::kinematicSingleLayer
+
+Description
+    Kinematic form of single-cell layer surface film model
+
+SourceFiles
+    kinematicSingleLayer.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef kinematicSingleLayer_H
+#define kinematicSingleLayer_H
+
+#include "surfaceFilmModel.H"
+#include "fvMesh.H"
+#include "volFields.H"
+#include "surfaceFields.H"
+#include "fvMatrices.H"
+
+#include "injectionModelList.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace regionModels
+{
+namespace surfaceFilmModels
+{
+
+/*---------------------------------------------------------------------------*\
+                   Class kinematicSingleLayer Declaration
+\*---------------------------------------------------------------------------*/
+
+class kinematicSingleLayer
+:
+    public surfaceFilmModel
+{
+private:
+
+    // Private member functions
+
+        //- Disallow default bitwise copy construct
+        kinematicSingleLayer(const kinematicSingleLayer&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const kinematicSingleLayer&);
+
+
+protected:
+
+    // Protected data
+
+        // Solution parameters
+
+            //- Momentum predictor
+            Switch momentumPredictor_;
+
+            //- Number of outer correctors
+            label nOuterCorr_;
+
+            //- Number of PISO-like correctors
+            label nCorr_;
+
+            //- Number of non-orthogonal correctors
+            label nNonOrthCorr_;
+
+            //- Cumulative continuity error
+            scalar cumulativeContErr_;
+
+
+        // Model parameters
+
+            //- Skin frition coefficient for film/primary region interface
+            scalar Cf_;
+
+
+        // Thermo properties
+
+            // Fields
+
+                //- Density / [kg/m3]
+                volScalarField rho_;
+
+                //- Dynamic viscosity / [Pa.s]
+                volScalarField mu_;
+
+                //- Surface tension / [m/s2]
+                volScalarField sigma_;
+
+
+        // Fields
+
+            //- Film thickness / [m]
+            volScalarField delta_;
+
+            //- Velocity - mean / [m/s]
+            volVectorField U_;
+
+            //- Velocity - surface / [m/s]
+            volVectorField Us_;
+
+            //- Velocity - wall / [m/s]
+            volVectorField Uw_;
+
+            //- Film thickness*density (helper field) / [kg/m2]
+            volScalarField deltaRho_;
+
+            //- Mass flux (includes film thickness) / [kg.m/s]
+            surfaceScalarField phi_;
+
+
+            // Transfer fields
+
+                //- Film mass available for transfer to the primary region
+                volScalarField primaryMassTrans_;
+
+                //- Film mass available for transfer to cloud
+                volScalarField cloudMassTrans_;
+
+                //- Parcel diameters originating from film to cloud
+                volScalarField cloudDiameterTrans_;
+
+
+        // Source term fields
+
+            // Film region - registered to the film region mesh
+            // Note: need boundary value mapped from primary region, and then
+            // pushed into the patch internal field
+
+                //- Momementum / [kg/m/s2]
+                volVectorField USp_;
+
+                //- Pressure / [Pa]
+                volScalarField pSp_;
+
+                //- Mass / [kg/m2/s]
+                volScalarField rhoSp_;
+
+
+            // Primary region - registered to the primary region mesh
+            // Internal use only - not read-in
+
+                //- Momementum / [kg/m/s2]
+                volVectorField USpPrimary_;
+
+                //- Pressure / [Pa]
+                volScalarField pSpPrimary_;
+
+                //- Mass / [kg/m2/s]
+                volScalarField rhoSpPrimary_;
+
+
+        // Fields mapped from primary region - registered to the film region
+        // Note: need both boundary AND patch internal fields to be mapped
+
+            //- Velocity / [m/s]
+            volVectorField UPrimary_;
+
+            //- Pressure / [Pa]
+            volScalarField pPrimary_;
+
+            //- Density / [kg/m3]
+            volScalarField rhoPrimary_;
+
+            //- Viscosity / [Pa.s]
+            volScalarField muPrimary_;
+
+
+        // Sub-models
+
+            //- Available mass for transfer via sub-models
+            scalarField availableMass_;
+
+            //- Cloud injection
+            injectionModelList injection_;
+
+
+       // Checks
+
+           //- Cumulative mass added via sources [kg]
+           scalar addedMassTotal_;
+
+
+    // Protected member functions
+
+        //- Read control parameters from dictionary
+        virtual bool read();
+
+        //- Correct the thermo fields
+        virtual void correctThermoFields();
+
+        //- Reset source term fields
+        virtual void resetPrimaryRegionSourceTerms();
+
+        //- Transfer thermo fields from the primary region to the film region
+        virtual void transferPrimaryRegionThermoFields();
+
+        //- Transfer source fields from the primary region to the film region
+        virtual void transferPrimaryRegionSourceFields();
+
+        // Explicit pressure source contribution
+        virtual tmp<volScalarField> pu();
+
+        // Implicit pressure source coefficient
+        virtual tmp<volScalarField> pp();
+
+        //- Update the film sub-models
+        virtual void updateSubmodels();
+
+        //- Continuity check
+        virtual void continuityCheck();
+
+        //- Update film surface velocities
+        virtual void updateSurfaceVelocities();
+
+        //- Return the stress term for the momentum equation
+        virtual tmp<fvVectorMatrix> tau(volVectorField& dU) const;
+
+        //- Constrain a film region master/slave boundaries of a field to a
+        //  given value
+        template<class Type>
+        void constrainFilmField
+        (
+            Type& field,
+            const typename Type::cmptType& value
+        );
+
+
+        // Equations
+
+            //- Solve continuity equation
+            virtual void solveContinuity();
+
+            //- Solve for film velocity
+            virtual tmp<fvVectorMatrix> solveMomentum
+            (
+                const volScalarField& pu,
+                const volScalarField& pp
+            );
+
+            //- Solve coupled velocity-thickness equations
+            virtual void solveThickness
+            (
+                const volScalarField& pu,
+                const volScalarField& pp,
+                const fvVectorMatrix& UEqn
+            );
+
+
+public:
+
+    //- Runtime type information
+    TypeName("kinematicSingleLayer");
+
+
+    // Constructors
+
+        //- Construct from components
+        kinematicSingleLayer
+        (
+            const word& modelType,
+            const fvMesh& mesh,
+            const dimensionedVector& g,
+            const bool readFields = true
+        );
+
+
+    //- Destructor
+    virtual ~kinematicSingleLayer();
+
+
+    // Member Functions
+
+        // Solution parameters
+
+            //- Courant number evaluation
+            virtual scalar CourantNumber() const;
+
+            //- Return the momentum predictor
+            inline const Switch& momentumPredictor() const;
+
+            //- Return the number of outer correctors
+            inline label nOuterCorr() const;
+
+            //- Return the number of PISO correctors
+            inline label nCorr() const;
+
+            //- Return the number of non-orthogonal correctors
+            inline label nNonOrthCorr() const;
+
+
+        // Model parameters
+
+            //- Return the skin friction coefficient
+            inline scalar Cf() const;
+
+
+        // Thermo properties
+
+            //- Return const access to the dynamic viscosity / [Pa.s]
+            inline const volScalarField& mu() const;
+
+            //- Return const access to the surface tension / [m/s2]
+            inline const volScalarField& sigma() const;
+
+
+        // Fields
+
+            //- Return const access to the film thickness / [m]
+            inline const volScalarField& delta() const;
+
+            //- Return the film velocity [m/s]
+            virtual const volVectorField& U() const;
+
+            //- Return the film surface velocity [m/s]
+            virtual const volVectorField& Us() const;
+
+            //- Return the film wall velocity [m/s]
+            virtual const volVectorField& Uw() const;
+
+            //- Return the film flux [kg.m/s]
+            virtual const surfaceScalarField& phi() const;
+
+            //- Return the film density [kg/m3]
+            virtual const volScalarField& rho() const;
+
+            //- Return the film mean temperature [K]
+            virtual const volScalarField& T() const;
+
+            //- Return the film surface temperature [K]
+            virtual const volScalarField& Ts() const;
+
+            //- Return the film wall temperature [K]
+            virtual const volScalarField& Tw() const;
+
+            //- Return the film specific heat capacity [J/kg/K]
+            virtual const volScalarField& Cp() const;
+
+            //- Return the film thermal conductivity [W/m/K]
+            virtual const volScalarField& kappa() const;
+
+
+            // Transfer fields - to the primary region
+
+                //- Return mass transfer source - Eulerian phase only
+                virtual tmp<volScalarField> primaryMassTrans() const;
+
+                //- Return the film mass available for transfer to cloud
+                virtual const volScalarField& cloudMassTrans() const;
+
+                //- Return the parcel diameters originating from film to cloud
+                virtual const volScalarField& cloudDiameterTrans() const;
+
+
+        // External helper functions
+
+            //- External hook to add sources to the film
+            virtual void addSources
+            (
+                const label patchI,            // patchI on primary region
+                const label faceI,             // faceI of patchI
+                const scalar massSource,       // [kg]
+                const vector& momentumSource,  // [kg.m/s] (tang'l momentum)
+                const scalar pressureSource,   // [kg.m/s] (normal momentum)
+                const scalar energySource = 0  // [J]
+            );
+
+
+         // Source fields (read/write access)
+
+            // Primary region
+
+                //- Momementum / [kg/m/s2]
+                inline volVectorField& USpPrimary();
+
+                //- Pressure / [Pa]
+                inline volScalarField& pSpPrimary();
+
+                //- Mass / [kg/m2/s]
+                inline volScalarField& rhoSpPrimary();
+
+
+            // Film region
+
+                //- Momentum / [kg/m/s2]
+                inline volVectorField& USp();
+
+                //- Pressure / [Pa]
+                inline volScalarField& pSp();
+
+                //- Mass / [kg/m2/s]
+                inline volScalarField& rhoSp();
+
+                //- Momentum / [kg/m/s2]
+                inline const volVectorField& USp() const;
+
+                //- Pressure / [Pa]
+                inline const volScalarField& pSp() const;
+
+                //- Mass / [kg/m2/s]
+                inline const volScalarField& rhoSp() const;
+
+
+        // Fields mapped from primary region
+
+            //- Velocity / [m/s]
+            inline const volVectorField& UPrimary() const;
+
+            //- Pressure / [Pa]
+            inline const volScalarField& pPrimary() const;
+
+            //- Density / [kg/m3]
+            inline const volScalarField& rhoPrimary() const;
+
+            //- Viscosity / [Pa.s]
+            inline const volScalarField& muPrimary() const;
+
+
+        // Sub-models
+
+            //- Injection
+            inline injectionModelList& injection();
+
+
+        // Helper functions
+
+            //- Return the current film mass
+            inline tmp<volScalarField> mass() const;
+
+            //- Return the net film mass available over the next integration
+            inline tmp<volScalarField> netMass() const;
+
+            //- Return the gravity normal-to-patch component contribution
+            inline tmp<volScalarField> gNorm() const;
+
+            //- Return the gravity normal-to-patch component contribution
+            //  Clipped so that only non-zero if g & nHat_ < 0
+            inline tmp<volScalarField> gNormClipped() const;
+
+            //- Return the gravity tangential component contributions
+            inline tmp<volVectorField> gTan() const;
+
+
+        // Evolution
+
+            //- Pre-evolve film hook
+            virtual void preEvolveRegion();
+
+            //- Evolve the film equations
+            virtual void evolveRegion();
+
+
+        // Source fields
+
+            // Mapped into primary region
+
+                //- Return total mass source - Eulerian phase only
+                virtual tmp<DimensionedField<scalar, volMesh> > Srho() const;
+
+                //- Return mass source for specie i - Eulerian phase only
+                virtual tmp<DimensionedField<scalar, volMesh> > Srho
+                (
+                    const label i
+                ) const;
+
+                //- Return enthalpy source - Eulerian phase only
+                virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
+
+
+        // I-O
+
+            //- Provide some feedback
+            virtual void info() const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace surfaceFilmModels
+} // End namespace regionModels
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+#   include "kinematicSingleLayerTemplates.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "kinematicSingleLayerI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H
index 02e7f7ccdd9b25bb2d3a1247681f653ca75842fe..8ac0c10619c793173ca4fbb492bb2a542e011354 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H
@@ -107,7 +107,7 @@ protected:
         tmp<volScalarField> calcInvR1(const volVectorField& U) const;
 
         //- Calculate the cosine of the angle between gravity vector and
-        //  cell out flow direction 
+        //  cell out flow direction
         tmp<scalarField> calcCosAngle(const surfaceScalarField& phi) const;
 
 
diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C
index 97365896cc5223072a1bc3c500286e2537f46fad..5ab27c47bf264c71f1ed6650a8703abf91b17761 100644
--- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C
+++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C
@@ -91,7 +91,7 @@ void phaseChangeModel::correct
     );
 
     latestMassPC_ = sum(dMass.internalField());
-    totalMassPC_ += latestMassPC_; 
+    totalMassPC_ += latestMassPC_;
 
     availableMass -= dMass;
     dMass.correctBoundaryConditions();
diff --git a/src/sampling/Make/files b/src/sampling/Make/files
index c9b26376d09db5931b086a32e7f8e0c41e76f3f5..ddf46a17e8516eec55d0cf81d4818598bcecb039 100644
--- a/src/sampling/Make/files
+++ b/src/sampling/Make/files
@@ -24,6 +24,7 @@ $(setWriters)/jplot/jplotSetWriterRunTime.C
 $(setWriters)/raw/rawSetWriterRunTime.C
 $(setWriters)/vtk/vtkSetWriterRunTime.C
 $(setWriters)/xmgrace/xmgraceSetWriterRunTime.C
+$(setWriters)/csv/csvSetWriterRunTime.C
 
 cuttingPlane/cuttingPlane.C
 
diff --git a/src/sampling/sampledSet/writers/csv/csvSetWriter.C b/src/sampling/sampledSet/writers/csv/csvSetWriter.C
new file mode 100644
index 0000000000000000000000000000000000000000..c0b0b694ed7d94a9788f9c71c366b176e461a319
--- /dev/null
+++ b/src/sampling/sampledSet/writers/csv/csvSetWriter.C
@@ -0,0 +1,202 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "csvSetWriter.H"
+#include "coordSet.H"
+#include "fileName.H"
+#include "OFstream.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::csvSetWriter<Type>::csvSetWriter()
+:
+    writer<Type>()
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::csvSetWriter<Type>::~csvSetWriter()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::fileName Foam::csvSetWriter<Type>::getFileName
+(
+    const coordSet& points,
+    const wordList& valueSetNames
+) const
+{
+    return this->getBaseName(points, valueSetNames) + ".csv";
+}
+
+
+template<class Type>
+void Foam::csvSetWriter<Type>::write
+(
+    const coordSet& points,
+    const wordList& valueSetNames,
+    const List<const Field<Type>*>& valueSets,
+    Ostream& os
+) const
+{
+    writeHeader(points,valueSetNames,os);
+
+    // Collect sets into columns
+    List<const List<Type>*> columns(valueSets.size());
+
+    forAll(valueSets, i)
+    {
+        columns[i] = valueSets[i];
+    }
+
+    writeTable(points, columns, os);
+}
+
+
+template<class Type>
+void Foam::csvSetWriter<Type>::write
+(
+    const bool writeTracks,
+    const PtrList<coordSet>& points,
+    const wordList& valueSetNames,
+    const List<List<Field<Type> > >& valueSets,
+    Ostream& os
+) const
+{
+    writeHeader(points[0],valueSetNames,os);
+
+    if (valueSets.size() != valueSetNames.size())
+    {
+        FatalErrorIn("csvSetWriter<Type>::write(..)")
+            << "Number of variables:" << valueSetNames.size() << endl
+            << "Number of valueSets:" << valueSets.size()
+            << exit(FatalError);
+    }
+
+    List<const List<Type>*> columns(valueSets.size());
+
+    forAll(points, trackI)
+    {
+        // Collect sets into columns
+        forAll(valueSets, i)
+        {
+            columns[i] = &valueSets[i][trackI];
+        }
+
+        writeTable(points[trackI], columns, os);
+        os  << nl << nl;
+    }
+}
+
+
+template<class Type>
+void Foam::csvSetWriter<Type>::writeSeparator(Ostream& os) const
+{
+    os << token::COMMA;
+}
+
+
+namespace Foam
+{
+    // otherwise compiler complains about specialization
+    template<>
+    void csvSetWriter<scalar>::writeHeader
+    (
+        const coordSet& points,
+        const wordList& valueSetNames,
+        Ostream& os
+    ) const
+    {
+        writeCoordHeader(points, os);
+
+        forAll(valueSetNames, i)
+        {
+            if (i > 0)
+            {
+                writeSeparator(os);
+            }
+            os << valueSetNames[i];
+        }
+
+        os << nl;
+    }
+} // end namespace
+
+
+template<class Type>
+void Foam::csvSetWriter<Type>::writeHeader
+(
+    const coordSet& points,
+    const wordList& valueSetNames,
+    Ostream& os
+) const
+{
+    writeCoordHeader(points, os);
+
+    forAll(valueSetNames, i)
+    {
+        for (label j=0; j<Type::nComponents; j++)
+        {
+            if (i>0 || j>0)
+            {
+                writeSeparator(os);
+            }
+            os << valueSetNames[i] << "_" << j;
+        }
+    }
+
+    os << nl;
+}
+
+
+template<class Type>
+void Foam::csvSetWriter<Type>::writeCoordHeader
+(
+    const coordSet& points,
+    Ostream& os
+) const
+{
+    if (points.hasVectorAxis())
+    {
+        forAll(points, i)
+        {
+            os << points.axis()[i];
+            writeSeparator(os);
+        }
+    }
+    else
+    {
+        os << points.axis();
+        writeSeparator(os);
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/csv/csvSetWriter.H b/src/sampling/sampledSet/writers/csv/csvSetWriter.H
new file mode 100644
index 0000000000000000000000000000000000000000..04987fea2a5ea24a85629937dd48be7e1cf89bf2
--- /dev/null
+++ b/src/sampling/sampledSet/writers/csv/csvSetWriter.H
@@ -0,0 +1,122 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::csvSetWriter
+
+Description
+
+SourceFiles
+    csvSetWriter.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef csvSetWriter_H
+#define csvSetWriter_H
+
+#include "writer.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                       Class csvSetWriter Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class csvSetWriter
+:
+    public writer<Type>
+{
+
+    // Private Member Functions
+
+        void writeCoordHeader(const coordSet&, Ostream&) const;
+
+        void writeHeader(const coordSet&, const wordList&, Ostream&) const;
+
+protected:
+
+    virtual void writeSeparator(Ostream&) const;
+
+public:
+
+    //- Runtime type information
+    TypeName("csv");
+
+
+    // Constructors
+
+        //- Construct null
+        csvSetWriter();
+
+
+    //- Destructor
+
+        virtual ~csvSetWriter();
+
+
+    // Member Functions
+
+        virtual fileName getFileName
+        (
+            const coordSet&,
+            const wordList&
+        ) const;
+
+        virtual void write
+        (
+            const coordSet&,
+            const wordList&,
+            const List<const Field<Type>*>&,
+            Ostream&
+        ) const;
+
+        virtual void write
+        (
+            const bool writeTracks,
+            const PtrList<coordSet>&,
+            const wordList& valueSetNames,
+            const List<List<Field<Type> > >&,
+            Ostream&
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+#   include "csvSetWriter.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/csv/csvSetWriterRunTime.C b/src/sampling/sampledSet/writers/csv/csvSetWriterRunTime.C
new file mode 100644
index 0000000000000000000000000000000000000000..2c22b5f227b070c83f2628756c7bb21dab277ed1
--- /dev/null
+++ b/src/sampling/sampledSet/writers/csv/csvSetWriterRunTime.C
@@ -0,0 +1,37 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2011 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 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "csvSetWriter.H"
+#include "writers.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makeSetWriters(csvSetWriter);
+}
+
+// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/writer.C b/src/sampling/sampledSet/writers/writer.C
index 651e0c7be247c7293d3440154cdd91909ca775d1..b2286998b47719a8816e002c4c2a19528d2ee990 100644
--- a/src/sampling/sampledSet/writers/writer.C
+++ b/src/sampling/sampledSet/writers/writer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,8 +105,7 @@ void Foam::writer<Type>::writeTable
     forAll(points, pointI)
     {
         writeCoord(points, pointI, os);
-
-        os << token::SPACE;
+        writeSeparator(os);
         write(values[pointI], os);
         os << nl;
     }
@@ -127,7 +126,8 @@ void Foam::writer<Type>::writeTable
 
         forAll(valuesPtrList, i)
         {
-            os << token::SPACE;
+            writeSeparator(os);
+
             const List<Type>& values = *valuesPtrList[i];
             write(values[pointI], os);
         }
@@ -173,17 +173,27 @@ Foam::Ostream& Foam::writer<Type>::writeVS
 {
     for (direction d=0; d<VSType::nComponents; d++)
     {
-        os << value.component(d);
-
-        if (d <= VSType::nComponents-1)
+        if (d > 0)
         {
-            os << ' ' << token::TAB;
+            writeSeparator(os);
         }
+
+        os << value.component(d);
     }
     return os;
 }
 
 
+template<class Type>
+void Foam::writer<Type>::writeSeparator
+(
+    Ostream& os
+) const
+{
+    os << token::SPACE << token::TAB;
+}
+
+
 template<class Type>
 Foam::Ostream& Foam::writer<Type>::write
 (
diff --git a/src/sampling/sampledSet/writers/writer.H b/src/sampling/sampledSet/writers/writer.H
index f5d9a73e532647b721f4bd7da39f557584b97aaa..6fb810dc1f4b72a1d03b5aae6e95c5f27b4e1d0a 100644
--- a/src/sampling/sampledSet/writers/writer.H
+++ b/src/sampling/sampledSet/writers/writer.H
@@ -107,6 +107,8 @@ protected:
         Ostream& os
     ) const;
 
+    //- Writes a separator. Used by write functions.
+    virtual void writeSeparator(Ostream& os) const;
 
 public:
 
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/PDRProperties b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/PDRProperties
old mode 100755
new mode 100644
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/RASProperties b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/RASProperties
old mode 100755
new mode 100644
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/g b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/g
old mode 100755
new mode 100644
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/turbulenceProperties b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/turbulenceProperties
old mode 100755
new mode 100644
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes
old mode 100755
new mode 100644
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution
old mode 100755
new mode 100644
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/createPatchDict b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/createPatchDict
index 6f22c41d23bd197604fb8a102a409d2e22a4b356..a2ec3c3d224bc59582953bc4947977373fa89ad8 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/createPatchDict
@@ -22,13 +22,28 @@ FoamFile
 //   is done for all coupled faces, not just for any patches created.
 // - optional: synchronise points on coupled patches.
 
-// Tolerance used in matching faces. Absolute tolerance is span of
-// face times this factor. To load incorrectly matches meshes set this
-// to a higher value.
-matchTolerance 1e-3;
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
 
 // Do a synchronisation of coupled points after creation of any patches.
-pointSync true;
+// Note: this does not work with points that are on multiple coupled patches
+//       with transformations (i.e. cyclics).
+pointSync false;
 
 // Patches to create.
 patches
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/createPatchDict b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/createPatchDict
index 6f22c41d23bd197604fb8a102a409d2e22a4b356..a2ec3c3d224bc59582953bc4947977373fa89ad8 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/createPatchDict
@@ -22,13 +22,28 @@ FoamFile
 //   is done for all coupled faces, not just for any patches created.
 // - optional: synchronise points on coupled patches.
 
-// Tolerance used in matching faces. Absolute tolerance is span of
-// face times this factor. To load incorrectly matches meshes set this
-// to a higher value.
-matchTolerance 1e-3;
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
 
 // Do a synchronisation of coupled points after creation of any patches.
-pointSync true;
+// Note: this does not work with points that are on multiple coupled patches
+//       with transformations (i.e. cyclics).
+pointSync false;
 
 // Patches to create.
 patches
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution
old mode 100755
new mode 100644
diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun
index d72de07446f00476a4cecc6dba8604076989857e..c9fa98255753a468f44e925754d110ecf3d56332 100755
--- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun
@@ -1,3 +1,4 @@
+#!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
 m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
diff --git a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/Allrun b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/Allrun
index d72de07446f00476a4cecc6dba8604076989857e..c9fa98255753a468f44e925754d110ecf3d56332 100755
--- a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/Allrun
+++ b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/Allrun
@@ -1,3 +1,4 @@
+#!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
 m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict
index b407d213094b7ac836d10c1bee694de46acfc750..d2abf98649f6e3c3b4bbf4445354d521ab98fbff 100644
--- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict
+++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict
@@ -23,7 +23,7 @@ startTime       0;
 
 stopAt          endTime;
 
-endTime         0.025;
+endTime         0.01;
 
 deltaT          1e-6;
 
diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/Allclean b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..a25fd5e1c4ebf83bd5a8b6afb5eab93ed8f7bceb
--- /dev/null
+++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/Allclean
@@ -0,0 +1,9 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/Allrun b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..eff0f0f019beca5b3c528fa765be3c609dac2c26
--- /dev/null
+++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/Allrun
@@ -0,0 +1,12 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+application=`getApplication`
+
+runApplication blockMesh
+runApplication $application
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/G b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/G
index d49a1b712b778f241fd43b9bf23c315b3d772fc3..dcd3b3a64404b9ac9bdc94a548ebd07c6003500c 100644
--- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/G
+++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/G
@@ -20,35 +20,12 @@ internalField   uniform 0;
 
 boundaryField
 {
-    floor
+    ".*"
     {
         type            MarshakRadiation;
         T               T;
-        emissivity      1;
-        value           uniform 0;
-    }
-
-    fixedWalls
-    {
-        type            MarshakRadiation;
-        T               T;
-        emissivity      1;
-        value           uniform 0;
-    }
-
-    ceiling
-    {
-        type            MarshakRadiation;
-        T               T;
-        emissivity      1;
-        value           uniform 0;
-    }
-
-    box
-    {
-        type            MarshakRadiation;
-        T               T;
-        emissivity      1;
+        emissivityMode  lookup;
+        emissivity      uniform 1.0;
         value           uniform 0;
     }
 }
diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/Allclean b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..a25fd5e1c4ebf83bd5a8b6afb5eab93ed8f7bceb
--- /dev/null
+++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/Allclean
@@ -0,0 +1,9 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/Allrun b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..eff0f0f019beca5b3c528fa765be3c609dac2c26
--- /dev/null
+++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/Allrun
@@ -0,0 +1,12 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+application=`getApplication`
+
+runApplication blockMesh
+runApplication $application
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/cp b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/cp
deleted file mode 100644
index 424a3676cb5a2be538b74410ff8bb73b9a373e00..0000000000000000000000000000000000000000
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/cp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    object      cp;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 2 -2 -1 0 0 0];
-
-internalField   uniform 450;
-
-boundaryField
-{
-    ".*"
-    {
-        type            calculated;
-    }
-}
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/rho b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/rho
deleted file mode 100644
index fb0aab998f609fabd656403d208b8b9a75ca0c28..0000000000000000000000000000000000000000
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/0/rho
+++ /dev/null
@@ -1,29 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    object      rho;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [1 -3 0 0 0 0 0];
-
-internalField   uniform 8000;
-
-boundaryField
-{
-    ".*"
-    {
-        type            calculated;
-    }
-}
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties
index cf23dbfef9577bd5ed4a09f39fa5d2df00332eae..6a996263882cd4eba788cd1d22c511f1edbea197 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                  |
+|  \\    /   O peration     | Version:  dev                                   |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -139,7 +139,7 @@ charCoeffs
     thermoProperties
     {
         Hf      0;
-        C0      611.0;; // Cp = C0*(T/Tref)^n0
+        C0      611.0; // Cp = C0*(T/Tref)^n0
         Tref    300;
         n0      1.31;
     }
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..73eb8b2d552e3a0d0a3dd08130e5e83058513077 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/decomposeParDict
@@ -19,13 +19,7 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
-
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,33 +34,10 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
-
 manualCoeffs
 {
     dataFile    "decompositionData";
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes
index c1288dc317a4866d396151b7e2ac787a66f835b2..bdd49a3ba35d7c8574aeb14384e331c70d01e2a6 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/fvSchemes
@@ -40,12 +40,12 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(muEff,U) Gauss linear limited 0.333;
-    laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
-    laplacian(alphaEff,h) Gauss linear limited 0.333;
-    laplacian(DkEff,k) Gauss linear limited 0.333;
-    laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;
-    laplacian(DREff,R) Gauss linear limited 0.333;
+    laplacian(muEff,U) Gauss linear uncorrected;
+    laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
+    laplacian(alphaEff,h) Gauss linear uncorrected;
+    laplacian(DkEff,k) Gauss linear uncorrected;
+    laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
+    laplacian(DREff,R) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -55,7 +55,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         limited 0.333;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..73eb8b2d552e3a0d0a3dd08130e5e83058513077 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/decomposeParDict
@@ -19,13 +19,7 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
-
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,33 +34,10 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
-
 manualCoeffs
 {
     dataFile    "decompositionData";
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/fvSchemes
index 58cefdaef271080284fe91b3029413fdbba65c83..25c9949dc27b13b748b80c922ab267feef6a438b 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/heater/fvSchemes
@@ -16,7 +16,7 @@ FoamFile
 
 ddtSchemes
 {
-    default steadyState;
+    default         steadyState;
 }
 
 gradSchemes
@@ -32,7 +32,7 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(K,T) Gauss linear limited 0.333;
+    laplacian(K,T) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -42,7 +42,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         limited 0.333;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..e70c10e65a5472b0b9a591ed09c26552c6e15342 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/decomposeParDict
@@ -19,13 +19,7 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
-
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +34,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +41,4 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/fvSchemes
index 58cefdaef271080284fe91b3029413fdbba65c83..d10f6c7a8a47f483ff8df6be419e476f9ea9d64b 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/leftSolid/fvSchemes
@@ -16,7 +16,7 @@ FoamFile
 
 ddtSchemes
 {
-    default steadyState;
+    default     steadyState;
 }
 
 gradSchemes
@@ -32,7 +32,7 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(K,T) Gauss linear limited 0.333;
+    laplacian(K,T) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -42,7 +42,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         limited 0.333;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..aed0363e0d119e59de081ff10d98dd8ca46614f4 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/decomposeParDict
@@ -19,13 +19,8 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
 
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +35,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +42,4 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/fvSchemes
index 58cefdaef271080284fe91b3029413fdbba65c83..d10f6c7a8a47f483ff8df6be419e476f9ea9d64b 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/rightSolid/fvSchemes
@@ -16,7 +16,7 @@ FoamFile
 
 ddtSchemes
 {
-    default steadyState;
+    default     steadyState;
 }
 
 gradSchemes
@@ -32,7 +32,7 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(K,T) Gauss linear limited 0.333;
+    laplacian(K,T) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -42,7 +42,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         limited 0.333;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..aed0363e0d119e59de081ff10d98dd8ca46614f4 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/decomposeParDict
@@ -19,13 +19,8 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
 
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +35,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +42,4 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes
index c1288dc317a4866d396151b7e2ac787a66f835b2..3f785ccbf36d4ad4010c8d22a23dfb908fd3bfda 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/fvSchemes
@@ -16,7 +16,7 @@ FoamFile
 
 ddtSchemes
 {
-    default steadyState;
+    default     steadyState;
 }
 
 gradSchemes
@@ -40,12 +40,12 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(muEff,U) Gauss linear limited 0.333;
-    laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
-    laplacian(alphaEff,h) Gauss linear limited 0.333;
-    laplacian(DkEff,k) Gauss linear limited 0.333;
-    laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;
-    laplacian(DREff,R) Gauss linear limited 0.333;
+    laplacian(muEff,U) Gauss linear uncorrected;
+    laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
+    laplacian(alphaEff,h) Gauss linear uncorrected;
+    laplacian(DkEff,k) Gauss linear uncorrected;
+    laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
+    laplacian(DREff,R) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -55,7 +55,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         limited 0.333;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/rho b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/rho
deleted file mode 100644
index fb0aab998f609fabd656403d208b8b9a75ca0c28..0000000000000000000000000000000000000000
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/rho
+++ /dev/null
@@ -1,29 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    object      rho;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [1 -3 0 0 0 0 0];
-
-internalField   uniform 8000;
-
-boundaryField
-{
-    ".*"
-    {
-        type            calculated;
-    }
-}
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/RASProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/RASProperties
index 1597ab89059120cb6f18a9c26f37c6599104e3c5..3ca51ada0ee97076818f0abbe6bc7b8f8df489cf 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/RASProperties
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/RASProperties
@@ -14,7 +14,7 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-RASModel laminar;
+RASModel        laminar;
 
 turbulence      on;
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..e70c10e65a5472b0b9a591ed09c26552c6e15342 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/decomposeParDict
@@ -19,13 +19,7 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
-
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +34,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +41,4 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes
index bc70aee53f10b174191fb7d18f0a6a5e8c9ff835..efec1163978cb4397fc7d41b57c1a0ae2f87c7da 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes
@@ -16,7 +16,7 @@ FoamFile
 
 ddtSchemes
 {
-    default steadyState;
+    default     steadyState;
 }
 
 gradSchemes
@@ -41,13 +41,13 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(muEff,U) Gauss linear corrected;
-    laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
-    laplacian(alphaEff,h) Gauss linear corrected;
-    laplacian(DkEff,k) Gauss linear corrected;
-    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
-    laplacian(DREff,R) Gauss linear corrected;
-    laplacian(gammaRad,G) Gauss linear corrected;
+    laplacian(muEff,U) Gauss linear uncorrected;
+    laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
+    laplacian(alphaEff,h) Gauss linear uncorrected;
+    laplacian(DkEff,k) Gauss linear uncorrected;
+    laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
+    laplacian(DREff,R) Gauss linear uncorrected;
+    laplacian(gammaRad,G) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -57,7 +57,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         corrected;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSolution
index 377d97c1cda69a0a6800081dbc88fc7447ea422d..5aa30bd45188053fa15f9b734ae4a0cdcf1fb94c 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSolution
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSolution
@@ -66,17 +66,14 @@ SIMPLE
 
 relaxationFactors
 {
-    rho         1;
-    p_rgh       0.7;
-    U           0.3;
-    h           0.7;
-    nuTilda     0.7;
-    k           0.7;
-    epsilon     0.7;
-    omega       0.7;
-    G           0.7;
-    "ILambda.*" 0.7;
-    Qr          0.7;
+    rho             1.0;
+    p_rgh           0.7;
+    U               0.3;
+    h               0.7;
+    "(k|epsilon|omega)" 0.7;
+    G               0.7;
+    "ILambda.*"     0.7;
+    Qr              0.7;
 }
 
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..39675231164f9c6b4eea3bfe3e6ea792402db6dd 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/decomposeParDict
@@ -19,13 +19,8 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
 
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +35,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +42,5 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
 
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/fvSchemes
index 58cefdaef271080284fe91b3029413fdbba65c83..03ad00fc9a71f1fa3e719bf0b87439be694acf19 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/heater/fvSchemes
@@ -16,7 +16,7 @@ FoamFile
 
 ddtSchemes
 {
-    default steadyState;
+    default     steadyState;
 }
 
 gradSchemes
@@ -32,7 +32,7 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(K,T) Gauss linear limited 0.333;
+    laplacian(K,T)  Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -42,7 +42,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         limited 0.333;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/leftSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/leftSolid/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..aed0363e0d119e59de081ff10d98dd8ca46614f4 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/leftSolid/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/leftSolid/decomposeParDict
@@ -19,13 +19,8 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
 
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +35,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +42,4 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..aed0363e0d119e59de081ff10d98dd8ca46614f4 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/decomposeParDict
@@ -19,13 +19,8 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
 
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +35,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +42,4 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/fvSchemes
index 58cefdaef271080284fe91b3029413fdbba65c83..13c9eacc9e21353cf37d5b85ceb8f159a86425ce 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/rightSolid/fvSchemes
@@ -32,7 +32,7 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(K,T) Gauss linear limited 0.333;
+    laplacian(K,T) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -42,7 +42,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         limited 0.333;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/decomposeParDict
index 1aaedd5a48c4d36a6a74b659431807617a4362fc..e70c10e65a5472b0b9a591ed09c26552c6e15342 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/decomposeParDict
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/decomposeParDict
@@ -19,13 +19,7 @@ FoamFile
 
 numberOfSubdomains  4;
 
-//- Keep owner and neighbour on same processor for faces in zones:
-// preserveFaceZones (heater solid1 solid3);
-
 method          scotch;
-// method          hierarchical;
-// method          simple;
-// method          manual;
 
 simpleCoeffs
 {
@@ -40,18 +34,6 @@ hierarchicalCoeffs
     order       xyz;
 }
 
-scotchCoeffs
-{
-    //processorWeights
-    //(
-    //    1
-    //    1
-    //    1
-    //    1
-    //);
-    //writeGraph  true;
-    //strategy "b";
-}
 
 manualCoeffs
 {
@@ -59,14 +41,4 @@ manualCoeffs
 }
 
 
-//// Is the case distributed
-//distributed     yes;
-//// Per slave (so nProcs-1 entries) the directory above the case.
-//roots
-//(
-//    "/tmp"
-//    "/tmp"
-//);
-
-
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes
index bc70aee53f10b174191fb7d18f0a6a5e8c9ff835..efec1163978cb4397fc7d41b57c1a0ae2f87c7da 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSchemes
@@ -16,7 +16,7 @@ FoamFile
 
 ddtSchemes
 {
-    default steadyState;
+    default     steadyState;
 }
 
 gradSchemes
@@ -41,13 +41,13 @@ divSchemes
 laplacianSchemes
 {
     default         none;
-    laplacian(muEff,U) Gauss linear corrected;
-    laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
-    laplacian(alphaEff,h) Gauss linear corrected;
-    laplacian(DkEff,k) Gauss linear corrected;
-    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
-    laplacian(DREff,R) Gauss linear corrected;
-    laplacian(gammaRad,G) Gauss linear corrected;
+    laplacian(muEff,U) Gauss linear uncorrected;
+    laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
+    laplacian(alphaEff,h) Gauss linear uncorrected;
+    laplacian(DkEff,k) Gauss linear uncorrected;
+    laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
+    laplacian(DREff,R) Gauss linear uncorrected;
+    laplacian(gammaRad,G) Gauss linear uncorrected;
 }
 
 interpolationSchemes
@@ -57,7 +57,7 @@ interpolationSchemes
 
 snGradSchemes
 {
-    default         corrected;
+    default         uncorrected;
 }
 
 fluxRequired
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSolution
index 074e725cd1662d09c073df93e455b2ffae103df5..c9f029c60978048068b986498f114666c85c149b 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSolution
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/fvSolution
@@ -68,16 +68,13 @@ SIMPLE
 
 relaxationFactors
 {
-    rho         1;
-    p_rgh       0.7;
-    U           0.3;
-    h           0.7;
-    nuTilda     0.7;
-    k           0.7;
-    epsilon     0.7;
-    omega       0.7;
-    "ILambda.*" 0.7;
-    Qr          0.7;
+    rho             1.0;
+    p_rgh           0.7;
+    U               0.3;
+    h               0.7;
+    "(k|epsilon|omega)" 0.7;
+    "ILambda.*"     0.7;
+    Qr              0.7;
 }
 
 // ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
index 33da5673451aecafede7510a6e3c4510c9f47f16..c1939edcae0ff08f50b53792935dd6e9805c4445 100755
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
@@ -23,7 +23,7 @@ cp -r 0.org 0
 runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent
 mv 0/pointDisplacement.unmapped 0/pointDisplacement
 runApplication decomposePar
-runParallel `getApplication` 3
+runParallel `getApplication` 4
 runApplication reconstructPar
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/0.org/pointDisplacement b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/0.org/pointDisplacement
index 2cabd2121cb900831f333769a87e2f8869afa791..1955fa5aec289c39e26140eb7c5174eb0cf9d041 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/0.org/pointDisplacement
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/0.org/pointDisplacement
@@ -35,7 +35,7 @@ boundaryField
         );
         velocity        (0 0 0);
         acceleration    (0 0 0);
-        angularMomentum (0 0 -0.5);
+        angularMomentum (0 0 -2.0);
         torque          (0 0 0);
         rhoName         rhoInf;
         rhoInf          1;
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/polyMesh/boundary b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/polyMesh/boundary
index a89f075e6956285ebcf398f4af2844f65316cd92..47ef37c9023202f2511c7ee348858e31d581d60d 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/polyMesh/boundary
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/polyMesh/boundary
@@ -20,38 +20,38 @@ FoamFile
     topAndBottom
     {
         type            patch;
-        nFaces          150;
-        startFace       76473;
+        nFaces          72;
+        startFace       25168;
     }
     inlet
     {
         type            patch;
-        nFaces          48;
-        startFace       76623;
+        nFaces          40;
+        startFace       25240;
     }
     outlet
     {
         type            patch;
-        nFaces          48;
-        startFace       76671;
+        nFaces          62;
+        startFace       25280;
     }
     front
     {
         type            empty;
-        nFaces          38129;
-        startFace       76719;
+        nFaces          12559;
+        startFace       25342;
     }
     back
     {
         type            empty;
-        nFaces          38129;
-        startFace       114848;
+        nFaces          12559;
+        startFace       37901;
     }
     wing
     {
         type            wall;
-        nFaces          778;
-        startFace       152977;
+        nFaces          378;
+        startFace       50460;
     }
 )
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/controlDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/controlDict
index db20cc97149d6a051aa00fd3cbc7b601caf57ce2..25e6e39610895d478daba86a72ba1b5957d74603 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/controlDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/controlDict
@@ -23,7 +23,7 @@ startTime       0;
 
 stopAt          endTime;
 
-endTime         1;
+endTime         0.6;
 
 deltaT          1e-5;
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/decomposeParDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/decomposeParDict
index e63167424c0947668ae03762c59717fbe7d35e09..d31797fc0d316856f13fe829343dd881e1bc432b 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/decomposeParDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/decomposeParDict
@@ -15,27 +15,22 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-numberOfSubdomains 3;
+numberOfSubdomains 4;
 
 method          simple;
 
 simpleCoeffs
 {
-    n               ( 1 3 1 );
+    n               ( 2 2 1 );
     delta           0.001;
 }
 
 hierarchicalCoeffs
 {
-    n               ( 3 2 1 );
+    n               ( 2 2 1 );
     delta           0.001;
     order           xyz;
 }
 
-manualCoeffs
-{
-    dataFile        "cellDecomposition";
-}
-
 
 // ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/polyMesh/boundary b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/polyMesh/boundary
index a89f075e6956285ebcf398f4af2844f65316cd92..47ef37c9023202f2511c7ee348858e31d581d60d 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/polyMesh/boundary
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/polyMesh/boundary
@@ -20,38 +20,38 @@ FoamFile
     topAndBottom
     {
         type            patch;
-        nFaces          150;
-        startFace       76473;
+        nFaces          72;
+        startFace       25168;
     }
     inlet
     {
         type            patch;
-        nFaces          48;
-        startFace       76623;
+        nFaces          40;
+        startFace       25240;
     }
     outlet
     {
         type            patch;
-        nFaces          48;
-        startFace       76671;
+        nFaces          62;
+        startFace       25280;
     }
     front
     {
         type            empty;
-        nFaces          38129;
-        startFace       76719;
+        nFaces          12559;
+        startFace       25342;
     }
     back
     {
         type            empty;
-        nFaces          38129;
-        startFace       114848;
+        nFaces          12559;
+        startFace       37901;
     }
     wing
     {
         type            wall;
-        nFaces          778;
-        startFace       152977;
+        nFaces          378;
+        startFace       50460;
     }
 )
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
index 388d8a9dfedc2cd19ef121c1930b829f10ae97f7..3c2b632b58b9551aa9b96bb89a8f814d609f1397 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
@@ -15,15 +15,35 @@ FoamFile
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Tolerance used in matching faces. Absolute tolerance is span of
-// face times this factor. To load incorrectly matches meshes set this
-// to a higher value.
-matchTolerance 1e-3;
+// This application/dictionary controls:
+// - optional: create new patches from boundary faces (either given as
+//   a set of patches or as a faceSet)
+// - always: order faces on coupled patches such that they are opposite. This
+//   is done for all coupled faces, not just for any patches created.
+// - optional: synchronise points on coupled patches.
+
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
 
 // Do a synchronisation of coupled points after creation of any patches.
 // Note: this does not work with points that are on multiple coupled patches
-//       with transformations.
-pointSync true;
+//       with transformations (i.e. cyclics).
+pointSync false;
 
 // Patches to create.
 patches
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/blockMeshDict
index 4f129d29763b0cbcddc5adaa21b4a1b6a94ee47d..4cbd61df8611c4cb5db148bc865ad7ab1e099608 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/blockMeshDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/blockMeshDict
@@ -19,19 +19,19 @@ convertToMeters 1;
 
 vertices
 (
-    (-2.5 -4.8 -0.1)
-    ( 10  -4.8 -0.1)
-    ( 10   4.8 -0.1)
-    (-2.5  4.8 -0.1)
-    (-2.5 -4.8  0.1)
-    ( 10  -4.8  0.1)
-    ( 10   4.8  0.1)
-    (-2.5  4.8  0.1)
+    (-1.2 -2.2 -0.1)
+    ( 5   -2.2 -0.1)
+    ( 5    2.2 -0.1)
+    (-1.2  2.2 -0.1)
+    (-1.2 -2.2  0.1)
+    ( 5   -2.2  0.1)
+    ( 5    2.2  0.1)
+    (-1.2  2.2  0.1)
 );
 
 blocks
 (
-    hex (0 1 2 3 4 5 6 7) (75 48 1) simpleGrading (1 1 1)
+    hex (0 1 2 3 4 5 6 7) (36 24 1) simpleGrading (1 1 1)
 );
 
 edges
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/boundary b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/boundary
index f7442f970309de899aec31a359d7eb26b8b133e2..b3aa38bcef4d29551cc92ff3e9e692a0c118c68c 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/boundary
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/constant/polyMesh/boundary
@@ -20,38 +20,38 @@ FoamFile
     topAndBottom
     {
         type            patch;
-        nFaces          150;
-        startFace       2098769;
+        nFaces          72;
+        startFace       495985;
     }
     inlet
     {
         type            patch;
-        nFaces          48;
-        startFace       2098919;
+        nFaces          72;
+        startFace       496057;
     }
     outlet
     {
         type            patch;
-        nFaces          48;
-        startFace       2098967;
+        nFaces          204;
+        startFace       496129;
     }
     front
     {
         type            empty;
-        nFaces          38129;
-        startFace       2099015;
+        nFaces          12559;
+        startFace       496333;
     }
     back
     {
         type            empty;
-        nFaces          38120;
-        startFace       2137144;
+        nFaces          12559;
+        startFace       508892;
     }
     wing_5degrees.obj_WALL10
     {
         type            wall;
-        nFaces          49792;
-        startFace       2175264;
+        nFaces          12096;
+        startFace       521451;
     }
 )
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict
index 788aa3ecbe9ed963abb569c22f5bcbb4575e07d0..8d8385a190315f3e0b88fd6edaf1c93251fbec13 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict
@@ -62,10 +62,10 @@ castellatedMeshControls
     // actually be a lot less.
     maxGlobalCells 2000000;
 
-    // The surface refinement loop might spend lots of iterations refining just a
-    // few cells. This setting will cause refinement to stop if <= minimumRefine
-    // are selected for refinement. Note: it will at least do one iteration
-    // (unless the number of cells to refine is 0)
+    // The surface refinement loop might spend lots of iterations refining just
+    // a few cells. This setting will cause refinement to stop if <=
+    // minimumRefine are selected for refinement. Note: it will at least do one
+    // iteration (unless the number of cells to refine is 0)
     minRefinementCells 100;
 
     // Number of buffer layers between different levels.
@@ -98,7 +98,7 @@ castellatedMeshControls
         wing_5degrees.obj
         {
             // Surface-wise min and max refinement level
-            level (6 6);
+            level (5 5);
         }
     }
 
@@ -124,7 +124,7 @@ castellatedMeshControls
         refinementBox
         {
             mode inside;
-            levels ((1e15 3));
+            levels ((1e15 2));
         }
     }
 
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun
index 624c62312e7cb1fe9befb1ffb524463360dc1adb..dd7c12e2807ed62aa3ed3a34603c50cb8f450392 100755
--- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun
@@ -1,3 +1,4 @@
+#!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 
 m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution
old mode 100755
new mode 100644
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/0/U b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/0/U
index 5583d72825a7ff1e172dc4343b8b17cc9905cc0c..0b165d2610ec95de4890c6543662360e2fcedd6f 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/0/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/0/U
@@ -17,7 +17,7 @@ FoamFile
 
 dimensions      [0 1 -1 0 0 0 0];
 
-internalField   uniform (0 0 0); 
+internalField   uniform (0 0 0);
 
 boundaryField
 {
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U
index 5583d72825a7ff1e172dc4343b8b17cc9905cc0c..0b165d2610ec95de4890c6543662360e2fcedd6f 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U
@@ -17,7 +17,7 @@ FoamFile
 
 dimensions      [0 1 -1 0 0 0 0];
 
-internalField   uniform (0 0 0); 
+internalField   uniform (0 0 0);
 
 boundaryField
 {
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/0/U b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/0/U
index 5583d72825a7ff1e172dc4343b8b17cc9905cc0c..0b165d2610ec95de4890c6543662360e2fcedd6f 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/0/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/0/U
@@ -17,7 +17,7 @@ FoamFile
 
 dimensions      [0 1 -1 0 0 0 0];
 
-internalField   uniform (0 0 0); 
+internalField   uniform (0 0 0);
 
 boundaryField
 {
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/U b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/U
index 5583d72825a7ff1e172dc4343b8b17cc9905cc0c..0b165d2610ec95de4890c6543662360e2fcedd6f 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0/U
@@ -17,7 +17,7 @@ FoamFile
 
 dimensions      [0 1 -1 0 0 0 0];
 
-internalField   uniform (0 0 0); 
+internalField   uniform (0 0 0);
 
 boundaryField
 {
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
index 49a23b95b872f3d7ae8ee27767a62c86a51b1280..50d71cadc33ae76ed7d264ab889a617c67f2ebda 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
@@ -11,4 +11,3 @@ cp -rf 0.org 0
 rm -f *.obj
 
 #rm -rf VTK
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun
index 03135280bf549fe32de164673de2361a3bf4ec5d..f01aae71c93dbf30a27dcec49b45540d2867a12a 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun
@@ -8,4 +8,3 @@ cd ${0%/*} || exit 1    # run from this directory
 application=`getApplication`
 
 runApplication $application
- 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
index a283228a8555537132a0dd0946434560e687e28a..6904214c8d0fa6152245d851f31867cce7dcd7fa 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
@@ -7,4 +7,3 @@ runApplication setSet -batch wallFilmRegion.setSet
 mv log.setSet log.wallFilmRegion.setSet
 
 runApplication extrudeToRegionMesh -overwrite
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/foam.inp b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/foam.inp
index cf67d1ec7cd65fad3ba89bf9f0abbf1fd6ece495..fff06b38e5ea07c5e25cccc08e637384db2d568d 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/foam.inp
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/foam.inp
@@ -8,4 +8,3 @@ species
 
 reactions
 {}
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/boundary b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/boundary
index 52b636ac613b108a8d654ca4680f4b173ced97e0..9df5ae8082f25608295afbce803ffa22bb5223cf 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/boundary
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/boundary
@@ -31,7 +31,7 @@ FoamFile
         sampleMode      nearestPatchFace;
         sampleRegion    wallFilmRegion;
         samplePatch     region0_to_wallFilmRegion_wallFilmFaces;
-        offsets         
+        offsets
 200
 (
 (-4.33680869e-19 -4.33680869e-19 -0)
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/faceZones b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/faceZones
index bd1f20da566979326fdb1b638a08574238817511..5c8c2e4677f820ba37d36c793082f3107deb8b17 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/faceZones
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/faceZones
@@ -20,7 +20,7 @@ FoamFile
 wallFilmFaces
 {
     type faceZone;
-faceLabels      List<label> 
+faceLabels      List<label>
 200
 (
 12600
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/sets/wallFilmFaces b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/sets/wallFilmFaces
index 0d06cd765fea3ac3af0b00fd47c581a6ed7ee2a2..e09e543ac459cafa06a20ca32ef1dd74648218ee 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/sets/wallFilmFaces
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh.save/sets/wallFilmFaces
@@ -18,206 +18,206 @@ FoamFile
 
 200
 (
-12600 
-12601 
-12602 
-12603 
-12604 
-12605 
-12606 
-12607 
-12608 
-12609 
-12610 
-12611 
-12612 
-12613 
-12614 
-12615 
-12616 
-12617 
-12618 
-12619 
-12620 
-12621 
-12622 
-12623 
-12624 
-12625 
-12626 
-12627 
-12628 
-12629 
-12630 
-12631 
-12632 
-12633 
-12634 
-12635 
-12636 
-12637 
-12638 
-12639 
-12640 
-12641 
-12642 
-12643 
-12644 
-12645 
-12646 
-12647 
-12648 
-12649 
-12650 
-12651 
-12652 
-12653 
-12654 
-12655 
-12656 
-12657 
-12658 
-12659 
-12660 
-12661 
-12662 
-12663 
-12664 
-12665 
-12666 
-12667 
-12668 
-12669 
-12670 
-12671 
-12672 
-12673 
-12674 
-12675 
-12676 
-12677 
-12678 
-12679 
-12680 
-12681 
-12682 
-12683 
-12684 
-12685 
-12686 
-12687 
-12688 
-12689 
-12690 
-12691 
-12692 
-12693 
-12694 
-12695 
-12696 
-12697 
-12698 
-12699 
-12700 
-12701 
-12702 
-12703 
-12704 
-12705 
-12706 
-12707 
-12708 
-12709 
-12710 
-12711 
-12712 
-12713 
-12714 
-12715 
-12716 
-12717 
-12718 
-12719 
-12720 
-12721 
-12722 
-12723 
-12724 
-12725 
-12726 
-12727 
-12728 
-12729 
-12730 
-12731 
-12732 
-12733 
-12734 
-12735 
-12736 
-12737 
-12738 
-12739 
-12740 
-12741 
-12742 
-12743 
-12744 
-12745 
-12746 
-12747 
-12748 
-12749 
-12750 
-12751 
-12752 
-12753 
-12754 
-12755 
-12756 
-12757 
-12758 
-12759 
-12760 
-12761 
-12762 
-12763 
-12764 
-12765 
-12766 
-12767 
-12768 
-12769 
-12770 
-12771 
-12772 
-12773 
-12774 
-12775 
-12776 
-12777 
-12778 
-12779 
-12780 
-12781 
-12782 
-12783 
-12784 
-12785 
-12786 
-12787 
-12788 
-12789 
-12790 
-12791 
-12792 
-12793 
-12794 
-12795 
-12796 
-12797 
-12798 
-12799 
+12600
+12601
+12602
+12603
+12604
+12605
+12606
+12607
+12608
+12609
+12610
+12611
+12612
+12613
+12614
+12615
+12616
+12617
+12618
+12619
+12620
+12621
+12622
+12623
+12624
+12625
+12626
+12627
+12628
+12629
+12630
+12631
+12632
+12633
+12634
+12635
+12636
+12637
+12638
+12639
+12640
+12641
+12642
+12643
+12644
+12645
+12646
+12647
+12648
+12649
+12650
+12651
+12652
+12653
+12654
+12655
+12656
+12657
+12658
+12659
+12660
+12661
+12662
+12663
+12664
+12665
+12666
+12667
+12668
+12669
+12670
+12671
+12672
+12673
+12674
+12675
+12676
+12677
+12678
+12679
+12680
+12681
+12682
+12683
+12684
+12685
+12686
+12687
+12688
+12689
+12690
+12691
+12692
+12693
+12694
+12695
+12696
+12697
+12698
+12699
+12700
+12701
+12702
+12703
+12704
+12705
+12706
+12707
+12708
+12709
+12710
+12711
+12712
+12713
+12714
+12715
+12716
+12717
+12718
+12719
+12720
+12721
+12722
+12723
+12724
+12725
+12726
+12727
+12728
+12729
+12730
+12731
+12732
+12733
+12734
+12735
+12736
+12737
+12738
+12739
+12740
+12741
+12742
+12743
+12744
+12745
+12746
+12747
+12748
+12749
+12750
+12751
+12752
+12753
+12754
+12755
+12756
+12757
+12758
+12759
+12760
+12761
+12762
+12763
+12764
+12765
+12766
+12767
+12768
+12769
+12770
+12771
+12772
+12773
+12774
+12775
+12776
+12777
+12778
+12779
+12780
+12781
+12782
+12783
+12784
+12785
+12786
+12787
+12788
+12789
+12790
+12791
+12792
+12793
+12794
+12795
+12796
+12797
+12798
+12799
 )
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh/boundary b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh/boundary
index e7d085b081764c1707a39b918040c56f42575bf5..f5ce09538995078db00ada3a5440db1ad78abb52 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh/boundary
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/polyMesh/boundary
@@ -38,7 +38,7 @@ FoamFile
         sampleRegion    wallFilmRegion;
         samplePatch     region0_to_wallFilmRegion_wallFilmFaces;
         offsetMode      nonuniform;
-        offsets         
+        offsets
 1100
 (
 (-1.110223025e-16 -0 -0)
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/createPatchDict b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/createPatchDict
index fd20a082b818a74cbb316dac89cf05a75a2ae336..0f0db31a6cdde95f997a0a47e4b0941d828f1ee7 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/createPatchDict
@@ -12,14 +12,37 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Tolerance used in matching faces. Absolute tolerance is span of
-// face times this factor. To load incorrectly matches meshes set this
-// to a higher value.
-matchTolerance 1E-3;
+// This application/dictionary controls:
+// - optional: create new patches from boundary faces (either given as
+//   a set of patches or as a faceSet)
+// - always: order faces on coupled patches such that they are opposite. This
+//   is done for all coupled faces, not just for any patches created.
+// - optional: synchronise points on coupled patches.
+
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
 
 // Do a synchronisation of coupled points after creation of any patches.
+// Note: this does not work with points that are on multiple coupled patches
+//       with transformations (i.e. cyclics).
 pointSync false;
 
 // Patches to create.
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/wallFilmRegion.setSet b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/wallFilmRegion.setSet
index a0276b7698b494366d7ec32bc9fa65a79b70f2d9..13b5752142a0cfc01ae5936ed625ab86214b2e39 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/wallFilmRegion.setSet
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/wallFilmRegion.setSet
@@ -1,4 +1,3 @@
 # Create face set
 faceSet wallFilmFaces new patchToFace filmWalls
 faceZoneSet wallFilmFaces new setToFaceZone wallFilmFaces
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
index c7df178b069fb3223d2ae37b55a23c66ab2a101b..e06272a5dca406ac16dab8ba0c94f91bedfe04a0 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
@@ -30,4 +30,3 @@ cp -r system/wallFilmRegion.org system/wallFilmRegion
 
 find ./0 -maxdepth 1 -type f -exec \
     sed -i "s/wallFilm/\"(region0_to.*)\"/g" {} \;
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties
index 06a7352b88780f1279cb347e2b8a944aff270ac1..0944bef4da8f807ef5289834c96303aaa2290c6b 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties
@@ -70,7 +70,7 @@ thermoSingleLayerCoeffs
     {
         cloudName    reactingCloud1;
         deltaStable  0;
- 
+
         particlesPerParcel 100.0;
 
         parcelDistribution
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/patchifyObstacles b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/patchifyObstacles
index ac4c6b90ae1227c075b66e2f82e5d06fbea08b05..8875fc36045bf3fa0471e986bd9c7b244d34b59f 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/patchifyObstacles
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/patchifyObstacles
@@ -1,11 +1,11 @@
 #!/bin/bash
-#--------------------------------*- C++ -*----------------------------------
-# =========                 |                                               
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox         
-#  \\    /   O peration     | Version:  dev                                 
-#   \\  /    A nd           | Web:      www.OpenFOAM.com                    
-#    \\/     M anipulation  |                                               
-#---------------------------------------------------------------------------
+#--------------------------------*- C++ -*----------------------------------#
+# =========                 |                                               #
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox         #
+#  \\    /   O peration     | Version:  dev                                 #
+#   \\  /    A nd           | Web:      www.OpenFOAM.com                    #
+#    \\/     M anipulation  |                                               #
+#---------------------------------------------------------------------------#
 cd ${0%/*} || exit 1    # run from this directory
 
 x0=0.4
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U
index 6a1e1b9b6f311d35b4fc48b0f0bf80212c3b7e26..bbc1b46eddaa865ae4a8e067eacf47ed0b698f79 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U
@@ -17,7 +17,7 @@ FoamFile
 
 dimensions      [0 1 -1 0 0 0 0];
 
-internalField   uniform (0 0 0); 
+internalField   uniform (0 0 0);
 
 boundaryField
 {
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0/U b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0/U
index 6a1e1b9b6f311d35b4fc48b0f0bf80212c3b7e26..bbc1b46eddaa865ae4a8e067eacf47ed0b698f79 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0/U
@@ -17,7 +17,7 @@ FoamFile
 
 dimensions      [0 1 -1 0 0 0 0];
 
-internalField   uniform (0 0 0); 
+internalField   uniform (0 0 0);
 
 boundaryField
 {
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
index 49a23b95b872f3d7ae8ee27767a62c86a51b1280..50d71cadc33ae76ed7d264ab889a617c67f2ebda 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
@@ -11,4 +11,3 @@ cp -rf 0.org 0
 rm -f *.obj
 
 #rm -rf VTK
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun
index 03135280bf549fe32de164673de2361a3bf4ec5d..f01aae71c93dbf30a27dcec49b45540d2867a12a 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun
@@ -8,4 +8,3 @@ cd ${0%/*} || exit 1    # run from this directory
 application=`getApplication`
 
 runApplication $application
- 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
index 9a69e3b490ac8ceb86cdbe238fc29fb3c32fb52c..9a3ccd9521a07066a40d0e5746c8604f208f8e04 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
@@ -12,4 +12,3 @@ runApplication setSet -region wallFilmRegion -batch createWallFilmRegionPatches.
 mv log.setSet log.createWallFilmRegionPatches.setSet
 
 runApplication createPatch -region wallFilmRegion -overwrite
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/foam.inp b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/foam.inp
index cf67d1ec7cd65fad3ba89bf9f0abbf1fd6ece495..fff06b38e5ea07c5e25cccc08e637384db2d568d 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/foam.inp
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/foam.inp
@@ -8,4 +8,3 @@ species
 
 reactions
 {}
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/polyMesh/boundary b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/polyMesh/boundary
index 181f5d2a08dce6a33a15f0f6a41200df0a02eed1..f977af7af2e89fc31ce27aa1b9795c8e5fd0c7d8 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/polyMesh/boundary
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/polyMesh/boundary
@@ -32,7 +32,7 @@ FoamFile
         sampleRegion    wallFilmRegion;
         samplePatch     region0_to_wallFilmRegion_wallFilmFaces;
         offsetMode      nonuniform;
-        offsets         
+        offsets
 200
 (
 (4.33680869e-19 4.33680869e-19 -0)
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/createWallFilmRegionPatches.setSet b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/createWallFilmRegionPatches.setSet
index 4cbda0a4cbae636a59a9fe9d6391169d8e65d07b..1c255e9f6b64d78d84ff3f5f120eebf86ea86189 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/createWallFilmRegionPatches.setSet
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/createWallFilmRegionPatches.setSet
@@ -3,4 +3,3 @@ faceSet sideFaces1 new boxToFace (-0.00001 -0.00001 -1) (0.10001 0.00001 1)
 faceSet sideFaces2 new boxToFace ( 0.09999 -0.00001 -1) (0.10001 0.05001 1)
 faceSet sideFaces3 new boxToFace (-0.00001  0.04999 -1) (1.00001 0.05001 1)
 faceSet sideFaces4 new boxToFace (-0.00001 -0.00001 -1) (0.00001 0.05001 1)
-
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/createPatchDict b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/createPatchDict
index 4219544bef1ce56019b27c8a7267dedba2c35e8a..625197ef29111abee61b33a379dcc6c5f753ffc9 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/createPatchDict
@@ -12,14 +12,37 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Tolerance used in matching faces. Absolute tolerance is span of
-// face times this factor. To load incorrectly matches meshes set this
-// to a higher value.
-matchTolerance 1E-3;
+// This application/dictionary controls:
+// - optional: create new patches from boundary faces (either given as
+//   a set of patches or as a faceSet)
+// - always: order faces on coupled patches such that they are opposite. This
+//   is done for all coupled faces, not just for any patches created.
+// - optional: synchronise points on coupled patches.
+
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
 
 // Do a synchronisation of coupled points after creation of any patches.
+// Note: this does not work with points that are on multiple coupled patches
+//       with transformations (i.e. cyclics).
 pointSync false;
 
 // Patches to create.
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/createPatchDict b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/createPatchDict
index 4895599e4b553d08e85847ecd1a362178853eb6f..2ad8690d9cdc3f726d681f156085b50a216e109d 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/createPatchDict
@@ -12,22 +12,45 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Tolerance used in matching faces. Absolute tolerance is span of
-// face times this factor. To load incorrectly matches meshes set this
-// to a higher value.
-matchTolerance 1E-3;
+// This application/dictionary controls:
+// - optional: create new patches from boundary faces (either given as
+//   a set of patches or as a faceSet)
+// - always: order faces on coupled patches such that they are opposite. This
+//   is done for all coupled faces, not just for any patches created.
+// - optional: synchronise points on coupled patches.
+
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
 
 // Do a synchronisation of coupled points after creation of any patches.
+// Note: this does not work with points that are on multiple coupled patches
+//       with transformations (i.e. cyclics).
 pointSync false;
 
 // Patches to create.
 patches
 (
-    {                
+    {
         // Name of new patch
-        name side1;   
+        name side1;
 
         // Type of new patch
         patchInfo