diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C
index 84f334f18bb550748c6d27dcc96ff609590202e0..c9134d6530ef56bfda8a03f0b208fcf1692ec6ff 100644
--- a/src/OpenFOAM/db/Time/TimeIO.C
+++ b/src/OpenFOAM/db/Time/TimeIO.C
@@ -163,115 +163,6 @@ void Foam::Time::readDict()
     }
 
 
-
-    //{
-    //    // fundamentalConstants.C
-    //    Info<< "constant::universal::hr:"
-    //        << Foam::constant::universal::hr
-    //        << endl;
-    //    Info<< "constant::universal::c:"
-    //        << Foam::constant::universal::c
-    //        << endl;
-    //    Info<< "constant::universal::G:"
-    //        << Foam::constant::universal::G
-    //        << endl;
-    //    Info<< "constant::universal::h:"
-    //        << Foam::constant::universal::h
-    //        << endl;
-    //    Info<< "constant::electromagnetic::e:"
-    //        << Foam::constant::electromagnetic::e
-    //        << endl;
-    //    Info<< "constant::atomic::me:"
-    //        << Foam::constant::atomic::me
-    //        << endl;
-    //    Info<< "constant::atomic::mp:"
-    //        << Foam::constant::atomic::mp
-    //        << endl;
-    //    Info<< "constant::physicoChemical::mu:"
-    //        << Foam::constant::physicoChemical::mu
-    //        << endl;
-    //    Info<< "constant::physicoChemical::NA:"
-    //        << Foam::constant::physicoChemical::NA
-    //        << endl;
-    //    Info<< "constant::physicoChemical::k:"
-    //        << Foam::constant::physicoChemical::k
-    //        << endl;
-    //    Info<< "constant::standard::Pstd:"
-    //        << Foam::constant::standard::Pstd
-    //        << endl;
-    //    Info<< "constant::standard::Tstd:"
-    //        << Foam::constant::standard::Tstd
-    //        << endl;
-    //
-    //    // universalConstants.C
-    //    Info<< "constant::universal::hr:"
-    //        << Foam::constant::universal::hr
-    //        << endl;
-    //
-    //    // electromagneticConstants.C
-    //    Info<< "constant::electromagnetic::mu0:"
-    //        << Foam::constant::electromagnetic::mu0
-    //        << endl;
-    //    Info<< "constant::electromagnetic::epsilon0:"
-    //        << Foam::constant::electromagnetic::epsilon0
-    //        << endl;
-    //    Info<< "constant::electromagnetic::Z0:"
-    //        << Foam::constant::electromagnetic::Z0
-    //        << endl;
-    //    Info<< "constant::electromagnetic::kappa:"
-    //        << Foam::constant::electromagnetic::kappa
-    //        << endl;
-    //    Info<< "constant::electromagnetic::G0:"
-    //        << Foam::constant::electromagnetic::G0
-    //        << endl;
-    //    Info<< "constant::electromagnetic::KJ:"
-    //        << Foam::constant::electromagnetic::KJ
-    //        << endl;
-    //    Info<< "constant::electromagnetic::RK:"
-    //        << Foam::constant::electromagnetic::RK
-    //        << endl;
-    //
-    //
-    //    // atomicConstants.C
-    //    Info<< "constant::atomic::alpha:"
-    //        << Foam::constant::atomic::alpha
-    //        << endl;
-    //    Info<< "constant::atomic::Rinf:"
-    //        << Foam::constant::atomic::Rinf
-    //        << endl;
-    //    Info<< "constant::atomic::a0:"
-    //        << Foam::constant::atomic::a0
-    //        << endl;
-    //    Info<< "constant::physiatomic::re:"
-    //        << Foam::constant::atomic::re
-    //        << endl;
-    //    Info<< "constant::atomic::Eh:"
-    //        << Foam::constant::atomic::Eh
-    //        << endl;
-    //
-    //
-    //    // physicoChemicalConstants.C
-    //    Info<< "constant::physicoChemical::R:"
-    //        << Foam::constant::physicoChemical::R
-    //        << endl;
-    //    Info<< "constant::physicoChemical::F:"
-    //        << Foam::constant::physicoChemical::F
-    //        << endl;
-    //    Info<< "constant::physicoChemical::sigma:"
-    //        << Foam::constant::physicoChemical::sigma
-    //        << endl;
-    //    Info<< "constant::physicoChemical::b:"
-    //        << Foam::constant::physicoChemical::b
-    //        << endl;
-    //    Info<< "constant::physicoChemical::c1:"
-    //        << Foam::constant::physicoChemical::c1
-    //        << endl;
-    //    Info<< "constant::physicoChemical::c2:"
-    //        << Foam::constant::physicoChemical::c2
-    //        << endl;
-    //}
-
-
     // Dimension sets
     if (controlDict_.found("DimensionSets"))
     {
@@ -302,7 +193,6 @@ void Foam::Time::readDict()
     }
 
 
-
     if (!deltaTchanged_)
     {
         deltaT_ = readScalar(controlDict_.lookup("deltaT"));
diff --git a/src/dynamicMesh/motionSolver/motionSolver/motionSolver.C b/src/dynamicMesh/motionSolver/motionSolver/motionSolver.C
index c6b60e67ec73083e180c8358633a19b2757ff185..01f37cbf62247749acc5cdf0b650df385a2c795a 100644
--- a/src/dynamicMesh/motionSolver/motionSolver/motionSolver.C
+++ b/src/dynamicMesh/motionSolver/motionSolver/motionSolver.C
@@ -69,7 +69,7 @@ Foam::motionSolver::motionSolver(const polyMesh& mesh)
             mesh.time().constant(),
             mesh,
             IOobject::MUST_READ_IF_MODIFIED,
-            IOobject::NO_WRITE
+            IOobject::AUTO_WRITE
         )
     ),
     mesh_(mesh)
@@ -146,7 +146,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh)
             mesh.time().constant(),
             mesh,
             IOobject::MUST_READ_IF_MODIFIED,
-            IOobject::NO_WRITE
+            IOobject::AUTO_WRITE
         )
     );
 
@@ -179,4 +179,15 @@ void Foam::motionSolver::updateMesh(const mapPolyMesh& mpm)
 {}
 
 
+bool Foam::motionSolver::writeObject
+(
+    IOstream::streamFormat fmt,
+    IOstream::versionNumber ver,
+    IOstream::compressionType cmp
+) const
+{
+    return true;
+}
+
+
 // ************************************************************************* //
diff --git a/src/dynamicMesh/motionSolver/motionSolver/motionSolver.H b/src/dynamicMesh/motionSolver/motionSolver/motionSolver.H
index 8cae4820606868fddbfcd04dac90a3b176d1178e..7a53d4e81d7bd7582bd4a0195cb7772f76f4452f 100644
--- a/src/dynamicMesh/motionSolver/motionSolver/motionSolver.H
+++ b/src/dynamicMesh/motionSolver/motionSolver/motionSolver.H
@@ -148,6 +148,14 @@ public:
 
         //-  Update local data for topology changes
         virtual void updateMesh(const mapPolyMesh&) = 0;
+
+        //- Write state using given format, version and compression
+        virtual bool writeObject
+        (
+            IOstream::streamFormat fmt,
+            IOstream::versionNumber ver,
+            IOstream::compressionType cmp
+        ) const;
 };
 
 
