diff --git a/etc/bashrc b/etc/bashrc
index 039c318ac90f3608f493658dd7a2fdf5023e348b..6fdd3305d07ad4e6d23d93e5da265af27051ebff 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -32,8 +32,8 @@
 #------------------------------------------------------------------------------
 
 export WM_PROJECT=OpenFOAM
-#export WM_PROJECT_VERSION=dev
-: ${WM_PROJECT_VERSION:=dev}; export WM_PROJECT_VERSION
+export WM_PROJECT_VERSION=1.5
+#: ${WM_PROJECT_VERSION:=dev}; export WM_PROJECT_VERSION
 
 
 #!!User:
diff --git a/etc/cellModels b/etc/cellModels
index ef20597528139dedefe35113e74bf51c1b5f38d4..344f0e7e76507d021954cd3fdf1f777e6cd49d1e 100644
--- a/etc/cellModels
+++ b/etc/cellModels
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
+|  \\    /   O peration     | Version:  1.5                                   |
 |   \\  /    A nd           | Web:      http://www.openfoam.org               |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/etc/controlDict b/etc/controlDict
index b7590f97b0954475289f6f3aab310e9c63f259f2..2cf2ce334aa2cd0eb35f458097263ae8741d56ed 100644
--- a/etc/controlDict
+++ b/etc/controlDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
+|  \\    /   O peration     | Version:  1.5                                   |
 |   \\  /    A nd           | Web:      http://www.openfoam.org               |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/etc/cshrc b/etc/cshrc
index a53ffc4e7cac325215957a8242033fe9c2606ced..0ca1478569ac114bd8a755b29730f0e29ed39137 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -32,8 +32,8 @@
 #------------------------------------------------------------------------------
 
 setenv WM_PROJECT OpenFOAM
-#setenv WM_PROJECT_VERSION dev
-if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION dev
+setenv WM_PROJECT_VERSION 1.5
+#if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION dev
 
 #!!User:
 #    either setenv FOAM_INST_DIR before sourcing this file or set
diff --git a/src/OSspecific/Unix/fileStat.C b/src/OSspecific/Unix/fileStat.C
index 678ddcac87009b16b075f8ea2777d52c51495643..9cd3207de24d9d89e3f8bd10aaa6cf546acec8a6 100644
--- a/src/OSspecific/Unix/fileStat.C
+++ b/src/OSspecific/Unix/fileStat.C
@@ -22,9 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Description
-    Wrapper for stat() system call.
-
 \*---------------------------------------------------------------------------*/
 
 #include "fileStat.H"
@@ -35,33 +32,15 @@ Description
 #include <unistd.h>
 #include <sys/sysmacros.h>
 
-/*
-#undef major
-#undef minor
-#undef makedev
-
-# define major(dev) ((int)(((dev) >> 8) & 0xff))
-# define minor(dev) ((int)((dev) & 0xff))
-# define makedev(major, minor) ((((unsigned int) (major)) << 8) \
-				| ((unsigned int) (minor)))
-*/
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct null
-fileStat::fileStat()
+Foam::fileStat::fileStat()
 :
     isValid_(false)
 {}
 
 
-// Construct from components
-fileStat::fileStat(const fileName& fName, const unsigned int maxTime)
+Foam::fileStat::fileStat(const fileName& fName, const unsigned int maxTime)
 {
     // Work on volatile
     volatile bool locIsValid = false;
@@ -85,8 +64,7 @@ fileStat::fileStat(const fileName& fName, const unsigned int maxTime)
 }
 
 
-// Construct from Istream.
-fileStat::fileStat(Istream& is)
+Foam::fileStat::fileStat(Istream& is)
 {
     is >> *this;
 }
@@ -94,10 +72,9 @@ fileStat::fileStat(Istream& is)
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// compare two fileStates for same device
-bool fileStat::sameDevice(const fileStat& stat2) const
+bool Foam::fileStat::sameDevice(const fileStat& stat2) const
 {
-    return 
+    return
         isValid_
      && (
             major(status_.st_dev) == major(stat2.status().st_dev)
@@ -105,14 +82,14 @@ bool fileStat::sameDevice(const fileStat& stat2) const
         );
 }
 
-// compare two fileStates for same Inode
-bool fileStat::sameINode(const fileStat& stat2) const
+
+bool Foam::fileStat::sameINode(const fileStat& stat2) const
 {
     return isValid_ && (status_.st_ino == stat2.status().st_ino);
 }
 
-// compare state against inode
-bool fileStat::sameINode(const label iNode) const
+
+bool Foam::fileStat::sameINode(const label iNode) const
 {
     return isValid_ && (status_.st_ino == ino_t(iNode));
 }
@@ -120,13 +97,12 @@ bool fileStat::sameINode(const label iNode) const
 
 // * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
 
-// Input in list syntax
-Istream& operator>>(Istream& is, fileStat& fStat)
+Foam::Istream& Foam::operator>>(Istream& is, fileStat& fStat)
 {
     // Read beginning of machine info list
     is.readBegin("fileStat");
 
-    label 
+    label
         devMaj, devMin,
         ino, mode, uid, gid,
         rdevMaj, rdevMin,
@@ -172,11 +148,10 @@ Istream& operator>>(Istream& is, fileStat& fStat)
 }
 
 
-// Output in list syntax
-Ostream& operator<<(Ostream& os, const fileStat& fStat)
+Foam::Ostream& Foam::operator<<(Ostream& os, const fileStat& fStat)
 {
-    //Set precision so 32bit unsigned int can be printed
-//    int oldPrecision = os.precision();
+    // Set precision so 32bit unsigned int can be printed
+    // int oldPrecision = os.precision();
     int oldPrecision = 0;
     os.precision(10);
 
@@ -200,8 +175,4 @@ Ostream& operator<<(Ostream& os, const fileStat& fStat)
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/conversion/ensight/file/ensightFile.C b/src/conversion/ensight/file/ensightFile.C
index 88357ba435acd05896294ae6eaf1968c01b8fadf..569cc6bc52da5b2ae85a2c5cd8b0f7c862eb5049 100644
--- a/src/conversion/ensight/file/ensightFile.C
+++ b/src/conversion/ensight/file/ensightFile.C
@@ -28,16 +28,12 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-// allow undef in results
 bool Foam::ensightFile::allowUndef_ = false;
 
-// value to represent undef in results
 Foam::scalar Foam::ensightFile::undefValue_ = Foam::floatScalarVGREAT;
 
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from pathname
 Foam::ensightFile::ensightFile
 (
     const fileName& pathname,
@@ -55,6 +51,7 @@ Foam::ensightFile::ensightFile
     precision(5);
 }
 
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::ensightFile::~ensightFile()
@@ -88,7 +85,6 @@ Foam::scalar Foam::ensightFile::undefValue(const scalar& value)
 }
 
 
-// binary write
 Foam::Ostream& Foam::ensightFile::write
 (
     const char* buf,
@@ -100,11 +96,7 @@ Foam::Ostream& Foam::ensightFile::write
 }
 
 
-// write string as "%80s" or as binary
-Foam::Ostream& Foam::ensightFile::write
-(
-    const string& value
-)
+Foam::Ostream& Foam::ensightFile::write(const string& value)
 {
     char buf[80];
 
@@ -141,11 +133,7 @@ Foam::Ostream& Foam::ensightFile::write
 }
 
 
