From 2339d607ee1007ab4ff4f7153900f51e9b47f992 Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Sat, 15 Oct 2016 14:24:36 +0100
Subject: [PATCH] blockMesh: Added support for run-time selectable methods to
 set the block vertex locations

---
 src/mesh/blockMesh/Make/files                 |   3 +
 .../blockDescriptor/blockDescriptor.H         |   8 +-
 .../blockDescriptor/blockDescriptorEdges.C    |   2 +-
 .../blockEdges/BSplineEdge/BSplineEdge.C      |  13 +-
 .../blockEdges/BSplineEdge/BSplineEdge.H      |   5 +-
 .../blockMesh/blockEdges/arcEdge/arcEdge.C    |  13 +-
 .../blockMesh/blockEdges/arcEdge/arcEdge.H    |   9 +-
 .../blockEdges/blockEdge/blockEdge.H          |   4 +-
 .../blockMesh/blockEdges/lineEdge/lineEdge.C  |  13 +-
 .../blockMesh/blockEdges/lineEdge/lineEdge.H  |   9 +-
 .../blockEdges/polyLineEdge/polyLineEdge.C    |  13 +-
 .../blockEdges/polyLineEdge/polyLineEdge.H    |   9 +-
 .../blockEdges/splineEdge/splineEdge.C        |  13 +-
 .../blockEdges/splineEdge/splineEdge.H        |   9 +-
 .../blockFaces/blockFace/blockFace.H          |   4 +-
 .../blockFaces/projectFace/projectFace.C      |   9 +-
 .../blockFaces/projectFace/projectFace.H      |   9 +-
 src/mesh/blockMesh/blockMesh/blockMesh.C      |   8 +-
 src/mesh/blockMesh/blockMesh/blockMesh.H      |   6 +-
 .../blockMesh/blockMesh/blockMeshTopology.C   |   1 -
 .../blockVertices/blockVertex/blockVertex.C   | 105 +++++++++++++++
 .../blockVertices/blockVertex/blockVertex.H   | 127 ++++++++++++++++++
 .../blockVertex/blockVertexList.H             |  66 +++++++++
 .../blockVertices/pointVertex/pointVertex.C   |  61 +++++++++
 .../blockVertices/pointVertex/pointVertex.H   |  96 +++++++++++++
 .../projectVertex/projectVertex.C             | 100 ++++++++++++++
 .../projectVertex/projectVertex.H             | 111 +++++++++++++++
 27 files changed, 769 insertions(+), 57 deletions(-)
 create mode 100644 src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C
 create mode 100644 src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.H
 create mode 100644 src/mesh/blockMesh/blockVertices/blockVertex/blockVertexList.H
 create mode 100644 src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.C
 create mode 100644 src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.H
 create mode 100644 src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.C
 create mode 100644 src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.H

diff --git a/src/mesh/blockMesh/Make/files b/src/mesh/blockMesh/Make/files
index 98e1c9cf6e4..d17f08e044b 100644
--- a/src/mesh/blockMesh/Make/files
+++ b/src/mesh/blockMesh/Make/files
@@ -1,3 +1,6 @@
+blockVertices/blockVertex/blockVertex.C
+blockVertices/pointVertex/pointVertex.C
+
 blockEdges/blockEdge/blockEdge.C
 blockEdges/lineDivide/lineDivide.C
 blockEdges/lineEdge/lineEdge.C
diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H
index fd7ac5d1eb1..b0f7b1412cf 100644
--- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H
+++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H
@@ -33,12 +33,12 @@ Description
     (block, centre): faces 0 (f0) and 1 are left and right, respectively; faces
     2 and 3 are front the back; and faces 4 and 5 are bottom and top:
     \verbatim
-             4 ---- 5
+             7 ---- 6
         f5   |\     |\   f3
-         |   | 7 ---- 6    \
-         |   0 |--- 1 |     \
+         |   | 4 ---- 5    \
+         |   3 |--- 2 |     \
          |    \|     \|      f2
-        f4     3 ---- 2
+        f4     0 ---- 1
 
              f0 ----- f1
      \endverbatim
diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C b/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C
index 77ca51abdd1..ad8baf22d93 100644
--- a/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C
+++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C
@@ -96,7 +96,7 @@ Foam::label Foam::blockDescriptor::edgePointsWeights
     // Not curved-edge: divide the edge as a straight line
     lineDivide divEdge
     (
-        lineEdge(blockPoints, start, end),
+        blockEdges::lineEdge(blockPoints, start, end),
         nDiv,
         expand_[edgei]
     );