diff --git a/src/sixDoFRigidBodyMotion/Make/files b/src/sixDoFRigidBodyMotion/Make/files
index 7ceb41d544ec2e2203132a9bea7893cb67ed3142..022baa43df6e0ebe4c8f36a2193cf8ca7c56418c 100644
--- a/src/sixDoFRigidBodyMotion/Make/files
+++ b/src/sixDoFRigidBodyMotion/Make/files
@@ -26,5 +26,7 @@ pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacement
 pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
 
 sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
+sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C
+sixDoFRigidBodyMotionSolver/pointPatchDist.C
 
 LIB = $(FOAM_LIBBIN)/libsixDoFRigidBodyMotion
diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
index 75af41d304aa3dd77fe049bcdc9913430078d7fc..559b3cc1752c890b2ce9682cfe50616b7f7bea01 100644
--- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
+++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
@@ -66,7 +66,7 @@ sixDoFRigidBodyDisplacementPointPatchVectorField
 )
 :
     fixedValuePointPatchField<vector>(p, iF, dict),
-    motion_(dict),
+    motion_(dict, dict),
     rhoInf_(1.0),
     rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")),
     lookupGravity_(-1),
diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
index 4d717b0f8b8ab214a6d6ff1d0ba8487fe17dc756..aaae3592221f01318d9c20ac01cb3f906f5d030a 100644
--- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
+++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
@@ -60,7 +60,7 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
 )
 :
     fixedValuePointPatchField<vector>(p, iF, dict),
-    motion_(dict)
+    motion_(dict, dict)
 {
     if (!dict.found("value"))
     {
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
index 492b88752c0d48dda341cc1e3c3af34e6bf4559c..6f002c5e2fec80cf2d5113c0de2b817a89db08b5 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
@@ -223,9 +223,13 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
 {}
 
 
-Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const dictionary& dict)
+Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
+(
+    const dictionary& dict,
+    const dictionary& stateDict
+)
 :
-    motionState_(dict),
+    motionState_(stateDict),
     motionState0_(motionState_),
     restraints_(),
     restraintNames_(),
@@ -234,11 +238,19 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const dictionary& dict)
     maxConstraintIterations_(0),
     initialCentreOfMass_
     (
-        dict.lookupOrDefault("initialCentreOfMass", centreOfMass())
+        dict.lookupOrDefault
+        (
+            "initialCentreOfMass",
+            vector(dict.lookup("centreOfMass"))
+        )
     ),
     initialQ_
     (
-        dict.lookupOrDefault("initialOrientation", Q())
+        dict.lookupOrDefault
+        (
+            "initialOrientation",
+            dict.lookupOrDefault("orientation", I)
+        )
     ),
     momentOfInertia_(dict.lookup("momentOfInertia")),
     mass_(readScalar(dict.lookup("mass"))),
@@ -247,7 +259,6 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const dictionary& dict)
     report_(dict.lookupOrDefault<Switch>("report", false))
 {
     addRestraints(dict);
-
     addConstraints(dict);
 }
 