-// write integer as "%10d" or as binary
-Foam::Ostream& Foam::ensightFile::write
-(
-    const label& value
-)
+Foam::Ostream& Foam::ensightFile::write(const label& value)
 {
     if (format() == IOstream::BINARY)
     {
@@ -167,7 +155,6 @@ Foam::Ostream& Foam::ensightFile::write
 }
 
 
-// write integer with specified width or as binary
 Foam::Ostream& Foam::ensightFile::write
 (
     const label& value,
@@ -194,11 +181,7 @@ Foam::Ostream& Foam::ensightFile::write
 }
 
 
-// write float as "%12.5e" or as binary
-Foam::Ostream& Foam::ensightFile::write
-(
-    const scalar& value
-)
+Foam::Ostream& Foam::ensightFile::write(const scalar& value)
 {
     if (format() == IOstream::BINARY)
     {
@@ -220,7 +203,6 @@ Foam::Ostream& Foam::ensightFile::write
 }
 
 
-// Add carriage return to ascii stream
 void Foam::ensightFile::newline()
 {
     if (format() == IOstream::ASCII)
@@ -230,7 +212,6 @@ void Foam::ensightFile::newline()
 }
 
 
-// write undef value
 Foam::Ostream& Foam::ensightFile::writeUndef()
 {
     write(undefValue_);
@@ -238,11 +219,7 @@ Foam::Ostream& Foam::ensightFile::writeUndef()
 }
 
 
-// write element keyword with trailing newline, optionally with undef
-Foam::Ostream& Foam::ensightFile::writeKeyword
-(
-    const string& key
-)
+Foam::Ostream& Foam::ensightFile::writeKeyword(const string& key)
 {
     if (allowUndef_)
     {
@@ -260,7 +237,6 @@ Foam::Ostream& Foam::ensightFile::writeKeyword
 }
 
 
-// write "C Binary" for binary files
 Foam::Ostream& Foam::ensightFile::writeBinaryHeader()
 {
     if (format() == IOstream::BINARY)
@@ -274,8 +250,6 @@ Foam::Ostream& Foam::ensightFile::writeBinaryHeader()
 
 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
 
-
-// '*' mask appropriate for subDir
 Foam::string Foam::ensightFile::mask()
 {
     char buf[16] = "********";
@@ -283,7 +257,6 @@ Foam::string Foam::ensightFile::mask()
 }
 
 
-// consistent zero-padded numbers for subdirectories
 Foam::string Foam::ensightFile::subDir(const label n)
 {
     char buf[16];
@@ -293,6 +266,4 @@ Foam::string Foam::ensightFile::subDir(const label n)
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/conversion/ensight/file/ensightFile.H b/src/conversion/ensight/file/ensightFile.H
index 9e0271dbf4a44fffa0d4c154b93265c2f519f6fa..86979dfd4e55a39aec73f258284c4708061bd776 100644
--- a/src/conversion/ensight/file/ensightFile.H
+++ b/src/conversion/ensight/file/ensightFile.H
@@ -30,12 +30,15 @@ Description
     Correctly handles binary write as well.
 
 \*---------------------------------------------------------------------------*/
+
 #ifndef ensightFile_H
 #define ensightFile_H
 
 #include "OFstream.H"
 #include "IOstream.H"
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 namespace Foam
 {
 
@@ -47,19 +50,26 @@ class ensightFile
 :
     public OFstream
 {
-    //- allow undef in results
-    static bool allowUndef_;
+    // Private data
+
+        //- allow undef in results
+        static bool allowUndef_;
 
-    //- value to represent undef in results
-    static scalar undefValue_;
+        //- value to represent undef in results
+        static scalar undefValue_;
 
-    //- Disallow default bitwise assignment
-    void operator=(const ensightFile&);
 
-    //- Disallow default copy constructor
-    ensightFile(const ensightFile&);
+    // Private member functions
+
+        //- Disallow default bitwise assignment
+        void operator=(const ensightFile&);
+
+        //- Disallow default copy constructor
+        ensightFile(const ensightFile&);
+
 
 public:
+
     // Constructors
 
         //- Construct from pathname
@@ -69,10 +79,13 @@ public:
             IOstream::streamFormat format=IOstream::BINARY
         );
 
+
     // Destructor
-        ~ensightFile();
+    ~ensightFile();
+
 
     // Access
+
         //- Return setting for whether 'undef' values are allowed in results
         static bool allowUndef();
 
@@ -82,7 +95,9 @@ public:
         //- consistent zero-padded numbers for subdirectories
         static string subDir(const label);
 
+
     // Edit
+
         static bool allowUndef(bool);
 
         //- Assign the value to represent undef in the results
@@ -90,6 +105,7 @@ public:
         //  NB: do not use values larger than floatScalarVGREAT
         static scalar undefValue(const scalar&);
 
+
     // Output
 
         //- binary write
@@ -125,6 +141,8 @@ public:
 
 } // End namespace Foam
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 #endif
 
 // ************************************************************************* //
diff --git a/src/conversion/ensight/file/ensightGeoFile.C b/src/conversion/ensight/file/ensightGeoFile.C
index 72805f553c5eda67bf782ac23a41d0859dddc514..94e69bd9797b88b045eca673785bbb01fc5389aa 100644
--- a/src/conversion/ensight/file/ensightGeoFile.C
+++ b/src/conversion/ensight/file/ensightGeoFile.C
@@ -28,8 +28,6 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-
-// Construct from pathname
 Foam::ensightGeoFile::ensightGeoFile
 (
     const fileName& pathname,
@@ -53,11 +51,7 @@ Foam::ensightGeoFile::~ensightGeoFile()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// write keyword with trailing newline
-Foam::Ostream& Foam::ensightGeoFile::writeKeyword
-(
-    const string& key
-)
+Foam::Ostream& Foam::ensightGeoFile::writeKeyword(const string& key)
 {
     write(key);
     newline();
@@ -65,6 +59,5 @@ Foam::Ostream& Foam::ensightGeoFile::writeKeyword
     return *this;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/ensight/file/ensightGeoFile.H b/src/conversion/ensight/file/ensightGeoFile.H
index 1c91fa3218e79cf93830a1590b8fce9b35b1e6e9..c87f7d40ff6b155b2891b3bb6606cec6e1ee53eb 100644
--- a/src/conversion/ensight/file/ensightGeoFile.H
+++ b/src/conversion/ensight/file/ensightGeoFile.H
@@ -29,28 +29,36 @@ Description
     Specialized Ensight output with extra geometry file header
 
 \*---------------------------------------------------------------------------*/
+
 #ifndef ensightGeoFile_H
 #define ensightGeoFile_H
 
 #include "ensightFile.H"
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
                       Class ensightGeoFile Declaration
 \*---------------------------------------------------------------------------*/
+
 class ensightGeoFile
 :
     public ensightFile
 {
-    //- Disallow default bitwise assignment
-    void operator=(const ensightGeoFile&);
+    // Private member functions
+
+        //- Disallow default bitwise assignment
+        void operator=(const ensightGeoFile&);
+
+        //- Disallow default copy constructor
+        ensightGeoFile(const ensightGeoFile&);
 
-    //- Disallow default copy constructor
-    ensightGeoFile(const ensightGeoFile&);
 
 public:
+
     // Constructors
 
         //- Construct from pathname
@@ -60,21 +68,23 @@ public:
             IOstream::streamFormat format=IOstream::BINARY
         );
 
-    // Destructor
-        ~ensightGeoFile();
+
+    //- Destructor
+    ~ensightGeoFile();
+
 
     // Output
 
         //- write keyword with trailing newline
         virtual Ostream& writeKeyword(const string& key);
-
 };
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
 } // End namespace Foam
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 #endif
 
 // ************************************************************************* //
diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C
index 7d2fab6483790a6502d7f6ee4f7699b40df564eb..5ccb17e8200db5521d78b231b6e316f628c5d032 100644
--- a/src/conversion/ensight/part/ensightPart.C
+++ b/src/conversion/ensight/part/ensightPart.C
@@ -41,11 +41,7 @@ Foam::List<Foam::word> Foam::ensightPart::elemTypes_(0);
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-//- check for fully defined fields
-bool Foam::ensightPart::isFieldDefined
-(
-    const List<scalar>& field
-) const
+bool Foam::ensightPart::isFieldDefined(const List<scalar>& field) const
 {
     forAll(elemLists_, elemI)
     {
@@ -67,7 +63,6 @@ bool Foam::ensightPart::isFieldDefined
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Null constructor
 Foam::ensightPart::ensightPart
 ()
 :
@@ -82,7 +77,6 @@ Foam::ensightPart::ensightPart
 {}
 
 
-// Construct empty part with number and description
 Foam::ensightPart::ensightPart
 (
     label partNumber,
@@ -100,7 +94,6 @@ Foam::ensightPart::ensightPart
 {}
 
 
-// Construct empty part with number and description
 Foam::ensightPart::ensightPart
 (
     label partNumber,
@@ -119,11 +112,7 @@ Foam::ensightPart::ensightPart
 {}
 
 
-// Construct as copy
-Foam::ensightPart::ensightPart
-(
-    const ensightPart& part
-)
+Foam::ensightPart::ensightPart(const ensightPart& part)
 :
     number_(part.number_),
     name_(part.name_),
@@ -138,7 +127,6 @@ Foam::ensightPart::ensightPart
 
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
-// runtime selection
 Foam::autoPtr<Foam::ensightPart> Foam::ensightPart::New(Istream& is)
 {
     word partType(is);
@@ -161,6 +149,7 @@ Foam::autoPtr<Foam::ensightPart> Foam::ensightPart::New(Istream& is)
     return autoPtr<ensightPart>(cstrIter()(is));
 }
 
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::ensightPart::~ensightPart()
@@ -169,7 +158,6 @@ Foam::ensightPart::~ensightPart()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// reconstruct from Istream
 void Foam::ensightPart::reconstruct(Istream& is)
 {
     dictionary dict(is);
@@ -198,7 +186,6 @@ void Foam::ensightPart::reconstruct(Istream& is)
 }
 
 
-// renumber elements
 void Foam::ensightPart::renumber(labelList const& origId)
 {
     // transform to global values first
@@ -226,6 +213,4 @@ void Foam::ensightPart::renumber(labelList const& origId)
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/conversion/ensight/part/ensightPart.H b/src/conversion/ensight/part/ensightPart.H
index b3186eb3a1281f5b077025bef305dacb8c60dcb7..b511c6d095afcf07b101ce26d9e0d5f46739fb6f 100644
--- a/src/conversion/ensight/part/ensightPart.H
+++ b/src/conversion/ensight/part/ensightPart.H
@@ -63,9 +63,9 @@ class ensightPart
         // Static data members
         static List<word> elemTypes_;
 
-    // Private Member Functions
 
 protected:
+
     // Protected data
 
         //- part number
@@ -92,6 +92,7 @@ protected:
         //- mesh reference used
         const polyMesh* meshPtr_;
 
+
     // Protected Classes
 
         //- track the points used by the part and map global to local indices
@@ -155,12 +156,12 @@ protected:
         ) const
         {}
 
+
 public:
 
     //- Runtime type information
     TypeName("ensightPart");
 
-    // Public data
 
     // Constructors
 
@@ -206,9 +207,9 @@ public:
         static autoPtr<ensightPart> New(Istream& is);
 
 
-    // Destructor
+    //- Destructor
+    virtual ~ensightPart();
 
-        virtual ~ensightPart();
 
     // Static members
 
@@ -217,6 +218,7 @@ public:
             return elemTypes_;
         }
 
+
     // Access
 
         //- number of elements in this part
@@ -272,6 +274,7 @@ public:
             return offset_;
         }
 
+
     // Edit
 
         //- renumber elements
@@ -332,7 +335,6 @@ public:
             ensightGeoFile&,
             const ensightPart&
         );
-
 };
 
 
diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C
index acbc02665e6b3c48f20eecfdc0022e97f4d7cf70..e7c2910f0532a8053f0dbe25a601758bebdae10c 100644
--- a/src/conversion/ensight/part/ensightPartCells.C
+++ b/src/conversion/ensight/part/ensightPartCells.C
@@ -40,7 +40,6 @@ namespace Foam
    addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream);
 }
 
-// names for addressable ensight element types
 Foam::List<Foam::word> Foam::ensightPartCells::elemTypes_
 (
     IStringStream
@@ -52,11 +51,7 @@ Foam::List<Foam::word> Foam::ensightPartCells::elemTypes_
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// classify the cell types, track the points used
-void Foam::ensightPartCells::classify
-(
-    const labelList& idList
-)
+void Foam::ensightPartCells::classify(const labelList& idList)
 {
     // References to cell shape models
     const cellModel& tet   = *(cellModeller::lookup("tet"));
@@ -229,7 +224,6 @@ void Foam::ensightPartCells::classify
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct empty part with number and description
 Foam::ensightPartCells::ensightPartCells
 (
     label partNumber,
@@ -240,7 +234,6 @@ Foam::ensightPartCells::ensightPartCells
 {}
 
 
-// Construct from polyMesh without zones
 Foam::ensightPartCells::ensightPartCells
 (
     label partNumber,
@@ -253,7 +246,6 @@ Foam::ensightPartCells::ensightPartCells
 }
 
 
-// Construct from polyMesh and list of (non-zoned) cells
 Foam::ensightPartCells::ensightPartCells
 (
     label partNumber,
@@ -267,7 +259,6 @@ Foam::ensightPartCells::ensightPartCells
 }
 
 
-// Construct from polyMesh and cellZone
 Foam::ensightPartCells::ensightPartCells
 (
     label partNumber,
@@ -281,21 +272,13 @@ Foam::ensightPartCells::ensightPartCells
 }
 
 
-// Construct as copy
-Foam::ensightPartCells::ensightPartCells
-(
-    const ensightPartCells& part
-)
+Foam::ensightPartCells::ensightPartCells(const ensightPartCells& part)
 :
     ensightPart(part)
 {}
 
 
-// Construct from Istream
-Foam::ensightPartCells::ensightPartCells
-(
-    Istream& is
-)
+Foam::ensightPartCells::ensightPartCells(Istream& is)
 :
     ensightPart()
 {
@@ -305,15 +288,12 @@ Foam::ensightPartCells::ensightPartCells
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-
 Foam::ensightPartCells::~ensightPartCells()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-
-// track the points used
 Foam::ensightPart::localPoints Foam::ensightPartCells::calcLocalPoints() const
 {
     const polyMesh& mesh = *meshPtr_;
@@ -362,7 +342,6 @@ Foam::ensightPart::localPoints Foam::ensightPartCells::calcLocalPoints() const
 }
 
 
-// write cell connectivities
 void Foam::ensightPartCells::writeConnectivity
 (
     ensightGeoFile& os,
@@ -449,6 +428,4 @@ void Foam::ensightPartCells::writeConnectivity
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/conversion/ensight/part/ensightPartCells.H b/src/conversion/ensight/part/ensightPartCells.H
index a85b2778098c3951a368ca1ab87c65aeff85a97f..a8a941ad7a6d791cc3a12160e0e9221bf596eb60 100644
--- a/src/conversion/ensight/part/ensightPartCells.H
+++ b/src/conversion/ensight/part/ensightPartCells.H
@@ -52,8 +52,6 @@ class ensightPartCells
 :
     public ensightPart
 {
-    // Private data
-
     // Private Member Functions
 
         //- Disallow default bitwise assignment
@@ -77,6 +75,7 @@ class ensightPartCells
             const labelList& pointMap
         ) const;
 
+
 protected:
 
     //- addressable Ensight element types
@@ -135,9 +134,8 @@ public:
         }
 
 
-    // Destructor
-
-        virtual ~ensightPartCells();
+    //- Destructor
+    virtual ~ensightPartCells();
 
 
     // Member Functions
@@ -147,7 +145,6 @@ public:
         {
             return elemTypes_;
         }
-
 };
 
 
diff --git a/src/conversion/ensight/part/ensightPartFaces.C b/src/conversion/ensight/part/ensightPartFaces.C
index 79fd6ceed0b7a204fbaebd2b49b1b8c87bff08bc..471e17bc72f250aa443686f902fe5fdbec871a7b 100644
--- a/src/conversion/ensight/part/ensightPartFaces.C
+++ b/src/conversion/ensight/part/ensightPartFaces.C
@@ -31,13 +31,14 @@ License
 #include "dictionary.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
 namespace Foam
 {
    defineTypeNameAndDebug(ensightPartFaces, 0);
    addToRunTimeSelectionTable(ensightPart, ensightPartFaces, istream);
 }
 
-// names for addressable ensight element types
+
 Foam::List<Foam::word> Foam::ensightPartFaces::elemTypes_
 (
     IStringStream
@@ -46,9 +47,9 @@ Foam::List<Foam::word> Foam::ensightPartFaces::elemTypes_
     )()
 );
 
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct empty part with number and description
 Foam::ensightPartFaces::ensightPartFaces
 (
     label partNumber,
@@ -61,7 +62,6 @@ Foam::ensightPartFaces::ensightPartFaces
 }
 
 
-// Construct from polyMesh and polyPatch
 Foam::ensightPartFaces::ensightPartFaces
 (
     label partNumber,
@@ -137,22 +137,13 @@ Foam::ensightPartFaces::ensightPartFaces
 }
 
 
-
-// Construct as copy
-Foam::ensightPartFaces::ensightPartFaces
-(
-    const ensightPartFaces &part
-)
+Foam::ensightPartFaces::ensightPartFaces(const ensightPartFaces &part)
 :
     ensightPart(part)
 {}
 
 
-// Construct from Istream
-Foam::ensightPartFaces::ensightPartFaces
-(
-    Istream& is
-)
+Foam::ensightPartFaces::ensightPartFaces(Istream& is)
 :
     ensightPart()
 {
@@ -160,6 +151,7 @@ Foam::ensightPartFaces::ensightPartFaces
     reconstruct(is);
 }
 
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::ensightPartFaces::~ensightPartFaces()
@@ -168,7 +160,6 @@ Foam::ensightPartFaces::~ensightPartFaces()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// track the points used
 Foam::ensightPart::localPoints Foam::ensightPartFaces::calcLocalPoints() const
 {
     const polyMesh& mesh = *meshPtr_;
@@ -212,7 +203,6 @@ Foam::ensightPart::localPoints Foam::ensightPartFaces::calcLocalPoints() const
 }
 
 
-// write face connectivities
 void Foam::ensightPartFaces::writeConnectivity
 (
     ensightGeoFile& os,
@@ -258,6 +248,4 @@ void Foam::ensightPartFaces::writeConnectivity
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/conversion/ensight/part/ensightPartFaces.H b/src/conversion/ensight/part/ensightPartFaces.H
index 6f00e0fb567e2815078b1ebbfa6b03d4b88d9dc3..f41f552d969460dea351d75a5d5e6c441c6171bd 100644
--- a/src/conversion/ensight/part/ensightPartFaces.H
+++ b/src/conversion/ensight/part/ensightPartFaces.H
@@ -51,8 +51,6 @@ class ensightPartFaces
 :
     public ensightPart
 {
-    // Private data
-
     // Private Member Functions
 
         //- Disallow default bitwise assignment
@@ -70,6 +68,7 @@ class ensightPartFaces
             const labelList& pointMap
         ) const;
 
+
 protected:
 
     //- addressable ensight element types
@@ -115,9 +114,8 @@ public:
         }
 
 
-    // Destructor
-
-        virtual ~ensightPartFaces();
+    //- Destructor
+    virtual ~ensightPartFaces();
 
 
     // Member Functions
@@ -127,7 +125,6 @@ public:
         {
             return elemTypes_;
         }
-
 };
 
 
diff --git a/src/conversion/ensight/part/ensightPartI.H b/src/conversion/ensight/part/ensightPartI.H
index 6252fdc6baad339df61749ba05885c8d1035ff3a..162f1b34438545eb055fc15b815064e350f686ee 100644
--- a/src/conversion/ensight/part/ensightPartI.H
+++ b/src/conversion/ensight/part/ensightPartI.H
@@ -31,7 +31,6 @@ Description
 
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
-// write generalized field components
 template <class Type>
 void Foam::ensightPart::writeField
 (
@@ -66,6 +65,4 @@ void Foam::ensightPart::writeField
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/conversion/ensight/part/ensightPartIO.C b/src/conversion/ensight/part/ensightPartIO.C
index 7bb6b3961aa36268990c37bddedcc747dafbce5f..6141556361d3b34a8914bf7fd9bb2aacffb83b32 100644
--- a/src/conversion/ensight/part/ensightPartIO.C
+++ b/src/conversion/ensight/part/ensightPartIO.C
@@ -33,7 +33,6 @@ Description
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// write the part header
 void Foam::ensightPart::writeHeader
 (
     ensightFile& os,
@@ -54,7 +53,6 @@ void Foam::ensightPart::writeHeader
 }
 
 
-// write scalar field for idList
 void Foam::ensightPart::writeFieldList
 (
     ensightFile& os,
@@ -80,12 +78,7 @@ void Foam::ensightPart::writeFieldList
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-
-// write summary information about the object
-bool Foam::ensightPart::writeSummary
-(
-    Ostream& os
-) const
+bool Foam::ensightPart::writeSummary(Ostream& os) const
 {
     os  << indent << type() << nl
         << indent << token::BEGIN_BLOCK << incrIndent << nl;
@@ -102,11 +95,7 @@ bool Foam::ensightPart::writeSummary
 }
 
 
-// write reconstruction information for the object
-bool Foam::ensightPart::writeData
-(
-    Ostream& os
-) const
+bool Foam::ensightPart::writeData(Ostream& os) const
 {
     os  << indent << type() << nl
         << indent << token::BEGIN_BLOCK << incrIndent << nl;
@@ -130,12 +119,7 @@ bool Foam::ensightPart::writeData
 }
 
 
-
-// write geometry by components
-void Foam::ensightPart::writeGeometry
-(
-    ensightGeoFile& os
-) const
+void Foam::ensightPart::writeGeometry(ensightGeoFile& os) const
 {
     if (size() && meshPtr_)
     {
@@ -182,7 +166,6 @@ void Foam::ensightPart::writeGeometry
 }
 
 
-// write scalar field
 void Foam::ensightPart::writeScalarField
 (
     ensightFile& os,
@@ -207,7 +190,6 @@ void Foam::ensightPart::writeScalarField
 }
 
 
-// write vector field components
 void Foam::ensightPart::writeVectorField
 (
     ensightFile& os,
@@ -259,6 +241,5 @@ Foam::ensightGeoFile& Foam::operator<<
     return os;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/ensight/part/ensightParts.C b/src/conversion/ensight/part/ensightParts.C
index 464205a9c85df77749453b21caa1d74320b43e6c..56004fc60e18f6c8d4d8f518be961a27bd4b7234 100644
--- a/src/conversion/ensight/part/ensightParts.C
+++ b/src/conversion/ensight/part/ensightParts.C
@@ -28,11 +28,7 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from polyMesh
-Foam::ensightParts::ensightParts
-(
-    const polyMesh& pMesh
-)
+Foam::ensightParts::ensightParts(const polyMesh& pMesh)
 :
     partsList_()
 {
@@ -40,11 +36,7 @@ Foam::ensightParts::ensightParts
 }
 
 
-// Construct from IOobject
-Foam::ensightParts::ensightParts
-(
-    const IOobject& ioObj
-)
+Foam::ensightParts::ensightParts(const IOobject& ioObj)
 :
     partsList_()
 {
@@ -61,12 +53,7 @@ Foam::ensightParts::~ensightParts()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-
-// clear old information and construct anew from polyMesh
-void Foam::ensightParts::recalculate
-(
-    const polyMesh& pMesh
-)
+void Foam::ensightParts::recalculate(const polyMesh& pMesh)
 {
     partsList_.clear();
 
@@ -197,7 +184,6 @@ void Foam::ensightParts::recalculate
 }
 
 
-// renumber elements
 void Foam::ensightParts::renumber
 (
     const labelList& origCellId,
@@ -218,11 +204,7 @@ void Foam::ensightParts::renumber
 }
 
 
-// write the geometry
-void Foam::ensightParts::writeGeometry
-(
-    ensightGeoFile& os
-) const
+void Foam::ensightParts::writeGeometry( ensightGeoFile& os) const
 {
     // with some feedback
     Info<< "write geometry part:" << nl << flush;
@@ -235,11 +217,7 @@ void Foam::ensightParts::writeGeometry
 }
 
 
-// write summary information about the objects
-bool Foam::ensightParts::writeSummary
-(
-    Ostream& os
-) const
+bool Foam::ensightParts::writeSummary(Ostream& os) const
 {
     forAll(partsList_, partI)
     {
@@ -250,10 +228,7 @@ bool Foam::ensightParts::writeSummary
 }
 
 
-void Foam::ensightParts::writeData
-(
-    Ostream& os
-) const
+void Foam::ensightParts::writeData(Ostream& os) const
 {
     // Write size of list
     os << nl << partsList_.size();
@@ -275,7 +250,6 @@ void Foam::ensightParts::writeData
 }
 
 
-// write scalar field
 void Foam::ensightParts::writeScalarField
 (
     ensightFile& os,
@@ -298,7 +272,6 @@ void Foam::ensightParts::writeScalarField
 }
 
 
-// write vector field components
 void Foam::ensightParts::writeVectorField
 (
     ensightFile& os,
@@ -322,8 +295,6 @@ void Foam::ensightParts::writeVectorField
     }
 }
 
-// * * * * * * * * * * * * * * * Member operators  * * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * //
 
@@ -337,6 +308,5 @@ Foam::ensightGeoFile& Foam::operator<<
     return os;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/ensight/part/ensightParts.H b/src/conversion/ensight/part/ensightParts.H
index f4ca32d6ff80231db1fb64378668c4be29ed553d..48b7e80a9002a7bca1aa5d575be93dcf8d957f83 100644
--- a/src/conversion/ensight/part/ensightParts.H
+++ b/src/conversion/ensight/part/ensightParts.H
@@ -66,6 +66,7 @@ class ensightParts
         //- Disallow default bitwise assignment
         void operator=(const ensightParts&);
 
+
 public:
 
     // Constructors
@@ -76,9 +77,12 @@ public:
         //- Construct from IOobject
         ensightParts(const IOobject&);
 
-    // Destructor
 
-        ~ensightParts();
+    //- Destructor
+    ~ensightParts();
+
+
+    // Member functions
 
         //- clear old information and construct anew from polyMesh
         void recalculate(const polyMesh&);
@@ -132,6 +136,7 @@ public:
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
+
     // Friend Operators
 
         friend ensightGeoFile& operator<<
@@ -139,7 +144,6 @@ public:
             ensightGeoFile&,
             const ensightParts&
         );
-
 };
 
 
diff --git a/src/conversion/ensight/part/ensightPartsI.H b/src/conversion/ensight/part/ensightPartsI.H
index bb5a915dec678a2099b066a9053fe75ba3ec6533..b4b9857b9e5801229680a4d0fb01cba29869aadf 100644
--- a/src/conversion/ensight/part/ensightPartsI.H
+++ b/src/conversion/ensight/part/ensightPartsI.H
@@ -26,11 +26,11 @@ Description
     Template to write generalized field components
 
 \*---------------------------------------------------------------------------*/
+
 #include "ensightParts.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// write generalized field components
 template <class Type>
 void Foam::ensightParts::writeField
 (
@@ -72,6 +72,5 @@ void Foam::ensightParts::writeField
     }
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/meshReader/calcPointCells.C b/src/conversion/meshReader/calcPointCells.C
index 1b9c673d0eb4bdd63799e4ab1faea281b5edea04..59d47a2f3b88ba65564ee860a5bb3e0c8346abe5 100644
--- a/src/conversion/meshReader/calcPointCells.C
+++ b/src/conversion/meshReader/calcPointCells.C
@@ -177,7 +177,5 @@ const Foam::labelListList& Foam::meshReader::pointCells() const
     return *pointCellsPtr_;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 
 // ************************************************************************* //
diff --git a/src/conversion/meshReader/createPolyBoundary.C b/src/conversion/meshReader/createPolyBoundary.C
index e25ead64c4e680b703edf30c25b74a82a4b30810..fb5a30da01bcb6efccda1cdf33bf1f592a2b98f5 100644
--- a/src/conversion/meshReader/createPolyBoundary.C
+++ b/src/conversion/meshReader/createPolyBoundary.C
@@ -42,7 +42,6 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// add in boundary face
 void Foam::meshReader::addPolyBoundaryFace
 (
     const label cellId,
@@ -86,7 +85,6 @@ void Foam::meshReader::addPolyBoundaryFace
 }
 
 
-// add in boundary face
 void Foam::meshReader::addPolyBoundaryFace
 (
     const cellFaceIdentifier& identifier,
@@ -96,6 +94,7 @@ void Foam::meshReader::addPolyBoundaryFace
     addPolyBoundaryFace(identifier.cell, identifier.face, nCreatedFaces);
 }
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 void Foam::meshReader::createPolyBoundary()
@@ -370,6 +369,7 @@ void Foam::meshReader::createPolyBoundary()
         << "Number of interfaces: " << nInterfaces << endl;
 }
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 Foam::List<Foam::polyPatch*>
@@ -445,6 +445,5 @@ Foam::meshReader::polyBoundaryPatches(const polyMesh& mesh)
     return p;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/meshReader/createPolyCells.C b/src/conversion/meshReader/createPolyCells.C
index ca9622cbf2e14cf6358bc610cb902dd0e62af3e0..8c796caf18367862dcb0b044762643a155745e03 100644
--- a/src/conversion/meshReader/createPolyCells.C
+++ b/src/conversion/meshReader/createPolyCells.C
@@ -31,6 +31,7 @@ Description
     - standard connectivity checks
 
     - added baffle support
+
 \*---------------------------------------------------------------------------*/
 
 #include "meshReader.H"
@@ -325,6 +326,5 @@ void Foam::meshReader::createPolyCells()
     // added in createPolyBoundary()
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/meshReader/meshReader.C b/src/conversion/meshReader/meshReader.C
index 08a8a9886abf74a05898c90b7fbf4df2c052a800..8449c93e2243d41c500ccb374f942d9ef633d291 100644
--- a/src/conversion/meshReader/meshReader.C
+++ b/src/conversion/meshReader/meshReader.C
@@ -34,7 +34,6 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-// Pointers to cell shape models
 const Foam::cellModel* Foam::meshReader::unknownModel = Foam::cellModeller::
 lookup
 (
@@ -65,27 +64,17 @@ lookup
     "hex"
 );
 
-// * * * * * * * * * * * * * * Static Functions  * * * * * * * * * * * * * * //
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// attach cellZones based on the cellTable Id
-// - any other values can be extracted later from the cellTable dictionary
-void Foam::meshReader::addCellZones
-(
-    polyMesh& mesh
-) const
+void Foam::meshReader::addCellZones(polyMesh& mesh) const
 {
     cellTable_.addCellZones(mesh, cellTableId_);
     warnDuplicates("cellZones", mesh.cellZones().names());
 }
 
 
-// attach faceZones based on the monitoring boundary conditions
-void Foam::meshReader::addFaceZones
-(
-    polyMesh& mesh
-) const
+void Foam::meshReader::addFaceZones(polyMesh& mesh) const
 {
     label nZone = monitoringSets_.size();
     mesh.faceZones().setSize(nZone);
@@ -128,7 +117,6 @@ void Foam::meshReader::addFaceZones
 }
 
 
-// create and access the polyMesh
 Foam::autoPtr<Foam::polyMesh> Foam::meshReader::mesh
 (
     const objectRegistry& registry
@@ -172,7 +160,6 @@ Foam::autoPtr<Foam::polyMesh> Foam::meshReader::mesh
 }
 
 
-//- write the polyMesh
 void Foam::meshReader::writeMesh
 (
     const polyMesh& mesh,
@@ -199,7 +186,6 @@ void Foam::meshReader::writeMesh
 }
 
 
-// Clear extra storage before creation of the mesh to reduce the memory usage
 void Foam::meshReader::clearExtraStorage()
 {
     cellFaces_.clear();
@@ -241,6 +227,7 @@ Foam::meshReader::meshReader
     cellTable_()
 {}
 
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::meshReader::~meshReader()
@@ -248,7 +235,5 @@ Foam::meshReader::~meshReader()
     deleteDemandDrivenData(pointCellsPtr_);
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 
 // ************************************************************************* //
diff --git a/src/conversion/meshReader/meshReader.H b/src/conversion/meshReader/meshReader.H
index 171c547756db7cde3c09b2783059ea5115d8b83a..e14ef1913750ef5ca73757c1c1cab98871fde5fb 100644
--- a/src/conversion/meshReader/meshReader.H
+++ b/src/conversion/meshReader/meshReader.H
@@ -51,6 +51,7 @@ SourceFiles
     createPolyCells.C
     meshReader.C
     meshReaderAux.C
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef meshReader_H
@@ -74,54 +75,69 @@ namespace Foam
 class meshReader
 {
 protected:
-    //- identify cell faces in terms of cell Id and face Id
+
+    //- Identify cell faces in terms of cell Id and face Id
     class cellFaceIdentifier
     {
     public:
-        //- cell Id
-        label cell;
+        // Public data
+
+            //- Cell Id
+            label cell;
+
+            //- Face Id
+            label face;
 
-        //- face Id
-        label face;
 
-        //- Construct null
-        cellFaceIdentifier() : cell(-1), face(-1) {}
+        // Constructors
+
+            //- Construct null
+            cellFaceIdentifier() : cell(-1), face(-1) {}
+
+            //- Construct from cell/face components
+            cellFaceIdentifier(label c, label f) : cell(c), face(f) {}
 
-        //- Construct from cell/face components
-        cellFaceIdentifier(label c, label f) : cell(c), face(f) {}
 
         // Check
 
-        //- used if cell or face are non-negative
-        bool used() const
-        {
-            return (cell >= 0 && face >= 0);
-        }
+            //- Used if cell or face are non-negative
+            bool used() const
+            {
+                return (cell >= 0 && face >= 0);
+            }
+
+            //- Unused if cell or face are negative
+            bool unused() const
+            {
+                return (cell < 0 || face < 0);
+            }
 
-        //- unsed if cell or face are negative
-        bool unused() const
-        {
-            return (cell < 0 || face < 0);
-        }
 
         // Member Operators
-        bool operator!=(const cellFaceIdentifier& cf) const
-        {
-            return (cell != cf.cell || face != cf.face);
-        }
 
-        bool operator==(const cellFaceIdentifier& cf) const
-        {
-            return (cell == cf.cell && face == cf.face);
-        }
+            bool operator!=(const cellFaceIdentifier& cf) const
+            {
+                return (cell != cf.cell || face != cf.face);
+            }
+
+            bool operator==(const cellFaceIdentifier& cf) const
+            {
+                return (cell == cf.cell && face == cf.face);
+            }
 
         // IOstream Operators
-        friend Ostream& operator<<(Ostream& os, const cellFaceIdentifier& cf)
-        {
-            os << "(" << cf.cell << "/" << cf.face << ")";
-            return os;
-        }
-    };
+
+            friend Ostream& operator<<
+            (
+                Ostream& os,
+                const cellFaceIdentifier& cf
+            )
+            {
+                os << "(" << cf.cell << "/" << cf.face << ")";
+                return os;
+            }
+        };
+
 
 private:
 
@@ -154,6 +170,7 @@ private:
         //- Face sets for monitoring
         HashTable<List<label>, word, string::hash> monitoringSets_;
 
+
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
@@ -170,7 +187,7 @@ private:
         //- Make polyhedral cells and global faces if the mesh is polyhedral
         void createPolyCells();
 
-        //- add in boundary face
+        //- Add in boundary face
         void addPolyBoundaryFace
         (
             const label cellId,
@@ -178,17 +195,17 @@ private:
             const label nCreatedFaces
         );
 
-        //- add in boundary face
+        //- Add in boundary face
         void addPolyBoundaryFace
         (
             const cellFaceIdentifier& identifier,
             const label nCreatedFaces
         );
 
-        //- add cellZones based on cellTable Id
+        //- Add cellZones based on cellTable Id
         void addCellZones(polyMesh&) const;
 
-        //- add faceZones based on monitoring boundary conditions
+        //- Add faceZones based on monitoring boundary conditions
         void addFaceZones(polyMesh&) const;
 
         //- Make polyhedral boundary from shape boundary
@@ -204,7 +221,7 @@ private:
 
         void writeInterfaces(const objectRegistry&) const;
 
-        // write List<label> in constant/polyMesh
+        //- Write List<label> in constant/polyMesh
         void writeMeshLabelList
         (
             const objectRegistry& registry,
@@ -219,7 +236,9 @@ private:
             return const_cast<faceListList&>(cellFaces_);
         }
 
+
 protected:
+
     // Protected data
 
         //- Pointers to cell shape models
@@ -229,19 +248,19 @@ protected:
         static const cellModel* prismModel;
         static const cellModel* hexModel;
 
-        //- referenced filename
+        //- Referenced filename
         fileName geometryFile_;
 
-        //- geometry scaling
+        //- Geometry scaling
         scalar scaleFactor_;
 
         //- Points supporting the mesh
         pointField points_;
 
-        //- lookup original Cell number for a given cell
+        //- Lookup original Cell number for a given cell
         labelList origCellId_;
 
-        //- identify boundary faces by cells and their faces
+        //- Identify boundary faces by cells and their faces
         //  for each patch
         List<List<cellFaceIdentifier> > boundaryIds_;
 
@@ -260,19 +279,17 @@ protected:
         //- List of each baffle face
         faceList baffleFaces_;
 
-        // cell table id for each cell
+        //- Cell table id for each cell
         labelList cellTableId_;
 
-        // cell table persistent data saved as a dictionary
+        //- Cell table persistent data saved as a dictionary
         cellTable cellTable_;
 
+
     // Member Functions
 
-        //- subclasses are required to supply this information
-        virtual bool readGeometry
-        (
-            const scalar scaleFactor = 1.0
-        ) = 0;
+        //- Subclasses are required to supply this information
+        virtual bool readGeometry(const scalar scaleFactor = 1.0) = 0;
 
         //- Return mesh points
         pointField& points() const
@@ -280,23 +297,28 @@ protected:
             return const_cast<pointField&>(points_);
         }
 
+
 public:
+
     // Static Members
 
-        //- warn about repeated names
+        //- Warn about repeated names
         static void warnDuplicates(const word& context, const wordList&);
 
+
     // Constructors
 
         //- Construct from fileName
         meshReader(const fileName&, const scalar scaleFactor = 1.0);
 
-    // Destructor
-        virtual ~meshReader();
+
+    //- Destructor
+    virtual ~meshReader();
+
 
     // Member Functions
 
-        //- create and return polyMesh
+        //- Create and return polyMesh
         virtual autoPtr<polyMesh> mesh(const objectRegistry&);
 
         //- Write auxiliary information
@@ -310,6 +332,7 @@ public:
         ) const;
 };
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/conversion/meshReader/meshReaderAux.C b/src/conversion/meshReader/meshReaderAux.C
index 286092594595c5136aae72332969bc1643d72728..dafaf9c9f3bbb6674ba495f115c6b4d2fc0c79fd 100644
--- a/src/conversion/meshReader/meshReaderAux.C
+++ b/src/conversion/meshReader/meshReaderAux.C
@@ -23,17 +23,14 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 \*----------------------------------------------------------------------------*/
+
 #include "meshReader.H"
 #include "IOMap.H"
 #include "OFstream.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 // * * * * * * * * * * * * * * * Static Functions  * * * * * * * * * * * * * //
 
-// warn about duplicate names
 void Foam::meshReader::warnDuplicates
 (
     const word& context,
@@ -76,8 +73,6 @@ void Foam::meshReader::warnDuplicates
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-
-// write interface (baffle) mapping
 void Foam::meshReader::writeInterfaces(const objectRegistry& registry) const
 {
     // write constant/polyMesh/interface
@@ -103,14 +98,12 @@ void Foam::meshReader::writeInterfaces(const objectRegistry& registry) const
     ioObj.writeHeader(os);
 
     os  << interfaces_
-        << "// ************************************************************************* //"
+        << "// *************************************"
+        << "************************************ //"
         << endl;
-
 }
 
 
-// write List<label> in constant/polyMesh
-// this is crucial for later conversion back to ccm/starcd
 void Foam::meshReader::writeMeshLabelList
 (
     const objectRegistry& registry,
@@ -151,6 +144,7 @@ void Foam::meshReader::writeMeshLabelList
     );
 }
 
+
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void Foam::meshReader::writeAux(const objectRegistry& registry) const
@@ -179,10 +173,4 @@ void Foam::meshReader::writeAux(const objectRegistry& registry) const
 }
 
 
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.C b/src/conversion/meshReader/starcd/STARCDMeshReader.C
index aaabca6740ecedaaef0080d0907784abab9d0ca8..751be41c57860ba85f06fdca65bf787ff1156b3b 100644
--- a/src/conversion/meshReader/starcd/STARCDMeshReader.C
+++ b/src/conversion/meshReader/starcd/STARCDMeshReader.C
@@ -34,21 +34,16 @@ License
 #include "IFstream.H"
 #include "IOMap.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-// special boundary regions
 const char* Foam::meshReaders::STARCD::defaultBoundaryName =
     "Default_Boundary_Region";
 
 const char* Foam::meshReaders::STARCD::defaultSolidBoundaryName =
     "Default_Boundary_Solid";
 
-// keep solids
 bool Foam::meshReaders::STARCD::keepSolids = false;
 
-// face addressing from pro-STAR faces -> foam faces
 const int Foam::meshReaders::STARCD::starToFoamFaceAddr[4][6] =
 {
     { 4, 5, 2, 3, 0, 1 },     // 11 = pro-STAR hex
@@ -57,12 +52,9 @@ const int Foam::meshReaders::STARCD::starToFoamFaceAddr[4][6] =
     { 0, -1, 4, 2, 1, 3 }     // 14 = pro-STAR pyramid
 };
 
-// * * * * * * * * * * * * * * Static Functions  * * * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// read and discard to newline
 void Foam::meshReaders::STARCD::readToNewline(IFstream& is)
 {
     char ch = '\n';
@@ -73,14 +65,8 @@ void Foam::meshReaders::STARCD::readToNewline(IFstream& is)
     while ((is) && ch != '\n');
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// read header
-bool Foam::meshReaders::STARCD::readHeader
-(
-    IFstream& is,
-    word fileSignature
-)
+bool Foam::meshReaders::STARCD::readHeader(IFstream& is, word fileSignature)
 {
     if (!is.good())
     {
@@ -108,19 +94,16 @@ bool Foam::meshReaders::STARCD::readHeader
     return true;
 }
 
+
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// read boundaryRegion names and the cellTable information from
-// dictionaries that have been extracted from the .inp file
-void Foam::meshReaders::STARCD::readAux
-(
-    const objectRegistry& registry
-)
+void Foam::meshReaders::STARCD::readAux(const objectRegistry& registry)
 {
     boundaryRegion_.readDict(registry);
     cellTable_.readDict(registry);
 }
 
+
 // read in the points from the .vrt file
 //
 /*---------------------------------------------------------------------------*\
@@ -219,7 +202,6 @@ void Foam::meshReaders::STARCD::readPoints
 
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // read in the cells from the .cel file
 //
@@ -261,10 +243,7 @@ for each cell face.
 Strictly speaking, we only need the cellModeller for adding boundaries.
 \*---------------------------------------------------------------------------*/
 
-void Foam::meshReaders::STARCD::readCells
-(
-    const fileName& inputName
-)
+void Foam::meshReaders::STARCD::readCells(const fileName& inputName)
 {
     const word fileSignature = "PROSTAR_CELL";
     label nFluids = 0, nSolids = 0, nBaffles = 0, nShells = 0;
@@ -545,7 +524,8 @@ void Foam::meshReaders::STARCD::readCells
                 {
                     Info<< "star cell " << starCellId << " has "
                         << (nFaces - faceI)
-                        << " empty faces - could cause boundary addressing problems"
+                        << " empty faces - could cause boundary "
+                        << "addressing problems"
                         << endl;
 
                     nFaces = faceI;
@@ -633,6 +613,7 @@ void Foam::meshReaders::STARCD::readCells
     mapToFoamPointId_.clear();
 }
 
+
 // read in the boundaries from the .bnd file
 //
 /*---------------------------------------------------------------------------*\
@@ -653,10 +634,7 @@ BAFFLE
 etc,
 \*---------------------------------------------------------------------------*/
 
-void Foam::meshReaders::STARCD::readBoundary
-(
-    const fileName& inputName
-)
+void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName)
 {
     const word fileSignature = "PROSTAR_BOUNDARY";
     label nPatches = 0, nFaces = 0, nBafflePatches = 0, maxId = 0;
@@ -1059,13 +1037,9 @@ void Foam::meshReaders::STARCD::cullPoints()
 }
 
 
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-bool Foam::meshReaders::STARCD::readGeometry
-(
-    const scalar scaleFactor
-)
+bool Foam::meshReaders::STARCD::readGeometry(const scalar scaleFactor)
 {
     // Info<< "called meshReaders::STARCD::readGeometry" << endl;
 
@@ -1077,9 +1051,9 @@ bool Foam::meshReaders::STARCD::readGeometry
     return true;
 }
 
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from reading a file
 Foam::meshReaders::STARCD::STARCD
 (
     const fileName& prefix,
@@ -1095,11 +1069,11 @@ Foam::meshReaders::STARCD::STARCD
     readAux(registry);
 }
 
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::meshReaders::STARCD::~STARCD()
 {}
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.H b/src/conversion/meshReader/starcd/STARCDMeshReader.H
index ce8873360875cd584f86154dcc6ac8b1985776e4..8a82e743ea5a83d88a22e4563828c9360c3ef289 100644
--- a/src/conversion/meshReader/starcd/STARCDMeshReader.H
+++ b/src/conversion/meshReader/starcd/STARCDMeshReader.H
@@ -67,7 +67,8 @@ class STARCD
 
 protected:
 
-    // Private Data
+    // Protected Data
+
         static const char* defaultBoundaryName;
         static const char* defaultSolidBoundaryName;
 
@@ -83,10 +84,11 @@ protected:
         //- Cell labels (imported Cell numbering not necessarily contiguous)
         labelList mapToFoamCellId_;
 
-        //- boundary region data
+        //- Boundary region data
         boundaryRegion boundaryRegion_;
 
-    // Private Member Functions
+
+    // Protected Member Functions
 
         //- Disallow default bitwise copy construct
         STARCD(const STARCD&);
@@ -97,27 +99,28 @@ protected:
         //- Read the mesh from the file(s)
         virtual bool readGeometry(const scalar scaleFactor = 1.0);
 
-        //- read points from file
+        //- Read points from file
         void readPoints(const fileName&, const scalar scaleFactor);
 
-        //- read cell connectivities from file
+        //- Read cell connectivities from file
         virtual void readCells(const fileName&);
 
-        //- remove unused points
+        //- Remove unused points
         void cullPoints();
 
-        //- read boundary (cell/face) definitions
+        //- Read boundary (cell/face) definitions
         void readBoundary(const fileName&);
 
-        //- read auxiliary data from constant/{boundaryRegion,cellTable}
+        //- Read auxiliary data from constant/{boundaryRegion,cellTable}
         void readAux(const objectRegistry&);
 
-        //- read and discard to newline
+        //- Read and discard to newline
         static void readToNewline(IFstream&);
 
-        //- read header
+        //- Read header
         static bool readHeader(IFstream&, word fileSignature);
 
+
 protected:
 
         enum cellType
@@ -145,9 +148,12 @@ protected:
 
 public:
 
-        //- keep solids (default false)
+    // Static data
+
+        //- Keep solids (default false)
         static bool keepSolids;
 
+
     // Constructors
 
         //- Construct from case name
@@ -158,19 +164,19 @@ public:
             const scalar scaleFactor = 1.0
         );
 
-        // Destructor
-        virtual ~STARCD();
-
-    // Member Functions
 
+    //- Destructor
+    virtual ~STARCD();
 };
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace meshReaders
-
 } // End namespace Foam
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 #endif
 
 // ************************************************************************* //
diff --git a/src/conversion/meshTables/boundaryRegion.C b/src/conversion/meshTables/boundaryRegion.C
index 8af5a0e1664e060bbc8b364b31917e19785a6463..43be5d301fb83ef1bf4da5da16bb709025251673 100644
--- a/src/conversion/meshTables/boundaryRegion.C
+++ b/src/conversion/meshTables/boundaryRegion.C
@@ -36,7 +36,6 @@ Foam::boundaryRegion::boundaryRegion()
 {}
 
 
-// read constant/boundaryRegion (IOMap<dictionary>)
 Foam::boundaryRegion::boundaryRegion
 (
     const objectRegistry& registry,
@@ -55,6 +54,7 @@ Foam::boundaryRegion::boundaryRegion
 Foam::boundaryRegion::~boundaryRegion()
 {}
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 Foam::label Foam::boundaryRegion::append(const dictionary& dict)
@@ -73,8 +73,7 @@ Foam::label Foam::boundaryRegion::append(const dictionary& dict)
 }
 
 
-Foam::Map<Foam::word>
-Foam::boundaryRegion::names() const
+Foam::Map<Foam::word> Foam::boundaryRegion::names() const
 {
     Map<word> lookup;
 
@@ -90,8 +89,7 @@ Foam::boundaryRegion::names() const
 }
 
 
-Foam::Map<Foam::word>
-Foam::boundaryRegion::boundaryTypes() const
+Foam::Map<Foam::word> Foam::boundaryRegion::boundaryTypes() const
 {
     Map<word> lookup;
 
@@ -139,7 +137,6 @@ Foam::word Foam::boundaryRegion::boundaryType(const word& name) const
 }
 
 
-// read constant/boundaryRegion (IOMap<dictionary>)
 void Foam::boundaryRegion::readDict
 (
     const objectRegistry& registry,
@@ -174,7 +171,6 @@ void Foam::boundaryRegion::readDict
 }
 
 
-// write constant/boundaryRegion for later reuse
 void Foam::boundaryRegion::writeDict
 (
     const objectRegistry& registry,
@@ -208,12 +204,12 @@ void Foam::boundaryRegion::writeDict
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-
 void Foam::boundaryRegion::operator=(const boundaryRegion& rhs)
 {
     Map<dictionary>::operator=(rhs);
 }
 
+
 void Foam::boundaryRegion::operator=(const Map<dictionary>& rhs)
 {
     Map<dictionary>::operator=(rhs);
@@ -260,9 +256,5 @@ void Foam::boundaryRegion::rename(const dictionary& dict)
     }
 }
 
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/meshTables/boundaryRegion.H b/src/conversion/meshTables/boundaryRegion.H
index ba5976d4a5e7cb2c441135ff3cf94afca17d3965..643cc17f4dac8c68e7d931976a1d1a2607b6d724 100644
--- a/src/conversion/meshTables/boundaryRegion.H
+++ b/src/conversion/meshTables/boundaryRegion.H
@@ -72,15 +72,13 @@ class boundaryRegion
 :
     public Map<dictionary>
 {
-    // Private data
-
     // Private Member Functions
 
-    //- Disallow default bitwise copy construct
-    boundaryRegion(const boundaryRegion&);
+        //- Disallow default bitwise copy construct
+        boundaryRegion(const boundaryRegion&);
+
 
 public:
-    // Static Members
 
     // Constructors
 
@@ -96,8 +94,8 @@ public:
         );
 
 
-    // Destructor
-        ~boundaryRegion();
+    //- Destructor
+    ~boundaryRegion();
 
 
     // Member Functions
@@ -126,7 +124,6 @@ public:
             const fileName& instance = "constant"
         );
 
-
         //- Write constant/boundaryRegion for later reuse
         void writeDict
         (
@@ -153,13 +150,14 @@ public:
         //      newPatchName    originalName;
         //  @endverbatim
         void rename(const dictionary&);
-
 };
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 #endif
 
 // ************************************************************************* //
diff --git a/src/conversion/meshTables/cellTable.C b/src/conversion/meshTables/cellTable.C
index 66e39a4cb9f8d15838049c0acd65d12c6b34f94b..5b911b8599eb3efc75f90f9267ed17f12bd3120a 100644
--- a/src/conversion/meshTables/cellTable.C
+++ b/src/conversion/meshTables/cellTable.C
@@ -37,7 +37,6 @@ const char* const Foam::cellTable::defaultMaterial_ = "fluid";
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-//- map from cellTable Id -> zone number (unmapped = -1)
 Foam::labelList Foam::cellTable::zoneMap() const
 {
     label maxId = 0;
@@ -78,7 +77,6 @@ Foam::wordList Foam::cellTable::namesList() const
 }
 
 
-// add required entries - MaterialType
 void Foam::cellTable::addDefaults()
 {
     forAllIter(Map<dictionary>, *this, iter)
@@ -115,14 +113,12 @@ void Foam::cellTable::setEntry
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-
 Foam::cellTable::cellTable()
 :
     Map<dictionary>()
 {}
 
 
-// read constant/cellTable (IOMap<dictionary>)
 Foam::cellTable::cellTable
 (
     const objectRegistry& registry,
@@ -136,13 +132,12 @@ Foam::cellTable::cellTable
 }
 
 
-// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::cellTable::~cellTable()
 {}
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 Foam::label Foam::cellTable::append(const dictionary& dict)
@@ -161,8 +156,7 @@ Foam::label Foam::cellTable::append(const dictionary& dict)
 }
 
 
-Foam::Map<Foam::word>
-Foam::cellTable::names() const
+Foam::Map<Foam::word> Foam::cellTable::names() const
 {
     Map<word> lookup;
 
@@ -211,8 +205,10 @@ Foam::label Foam::cellTable::findIndex(const word& name) const
 }
 
 
-Foam::Map<Foam::word>
-Foam::cellTable::selectType(const word& materialType) const
+Foam::Map<Foam::word> Foam::cellTable::selectType
+(
+    const word& materialType
+) const
 {
     Map<word> lookup;
 
@@ -236,29 +232,25 @@ Foam::cellTable::selectType(const word& materialType) const
 }
 
 
-Foam::Map<Foam::word>
-Foam::cellTable::fluids() const
+Foam::Map<Foam::word> Foam::cellTable::fluids() const
 {
     return selectType("fluid");
 }
 
 
-Foam::Map<Foam::word>
-Foam::cellTable::solids() const
+Foam::Map<Foam::word> Foam::cellTable::solids() const
 {
     return selectType("solid");
 }
 
 
-Foam::Map<Foam::word>
-Foam::cellTable::shells() const
+Foam::Map<Foam::word> Foam::cellTable::shells() const
 {
     return selectType("shell");
 }
 
 
-Foam::Map<Foam::word>
-Foam::cellTable::materialTypes() const
+Foam::Map<Foam::word> Foam::cellTable::materialTypes() const
 {
     Map<word> lookup;
 
@@ -275,7 +267,6 @@ Foam::cellTable::materialTypes() const
 }
 
 
-//- assign material Type
 void Foam::cellTable::setMaterial(const label& id, const word& matlType)
 {
     setEntry(id, "MaterialType", matlType);
@@ -299,7 +290,6 @@ void Foam::cellTable::setName(const label& id)
 }
 
 
-// read constant/cellTable (IOMap<dictionary>)
 void Foam::cellTable::readDict
 (
     const objectRegistry& registry,
@@ -335,7 +325,6 @@ void Foam::cellTable::readDict
 }
 
 
-// write constant/cellTable for later reuse
 void Foam::cellTable::writeDict
 (
     const objectRegistry& registry,
@@ -369,19 +358,20 @@ void Foam::cellTable::writeDict
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-
 void Foam::cellTable::operator=(const cellTable& rhs)
 {
     Map<dictionary>::operator=(rhs);
     addDefaults();
 }
 
+
 void Foam::cellTable::operator=(const Map<dictionary>& rhs)
 {
     Map<dictionary>::operator=(rhs);
     addDefaults();
 }
 
+
 void Foam::cellTable::operator=(const polyMesh& mesh)
 {
     Map<dictionary> zoneDict;
@@ -430,9 +420,6 @@ void Foam::cellTable::operator=(const polyMesh& mesh)
 
 // * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
 
-
-// attach cellZones based on the cellTable Id
-// - any other values can be extracted later from the cellTable dictionary
 void Foam::cellTable::addCellZones
 (
     polyMesh& mesh,
@@ -580,8 +567,5 @@ void Foam::cellTable::combine(const dictionary& dict, labelList& tableIds)
     }
 }
 
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/conversion/meshTables/cellTable.H b/src/conversion/meshTables/cellTable.H
index a0e092c7eec6c481871d8fb811ba787051a30836..04aac24e96bb6d28118d472fd380059e217e72db 100644
--- a/src/conversion/meshTables/cellTable.H
+++ b/src/conversion/meshTables/cellTable.H
@@ -80,7 +80,9 @@ class cellTable
     public Map<dictionary>
 {
     // Private data
-        static const char* const defaultMaterial_;
+
+       static const char* const defaultMaterial_;
+
 
     // Private Member Functions
 
@@ -98,8 +100,8 @@ class cellTable
         //- Disallow default bitwise copy construct
         cellTable(const cellTable&);
 
+
 public:
-    // Static Members
 
     // Constructors
 
@@ -115,8 +117,8 @@ public:
         );
 
 
-    // Destructor
-        ~cellTable();
+    //- Destructor
+    ~cellTable();
 
 
     // Member Functions
@@ -175,6 +177,7 @@ public:
             const fileName& instance = "constant"
         ) const;
 
+
     // Member Operators
 
         //- Assignment
@@ -195,13 +198,14 @@ public:
         //- Combine tableIds together
         //  each dictionary entry is a wordList
         void combine(const dictionary&, labelList& tableIds);
-
 };
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 #endif
 
 // ************************************************************************* //