diff --git a/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.C b/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.C
index 206d5db9574..4e16c18264c 100644
--- a/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.C
+++ b/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.C
@@ -30,6 +30,8 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace blockEdges
 {
     defineTypeNameAndDebug(BSplineEdge, 0);
 
@@ -40,11 +42,12 @@ namespace Foam
         Istream
     );
 }
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::BSplineEdge::BSplineEdge
+Foam::blockEdges::BSplineEdge::BSplineEdge
 (
     const pointField& points,
     const label start,
@@ -57,7 +60,7 @@ Foam::BSplineEdge::BSplineEdge
 {}
 
 
-Foam::BSplineEdge::BSplineEdge
+Foam::blockEdges::BSplineEdge::BSplineEdge
 (
     const searchableSurfaces& geometry,
     const pointField& points,
@@ -81,19 +84,19 @@ Foam::BSplineEdge::BSplineEdge
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::BSplineEdge::~BSplineEdge()
+Foam::blockEdges::BSplineEdge::~BSplineEdge()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::point Foam::BSplineEdge::position(const scalar mu) const
+Foam::point Foam::blockEdges::BSplineEdge::position(const scalar mu) const
 {
     return BSpline::position(mu);
 }
 
 
-Foam::scalar Foam::BSplineEdge::length() const
+Foam::scalar Foam::blockEdges::BSplineEdge::length() const
 {
     return BSpline::length();
 }
diff --git a/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.H b/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.H
index 8d11e154464..fcc799a4255 100644
--- a/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.H
+++ b/src/mesh/blockMesh/blockEdges/BSplineEdge/BSplineEdge.H
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::BSplineEdge
+    Foam::blockEdges::BSplineEdge
 
 Description
     A blockEdge interface for B-splines.
@@ -42,6 +42,8 @@ SourceFiles
 
 namespace Foam
 {
+namespace blockEdges
+{
 
 /*---------------------------------------------------------------------------*\
                       Class BSplineEdge Declaration
@@ -104,6 +106,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End of namespace blockEdges
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.C b/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.C
index 55597f2deac..5d012e0531c 100644
--- a/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.C
+++ b/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.C
@@ -30,15 +30,18 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace blockEdges
 {
     defineTypeNameAndDebug(arcEdge, 0);
     addToRunTimeSelectionTable(blockEdge, arcEdge, Istream);
 }
+}
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-Foam::cylindricalCS Foam::arcEdge::calcAngle()
+Foam::cylindricalCS Foam::blockEdges::arcEdge::calcAngle()
 {
     vector a = p2_ - p1_;
     vector b = p3_ - p1_;
@@ -102,7 +105,7 @@ Foam::cylindricalCS Foam::arcEdge::calcAngle()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::arcEdge::arcEdge
+Foam::blockEdges::arcEdge::arcEdge
 (
     const pointField& points,
     const label start,
@@ -118,7 +121,7 @@ Foam::arcEdge::arcEdge
 {}
 
 
-Foam::arcEdge::arcEdge
+Foam::blockEdges::arcEdge::arcEdge
 (
     const searchableSurfaces& geometry,
     const pointField& points,
@@ -135,7 +138,7 @@ Foam::arcEdge::arcEdge
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::point Foam::arcEdge::position(const scalar lambda) const
+Foam::point Foam::blockEdges::arcEdge::position(const scalar lambda) const
 {
     if (lambda < -SMALL || lambda > 1 + SMALL)
     {
@@ -159,7 +162,7 @@ Foam::point Foam::arcEdge::position(const scalar lambda) const
 }
 
 
-Foam::scalar Foam::arcEdge::length() const
+Foam::scalar Foam::blockEdges::arcEdge::length() const
 {
     return degToRad(angle_*radius_);
 }
diff --git a/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.H b/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.H
index c41ae669b87..b7a71ff6d10 100644
--- a/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.H
+++ b/src/mesh/blockMesh/blockEdges/arcEdge/arcEdge.H
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::arcEdge
+    Foam::blockEdges::arcEdge
 
 Description
     Defines the arcEdge of a circle in terms of 3 points on its circumference
@@ -32,8 +32,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef arcEdge_H
-#define arcEdge_H
+#ifndef blockEdges_arcEdge_H
+#define blockEdges_arcEdge_H
 
 #include "blockEdge.H"
 #include "cylindricalCS.H"
@@ -42,6 +42,8 @@ SourceFiles
 
 namespace Foam
 {
+namespace blockEdges
+{
 
 /*---------------------------------------------------------------------------*\
                            Class arcEdge Declaration
@@ -113,6 +115,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End of namespace blockEdges
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.H b/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.H
index 24a64509ab4..86561f6abde 100644
--- a/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.H
+++ b/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.H
@@ -33,8 +33,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef blockEdges_H
-#define blockEdges_H
+#ifndef blockEdge_H
+#define blockEdge_H
 
 #include "searchableSurfaces.H"
 
diff --git a/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.C b/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.C
index 5ceaafc5c5e..45b4434850a 100644
--- a/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.C
+++ b/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.C
@@ -29,15 +29,18 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace blockEdges
 {
     defineTypeNameAndDebug(lineEdge, 0);
     addToRunTimeSelectionTable(blockEdge, lineEdge, Istream);
 }
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::lineEdge::lineEdge
+Foam::blockEdges::lineEdge::lineEdge
 (
     const pointField& points,
     const label start,
@@ -48,7 +51,7 @@ Foam::lineEdge::lineEdge
 {}
 
 
-Foam::lineEdge::lineEdge
+Foam::blockEdges::lineEdge::lineEdge
 (
     const searchableSurfaces& geometry,
     const pointField& points,
@@ -61,13 +64,13 @@ Foam::lineEdge::lineEdge
 
 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
 
-Foam::lineEdge::~lineEdge()
+Foam::blockEdges::lineEdge::~lineEdge()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::point Foam::lineEdge::position(const scalar lambda) const
+Foam::point Foam::blockEdges::lineEdge::position(const scalar lambda) const
 {
     if (lambda < -SMALL || lambda > 1+SMALL)
     {
@@ -80,7 +83,7 @@ Foam::point Foam::lineEdge::position(const scalar lambda) const
 }
 
 
-Foam::scalar Foam::lineEdge::length() const
+Foam::scalar Foam::blockEdges::lineEdge::length() const
 {
     return mag(points_[end_] - points_[start_]);
 }
diff --git a/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.H b/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.H
index 7eb5de7ec6a..e70ffd10bf7 100644
--- a/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.H
+++ b/src/mesh/blockMesh/blockEdges/lineEdge/lineEdge.H
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::lineEdge
+    Foam::blockEdges::lineEdge
 
 Description
     A straight edge between the start point and the end point.
@@ -32,8 +32,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef lineEdge_H
-#define lineEdge_H
+#ifndef blockEdges_lineEdge_H
+#define blockEdges_lineEdge_H
 
 #include "blockEdge.H"
 
@@ -41,6 +41,8 @@ SourceFiles
 
 namespace Foam
 {
+namespace blockEdges
+{
 
 /*---------------------------------------------------------------------------*\
                           Class lineEdge Declaration
@@ -89,6 +91,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End of namespace blockEdges
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.C b/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.C
index c79097ce20e..1396636a66f 100644
--- a/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.C
+++ b/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.C
@@ -29,15 +29,18 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace blockEdges
 {
     defineTypeNameAndDebug(polyLineEdge, 0);
     addToRunTimeSelectionTable(blockEdge, polyLineEdge, Istream);
 }
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::polyLineEdge::polyLineEdge
+Foam::blockEdges::polyLineEdge::polyLineEdge
 (
     const pointField& ps,
     const label start,
@@ -50,7 +53,7 @@ Foam::polyLineEdge::polyLineEdge
 {}
 
 
-Foam::polyLineEdge::polyLineEdge
+Foam::blockEdges::polyLineEdge::polyLineEdge
 (
     const searchableSurfaces& geometry,
     const pointField& ps,
@@ -64,19 +67,19 @@ Foam::polyLineEdge::polyLineEdge
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::polyLineEdge::~polyLineEdge()
+Foam::blockEdges::polyLineEdge::~polyLineEdge()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::point Foam::polyLineEdge::position(const scalar lambda) const
+Foam::point Foam::blockEdges::polyLineEdge::position(const scalar lambda) const
 {
     return polyLine::position(lambda);
 }
 
 
-Foam::scalar Foam::polyLineEdge::length() const
+Foam::scalar Foam::blockEdges::polyLineEdge::length() const
 {
     return polyLine::lineLength_;
 }
diff --git a/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.H b/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.H
index 7458b393e89..adcd7fd1b47 100644
--- a/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.H
+++ b/src/mesh/blockMesh/blockEdges/polyLineEdge/polyLineEdge.H
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::polyLineEdge
+    Foam::blockEdges::polyLineEdge
 
 Description
     A blockEdge defined in terms of a series of straight line segments.
@@ -32,8 +32,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef polyLineEdge_H
-#define polyLineEdge_H
+#ifndef blockEdges_polyLineEdge_H
+#define blockEdges_polyLineEdge_H
 
 #include "blockEdge.H"
 #include "polyLine.H"
@@ -42,6 +42,8 @@ SourceFiles
 
 namespace Foam
 {
+namespace blockEdges
+{
 
 /*---------------------------------------------------------------------------*\
                         Class polyLineEdge Declaration
@@ -104,6 +106,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End of namespace blockEdges
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.C b/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.C
index 511220bffc9..5a6be74f4e8 100644
--- a/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.C
+++ b/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.C
@@ -30,6 +30,8 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace blockEdges
 {
     defineTypeNameAndDebug(splineEdge, 0);
 
@@ -40,11 +42,12 @@ namespace Foam
         Istream
     );
 }
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::splineEdge::splineEdge
+Foam::blockEdges::splineEdge::splineEdge
 (
     const pointField& points,
     const label start,
@@ -57,7 +60,7 @@ Foam::splineEdge::splineEdge
 {}
 
 
-Foam::splineEdge::splineEdge
+Foam::blockEdges::splineEdge::splineEdge
 (
     const searchableSurfaces& geometry,
     const pointField& points,
@@ -81,19 +84,19 @@ Foam::splineEdge::splineEdge
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::splineEdge::~splineEdge()
+Foam::blockEdges::splineEdge::~splineEdge()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::point Foam::splineEdge::position(const scalar mu) const
+Foam::point Foam::blockEdges::splineEdge::position(const scalar mu) const
 {
     return CatmullRomSpline::position(mu);
 }
 
 
-Foam::scalar Foam::splineEdge::length() const
+Foam::scalar Foam::blockEdges::splineEdge::length() const
 {
     return CatmullRomSpline::length();
 }
diff --git a/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.H b/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.H
index cb9afb90322..4080b606c82 100644
--- a/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.H
+++ b/src/mesh/blockMesh/blockEdges/splineEdge/splineEdge.H
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::splineEdge
+    Foam::blockEdges::splineEdge
 
 Description
     A blockEdge interface for Catmull-Rom splines.
@@ -32,8 +32,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef splineEdge_H
-#define splineEdge_H
+#ifndef blockEdges_splineEdge_H
+#define blockEdges_splineEdge_H
 
 #include "blockEdge.H"
 #include "CatmullRomSpline.H"
@@ -42,6 +42,8 @@ SourceFiles
 
 namespace Foam
 {
+namespace blockEdges
+{
 
 /*---------------------------------------------------------------------------*\
                       Class splineEdge Declaration
@@ -104,6 +106,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End of namespace blockEdges
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/blockMesh/blockFaces/blockFace/blockFace.H b/src/mesh/blockMesh/blockFaces/blockFace/blockFace.H
index bbee0cb818a..b060031d5a4 100644
--- a/src/mesh/blockMesh/blockFaces/blockFace/blockFace.H
+++ b/src/mesh/blockMesh/blockFaces/blockFace/blockFace.H
@@ -32,8 +32,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef blockFaces_H
-#define blockFaces_H
+#ifndef blockFace_H
+#define blockFace_H
 
 #include "searchableSurfaces.H"
 
diff --git a/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C b/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C
index 4876230c077..fbc40094de6 100644
--- a/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C
+++ b/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C
@@ -30,15 +30,18 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace blockFaces
 {
     defineTypeNameAndDebug(projectFace, 0);
     addToRunTimeSelectionTable(blockFace, projectFace, Istream);
 }
+}
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-const Foam::searchableSurface& Foam::projectFace::lookupSurface
+const Foam::searchableSurface& Foam::blockFaces::projectFace::lookupSurface
 (
     const searchableSurfaces& geometry,
     Istream& is
@@ -64,7 +67,7 @@ const Foam::searchableSurface& Foam::projectFace::lookupSurface
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::projectFace::projectFace
+Foam::blockFaces::projectFace::projectFace
 (
     const searchableSurfaces& geometry,
     Istream& is
@@ -77,7 +80,7 @@ Foam::projectFace::projectFace
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::projectFace::project(pointField& points) const
+void Foam::blockFaces::projectFace::project(pointField& points) const
 {
     List<pointIndexHit> hits;
     scalarField nearestDistSqr
diff --git a/src/mesh/blockMesh/blockFaces/projectFace/projectFace.H b/src/mesh/blockMesh/blockFaces/projectFace/projectFace.H
index 787f5fe1528..44a2a25c540 100644
--- a/src/mesh/blockMesh/blockFaces/projectFace/projectFace.H
+++ b/src/mesh/blockMesh/blockFaces/projectFace/projectFace.H
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::projectFace
+    Foam::blockFaces::projectFace
 
 Description
     Projects the given set of face points onto the selected surface of the
@@ -33,8 +33,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef projectFace_H
-#define projectFace_H
+#ifndef blockFaces_projectFace_H
+#define blockFaces_projectFace_H
 
 #include "blockFace.H"
 
@@ -42,6 +42,8 @@ SourceFiles
 
 namespace Foam
 {
+namespace blockFaces
+{
 
 /*---------------------------------------------------------------------------*\
                            Class projectFace Declaration
@@ -102,6 +104,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace blockFaces
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/blockMesh/blockMesh/blockMesh.C b/src/mesh/blockMesh/blockMesh/blockMesh.C
index 458b7ee2b6d..366288e5ae7 100644
--- a/src/mesh/blockMesh/blockMesh/blockMesh.C
+++ b/src/mesh/blockMesh/blockMesh/blockMesh.C
@@ -25,7 +25,6 @@ License
 
 #include "blockMesh.H"
 #include "Time.H"
-#include "Switch.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -57,7 +56,12 @@ Foam::blockMesh::blockMesh(const IOdictionary& dict, const word& regionName)
         true
     ),
     scaleFactor_(1.0),
-    vertices_(dict.lookup("vertices")),
+    blockVertices_
+    (
+        dict.lookup("vertices"),
+        blockVertex::iNew(geometry_)
+    ),
+    vertices_(Foam::vertices(blockVertices_)),
     topologyPtr_(createTopology(dict, regionName))
 {
     Switch fastMerge(dict.lookupOrDefault<Switch>("fastMerge", false));
diff --git a/src/mesh/blockMesh/blockMesh/blockMesh.H b/src/mesh/blockMesh/blockMesh/blockMesh.H
index 2b07036d3b9..fcd3698c340 100644
--- a/src/mesh/blockMesh/blockMesh/blockMesh.H
+++ b/src/mesh/blockMesh/blockMesh/blockMesh.H
@@ -46,6 +46,7 @@ SourceFiles
 #include "searchableSurfaces.H"
 #include "polyMesh.H"
 #include "IOdictionary.H"
+#include "blockVertexList.H"
 #include "blockEdgeList.H"
 #include "blockFaceList.H"
 
@@ -73,7 +74,10 @@ class blockMesh
         //- The scaling factor to convert to metres
         scalar scaleFactor_;
 
-        //- Vertices defining the block mesh (corners)
+        //- The list of block vertices
+        blockVertexList blockVertices_;
+
+        //- The list of block vertex positions
         pointField vertices_;
 
         //- The list of curved edges
diff --git a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C b/src/mesh/blockMesh/blockMesh/blockMeshTopology.C
index aaa76ac22d3..ab998442051 100644
--- a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C
+++ b/src/mesh/blockMesh/blockMesh/blockMeshTopology.C
@@ -342,7 +342,6 @@ Foam::polyMesh* Foam::blockMesh::createTopology
         meshDescription.readIfPresent("scale", scaleFactor_);
     }
 
-
     // Read the block edges
     if (meshDescription.found("edges"))
     {
diff --git a/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C
new file mode 100644
index 00000000000..fe8ab41dc59
--- /dev/null
+++ b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C
@@ -0,0 +1,105 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 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 "blockVertex.H"
+#include "pointVertex.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    defineTypeNameAndDebug(blockVertex, 0);
+    defineRunTimeSelectionTable(blockVertex, Istream);
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::blockVertex::blockVertex()
+{}
+
+
+Foam::autoPtr<Foam::blockVertex> Foam::blockVertex::clone() const
+{
+    NotImplemented;
+    return autoPtr<blockVertex>(nullptr);
+}
+
+
+Foam::autoPtr<Foam::blockVertex> Foam::blockVertex::New
+(
+    const searchableSurfaces& geometry,
+    Istream& is
+)
+{
+    if (debug)
+    {
+        InfoInFunction << "Constructing blockVertex" << endl;
+    }
+
+    token firstToken(is);
+
+    if (firstToken.pToken() == token::BEGIN_LIST)
+    {
+        // Putback the opening bracket
+        is.putBack(firstToken);
+
+        return autoPtr<blockVertex>
+        (
+            new blockVertices::pointVertex(geometry, is)
+        );
+    }
+    else if (firstToken.isWord())
+    {
+        const word faceType(firstToken.wordToken());
+
+        IstreamConstructorTable::iterator cstrIter =
+            IstreamConstructorTablePtr_->find(faceType);
+
+        if (cstrIter == IstreamConstructorTablePtr_->end())
+        {
+            FatalErrorInFunction
+                << "Unknown blockVertex type "
+                << faceType << nl << nl
+                << "Valid blockVertex types are" << endl
+                << IstreamConstructorTablePtr_->sortedToc()
+                << abort(FatalError);
+        }
+
+        return autoPtr<blockVertex>(cstrIter()(geometry, is));
+    }
+    else
+    {
+        FatalIOErrorInFunction(is)
+            << "incorrect first token, expected <word> or '(', found "
+            << firstToken.info()
+            << exit(FatalIOError);
+
+        return autoPtr<blockVertex>(nullptr);
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.H b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.H
new file mode 100644
index 00000000000..7d5bb9fbd63
--- /dev/null
+++ b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.H
@@ -0,0 +1,127 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 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::blockVertex
+
+Description
+    Define a block vertex.
+
+SourceFiles
+    blockVertex.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef blockVertex_H
+#define blockVertex_H
+
+#include "searchableSurfaces.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class blockVertex Declaration
+\*---------------------------------------------------------------------------*/
+
+class blockVertex
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("blockVertex");
+
+
+    // Declare run-time constructor selection tables
+
+        declareRunTimeSelectionTable
+        (
+            autoPtr,
+            blockVertex,
+            Istream,
+            (
+                const searchableSurfaces& geometry,
+                Istream& is
+            ),
+            (geometry, is)
+        );
+
+
+    // Constructors
+
+        //- Construct null
+        blockVertex();
+
+        //- Clone function
+        virtual autoPtr<blockVertex> clone() const;
+
+        //- New function which constructs and returns pointer to a blockVertex
+        static autoPtr<blockVertex> New
+        (
+            const searchableSurfaces& geometry,
+            Istream&
+        );
+
+        //- Class used for the read-construction of
+        //  PtrLists of blockVertex
+        class iNew
+        {
+            const searchableSurfaces& geometry_;
+
+        public:
+
+            iNew(const searchableSurfaces& geometry)
+            :
+                geometry_(geometry)
+            {}
+
+            autoPtr<blockVertex> operator()(Istream& is) const
+            {
+                return blockVertex::New(geometry_, is);
+            }
+        };
+
+
+    //- Destructor
+    virtual ~blockVertex()
+    {}
+
+
+    // Member Functions
+
+        virtual operator point() const = 0;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/blockVertices/blockVertex/blockVertexList.H b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertexList.H
new file mode 100644
index 00000000000..bfab04c9b27
--- /dev/null
+++ b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertexList.H
@@ -0,0 +1,66 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 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/>.
+
+Typedef
+    Foam::blockVertexList
+
+Description
+    A PtrList of blockVertex
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef blockVertexList_H
+#define blockVertexList_H
+
+#include "blockVertex.H"
+#include "PtrList.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+typedef PtrList<blockVertex> blockVertexList;
+
+inline pointField vertices(const blockVertexList& bvl)
+{
+    pointField vertices(bvl.size());
+    forAll(bvl, pi)
+    {
+        vertices[pi] = bvl[pi];
+    }
+
+    return vertices;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.C b/src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.C
new file mode 100644
index 00000000000..4b3120d98b2
--- /dev/null
+++ b/src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.C
@@ -0,0 +1,61 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 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 "pointVertex.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace blockVertices
+{
+    defineTypeNameAndDebug(pointVertex, 0);
+    addToRunTimeSelectionTable(blockVertex, pointVertex, Istream);
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::blockVertices::pointVertex::pointVertex
+(
+    const searchableSurfaces& geometry,
+    Istream& is
+)
+:
+    vertex_(is)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::blockVertices::pointVertex::operator point() const
+{
+    return vertex_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.H b/src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.H
new file mode 100644
index 00000000000..9df74a71310
--- /dev/null
+++ b/src/mesh/blockMesh/blockVertices/pointVertex/pointVertex.H
@@ -0,0 +1,96 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 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::blockVertices::pointVertex
+
+Description
+
+SourceFiles
+    pointVertex.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef blockVertices_pointVertex_H
+#define blockVertices_pointVertex_H
+
+#include "blockVertex.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace blockVertices
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class pointVertex Declaration
+\*---------------------------------------------------------------------------*/
+
+class pointVertex
+:
+    public blockVertex
+{
+    // Private member data
+
+        //- The vertex location
+        point vertex_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("point");
+
+
+    // Constructors
+
+        //- Construct from Istream setting pointsList
+        pointVertex
+        (
+            const searchableSurfaces& geometry,
+            Istream&
+        );
+
+
+    //- Destructor
+    virtual ~pointVertex()
+    {}
+
+
+    // Member Functions
+
+        virtual operator point() const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace blockVertices
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.C b/src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.C
new file mode 100644
index 00000000000..a3d6c28d7e5
--- /dev/null
+++ b/src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.C
@@ -0,0 +1,100 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 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 "projectFace.H"
+#include "unitConversion.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    defineTypeNameAndDebug(projectFace, 0);
+    addToRunTimeSelectionTable(blockVertex, projectFace, Istream);
+}
+
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+const Foam::searchableSurface& Foam::projectFace::lookupSurface
+(
+    const searchableSurfaces& geometry,
+    Istream& is
+) const
+{
+    word name(is);
+
+    forAll(geometry, i)
+    {
+        if (geometry[i].name() == name)
+        {
+            return geometry[i];
+        }
+    }
+
+    FatalIOErrorInFunction(is)
+        << "Cannot find surface " << name << " in geometry"
+        << exit(FatalIOError);
+
+    return geometry[0];
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::projectFace::projectFace
+(
+    const searchableSurfaces& geometry,
+    Istream& is
+)
+:
+    blockVertex(is),
+    surface_(lookupSurface(geometry, is))
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::projectFace::project(pointField& points) const
+{
+    List<pointIndexHit> hits;
+    scalarField nearestDistSqr
+    (
+        points.size(),
+        magSqr(points[0] - points[points.size()-1])
+    );
+    surface_.findNearest(points, nearestDistSqr, hits);
+
+    forAll(hits, i)
+    {
+        if (hits[i].hit())
+        {
+            points[i] = hits[i].hitPoint();
+        }
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.H b/src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.H
new file mode 100644
index 00000000000..23e4fd10bfa
--- /dev/null
+++ b/src/mesh/blockMesh/blockVertices/projectVertex/projectVertex.H
@@ -0,0 +1,111 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 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::projectFace
+
+Description
+    Projects the given set of face points onto the selected surface of the
+    geometry provided as a searchableSurfaces object.
+
+SourceFiles
+    projectFace.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef projectFace_H
+#define projectFace_H
+
+#include "blockVertex.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class projectFace Declaration
+\*---------------------------------------------------------------------------*/
+
+class projectFace
+:
+    public blockVertex
+{
+    // Private data
+
+        //- The surface onto which the points are projected
+        const searchableSurface& surface_;
+
+
+    // Private Member Functions
+
+        const searchableSurface& lookupSurface
+        (
+            const searchableSurfaces& geometry,
+            Istream& is
+        ) const;
+
+        //- Disallow default bitwise copy construct
+        projectFace(const projectFace&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const projectFace&);
+
+
+public:
+
+    //- Runtime type information
+    TypeName("project");
+
+
+    // Constructors
+
+        //- Construct from Istream setting pointsList
+        projectFace
+        (
+            const searchableSurfaces& geometry,
+            Istream&
+        );
+
+
+    //- Destructor
+    virtual ~projectFace()
+    {}
+
+
+    // Member Functions
+
+        //- Project the given points onto the surface
+        virtual void project(pointField& points) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
-- 
GitLab