@@ -404,7 +415,7 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration
     scalar deltaT
 )
 {
-    static bool first = true;
+    static bool first = false;
 
     // Second leapfrog velocity adjust part, required after motion and
     // acceleration calculation
@@ -553,6 +564,8 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::scaledPosition
     const scalarField& scale
 ) const
 {
+    Info<< "initialCentreOfMass " << initialCentreOfMass() << endl;
+
     // Calculate the transformation septerion from the initial state
     septernion s
     (
@@ -565,12 +578,24 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::scaledPosition
 
     forAll(points, pointi)
     {
-        //- Slerp septernion
-        septernion ss(slerp(septernion::I, s, scale[pointi]));
+        // Move non-stationary points
+        if (scale[pointi] > SMALL)
+        {
+            // Use solid-body motion where scale = 1
+            if (scale[pointi] > 1 - SMALL)
+            {
+                points[pointi] = currentPosition(initialPoints[pointi]);
+            }
+            // Slerp septernion interpolation
+            else
+            {
+                septernion ss(slerp(septernion::I, s, scale[pointi]));
 
-        points[pointi] =
-            initialCentreOfMass()
-          + ss.transform(initialPoints[pointi] - initialCentreOfMass());
+                points[pointi] =
+                    initialCentreOfMass()
+                  + ss.transform(initialPoints[pointi] - initialCentreOfMass());
+            }
+        }
     }
 
     return tpoints;
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.H
index c75e0719642f58d7bc43fb8cae08a219df033c66..670004ba693e0eba489e2d7204ee1d6e8cd37b0b 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.H
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.H
@@ -164,9 +164,6 @@ class sixDoFRigidBodyMotion
 
         // Access
 
-            //- Return access to the motion state
-            inline const sixDoFRigidBodyMotionState& motionState() const;
-
             //- Return access to the restraints
             inline const PtrList<sixDoFRigidBodyMotionRestraint>&
                 restraints() const;
@@ -271,8 +268,12 @@ public:
             bool report = false
         );
 
-        //- Construct from dictionary
-        sixDoFRigidBodyMotion(const dictionary& dict);
+        //- Construct from constant and state dictionaries
+        sixDoFRigidBodyMotion
+        (
+            const dictionary& dict,
+            const dictionary& stateDict
+        );
 
         //- Construct as copy
         sixDoFRigidBodyMotion(const sixDoFRigidBodyMotion&);
@@ -382,6 +383,9 @@ public:
 
         // Access
 
+            //- Return access to the motion state
+            inline const sixDoFRigidBodyMotionState& state() const;
+
             //- Return const access to the centre of mass
             inline const point& centreOfMass() const;
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionI.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionI.H
index e64e1677fcb2987cc8dbc5906fc48a6b759090ce..f70ba68ced1cc79c20dcc26b009130d4734201b4 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionI.H
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionI.H
@@ -98,7 +98,7 @@ Foam::sixDoFRigidBodyMotion::rotate
 
 
 inline const Foam::sixDoFRigidBodyMotionState&
-Foam::sixDoFRigidBodyMotion::motionState() const
+Foam::sixDoFRigidBodyMotion::state() const
 {
     return motionState_;
 }
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
index e16fd6d5d51a5d32cf416f54c3b719d0cd33d246..99bdba3ef022f370b9c096ab7482db75b2ede074 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
@@ -137,7 +137,7 @@ Foam::Ostream& Foam::operator<<
     const sixDoFRigidBodyMotion& sDoFRBM
 )
 {
-    os  << sDoFRBM.motionState()
+    os  << sDoFRBM.state()
         << token::SPACE << sDoFRBM.initialCentreOfMass()
         << token::SPACE << sDoFRBM.initialQ()
         << token::SPACE << sDoFRBM.momentOfInertia()
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H
index 92b3109c8b505676d8e878002da1e7aef28f1c86..be698ef86972c82ce301be4911d5576533b07f34 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H
@@ -163,13 +163,12 @@ public:
             inline vector& tau();
 
 
-        //- Write
-        void write(Ostream&) const;
-
+        //- Write to dictionary
+        void write(dictionary& dict) const;
 
-    // Friend Functions
+        //- Write to stream
+        void write(Ostream&) const;
 
-    // Friend Operators
 
     // IOstream Operators
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateI.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateI.H
index e5e955724532012278cde20d66357311677b81c5..8df8161efe6fcfdcce95eb0f07ad21f997ae8795 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateI.H
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateI.H
@@ -23,9 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
 inline const Foam::point& Foam::sixDoFRigidBodyMotionState::centreOfMass() const
 {
     return centreOfMass_;
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
index 4033b240ba4e7087d7be33d17e959972962982e9..503df53fc49af64cfcaeb4f3d975ba39f7d9b9e5 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
@@ -28,6 +28,17 @@ License
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
+void Foam::sixDoFRigidBodyMotionState::write(dictionary& dict) const
+{
+    dict.add("centreOfMass", centreOfMass_);
+    dict.add("orientation", Q_);
+    dict.add("velocity", v_);
+    dict.add("acceleration", a_);
+    dict.add("angularMomentum", pi_);
+    dict.add("torque", tau_);
+}
+
+
 void Foam::sixDoFRigidBodyMotionState::write(Ostream& os) const
 {
     os.writeKeyword("centreOfMass")
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C
new file mode 100644
index 0000000000000000000000000000000000000000..8ed6f62005c59fe26693c288f878a2267d597615
--- /dev/null
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C
@@ -0,0 +1,50 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "externalPointEdgePoint.H"
+
+// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
+
+Foam::Ostream& Foam::operator<<
+(
+    Foam::Ostream& os,
+    const Foam::externalPointEdgePoint& wDist
+)
+{
+    return os << wDist.origin() << wDist.distSqr();
+}
+
+
+Foam::Istream& Foam::operator>>
+(
+    Foam::Istream& is,
+    Foam::externalPointEdgePoint& wDist
+)
+{
+    return is >> wDist.origin_ >> wDist.distSqr_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.H
new file mode 100644
index 0000000000000000000000000000000000000000..70a66b4ba2d59b40eeee42ed5dc8c9be44f9f2e9
--- /dev/null
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.H
@@ -0,0 +1,263 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::externalPointEdgePoint
+
+Description
+    Holds information regarding nearest wall point. Used in PointEdgeWave.
+    (so not standard FaceCellWave)
+    To be used in wall distance calculation.
+
+SourceFiles
+    externalPointEdgePointI.H
+    externalPointEdgePoint.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef externalPointEdgePoint_H
+#define externalPointEdgePoint_H
+
+#include "pointField.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// Forward declaration of classes
+class polyPatch;
+class polyMesh;
+
+/*---------------------------------------------------------------------------*\
+                           Class externalPointEdgePoint Declaration
+\*---------------------------------------------------------------------------*/
+
+class externalPointEdgePoint
+{
+    // Private data
+
+        //- position of nearest wall center
+        point origin_;
+
+        //- normal distance (squared) from point to origin
+        scalar distSqr_;
+
+
+    // Private Member Functions
+
+        //- Evaluate distance to point. Update distSqr, origin from whomever
+        //  is nearer pt. Return true if w2 is closer to point,
+        //  false otherwise.
+        template<class TrackingData>
+        inline bool update
+        (
+            const point&,
+            const externalPointEdgePoint& w2,
+            const scalar tol,
+            TrackingData& td
+        );
+
+        //- Combine current with w2. Update distSqr, origin if w2 has smaller
+        //  quantities and returns true.
+        template<class TrackingData>
+        inline bool update
+        (
+            const externalPointEdgePoint& w2,
+            const scalar tol,
+            TrackingData& td
+        );
+
+
+public:
+
+    //- Class used to pass data into container
+    class trackingData
+    {
+    public:
+        const pointField& points_;
+
+        trackingData(const pointField& points)
+        :
+            points_(points)
+        {}
+    };
+
+
+
+    // Constructors
+
+        //- Construct null
+        inline externalPointEdgePoint();
+
+        //- Construct from origin, distance
+        inline externalPointEdgePoint(const point&, const scalar);
+
+        //- Construct as copy
+        inline externalPointEdgePoint(const externalPointEdgePoint&);
+
+
+    // Member Functions
+
+        // Access
+
+            inline const point& origin() const;
+
+            inline scalar distSqr() const;
+
+
+        // Needed by PointEdgeWave
+
+            //- Check whether origin has been changed at all or
+            //  still contains original (invalid) value.
+            template<class TrackingData>
+            inline bool valid(TrackingData& td) const;
+
+            //- Check for identical geometrical data. Used for cyclics checking.
+            template<class TrackingData>
+            inline bool sameGeometry
+            (
+                const externalPointEdgePoint&,
+                const scalar tol,
+                TrackingData& td
+            ) const;
+
+            //- Convert origin to relative vector to leaving point
+            //  (= point coordinate)
+            template<class TrackingData>
+            inline void leaveDomain
+            (
+                const polyPatch& patch,
+                const label patchPointI,
+                const point& pos,
+                TrackingData& td
+            );
+
+            //- Convert relative origin to absolute by adding entering point
+            template<class TrackingData>
+            inline void enterDomain
+            (
+                const polyPatch& patch,
+                const label patchPointI,
+                const point& pos,
+                TrackingData& td
+            );
+
+            //- Apply rotation matrix to origin
+            template<class TrackingData>
+            inline void transform
+            (
+                const tensor& rotTensor,
+                TrackingData& td
+            );
+
+            //- Influence of edge on point
+            template<class TrackingData>
+            inline bool updatePoint
+            (
+                const polyMesh& mesh,
+                const label pointI,
+                const label edgeI,
+                const externalPointEdgePoint& edgeInfo,
+                const scalar tol,
+                TrackingData& td
+            );
+
+            //- Influence of different value on same point.
+            //  Merge new and old info.
+            template<class TrackingData>
+            inline bool updatePoint
+            (
+                const polyMesh& mesh,
+                const label pointI,
+                const externalPointEdgePoint& newPointInfo,
+                const scalar tol,
+                TrackingData& td
+            );
+
+            //- Influence of different value on same point.
+            //  No information about current position whatsoever.
+            template<class TrackingData>
+            inline bool updatePoint
+            (
+                const externalPointEdgePoint& newPointInfo,
+                const scalar tol,
+                TrackingData& td
+            );
+
+            //- Influence of point on edge.
+            template<class TrackingData>
+            inline bool updateEdge
+            (
+                const polyMesh& mesh,
+                const label edgeI,
+                const label pointI,
+                const externalPointEdgePoint& pointInfo,
+                const scalar tol,
+                TrackingData& td
+            );
+
+            //- Equivalent to operator== with TrackingData
+            template<class TrackingData>
+            inline bool equal
+            (
+                const externalPointEdgePoint&,
+                TrackingData& td
+            ) const;
+
+
+    // Member Operators
+
+        // Needed for List IO
+        inline bool operator==(const externalPointEdgePoint&) const;
+        inline bool operator!=(const externalPointEdgePoint&) const;
+
+
+    // IOstream Operators
+
+        friend Ostream& operator<<(Ostream&, const externalPointEdgePoint&);
+        friend Istream& operator>>(Istream&, externalPointEdgePoint&);
+};
+
+
+//- Data associated with externalPointEdgePoint type are contiguous
+template<>
+inline bool contiguous<externalPointEdgePoint>()
+{
+    return true;
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "externalPointEdgePointI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePointI.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePointI.H
new file mode 100644
index 0000000000000000000000000000000000000000..44ee302e4c7b05b4a5e4722087d70f75a8482495
--- /dev/null
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePointI.H
@@ -0,0 +1,324 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "polyMesh.H"
+#include "transform.H"
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::update
+(
+    const point& pt,
+    const externalPointEdgePoint& w2,
+    const scalar tol,
+    TrackingData& td
+)
+{
+    scalar dist2 = magSqr(pt - w2.origin());
+
+    if (!valid(td))
+    {
+        // current not yet set so use any value
+        distSqr_ = dist2;
+        origin_ = w2.origin();
+
+        return true;
+    }
+
+    scalar diff = distSqr_ - dist2;
+
+    if (diff < 0)
+    {
+        // already nearer to pt
+        return false;
+    }
+
+    if ((diff < SMALL) || ((distSqr_ > SMALL) && (diff/distSqr_ < tol)))
+    {
+        // don't propagate small changes
+        return false;
+    }
+    else
+    {
+        // update with new values
+        distSqr_ = dist2;
+        origin_ = w2.origin();
+
+        return true;
+    }
+}
+
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::update
+(
+    const externalPointEdgePoint& w2,
+    const scalar tol,
+    TrackingData& td
+)
+{
+    if (!valid(td))
+    {
+        // current not yet set so use any value
+        distSqr_ = w2.distSqr();
+        origin_ = w2.origin();
+
+        return true;
+    }
+
+    scalar diff = distSqr_ - w2.distSqr();
+
+    if (diff < 0)
+    {
+        // already nearer to pt
+        return false;
+    }
+
+    if ((diff < SMALL) || ((distSqr_ > SMALL) && (diff/distSqr_ < tol)))
+    {
+        // don't propagate small changes
+        return false;
+    }
+    else
+    {
+        // update with new values
+        distSqr_ =  w2.distSqr();
+        origin_ = w2.origin();
+
+        return true;
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::externalPointEdgePoint::externalPointEdgePoint()
+:
+    origin_(point::max),
+    distSqr_(GREAT)
+{}
+
+
+inline Foam::externalPointEdgePoint::externalPointEdgePoint
+(
+    const point& origin,
+    const scalar distSqr
+)
+:
+    origin_(origin),
+    distSqr_(distSqr)
+{}
+
+
+inline Foam::externalPointEdgePoint::externalPointEdgePoint
+(
+    const externalPointEdgePoint& wpt
+)
+:
+    origin_(wpt.origin()),
+    distSqr_(wpt.distSqr())
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline const Foam::point& Foam::externalPointEdgePoint::origin() const
+{
+    return origin_;
+}
+
+
+inline Foam::scalar Foam::externalPointEdgePoint::distSqr() const
+{
+    return distSqr_;
+}
+
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::valid(TrackingData& td) const
+{
+    return origin_ != point::max;
+}
+
+
+// Checks for cyclic points
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::sameGeometry
+(
+    const externalPointEdgePoint& w2,
+    const scalar tol,
+    TrackingData& td
+) const
+{
+    scalar diff = Foam::mag(distSqr() - w2.distSqr());
+
+    if (diff < SMALL)
+    {
+        return true;
+    }
+    else
+    {
+        if ((distSqr() > SMALL) && ((diff/distSqr()) < tol))
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+}
+
+
+template<class TrackingData>
+inline void Foam::externalPointEdgePoint::leaveDomain
+(
+    const polyPatch& patch,
+    const label patchPointI,
+    const point& coord,
+    TrackingData& td
+)
+{
+    origin_ -= coord;
+}
+
+
+template<class TrackingData>
+inline void Foam::externalPointEdgePoint::transform
+(
+    const tensor& rotTensor,
+    TrackingData& td
+)
+{
+    origin_ = Foam::transform(rotTensor, origin_);
+}
+
+
+template<class TrackingData>
+inline void Foam::externalPointEdgePoint::enterDomain
+(
+    const polyPatch& patch,
+    const label patchPointI,
+    const point& coord,
+    TrackingData& td
+)
+{
+    // back to absolute form
+    origin_ += coord;
+}
+
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::updatePoint
+(
+    const polyMesh& mesh,
+    const label pointI,
+    const label edgeI,
+    const externalPointEdgePoint& edgeInfo,
+    const scalar tol,
+    TrackingData& td
+)
+{
+    return update(td.points_[pointI], edgeInfo, tol, td);
+}
+
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::updatePoint
+(
+    const polyMesh& mesh,
+    const label pointI,
+    const externalPointEdgePoint& newPointInfo,
+    const scalar tol,
+    TrackingData& td
+)
+{
+    return update(td.points_[pointI], newPointInfo, tol, td);
+}
+
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::updatePoint
+(
+    const externalPointEdgePoint& newPointInfo,
+    const scalar tol,
+    TrackingData& td
+)
+{
+    return update(newPointInfo, tol, td);
+}
+
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::updateEdge
+(
+    const polyMesh& mesh,
+    const label edgeI,
+    const label pointI,
+    const externalPointEdgePoint& pointInfo,
+    const scalar tol,
+    TrackingData& td
+)
+{
+    const edge& e = mesh.edges()[edgeI];
+    return update(e.centre(td.points_), pointInfo, tol, td);
+}
+
+
+template<class TrackingData>
+inline bool Foam::externalPointEdgePoint::equal
+(
+    const externalPointEdgePoint& rhs,
+    TrackingData& td
+) const
+{
+    return operator==(rhs);
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+inline bool Foam::externalPointEdgePoint::operator==
+(
+    const Foam::externalPointEdgePoint& rhs
+)
+const
+{
+    return (origin() == rhs.origin()) && (distSqr() == rhs.distSqr());
+}
+
+
+inline bool Foam::externalPointEdgePoint::operator!=
+(
+    const Foam::externalPointEdgePoint& rhs
+)
+const
+{
+    return !(*this == rhs);
+}
+
+
+// ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.C
new file mode 100644
index 0000000000000000000000000000000000000000..7a1eb25a4ebc071a4c1e2d33c8aa165fa1ff65a6
--- /dev/null
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.C
@@ -0,0 +1,145 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "pointPatchDist.H"
+#include "externalPointEdgePoint.H"
+#include "pointMesh.H"
+#include "PointEdgeWave.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::pointPatchDist::pointPatchDist
+(
+    const pointMesh& pMesh,
+    const labelHashSet& patchIDs,
+    const pointField& points
+)
+:
+    pointScalarField
+    (
+        IOobject
+        (
+            "pointDistance",
+            pMesh.db().time().timeName(),
+            pMesh.db()
+        ),
+        pMesh,
+        dimensionedScalar("y", dimLength, GREAT)
+    ),
+    points_(points),
+    patchIDs_(patchIDs),
+    nUnset_(0)
+{
+    correct();
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::pointPatchDist::~pointPatchDist()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::pointPatchDist::correct()
+{
+    const pointBoundaryMesh& pbm = mesh().boundary();
+
+    label nPoints = 0;
+
+    forAllConstIter(labelHashSet, patchIDs_, iter)
+    {
+        label patchI = iter.key();
+        nPoints += pbm[patchI].meshPoints().size();
+    }
+
+    externalPointEdgePoint::trackingData td(points_);
+
+    // Set initial changed points to all the patch points(if patch present)
+    List<externalPointEdgePoint> wallInfo(nPoints);
+    labelList wallPoints(nPoints);
+    nPoints = 0;
+
+    forAllConstIter(labelHashSet, patchIDs_, iter)
+    {
+        label patchI = iter.key();
+        // Retrieve the patch now we have its index in patches.
+
+        const labelList& mp = pbm[patchI].meshPoints();
+
+        forAll(mp, ppI)
+        {
+            label meshPointI = mp[ppI];
+            wallPoints[nPoints] = meshPointI;
+            wallInfo[nPoints] = externalPointEdgePoint
+            (
+                td.points_[meshPointI],
+                0.0
+            );
+            nPoints++;
+        }
+    }
+
+    // Current info on points
+    List<externalPointEdgePoint> allPointInfo(mesh()().nPoints());
+
+    // Current info on edges
+    List<externalPointEdgePoint> allEdgeInfo(mesh()().nEdges());
+
+    PointEdgeWave
+    <
+        externalPointEdgePoint,
+        externalPointEdgePoint::trackingData
+    > wallCalc
+    (
+        mesh()(),
+        wallPoints,
+        wallInfo,
+
+        allPointInfo,
+        allEdgeInfo,
+        mesh().globalData().nTotalPoints(), // max iterations
+        td
+    );
+
+    pointScalarField& psf = *this;
+
+
+    forAll(allPointInfo, pointI)
+    {
+        if (allPointInfo[pointI].valid(td))
+        {
+            psf[pointI] = Foam::sqrt(allPointInfo[pointI].distSqr());
+        }
+        else
+        {
+            nUnset_++;
+        }
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.H
new file mode 100644
index 0000000000000000000000000000000000000000..7d15d30fff54adc10101376a2edaba19ed0bbd6d
--- /dev/null
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.H
@@ -0,0 +1,121 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::pointPatchDist
+
+Description
+    Calculation of distance to nearest patch for all points
+
+SourceFiles
+    pointPatchDist.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef pointPatchDist_H
+#define pointPatchDist_H
+
+#include "pointFields.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+class pointMesh;
+
+/*---------------------------------------------------------------------------*\
+                          Class pointPatchDist Declaration
+\*---------------------------------------------------------------------------*/
+
+class pointPatchDist
+:
+    public pointScalarField
+{
+
+private:
+
+    // Private Member Data
+
+        //- Reference to pointField
+        const pointField& points_;
+
+        //- Set of patch IDs
+        const labelHashSet patchIDs_;
+
+        //- Number of unset points
+        label nUnset_;
+
+
+    // Private Member Functions
+
+        //- Disallow default bitwise copy construct
+        pointPatchDist(const pointPatchDist&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const pointPatchDist&);
+
+
+public:
+
+    // Constructors
+
+        //- Construct from mesh and set of patches
+        pointPatchDist
+        (
+            const pointMesh& pMesh,
+            const labelHashSet& patchIDs,
+            const pointField& points
+        );
+
+
+    //- Destructor
+    virtual ~pointPatchDist();
+
+
+    // Member Functions
+
+        const pointScalarField& y() const
+        {
+            return *this;
+        }
+
+        label nUnset() const
+        {
+            return nUnset_;
+        }
+
+        //- Correct for mesh geom/topo changes
+        void correct();
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
index ca303bbeca1bf75f0414003adfa0b6b967065f4d..2e208340428d4b3207d8f0bf6efe83c9b601a8aa 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
@@ -26,10 +26,11 @@ License
 #include "sixDoFRigidBodyMotionSolver.H"
 #include "addToRunTimeSelectionTable.H"
 #include "polyMesh.H"
-#include "patchDist.H"
-#include "volPointInterpolation.H"
+#include "pointPatchDist.H"
+#include "pointConstraints.H"
 #include "uniformDimensionedFields.H"
 #include "forces.H"
+#include "mathematicalConstants.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -55,17 +56,42 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver
 )
 :
     displacementMotionSolver(mesh, dict, typeName),
-    motion_(coeffDict()),
+    motion_
+    (
+        coeffDict(),
+        IOobject
+        (
+            "sixDoFRigidBodyMotionState",
+            mesh.time().timeName(),
+            "uniform",
+            mesh
+        ).headerOk()
+      ? IOdictionary
+        (
+            IOobject
+            (
+                "sixDoFRigidBodyMotionState",
+                mesh.time().timeName(),
+                "uniform",
+                mesh,
+                IOobject::READ_IF_PRESENT,
+                IOobject::NO_WRITE,
+                false
+            )
+        )
+      : coeffDict()
+    ),
     patches_(wordReList(coeffDict().lookup("patches"))),
     patchSet_(mesh.boundaryMesh().patchSet(patches_)),
-    distance_(readScalar(coeffDict().lookup("distance"))),
+    di_(readScalar(coeffDict().lookup("innerDistance"))),
+    do_(readScalar(coeffDict().lookup("outerDistance"))),
     rhoInf_(1.0),
     rhoName_(coeffDict().lookupOrDefault<word>("rhoName", "rho")),
     scale_
     (
         IOobject
         (
-            "scale",
+            "motionScale",
             mesh.time().timeName(),
             mesh,
             IOobject::NO_READ,
@@ -77,8 +103,6 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver
     ),
     curTimeIndex_(-1)
 {
-    const fvMesh& fMesh = dynamic_cast<const fvMesh&>(mesh);
-
     if (rhoName_ == "rhoInf")
     {
         rhoInf_ = readScalar(dict.lookup("rhoInf"));
@@ -88,19 +112,35 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     {
-        patchDist dist(fMesh, patchSet_);
+        pointPatchDist pDist(pointMesh::New(mesh), patchSet_, points0());
 
-        // Update distance to object
-        pointScalarField pDist
-        (
-            volPointInterpolation::New
+        // Scaling: 1 up to di then linear down to 0 at do away from patches
+        scale_.internalField() =
+            min
             (
-                fMesh
-            ).interpolate(dist)
-        );
+                max
+                (
+                    (do_ - pDist.internalField())/(do_ - di_),
+                    0.0
+                ),
+                1.0
+            );
+
+        // Convert the scale function to a cosine
+        scale_.internalField() =
+            min
+            (
+                max
+                (
+                    0.5
+                  - 0.5
+                   *cos(scale_.internalField()
+                   *Foam::constant::mathematical::pi),
+                    0.0
+                ),
+                1.0
+            );
 
-        // Scaling. 1 at patches, 0 at distance_ away from patches
-        scale_.internalField() = 1 - min(1.0, pDist.internalField()/distance_);
         scale_.correctBoundaryConditions();
         scale_.write();
     }
@@ -179,7 +219,34 @@ void Foam::sixDoFRigidBodyMotionSolver::solve()
     pointDisplacement_.internalField() =
         motion_.scaledPosition(points0(), scale_) - points0();
 
-    pointDisplacement_.correctBoundaryConditions();
+    // Displacement has changed. Update boundary conditions
+    pointConstraints::New(mesh()).constrainDisplacement(pointDisplacement_);
+}
+
+
+bool Foam::sixDoFRigidBodyMotionSolver::writeObject
+(
+    IOstream::streamFormat fmt,
+    IOstream::versionNumber ver,
+    IOstream::compressionType cmp
+) const
+{
+    IOdictionary dict
+    (
+        IOobject
+        (
+            "sixDoFRigidBodyMotionState",
+            mesh().time().timeName(),
+            "uniform",
+            mesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE,
+            false
+        )
+    );
+
+    motion_.state().write(dict);
+    return dict.regIOobject::write();
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.H
index 1d1e72263c8c0cfa8088afee9cf3981756640092..410745d96cddebc793cdd1f8d07c632866d246fb 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.H
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.H
@@ -64,8 +64,11 @@ class sixDoFRigidBodyMotionSolver
         //- Patches to integrate forces
         const labelHashSet patchSet_;
 
-        //- Morphing distance
-        const scalar distance_;
+        //- Inner morphing distance (limit of solid-body region)
+        const scalar di_;
+
+        //- Outer morphing distance (limit of linear interpolation region)
+        const scalar do_;
 
         //- Reference density required by the forces object for
         //  incompressible calculations, required if rhoName == rhoInf
@@ -122,6 +125,14 @@ public:
 
         //- Solve for motion
         virtual void solve();
+
+        //- Write state using given format, version and compression
+        virtual bool writeObject
+        (
+            IOstream::streamFormat fmt,
+            IOstream::versionNumber ver,
+            IOstream::compressionType cmp
+        ) const;
 };
 
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U
index 5c19bbed4402653928af7460db01588e59201531..cb3d319ea8b168fc609bfeeddc6193c35147462b 100644
--- a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U
+++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U
@@ -38,11 +38,6 @@ boundaryField
         value           uniform (0 0 0);
     }
 
-    axis
-    {
-        type            symmetryPlane;
-    }
-
     left
     {
         type            pressureInletOutletVelocity;
diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/p b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/p
index e18fa649d712bd6ae58387bf7e8ee85dcd78a4c0..6a14042c40899d904791d964284ca2e44da98650 100644
--- a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/p
+++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/p
@@ -35,11 +35,6 @@ boundaryField
         type            zeroGradient;
     }
 
-    axis
-    {
-        type            symmetryPlane;
-    }
-
     left
     {
         type            totalPressure;
diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/pointMotionUx b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/pointMotionUx
index b9c1cef0787485cfc0ee7e97cbb23cbb31aeb1a7..74570f1b725063c1a2f07cbafbc49e932d33e641 100644
--- a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/pointMotionUx
+++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/pointMotionUx
@@ -34,10 +34,6 @@ boundaryField
         type            uniformFixedValue;
         uniformValue    constant 0;
     }
-    axis
-    {
-        type            symmetryPlane;
-    }
     left
     {
         type            uniformFixedValue;
diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pimpleDyMFoam/movingCone/constant/polyMesh/blockMeshDict
index 82fb8079e36ba267d1ccb30e2b22488c2f61d81b..d6031d83f3cddbc76ce062545459c4838133f01b 100644
--- a/tutorials/incompressible/pimpleDyMFoam/movingCone/constant/polyMesh/blockMeshDict
+++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/constant/polyMesh/blockMeshDict
@@ -84,7 +84,7 @@ boundary
     }
     axis
     {
-        type symmetryPlane;
+        type empty;
         faces
         (
             (0 1 1 0)
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict
index 3dfd129db5fbb717145f9cc67bbaa0e5de8623af..84401802994cfbac22842c81c378b4b40071fda2 100644
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict
@@ -23,13 +23,14 @@ solver              sixDoFRigidBodyMotion;
 sixDoFRigidBodyMotionCoeffs
 {
     patches         (floatingObject);
-    distance        0.3;
+    innerDistance   0.05;
+    outerDistance   0.35;
 
     centreOfMass    (0.5 0.5 0.5);
     momentOfInertia (0.08622222 0.08622222 0.144);
     mass            9.6;
     report          on;
-    accelerationRelaxation 0.3;
+    accelerationRelaxation 0.7;
 }
 
 
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/controlDict
index d51c2fd31ed6c3b2dc01d5e8ffad9a213cf3a21d..6510d78a1221ab4cb9e49162027bd4e99531e1bc 100644
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/controlDict
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/controlDict
@@ -29,7 +29,7 @@ deltaT          0.01;
 
 writeControl    adjustableRunTime;
 
-writeInterval   0.2;
+writeInterval   0.1;
 
 purgeWrite      0;
 
@@ -47,8 +47,8 @@ runTimeModifiable yes;
 
 adjustTimeStep  yes;
 
-maxCo           5;
-maxAlphaCo      5;
+maxCo           1;
+maxAlphaCo      1;
 maxDeltaT       1;
 
 // ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSolution
index c539caec767bd1663cc77089af78b605b21446b0..e920dcf8d968c4c62f9cae330f8385b116bff2af 100644
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSolution
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSolution
@@ -17,18 +17,6 @@ FoamFile
 
 solvers
 {
-    "cellDisplacement.*"
-    {
-        solver          GAMG;
-        tolerance       1e-5;
-        relTol          0;
-        smoother        GaussSeidel;
-        cacheAgglomeration true;
-        nCellsInCoarsestLevel 10;
-        agglomerator    faceAreaPair;
-        mergeLevels     1;
-    }
-
     "alpha.water.*"
     {
         nAlphaCorr      1;
@@ -39,6 +27,7 @@ solvers
 
         MULESCorr       yes;
         nLimiterIter    5;
+        alphaApplyPrevCorr  true;
 
         solver          PBiCG;
         preconditioner  DILU;
@@ -130,7 +119,7 @@ solvers
 PIMPLE
 {
     momentumPredictor no;
-    nOuterCorrectors 6;
+    nOuterCorrectors 5;
     nCorrectors      1;
     nNonOrthogonalCorrectors 0;
     correctPhi      yes;
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/U b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/U
deleted file mode 100644
index 3bd47593e0467cf08cac6c3846c1f4b7702c1fe3..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/U
+++ /dev/null
@@ -1,42 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volVectorField;
-    location    "0";
-    object      U;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 1 -1 0 0 0 0];
-
-internalField   uniform (0 0 0);
-
-boundaryField
-{
-    stationaryWalls
-    {
-        type            fixedValue;
-        value           uniform (0 0 0);
-    }
-    atmosphere
-    {
-        type            pressureInletOutletVelocity;
-        value           uniform (0 0 0);
-    }
-    floatingObject
-    {
-        type            movingWallVelocity;
-        value           uniform (0 0 0);
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/alpha.water b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/alpha.water
deleted file mode 100644
index e09e2739bd74209760e5464f8115fcb98a495b1d..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/alpha.water
+++ /dev/null
@@ -1,41 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    location    "0";
-    object      alpha.water;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 0 0 0 0 0 0];
-
-internalField   uniform 0;
-
-boundaryField
-{
-    stationaryWalls
-    {
-        type            zeroGradient;
-    }
-    atmosphere
-    {
-        type            inletOutlet;
-        inletValue      uniform 0;
-        value           uniform 0;
-    }
-    floatingObject
-    {
-        type            zeroGradient;
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/epsilon b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/epsilon
deleted file mode 100644
index 7f3186509e35ac5e959629401a942c7b254f53df..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/epsilon
+++ /dev/null
@@ -1,49 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    location    "0";
-    object      epsilon;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 2 -3 0 0 0 0];
-
-internalField   uniform 0.1;
-
-boundaryField
-{
-    stationaryWalls
-    {
-        type            epsilonWallFunction;
-        Cmu             0.09;
-        kappa           0.41;
-        E               9.8;
-        value           uniform 0.1;
-    }
-    atmosphere
-    {
-        type            inletOutlet;
-        inletValue      uniform 0.1;
-        value           uniform 0.1;
-    }
-    floatingObject
-    {
-        type            epsilonWallFunction;
-        Cmu             0.09;
-        kappa           0.41;
-        E               9.8;
-        value           uniform 0.1;
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/k b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/k
deleted file mode 100644
index b43eb2f5c00f09a27984fcf19366600a87a876f5..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/k
+++ /dev/null
@@ -1,43 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    location    "0";
-    object      k;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 2 -2 0 0 0 0];
-
-internalField   uniform 0.1;
-
-boundaryField
-{
-    stationaryWalls
-    {
-        type            kqRWallFunction;
-        value           uniform 0.1;
-    }
-    atmosphere
-    {
-        type            inletOutlet;
-        inletValue      uniform 0.1;
-        value           uniform 0.1;
-    }
-    floatingObject
-    {
-        type            kqRWallFunction;
-        value           uniform 0.1;
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/nut b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/nut
deleted file mode 100644
index 9d437e984132980225b2dfe8071b3a564d15e833..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/nut
+++ /dev/null
@@ -1,48 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    location    "0";
-    object      nut;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 2 -1 0 0 0 0];
-
-internalField   uniform 0;
-
-boundaryField
-{
-    stationaryWalls
-    {
-        type            nutkWallFunction;
-        Cmu             0.09;
-        kappa           0.41;
-        E               9.8;
-        value           uniform 0;
-    }
-    atmosphere
-    {
-        type            calculated;
-        value           uniform 0;
-    }
-    floatingObject
-    {
-        type            nutkWallFunction;
-        Cmu             0.09;
-        kappa           0.41;
-        E               9.8;
-        value           uniform 0;
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/p_rgh b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/p_rgh
deleted file mode 100644
index e24799fc142dceac24cdc489930837bd6163db4f..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/p_rgh
+++ /dev/null
@@ -1,44 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       volScalarField;
-    object      p_rgh;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [1 -1 -2 0 0 0 0];
-
-internalField   uniform 0;
-
-boundaryField
-{
-    stationaryWalls
-    {
-        type            fixedFluxPressure;
-    }
-    atmosphere
-    {
-        type            totalPressure;
-        p0              uniform 0;
-        U               U;
-        phi             phi;
-        rho             rho;
-        psi             none;
-        gamma           1;
-        value           uniform 0;
-    }
-    floatingObject
-    {
-        type            fixedFluxPressure;
-    }
-}
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/pointDisplacement b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/pointDisplacement
deleted file mode 100644
index daff376a9d323b0fc015d085f6f15ccf2e51e110..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/0.org/pointDisplacement
+++ /dev/null
@@ -1,47 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       pointVectorField;
-    object      pointDisplacement;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 1 0 0 0 0 0];
-
-internalField   uniform (0 0 0);
-
-boundaryField
-{
-    stationaryWalls
-    {
-        type            fixedValue;
-        value           uniform (0 0 0);
-    }
-    atmosphere
-    {
-        type            fixedValue;
-        value           uniform (0 0 0);
-    }
-    floatingObject
-    {
-        type            sixDoFRigidBodyDisplacement;
-        centreOfMass    (0.5 0.5 0.5);
-        momentOfInertia (0.08622222 0.08622222 0.144);
-        mass            9.6;
-        rhoInf          1;
-        report          on;
-        accelerationRelaxation 0.3;
-        value           uniform (0 0 0);
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/Allclean b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/Allclean
deleted file mode 100755
index d16400a94f636d461b62f6f909c2d64d7e29c335..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/Allclean
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0 > /dev/null 2>&1
-
-cleanCase
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/Allrun b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/Allrun
deleted file mode 100755
index 8ca61574f237151679a9f4041dcc7540282c72b3..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/Allrun
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-# Set application name
-application=`getApplication`
-
-runApplication blockMesh
-runApplication topoSet
-runApplication subsetMesh -overwrite c0 -patch floatingObject
-cp -r 0.org 0 > /dev/null 2>&1
-runApplication setFields
-runApplication $application
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/RASProperties
deleted file mode 100644
index a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/RASProperties
+++ /dev/null
@@ -1,25 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "constant";
-    object      RASProperties;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-RASModel        kEpsilon;
-
-turbulence      on;
-
-printCoeffs     on;
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/dynamicMeshDict
deleted file mode 100644
index b350585fe9e80204fbf4038f73628f25f1e4b39c..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/dynamicMeshDict
+++ /dev/null
@@ -1,29 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    object      motionProperties;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dynamicFvMesh      dynamicMotionSolverFvMesh;
-
-motionSolverLibs    ("libfvMotionSolvers.so" "libsixDoFRigidBodyMotion.so");
-
-solver            displacementLaplacian;
-
-displacementLaplacianCoeffs
-{
-    diffusivity       inverseDistance (floatingObject);
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/g b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/g
deleted file mode 100644
index 897615a50df92736e7b9c64bb2e64fba539496fc..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/g
+++ /dev/null
@@ -1,22 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       uniformDimensionedVectorField;
-    location    "constant";
-    object      g;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions      [0 1 -2 0 0 0 0];
-value           ( 0 0 -9.81 );
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/polyMesh/blockMeshDict
deleted file mode 100644
index 67928d075a42ee149582200510ad64144bee4e1a..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/polyMesh/blockMeshDict
+++ /dev/null
@@ -1,73 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    object      blockMeshDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-convertToMeters 1;
-
-vertices
-(
-    (0 0 0)
-    (1 0 0)
-    (1 1 0)
-    (0 1 0)
-    (0 0 1)
-    (1 0 1)
-    (1 1 1)
-    (0 1 1)
-);
-
-blocks
-(
-    hex (0 1 2 3 4 5 6 7) (40 40 60) simpleGrading (1 1 1)
-);
-
-edges
-(
-);
-
-boundary
-(
-    stationaryWalls
-    {
-        type wall;
-        faces
-        (
-            (0 3 2 1)
-            (2 6 5 1)
-            (1 5 4 0)
-            (3 7 6 2)
-            (0 4 7 3)
-        );
-    }
-    atmosphere
-    {
-        type patch;
-        faces
-        (
-            (4 5 6 7)
-        );
-    }
-    floatingObject
-    {
-        type wall;
-        faces ();
-    }
-);
-
-mergePatchPairs
-(
-);
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/polyMesh/boundary b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/polyMesh/boundary
deleted file mode 100644
index 1543006b7ac2cf94c682d7432780a0bd0d678615..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/polyMesh/boundary
+++ /dev/null
@@ -1,40 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       polyBoundaryMesh;
-    location    "constant/polyMesh";
-    object      boundary;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-3
-(
-    stationaryWalls
-    {
-        type            wall;
-        nFaces          11200;
-        startFace       277808;
-    }
-    atmosphere
-    {
-        type            patch;
-        nFaces          1600;
-        startFace       289008;
-    }
-    floatingObject
-    {
-        type            wall;
-        nFaces          672;
-        startFace       290608;
-    }
-)
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/transportProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/transportProperties
deleted file mode 100644
index 3729fc7648bb9d76cae6c48139d4b359b92e526c..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/transportProperties
+++ /dev/null
@@ -1,37 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "constant";
-    object      transportProperties;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-phases (water air);
-
-water
-{
-    transportModel  Newtonian;
-    nu              nu [ 0 2 -1 0 0 0 0 ] 1e-06;
-    rho             rho [ 1 -3 0 0 0 0 0 ] 998.2;
-}
-
-air
-{
-    transportModel  Newtonian;
-    nu              nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
-    rho             rho [ 1 -3 0 0 0 0 0 ] 1;
-}
-
-sigma           sigma [ 1 0 -2 0 0 0 0 ] 0;
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/turbulenceProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/turbulenceProperties
deleted file mode 100644
index c2021e7271ad4486bc209ceb70840ec26087d5e1..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/constant/turbulenceProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "constant";
-    object      turbulenceProperties;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-simulationType  RASModel;
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/controlDict
deleted file mode 100644
index d51c2fd31ed6c3b2dc01d5e8ffad9a213cf3a21d..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/controlDict
+++ /dev/null
@@ -1,54 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      controlDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-application     interDyMFoam;
-
-startFrom       startTime;
-
-startTime       0;
-
-stopAt          endTime;
-
-endTime         6;
-
-deltaT          0.01;
-
-writeControl    adjustableRunTime;
-
-writeInterval   0.2;
-
-purgeWrite      0;
-
-writeFormat     ascii;
-
-writePrecision  12;
-
-writeCompression uncompressed;
-
-timeFormat      general;
-
-timePrecision   6;
-
-runTimeModifiable yes;
-
-adjustTimeStep  yes;
-
-maxCo           5;
-maxAlphaCo      5;
-maxDeltaT       1;
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/decomposeParDict b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/decomposeParDict
deleted file mode 100644
index 0548a40b126dfbd72a03816fa8bc3fc04ed3cb6e..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/decomposeParDict
+++ /dev/null
@@ -1,45 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      decomposeParDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-numberOfSubdomains 8;
-
-method          scotch;
-
-simpleCoeffs
-{
-    n               ( 2 2 1 );
-    delta           0.001;
-}
-
-hierarchicalCoeffs
-{
-    n               ( 2 2 1 );
-    delta           0.001;
-    order           xyz;
-}
-
-manualCoeffs
-{
-    dataFile        "";
-}
-
-distributed     no;
-
-roots           ( );
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/fvSchemes
deleted file mode 100644
index df7685da654a4a4fa7b159dc88722b7c7a521f5a..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/fvSchemes
+++ /dev/null
@@ -1,62 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      fvSchemes;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-ddtSchemes
-{
-    default         Euler;
-}
-
-gradSchemes
-{
-    default         Gauss linear;
-}
-
-divSchemes
-{
-    div(rhoPhi,U)  Gauss vanLeerV;
-    div(phi,alpha)  Gauss vanLeer;
-    div(phirb,alpha) Gauss interfaceCompression;
-    div(phi,k)      Gauss upwind;
-    div(phi,epsilon) Gauss upwind;
-    div((muEff*dev(T(grad(U))))) Gauss linear;
-}
-
-laplacianSchemes
-{
-    default         Gauss linear corrected;
-}
-
-interpolationSchemes
-{
-    default         linear;
-}
-
-snGradSchemes
-{
-    default         corrected;
-}
-
-fluxRequired
-{
-    default         no;
-    p_rgh;
-    pcorr;
-    alpha.water;
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/fvSolution
deleted file mode 100644
index c539caec767bd1663cc77089af78b605b21446b0..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/fvSolution
+++ /dev/null
@@ -1,152 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      fvSolution;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-solvers
-{
-    "cellDisplacement.*"
-    {
-        solver          GAMG;
-        tolerance       1e-5;
-        relTol          0;
-        smoother        GaussSeidel;
-        cacheAgglomeration true;
-        nCellsInCoarsestLevel 10;
-        agglomerator    faceAreaPair;
-        mergeLevels     1;
-    }
-
-    "alpha.water.*"
-    {
-        nAlphaCorr      1;
-        nAlphaSubCycles 1;
-        cAlpha          1;
-
-        alphaOuterCorrectors  yes;
-
-        MULESCorr       yes;
-        nLimiterIter    5;
-
-        solver          PBiCG;
-        preconditioner  DILU;
-        tolerance       1e-8;
-        relTol          0;
-    }
-
-    "pcorr.*"
-    {
-        solver          PCG;
-        preconditioner
-        {
-            preconditioner  GAMG;
-            tolerance       1e-5;
-            relTol          0;
-            smoother        DICGaussSeidel;
-            nPreSweeps      0;
-            nPostSweeps     2;
-            nFinestSweeps   2;
-            cacheAgglomeration false;
-            nCellsInCoarsestLevel 10;
-            agglomerator    faceAreaPair;
-            mergeLevels     1;
-        }
-
-        tolerance       1e-05;
-        relTol          0;
-        maxIter         100;
-    }
-
-    p_rgh
-    {
-        solver          GAMG;
-        tolerance       1e-8;
-        relTol          0.01;
-        smoother        DIC;
-        nPreSweeps      0;
-        nPostSweeps     2;
-        nFinestSweeps   2;
-        cacheAgglomeration true;
-        nCellsInCoarsestLevel 10;
-        agglomerator    faceAreaPair;
-        mergeLevels     1;
-    }
-
-    p_rghFinal
-    {
-        solver          PCG;
-        preconditioner
-        {
-            preconditioner  GAMG;
-            tolerance       1e-8;
-            relTol          0;
-            nVcycles        2;
-            smoother        DICGaussSeidel;
-            nPreSweeps      2;
-            nPostSweeps     2;
-            nFinestSweeps   2;
-            cacheAgglomeration true;
-            nCellsInCoarsestLevel 10;
-            agglomerator    faceAreaPair;
-            mergeLevels     1;
-        }
-
-        tolerance       1e-8;
-        relTol          0;
-        maxIter         20;
-    }
-
-    "(U|k|epsilon)"
-    {
-        solver          smoothSolver;
-        smoother        GaussSeidel;
-        tolerance       1e-6;
-        relTol          0.1;
-        nSweeps         1;
-    }
-
-    "(U|k|epsilon)Final"
-    {
-        solver          smoothSolver;
-        smoother        GaussSeidel;
-        tolerance       1e-6;
-        relTol          0;
-        nSweeps         1;
-    }
-}
-
-PIMPLE
-{
-    momentumPredictor no;
-    nOuterCorrectors 6;
-    nCorrectors      1;
-    nNonOrthogonalCorrectors 0;
-    correctPhi      yes;
-    moveMeshOuterCorrectors yes;
-}
-
-relaxationFactors
-{
-    fields
-    {
-    }
-    equations
-    {
-        ".*" 1;
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/setFieldsDict b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/setFieldsDict
deleted file mode 100644
index 2506a693af099682fa83ec08257f7e33b07498f8..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/setFieldsDict
+++ /dev/null
@@ -1,39 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      setFieldsDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-defaultFieldValues
-(
-    volScalarFieldValue alpha.water 0
-);
-
-regions
-(
-    boxToCell
-    {
-        box ( -100 -100 -100 ) ( 100 100 0.5368 );
-        fieldValues ( volScalarFieldValue alpha.water 1 );
-    }
-
-    boxToCell
-    {
-        box ( 0.7 0.8 -100 ) ( 100 100 0.65 );
-        fieldValues ( volScalarFieldValue alpha.water 1 );
-    }
-);
-
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/topoSetDict b/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/topoSetDict
deleted file mode 100644
index 7cfce50d58bf0d2bc54981426cdb76ad4d9a542f..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObjectOld/system/topoSetDict
+++ /dev/null
@@ -1,38 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    object      topoSetDict;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-actions
-(
-    {
-        name    c0;
-        type    cellSet;
-        action  new;
-        source  boxToCell;
-        sourceInfo
-        {
-            box (0.35 0.35 0.44) (0.65 0.65 0.56);
-        }
-    }
-
-    {
-        name    c0;
-        type    cellSet;
-        action  invert;
-    }
-);
-
-// ************************************************************************* //