diff --git a/src/conversion/meshWriter/meshWriter.C b/src/conversion/meshWriter/meshWriter.C
index ca9eeb019026d2756ad5b90832394503990a7798..fafd62263b156bf254de080c5b6227f2f8328cf7 100644
--- a/src/conversion/meshWriter/meshWriter.C
+++ b/src/conversion/meshWriter/meshWriter.C
@@ -29,27 +29,34 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-// Pointers to cell shape models
 const Foam::cellModel* Foam::meshWriter::unknownModel = Foam::cellModeller::
 lookup
 (
     "unknown"
 );
+
+
 const Foam::cellModel* Foam::meshWriter::tetModel = Foam::cellModeller::
 lookup
 (
     "tet"
 );
+
+
 const Foam::cellModel* Foam::meshWriter::pyrModel = Foam::cellModeller::
 lookup
 (
     "pyr"
 );
+
+
 const Foam::cellModel* Foam::meshWriter::prismModel = Foam::cellModeller::
 lookup
 (
     "prism"
 );
+
+
 const Foam::cellModel* Foam::meshWriter::hexModel = Foam::cellModeller::
 lookup
 (
@@ -61,15 +68,9 @@ Foam::string Foam::meshWriter::defaultMeshName = "meshExport";
 Foam::string Foam::meshWriter::defaultSurfaceName = "surfExport";
 
 
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::meshWriter::meshWriter
-(
-    const polyMesh& mesh,
-    const scalar scaleFactor
-)
+Foam::meshWriter::meshWriter(const polyMesh& mesh, const scalar scaleFactor)
 :
     mesh_(mesh),
     scaleFactor_(scaleFactor),
@@ -80,27 +81,10 @@ Foam::meshWriter::meshWriter
 {}
 
 
-// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
-
-
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::meshWriter::~meshWriter()
 {}
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-
 // ************************************************************************* //
diff --git a/src/conversion/meshWriter/meshWriter.H b/src/conversion/meshWriter/meshWriter.H
index 866bd0072ffe4fb2671d8493b7c5c539410c827e..a3ce8fd32a63695ea37a56e0e152bf371cd86657 100644
--- a/src/conversion/meshWriter/meshWriter.H
+++ b/src/conversion/meshWriter/meshWriter.H
@@ -90,8 +90,6 @@ namespace Foam
 
 class meshWriter
 {
-    // Private data
-
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
@@ -100,16 +98,18 @@ class meshWriter
         //- Disallow default bitwise assignment
         void operator=(const meshWriter&);
 
+
 protected:
+
     // Protected data
 
-        //- mesh reference
+        //- Mesh reference
         const polyMesh& mesh_;
 
-        //- scaling factor for points (eg, [m] -> [mm])
+        //- Scaling factor for points (eg, [m] -> [mm])
         scalar scaleFactor_;
 
-        //- write bnd file
+        //- Write bnd file
         bool writeBoundary_;
 
         //- boundaryRegion persistent data saved as a dictionary
@@ -118,7 +118,7 @@ protected:
         //- cellTable persistent data saved as a dictionary
         cellTable cellTable_;
 
-        // cellTable IDs for each cell
+        //- cellTable IDs for each cell
         labelList cellTableId_;
 
         //- Pointers to cell shape models
@@ -128,6 +128,7 @@ protected:
         static const cellModel* prismModel;
         static const cellModel* hexModel;
 
+
 public:
 
     // Static data members
@@ -138,7 +139,7 @@ public:
 
     // Constructors
 
-        //- create a writer obejct
+        //- Ccreate a writer obejct
         meshWriter
         (
             const polyMesh&,
@@ -146,60 +147,46 @@ public:
         );
 
 
-    // Selectors
-
-    // Destructor
-
-        virtual ~meshWriter();
+    //- Destructor
+    virtual ~meshWriter();
 
 
     // Member Functions
 
-        // Access
-
-        // Check
-
         // Edit
 
-        //- set points scaling
-        void scaleFactor(const scalar scaling)
-        {
-            scaleFactor_ = scaling;
-        }
-
-        //- suppress writing bnd file
-        void noBoundary()
-        {
-            writeBoundary_ = false;
-        }
-
-        // Write
-
-        //- write volume mesh
-        //  subclass must to supply this method
-        virtual bool write
-        (
-            const fileName& timeName = fileName::null
-        ) const = 0;
-
-        //- write surface mesh with optional triangulation
-        //  subclass could supply this information
-        virtual bool writeSurface
-        (
-            const fileName& timeName = fileName::null,
-            const bool& triangulate = false
-        ) const
-        {
-            return false;
-        }
+            //- Set points scaling
+            void scaleFactor(const scalar scaling)
+            {
+                scaleFactor_ = scaling;
+            }
 
-    // Member Operators
+            //- Suppress writing bnd file
+            void noBoundary()
+            {
+                writeBoundary_ = false;
+            }
 
-    // Friend Functions
 
-    // Friend Operators
+        // Write
 
-    // IOstream Operators
+            //- Write volume mesh
+            //  subclass must to supply this method
+            virtual bool write
+            (
+                const fileName& timeName = fileName::null
+            ) const = 0;
+
+            //- Write surface mesh with optional triangulation
+            //  subclass could supply this information
+            virtual bool writeSurface
+            (
+                const fileName& timeName = fileName::null,
+                const bool& triangulate = false
+            ) const
+            {
+                return false;
+            }
 };
 
 
@@ -209,10 +196,6 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// #include "meshWriterI.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 #endif
 
 // ************************************************************************* //
diff --git a/src/conversion/meshWriter/starcd/STARCDMeshWriter.C b/src/conversion/meshWriter/starcd/STARCDMeshWriter.C
index f382f096060ab953c91032a8a20686d0bc16495a..3df2eb62e10be89a50be5e5dd058c93f67c569cb 100644
--- a/src/conversion/meshWriter/starcd/STARCDMeshWriter.C
+++ b/src/conversion/meshWriter/starcd/STARCDMeshWriter.C
@@ -32,11 +32,9 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-// special boundary regions
 const char* Foam::meshWriters::STARCD::defaultBoundaryName =
     "Default_Boundary_Region";
 
-// face addressing from foam faces -> pro-STAR faces for primitive shapes
 const Foam::label Foam::meshWriters::STARCD::foamToStarFaceAddr[4][6] =
 {
     { 4, 5, 2, 3, 0, 1 },     // 11 = pro-STAR hex
@@ -174,12 +172,7 @@ void Foam::meshWriters::STARCD::getCellTable()
 }
 
 
-// Prostar 4+ header format
-void Foam::meshWriters::STARCD::writeHeader
-(
-    Ostream& os,
-    const char* filetype
-)
+void Foam::meshWriters::STARCD::writeHeader(Ostream& os, const char* filetype)
 {
     os  << "PROSTAR_" << filetype << nl
         << 4000
@@ -194,10 +187,7 @@ void Foam::meshWriters::STARCD::writeHeader
 }
 
 
-void Foam::meshWriters::STARCD::writePoints
-(
-    const fileName& prefix
-) const
+void Foam::meshWriters::STARCD::writePoints(const fileName& prefix) const
 {
     OFstream os(prefix + ".vrt");
     writeHeader(os, "VERTEX");
@@ -227,10 +217,7 @@ void Foam::meshWriters::STARCD::writePoints
 }
 
 
-void Foam::meshWriters::STARCD::writeCells
-(
-    const fileName& prefix
-) const
+void Foam::meshWriters::STARCD::writeCells(const fileName& prefix) const
 {
     OFstream os(prefix + ".cel");
     writeHeader(os, "CELL");
@@ -372,10 +359,7 @@ void Foam::meshWriters::STARCD::writeCells
 }
 
 
-void Foam::meshWriters::STARCD::writeBoundary
-(
-    const fileName& prefix
-) const
+void Foam::meshWriters::STARCD::writeBoundary(const fileName& prefix) const
 {
     OFstream os(prefix + ".bnd");
     writeHeader(os, "BOUNDARY");
@@ -495,9 +479,6 @@ Foam::meshWriters::STARCD::STARCD
 }
 
 
-// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
-
-
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::meshWriters::STARCD::~STARCD()
@@ -506,10 +487,7 @@ Foam::meshWriters::STARCD::~STARCD()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::meshWriters::STARCD::rmFiles
-(
-    const fileName& baseName
-) const
+void Foam::meshWriters::STARCD::rmFiles(const fileName& baseName) const
 {
     rm(baseName + ".vrt");
     rm(baseName + ".cel");
@@ -518,10 +496,7 @@ void Foam::meshWriters::STARCD::rmFiles
 }
 
 
-bool Foam::meshWriters::STARCD::write
-(
-    const fileName& meshName
-) const
+bool Foam::meshWriters::STARCD::write(const fileName& meshName) const
 {
     fileName baseName(meshName);
 
@@ -748,10 +723,4 @@ bool Foam::meshWriters::STARCD::writeSurface
 }
 
 
-// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/conversion/meshWriter/starcd/STARCDMeshWriter.H b/src/conversion/meshWriter/starcd/STARCDMeshWriter.H
index 1bbdf7dd455642c9d294721ad2889035daba84dd..48efb8dfee4193d8c0d68a89a5d5d336714c4faf 100644
--- a/src/conversion/meshWriter/starcd/STARCDMeshWriter.H
+++ b/src/conversion/meshWriter/starcd/STARCDMeshWriter.H
@@ -64,8 +64,10 @@ class STARCD
     public meshWriter
 {
     // Private Data
+
         static const char* defaultBoundaryName;
 
+
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
@@ -74,22 +76,23 @@ class STARCD
         //- Disallow default bitwise assignment
         void operator=(const STARCD&);
 
-        //- pro-STAR 4+ header format
+        //- Pro-STAR 4+ header format
         static void writeHeader(Ostream&, const char* filetype);
 
-        //- write points
+        //- Write points
         void writePoints(const fileName& baseName) const;
 
-        //- write cells
+        //- Write cells
         void writeCells(const fileName& baseName) const;
 
-        //- write boundary
+        //- Write boundary
         void writeBoundary(const fileName& baseName) const;
 
         void getCellTable();
 
         label findDefaultBoundary() const;
 
+
 public:
 
     // Static data members
@@ -100,68 +103,50 @@ public:
 
     // Constructors
 
-        //- open a file for writing
+        //- Open a file for writing
         STARCD
         (
             const polyMesh&,
             const scalar scaleFactor = 1.0
         );
 
-    // Selectors
 
-    // Destructor
-
-        virtual ~STARCD();
+    //- Destructor
+    virtual ~STARCD();
 
 
     // Member Functions
 
-        // Access
-
-        // Check
-
         // Edit
 
-        // Write
-
+            //- Remove STAR-CD files for the baseName
+            void rmFiles(const fileName& baseName) const;
 
-        //- Remove STAR-CD files for the baseName
-        void rmFiles(const fileName& baseName) const;
-
-        //- write volume mesh
-        virtual bool write
-        (
-            const fileName& meshName = fileName::null
-        ) const;
 
-        //- write surface mesh with optional triangulation
-        virtual bool writeSurface
-        (
-            const fileName& meshName = fileName::null,
-            const bool& triangulate = false
-        ) const;
-
-
-    // Member Operators
-
-    // Friend Functions
-
-    // Friend Operators
+        // Write
 
-    // IOstream Operators
+            //- Write volume mesh
+            virtual bool write
+            (
+                const fileName& meshName = fileName::null
+            ) const;
+
+            //- Write surface mesh with optional triangulation
+            virtual bool writeSurface
+            (
+                const fileName& meshName = fileName::null,
+                const bool& triangulate = false
+            ) const;
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace meshWriters
-
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 #endif
 
 // ************************************************************************* //
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C
index d99e56209dcb23db76a5654c4c0b7c1130f041c5..1b3bf6e19b4f4c6d5190775867b697ebd060e989 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C
@@ -474,7 +474,7 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const
 
     forAll(typEdgeLenSqr, levelI)
     {
-        if (typEdgeLenSqr[levelI] == GREAT2)
+        if (typEdgeLenSqr[levelI] == GREAT2 && maxEdgeLenSqr[levelI] >= 0)
         {
             typEdgeLenSqr[levelI] = maxEdgeLenSqr[levelI];
         }
@@ -496,13 +496,14 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const
 
         if (lenSqr < GREAT2)
         {
-            level0Size = Foam::sqrt(lenSqr)/(1<<levelI);
+            level0Size = Foam::sqrt(lenSqr)*(1<<levelI);
 
             if (debug)
             {
                 Pout<< "hexRef8::getLevel0EdgeLength() :"
                     << " For level:" << levelI
-                    << " found edgeLen:" << level0Size
+                    << " have edgeLen:" << Foam::sqrt(lenSqr)
+                    << " with equivalent level0 len:" << level0Size
                     << endl;
             }
             break;
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/constant/dynamicMeshDict b/tutorials/snappyHexMesh/iglooWithFridges/constant/dynamicMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..20e80e0c878de827737a74b73efe6b54b2997e09
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/constant/dynamicMeshDict
@@ -0,0 +1,52 @@
+// The FOAM Project // File: motionProperties
+/*
+
+-------------------------------------------------------------------------------
+ =========         | dictionary
+ \\      /         |
+  \\    /          | Name:   motionProperties
+   \\  /           | Family: FoamX configuration file
+    \\/            |
+    F ield         | FOAM version: 2.1
+    O peration     | Product of Nabla Ltd.
+    A and          |
+    M anipulation  | Email: Enquiries@Nabla.co.uk
+-------------------------------------------------------------------------------
+*/
+// FoamX Case Dictionary.
+
+version             1.0;
+format              ascii;
+
+root                "/home/warhol/chris/foam/chris2.1/run/Test";
+case                "movingCone";
+instance            "constant";
+local               "";
+
+class               dictionary;
+form                dictionary;
+object              motionProperties;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+//motionSolverLibs ("libfvMotionSolvers.so");
+solver laplacian;
+//solver componentLaplacian x;
+
+twoDMotion          no;
+
+diffusivity  uniform;
+
+//motionPlaneNormal   (0 0 1);
+//
+//movingSurface       yes;
+//
+//twoFluids           no;
+//
+//normalMotionDir     no;
+//
+//motionURF           1.0;
+//
+//boundaryCorrection  yes;
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict b/tutorials/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..f842cbb8fd29fd29913aae1120473ae99b977a35
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict
@@ -0,0 +1,82 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          blockMeshDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+convertToMeters 1;
+
+vertices        
+(
+    (-2.03 -2.0  0)
+    ( 8.03 -2.0  0)
+    ( 8.03  8.0  0)
+    (-2.03  8.0  0)
+    (-2.03 -2.0  5)
+    ( 8.03 -2.0  5)
+    ( 8.03  8.0  5)
+    (-2.03  8.0  5)
+);
+
+blocks          
+(
+    hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
+);
+
+edges           
+(
+);
+
+patches         
+(
+    patch maxY 
+    (
+        (3 7 6 2)
+    )
+    patch minX
+    (
+        (0 4 7 3)
+    )
+    patch maxX
+    (
+        (2 6 5 1)
+    )
+    patch minY
+    (
+        (1 5 4 0)
+    )
+    patch minZ
+    (
+        (0 3 2 1)
+    )
+    patch maxZ
+    (
+        (4 5 6 7)
+    )
+);
+
+mergePatchPairs 
+(
+);
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/constant/transportProperties b/tutorials/snappyHexMesh/iglooWithFridges/constant/transportProperties
new file mode 100644
index 0000000000000000000000000000000000000000..285cbf44dec66cfb171fb6d49ef207c07c9c171c
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/constant/transportProperties
@@ -0,0 +1,28 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          transportProperties;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+nu              nu [0 2 -1 0 0 0 0] 0.01;
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/system/controlDict b/tutorials/snappyHexMesh/iglooWithFridges/system/controlDict
new file mode 100644
index 0000000000000000000000000000000000000000..3303982fb7c5012c5ff147639b9f5ef100ff65b8
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/system/controlDict
@@ -0,0 +1,57 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          controlDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+application icoFoam;
+
+startFrom       latestTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         100;
+
+deltaT          1;
+
+writeControl    timeStep;
+
+writeInterval   1;
+
+purgeWrite      0;
+
+//writeFormat     binary;
+writeFormat     ascii;
+
+writePrecision  7;
+
+writeCompression uncompressed;
+
+timeFormat      general;
+
+timePrecision   6;
+
+runTimeModifiable yes;
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/system/decomposeParDict b/tutorials/snappyHexMesh/iglooWithFridges/system/decomposeParDict
new file mode 100644
index 0000000000000000000000000000000000000000..3b4a5b205deffab12666ad54723790dae3388298
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/system/decomposeParDict
@@ -0,0 +1,66 @@
+// The FOAM Project // File: decomposeParDict
+/*
+-------------------------------------------------------------------------------
+ =========         | dictionary
+ \\      /         | 
+  \\    /          | Name:   decomposeParDict
+   \\  /           | Family: FoamX configuration file
+    \\/            | 
+    F ield         | FOAM version: 2.1
+    O peration     | Product of Nabla Ltd.
+    A and          | 
+    M anipulation  | Email: Enquiries@Nabla.co.uk
+-------------------------------------------------------------------------------
+*/
+// FoamX Case Dictionary.
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
+    case            "cavity";
+    instance        "system";
+    local           "";
+
+    class           dictionary;
+    object          decomposeParDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+arguments       "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam" "cavity";
+
+numberOfSubdomains 6;
+
+method          hierarchical;
+//method          metis;
+//method          parMetis;
+
+simpleCoeffs
+{
+    n               (4 1 1);
+    delta           0.001;
+}
+
+hierarchicalCoeffs
+{
+    n               (3 2 1);
+    delta           0.001;
+    order           xyz;
+}
+
+manualCoeffs
+{
+    dataFile        "cellDecomposition";
+}
+
+metisCoeffs
+{
+    //n                   (5 1 1);
+    //cellWeightsFile     "constant/cellWeightsFile";
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/system/fvSchemes b/tutorials/snappyHexMesh/iglooWithFridges/system/fvSchemes
new file mode 100644
index 0000000000000000000000000000000000000000..b89a35be1338774431bb3d182528a0a97c25cfb3
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/system/fvSchemes
@@ -0,0 +1,71 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          fvSchemes;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         Euler;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+    grad(p)         Gauss linear;
+
+    //snGradCorr(cellMotionU) Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+    div(phi,U)      Gauss linear;
+}
+
+laplacianSchemes
+{
+    default         none;
+    laplacian(nu,U) Gauss linear corrected;
+    laplacian(1|A(U),p) Gauss linear corrected;
+
+    laplacian(diffusivity,cellMotionU) Gauss linear uncorrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+    interpolate(HbyA) linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
+
+fluxRequired
+{
+    default         no;
+    p;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/system/fvSolution b/tutorials/snappyHexMesh/iglooWithFridges/system/fvSolution
new file mode 100644
index 0000000000000000000000000000000000000000..da311c99cdeb045c606d68d29bbbd1b30844fee8
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/system/fvSolution
@@ -0,0 +1,45 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          fvSolution;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+    //p               ICCG 1e-06 0;
+    p               AMG 1e-06 0 10;
+    U               BICCG 1e-05 0;
+
+    // Meshmotion
+    cellMotionU ICCG 1e-6 0.0;
+    cellMotionUx ICCG 1e-6 0.0;
+}
+
+PISO
+{
+    nCorrectors     2;
+    nNonOrthogonalCorrectors 0;
+    pRefCell        0;
+    pRefValue       0;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict b/tutorials/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..3286958275ba390ebf05c410a66003cc6d3a7a64
--- /dev/null
+++ b/tutorials/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict
@@ -0,0 +1,338 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
+    case            "cavity";
+    instance        "system";
+    local           "";
+
+    class           dictionary;
+    object          autoHexMeshDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Which of the steps to run
+castellatedMesh true;
+snap            true;
+addLayers       true;
+
+
+// Geometry. Definition of all surfaces. All surfaces are of class
+// searchableSurface.
+// Surfaces are used
+// - to specify refinement for any mesh cell intersecting it
+// - to specify refinement for any mesh cell inside/outside/near
+// - to 'snap' the mesh boundary to the surface
+geometry
+{
+    fridgeA
+    {
+        type searchableBox;
+        min (2 2 0);
+        max (3 3 2);
+    }
+
+    fridgeB
+    {
+        type searchableBox;
+        min (3.5 3 0);
+        max (4.3 3.8 1.8);
+    }
+
+    igloo
+    {
+        type searchableSphere;
+        centre (3 3 0);
+        radius 4;
+    }
+};
+
+
+
+// Settings for the castellatedMesh generation.
+castellatedMeshControls
+{
+
+    // Refinement parameters
+    // ~~~~~~~~~~~~~~~~~~~~~
+
+    // While refining maximum number of cells per processor. This is basically
+    // the number of cells that fit on a processor. If you choose this too small
+    // it will do just more refinement iterations to obtain a similar mesh.
+    maxLocalCells 1000000;
+
+    // Overall cell limit (approximately). Refinement will stop immediately
+    // upon reaching this number so a refinement level might not complete.
+    // Note that this is the number of cells before removing the part which
+    // is not 'visible' from the keepPoint. The final number of cells might
+    // 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)
+    minRefinementCells 0;
+
+    // Number of buffer layers between different levels.
+    // 1 means normal 2:1 refinement restriction, larger means slower
+    // refinement.
+    nCellsBetweenLevels 1;
+
+
+
+    // Explicit feature edge refinement
+    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    // Specifies a level for any cell intersected by its edges.
+    // This is a featureEdgeMesh, read from constant/triSurface for now.
+    features
+    (
+        //{
+        //    file "someLine.eMesh";
+        //    level 2;
+        //}
+    );
+
+
+
+    // Surface based refinement
+    // ~~~~~~~~~~~~~~~~~~~~~~~~
+
+    // Specifies two levels for every surface. The first is the minimum level,
+    // every cell intersecting a surface gets refined up to the minimum level.
+    // The second level is the maximum level. Cells that 'see' multiple
+    // intersections where the intersections make an
+    // angle > resolveFeatureAngle get refined up to the maximum level.
+
+    refinementSurfaces
+    {
+        fridgeA
+        {
+            // Surface-wise min and max refinement level
+            level (2 2);
+        }
+        fridgeB
+        {
+            // Surface-wise min and max refinement level
+            level (2 2);
+        }
+        igloo
+        {
+            // Surface-wise min and max refinement level
+            level (1 1);
+        }
+    }
+
+    // Resolve sharp angles on fridges
+    resolveFeatureAngle 60;
+
+
+    // Region-wise refinement
+    // ~~~~~~~~~~~~~~~~~~~~~~
+
+    // Specifies refinement level for cells in relation to a surface. One of
+    // three modes
+    // - distance. 'levels' specifies per distance to the surface the
+    //   wanted refinement level. The distances need to be specified in
+    //   descending order.
+    // - inside. 'levels' is only one entry and only the level is used. All
+    //   cells inside the surface get refined up to the level. The surface
+    //   needs to be closed for this to be possible.
+    // - outside. Same but cells outside.
+
+    refinementRegions
+    {
+    }
+
+
+    // Mesh selection
+    // ~~~~~~~~~~~~~~
+
+    // After refinement patches get added for all refinementSurfaces and
+    // all cells intersecting the surfaces get put into these patches. The
+    // section reachable from the locationInMesh is kept.
+    // NOTE: This point should never be on a face, always inside a cell, even
+    // after refinement.
+    locationInMesh (3 0.28 0.43);
+}
+
+
+
+// Settings for the snapping.
+snapControls
+{
+    //- Number of patch smoothing iterations before finding correspondence
+    //  to surface
+    nSmoothPatch 3;
+
+    //- Relative distance for points to be attracted by surface feature point
+    //  or edge. True distance is this factor times local
+    //  maximum edge length.
+    tolerance 4.0;
+
+    //- Number of mesh displacement relaxation iterations.
+    nSolveIter 30;
+
+    //- Maximum number of snapping relaxation iterations. Should stop
+    //  before upon reaching a correct mesh.
+    nRelaxIter 5;
+}
+
+
+
+// Settings for the layer addition.
+addLayersControls
+{
+    // Per final patch (so not geometry!) the layer information
+    layers
+    {
+        fridgeA_region0
+        {
+            nSurfaceLayers 1;
+        }
+        fridgeB_region0
+        {
+            nSurfaceLayers 1;
+        }
+        igloo_region0
+        {
+            nSurfaceLayers 1;
+        }
+    }
+
+    // Expansion factor for layer mesh
+    expansionRatio 1.0;
+
+    //- Wanted thickness of final added cell layer. If multiple layers
+    //  is the
+    //  thickness of the layer furthest away from the wall.
+    //  Relative to undistorted size of cell outside layer.
+    finalLayerRatio 0.5; 
+
+    //- Minimum thickness of cell layer. If for any reason layer
+    //  cannot be above minThickness do not add layer.
+    //  Relative to undistorted size of cell outside layer.
+    minThickness 0.25;
+
+    //- If points get not extruded do nGrow layers of connected faces that are
+    //  also not grown. This helps convergence of the layer addition process
+    //  close to features.
+    nGrow 0;
+
+
+    // Advanced settings
+
+    //- When not to extrude surface. 0 is flat surface, 90 is when two faces
+    //  make straight angle.
+    featureAngle 60;
+
+    //- Maximum number of snapping relaxation iterations. Should stop
+    //  before upon reaching a correct mesh.
+    nRelaxIter 5;
+
+    // Number of smoothing iterations of surface normals 
+    nSmoothSurfaceNormals 1;
+
+    // Number of smoothing iterations of interior mesh movement direction  
+    nSmoothNormals 3;
+
+    // Smooth layer thickness over surface patches
+    nSmoothThickness 10;
+
+    // Stop layer growth on highly warped cells 
+    maxFaceThicknessRatio 0.5;
+
+    // Reduce layer growth where ratio thickness to medial 
+    // distance is large 
+    maxThicknessToMedialRatio 0.3;
+
+    // Angle used to pick up medial axis points
+    minMedianAxisAngle 130;
+
+    // Create buffer region for new layer terminations
+    nBufferCellsNoExtrude 0;
+}
+
+
+
+// Generic mesh quality settings. At any undoable phase these determine
+// where to undo.
+meshQualityControls
+{
+    //- Maximum non-orthogonality allowed. Set to 180 to disable.
+    maxNonOrtho 65;
+
+    //- Max skewness allowed. Set to <0 to disable.
+    maxBoundarySkewness 20;
+    maxInternalSkewness 4;
+
+    //- Max concaveness allowed. Is angle (in degrees) below which concavity
+    //  is allowed. 0 is straight face, <0 would be convex face.
+    //  Set to 180 to disable.
+    maxConcave 80;
+
+    //- Minimum projected area v.s. actual area. Set to -1 to disable.
+    minFlatness 0.5;
+
+    //- Minimum pyramid volume. Is absolute volume of cell pyramid.
+    //  Set to very negative number (e.g. -1E30) to disable.
+    minVol 1e-13;
+
+    //- Minimum face area. Set to <0 to disable.
+    minArea -1;
+
+    //- Minimum face twist. Set to <-1 to disable. dot product of face normal
+    //- and face centre triangles normal
+    minTwist 0.05;
+
+    //- minimum normalised cell determinant
+    //- 1 = hex, <= 0 = folded or flattened illegal cell
+    minDeterminant 0.001;
+
+    //- minFaceWeight (0 -> 0.5) 
+    minFaceWeight 0.05;
+
+    //- minVolRatio (0 -> 1)
+    minVolRatio 0.01;
+
+    //must be >0 for Fluent compatibility
+    minTriangleTwist -1;
+
+
+    // Advanced
+
+    //- Number of error distribution iterations
+    nSmoothScale 4;
+    //- amount to scale back displacement at error points
+    errorReduction 0.75;
+}
+
+
+// Advanced
+
+// Flags for optional output
+// 0 : only write final meshes
+// 1 : write intermediate meshes
+// 2 : write volScalarField with cellLevel for postprocessing
+// 4 : write current intersections as .obj files
+debug 0;
+
+
+// Merge tolerance. Is fraction of overall bounding box of initial mesh.
+// Note: the write tolerance needs to be higher than this.
+mergeTolerance 1E-6;
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/constant/dynamicMeshDict b/tutorials/snappyHexMesh/motorBike/constant/dynamicMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..20e80e0c878de827737a74b73efe6b54b2997e09
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/constant/dynamicMeshDict
@@ -0,0 +1,52 @@
+// The FOAM Project // File: motionProperties
+/*
+
+-------------------------------------------------------------------------------
+ =========         | dictionary
+ \\      /         |
+  \\    /          | Name:   motionProperties
+   \\  /           | Family: FoamX configuration file
+    \\/            |
+    F ield         | FOAM version: 2.1
+    O peration     | Product of Nabla Ltd.
+    A and          |
+    M anipulation  | Email: Enquiries@Nabla.co.uk
+-------------------------------------------------------------------------------
+*/
+// FoamX Case Dictionary.
+
+version             1.0;
+format              ascii;
+
+root                "/home/warhol/chris/foam/chris2.1/run/Test";
+case                "movingCone";
+instance            "constant";
+local               "";
+
+class               dictionary;
+form                dictionary;
+object              motionProperties;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+//motionSolverLibs ("libfvMotionSolvers.so");
+solver laplacian;
+//solver componentLaplacian x;
+
+twoDMotion          no;
+
+diffusivity  uniform;
+
+//motionPlaneNormal   (0 0 1);
+//
+//movingSurface       yes;
+//
+//twoFluids           no;
+//
+//normalMotionDir     no;
+//
+//motionURF           1.0;
+//
+//boundaryCorrection  yes;
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/constant/polyMesh/blockMeshDict b/tutorials/snappyHexMesh/motorBike/constant/polyMesh/blockMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..ec09ef5e88716142e00b669e4438a3a42f17e5f4
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/constant/polyMesh/blockMeshDict
@@ -0,0 +1,82 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          blockMeshDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+convertToMeters 1;
+
+vertices        
+(
+    (-20.29 -10  -4.232e-05)
+    ( 41.71 -10  -4.232e-05)
+    ( 41.71  10  -4.232e-05)
+    (-20.29  10  -4.232e-05)
+    (-20.29 -10   20)
+    ( 41.71 -10   20)
+    ( 41.71  10   20)
+    (-20.29  10   20)
+);
+
+blocks          
+(
+    hex (0 1 2 3 4 5 6 7) (60 20 20) simpleGrading (1 1 1)
+);
+
+edges           
+(
+);
+
+patches         
+(
+    patch maxY 
+    (
+        (3 7 6 2)
+    )
+    patch minX
+    (
+        (0 4 7 3)
+    )
+    patch maxX
+    (
+        (2 6 5 1)
+    )
+    patch minY
+    (
+        (1 5 4 0)
+    )
+    patch minZ
+    (
+        (0 3 2 1)
+    )
+    patch maxZ
+    (
+        (4 5 6 7)
+    )
+);
+
+mergePatchPairs 
+(
+);
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/constant/transportProperties b/tutorials/snappyHexMesh/motorBike/constant/transportProperties
new file mode 100644
index 0000000000000000000000000000000000000000..285cbf44dec66cfb171fb6d49ef207c07c9c171c
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/constant/transportProperties
@@ -0,0 +1,28 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          transportProperties;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+nu              nu [0 2 -1 0 0 0 0] 0.01;
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/constant/triSurface/motorBike.stl b/tutorials/snappyHexMesh/motorBike/constant/triSurface/motorBike.stl
new file mode 100644
index 0000000000000000000000000000000000000000..ea9666fcf2db9cb1f0237ee80849acabf6b67dcf
Binary files /dev/null and b/tutorials/snappyHexMesh/motorBike/constant/triSurface/motorBike.stl differ
diff --git a/tutorials/snappyHexMesh/motorBike/system/controlDict b/tutorials/snappyHexMesh/motorBike/system/controlDict
new file mode 100644
index 0000000000000000000000000000000000000000..3303982fb7c5012c5ff147639b9f5ef100ff65b8
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/system/controlDict
@@ -0,0 +1,57 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          controlDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+application icoFoam;
+
+startFrom       latestTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         100;
+
+deltaT          1;
+
+writeControl    timeStep;
+
+writeInterval   1;
+
+purgeWrite      0;
+
+//writeFormat     binary;
+writeFormat     ascii;
+
+writePrecision  7;
+
+writeCompression uncompressed;
+
+timeFormat      general;
+
+timePrecision   6;
+
+runTimeModifiable yes;
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/system/decomposeParDict b/tutorials/snappyHexMesh/motorBike/system/decomposeParDict
new file mode 100644
index 0000000000000000000000000000000000000000..3b4a5b205deffab12666ad54723790dae3388298
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/system/decomposeParDict
@@ -0,0 +1,66 @@
+// The FOAM Project // File: decomposeParDict
+/*
+-------------------------------------------------------------------------------
+ =========         | dictionary
+ \\      /         | 
+  \\    /          | Name:   decomposeParDict
+   \\  /           | Family: FoamX configuration file
+    \\/            | 
+    F ield         | FOAM version: 2.1
+    O peration     | Product of Nabla Ltd.
+    A and          | 
+    M anipulation  | Email: Enquiries@Nabla.co.uk
+-------------------------------------------------------------------------------
+*/
+// FoamX Case Dictionary.
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
+    case            "cavity";
+    instance        "system";
+    local           "";
+
+    class           dictionary;
+    object          decomposeParDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+arguments       "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam" "cavity";
+
+numberOfSubdomains 6;
+
+method          hierarchical;
+//method          metis;
+//method          parMetis;
+
+simpleCoeffs
+{
+    n               (4 1 1);
+    delta           0.001;
+}
+
+hierarchicalCoeffs
+{
+    n               (3 2 1);
+    delta           0.001;
+    order           xyz;
+}
+
+manualCoeffs
+{
+    dataFile        "cellDecomposition";
+}
+
+metisCoeffs
+{
+    //n                   (5 1 1);
+    //cellWeightsFile     "constant/cellWeightsFile";
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/system/fvSchemes b/tutorials/snappyHexMesh/motorBike/system/fvSchemes
new file mode 100644
index 0000000000000000000000000000000000000000..b89a35be1338774431bb3d182528a0a97c25cfb3
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/system/fvSchemes
@@ -0,0 +1,71 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          fvSchemes;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         Euler;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+    grad(p)         Gauss linear;
+
+    //snGradCorr(cellMotionU) Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+    div(phi,U)      Gauss linear;
+}
+
+laplacianSchemes
+{
+    default         none;
+    laplacian(nu,U) Gauss linear corrected;
+    laplacian(1|A(U),p) Gauss linear corrected;
+
+    laplacian(diffusivity,cellMotionU) Gauss linear uncorrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+    interpolate(HbyA) linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
+
+fluxRequired
+{
+    default         no;
+    p;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/system/fvSolution b/tutorials/snappyHexMesh/motorBike/system/fvSolution
new file mode 100644
index 0000000000000000000000000000000000000000..da311c99cdeb045c606d68d29bbbd1b30844fee8
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/system/fvSolution
@@ -0,0 +1,45 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "";
+    case            "";
+    instance        "";
+    local           "";
+
+    class           dictionary;
+    object          fvSolution;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+    //p               ICCG 1e-06 0;
+    p               AMG 1e-06 0 10;
+    U               BICCG 1e-05 0;
+
+    // Meshmotion
+    cellMotionU ICCG 1e-6 0.0;
+    cellMotionUx ICCG 1e-6 0.0;
+}
+
+PISO
+{
+    nCorrectors     2;
+    nNonOrthogonalCorrectors 0;
+    pRefCell        0;
+    pRefValue       0;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/snappyHexMesh/motorBike/system/snappyHexMeshDict b/tutorials/snappyHexMesh/motorBike/system/snappyHexMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..5e206f019fbcf678879318406b14e14f58e5492a
--- /dev/null
+++ b/tutorials/snappyHexMesh/motorBike/system/snappyHexMeshDict
@@ -0,0 +1,585 @@
+/*---------------------------------------------------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  1.0                                   |
+|   \\  /    A nd           | Web:      http://www.openfoam.org               |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+FoamFile
+{
+    version         2.0;
+    format          ascii;
+
+    root            "/home/penfold/mattijs/foam/mattijs2.1/run/icoFoam";
+    case            "cavity";
+    instance        "system";
+    local           "";
+
+    class           dictionary;
+    object          autoHexMeshDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Which of the steps to run
+castellatedMesh true;
+snap            true;
+addLayers       true;
+
+
+// Geometry. Definition of all surfaces. All surfaces are of class
+// searchableSurface.
+// Surfaces are used
+// - to specify refinement for any mesh cell intersecting it
+// - to specify refinement for any mesh cell inside/outside/near
+// - to 'snap' the mesh boundary to the surface
+geometry
+{
+    motorBike.stl
+    {
+        type triSurfaceMesh;
+        name motorBike;
+    }
+
+    refinementBox
+    {
+        type searchableBox;
+        min (-0.3 -0.4 -0.1);
+        max ( 3.0  0.4  1.4);
+    }
+};
+
+
+
+// Settings for the castellatedMesh generation.
+castellatedMeshControls
+{
+
+    // Refinement parameters
+    // ~~~~~~~~~~~~~~~~~~~~~
+
+    // While refining maximum number of cells per processor. This is basically
+    // the number of cells that fit on a processor. If you choose this too small
+    // it will do just more refinement iterations to obtain a similar mesh.
+    maxLocalCells 1000000;
+
+    // Overall cell limit (approximately). Refinement will stop immediately
+    // upon reaching this number so a refinement level might not complete.
+    // Note that this is the number of cells before removing the part which
+    // is not 'visible' from the keepPoint. The final number of cells might
+    // 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)
+    minRefinementCells 10;
+
+    // Number of buffer layers between different levels.
+    // 1 means normal 2:1 refinement restriction, larger means slower
+    // refinement.
+    nCellsBetweenLevels 2;
+
+
+
+    // Explicit feature edge refinement
+    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    // Specifies a level for any cell intersected by its edges.
+    // This is a featureEdgeMesh, read from constant/triSurface for now.
+    features
+    (
+        //{
+        //    file "someLine.eMesh";
+        //    level 2;
+        //}
+    );
+
+
+
+    // Surface based refinement
+    // ~~~~~~~~~~~~~~~~~~~~~~~~
+
+    // Specifies two levels for every surface. The first is the minimum level,
+    // every cell intersecting a surface gets refined up to the minimum level.
+    // The second level is the maximum level. Cells that 'see' multiple
+    // intersections where the intersections make an
+    // angle > resolveFeatureAngle get refined up to the maximum level.
+
+    refinementSurfaces
+    {
+        motorBike
+        {
+            // Surface-wise min and max refinement level
+            level (5 6);
+        }
+    }
+
+    // Resolve sharp angles
+    resolveFeatureAngle 30;
+
+
+    // Region-wise refinement
+    // ~~~~~~~~~~~~~~~~~~~~~~
+
+    // Specifies refinement level for cells in relation to a surface. One of
+    // three modes
+    // - distance. 'levels' specifies per distance to the surface the
+    //   wanted refinement level. The distances need to be specified in
+    //   descending order.
+    // - inside. 'levels' is only one entry and only the level is used. All
+    //   cells inside the surface get refined up to the level. The surface
+    //   needs to be closed for this to be possible.
+    // - outside. Same but cells outside.
+
+    refinementRegions
+    {
+        refinementBox
+        {
+            mode inside;
+            levels ((1E15 4));
+        }
+    }
+
+
+    // Mesh selection
+    // ~~~~~~~~~~~~~~
+
+    // After refinement patches get added for all refinementSurfaces and
+    // all cells intersecting the surfaces get put into these patches. The
+    // section reachable from the locationInMesh is kept.
+    // NOTE: This point should never be on a face, always inside a cell, even
+    // after refinement.
+    locationInMesh (3 3 0.43);
+}
+
+
+
+// Settings for the snapping.
+snapControls
+{
+    //- Number of patch smoothing iterations before finding correspondence
+    //  to surface
+    nSmoothPatch 3;
+
+    //- Relative distance for points to be attracted by surface feature point
+    //  or edge. True distance is this factor times local
+    //  maximum edge length.
+    tolerance 4.0;
+
+    //- Number of mesh displacement relaxation iterations.
+    nSolveIter 30;
+
+    //- Maximum number of snapping relaxation iterations. Should stop
+    //  before upon reaching a correct mesh.
+    nRelaxIter 5;
+}
+
+
+
+// Settings for the layer addition.
+addLayersControls
+{
+    // Per final patch (so not geometry!) the layer information
+    layers
+    {
+        minZ
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_frt-fairing:001%1
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_windshield:002%2
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-rim:005%5
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-rim:010%10
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-wh-rim:011%11
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-wh-brake-disk:012%12
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_frame:016-shadow%13
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-susp:014%14
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-susp:014-shadow%15
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_frame:016%16
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-rim:005-shadow%17
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-chain-hub:022%22
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rearseat%24
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_frt-fairing%25
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_windshield%26
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_headlights%27
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_driversseat%28
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-body%29
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fuel-tank%30
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_exhaust%31
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-rim%32
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-mud-guard%33
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-wh-rim%34
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-wh-brake-disk%35
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-brake-caliper%36
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-wh-tyre%37
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_hbars%38
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-forks%39
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_chain%40
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-tyre%41
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_square-dial%42
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_round-dial%43
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_dial-holder%44
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-susp%45
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-brake-lights%46
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-light-bracket%47
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_frame%48
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-mud-guard%49
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-susp-spring-damp%50
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fairing-inner-plate%51
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_clutch-housing%52
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_radiator%53
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_water-pipe%54
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_water-pump%55
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_engine%56
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-shock-link%57
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-brake-fluid-pot-bracket%58
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-brake-fluid-pot%59
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_footpeg%60
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-chain-hub%61
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-brake-caliper%62
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rider-helmet%65
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rider-visor%66
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rider-boots%67
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rider-gloves%68
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rider-body%69
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_frame:0%70
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_frt-fairing:001-shadow%74
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_windshield-shadow%75
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-mud-guard-shadow%81
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_fr-wh-brake-disk-shadow%83
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-mud-guard-shadow%84
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-susp-spring-damp-shadow%85
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_radiator-shadow%86
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-shock-link-shadow%87
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rear-brake-fluid-pot-bracket-shadow%88
+        {
+            nSurfaceLayers 1;
+        }
+        motorBike_rr-wh-chain-hub-shadow%89
+        {
+            nSurfaceLayers 1;
+        }
+    }
+
+    // Expansion factor for layer mesh
+    expansionRatio 1.0;
+
+    //- Wanted thickness of final added cell layer. If multiple layers
+    //  is the
+    //  thickness of the layer furthest away from the wall.
+    //  Relative to undistorted size of cell outside layer.
+    finalLayerRatio 0.3; 
+
+    //- Minimum thickness of cell layer. If for any reason layer
+    //  cannot be above minThickness do not add layer.
+    //  Relative to undistorted size of cell outside layer.
+    minThickness 0.1;
+
+    //- If points get not extruded do nGrow layers of connected faces that are
+    //  also not grown. This helps convergence of the layer addition process
+    //  close to features.
+    nGrow 1;
+
+
+    // Advanced settings
+
+    //- When not to extrude surface. 0 is flat surface, 90 is when two faces
+    //  make straight angle.
+    featureAngle 30;
+
+    //- Maximum number of snapping relaxation iterations. Should stop
+    //  before upon reaching a correct mesh.
+    nRelaxIter 3;
+
+    // Number of smoothing iterations of surface normals 
+    nSmoothSurfaceNormals 1;
+
+    // Number of smoothing iterations of interior mesh movement direction  
+    nSmoothNormals 3;
+
+    // Smooth layer thickness over surface patches
+    nSmoothThickness 10;
+
+    // Stop layer growth on highly warped cells 
+    maxFaceThicknessRatio 0.5;
+
+    // Reduce layer growth where ratio thickness to medial 
+    // distance is large 
+    maxThicknessToMedialRatio 0.3;
+
+    // Angle used to pick up medial axis points
+    minMedianAxisAngle 130;
+
+    // Create buffer region for new layer terminations
+    nBufferCellsNoExtrude 0;
+}
+
+
+
+// Generic mesh quality settings. At any undoable phase these determine
+// where to undo.
+meshQualityControls
+{
+    //- Maximum non-orthogonality allowed. Set to 180 to disable.
+    maxNonOrtho 65;
+
+    //- Max skewness allowed. Set to <0 to disable.
+    maxBoundarySkewness 20;
+    maxInternalSkewness 4;
+
+    //- Max concaveness allowed. Is angle (in degrees) below which concavity
+    //  is allowed. 0 is straight face, <0 would be convex face.
+    //  Set to 180 to disable.
+    maxConcave 80;
+
+    //- Minimum projected area v.s. actual area. Set to -1 to disable.
+    minFlatness 0.5;
+
+    //- Minimum pyramid volume. Is absolute volume of cell pyramid.
+    //  Set to very negative number (e.g. -1E30) to disable.
+    minVol 1e-13;
+
+    //- Minimum face area. Set to <0 to disable.
+    minArea -1;
+
+    //- Minimum face twist. Set to <-1 to disable. dot product of face normal
+    //- and face centre triangles normal
+    minTwist 0.02;
+
+    //- minimum normalised cell determinant
+    //- 1 = hex, <= 0 = folded or flattened illegal cell
+    minDeterminant 0.001;
+
+    //- minFaceWeight (0 -> 0.5) 
+    minFaceWeight 0.02;
+
+    //- minVolRatio (0 -> 1)
+    minVolRatio 0.01;
+
+    //must be >0 for Fluent compatibility
+    minTriangleTwist -1;
+
+
+    // Advanced
+
+    //- Number of error distribution iterations
+    nSmoothScale 4;
+    //- amount to scale back displacement at error points
+    errorReduction 0.75;
+}
+
+
+// Advanced
+
+// Flags for optional output
+// 0 : only write final meshes
+// 1 : write intermediate meshes
+// 2 : write volScalarField with cellLevel for postprocessing
+// 4 : write current intersections as .obj files
+debug 0;
+
+
+// Merge tolerance. Is fraction of overall bounding box of initial mesh.
+// Note: the write tolerance needs to be higher than this.
+mergeTolerance 1E-6;
+
+
+// ************************************************************************* //