diff --git a/src/mesh/blockMesh/Make/files b/src/mesh/blockMesh/Make/files
index 98e1c9cf6..d17f08e04 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 fd7ac5d1e..b0f7b1412 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 77ca51abd..ad8baf22d 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 206d5db95..4e16c1826 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 8d11e1544..fcc799a42 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 .
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 55597f2de..5d012e053 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 c41ae669b..b7a71ff6d 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 .
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 24a64509a..86561f6ab 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 5ceaafc5c..45b443485 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 7eb5de7ec..e70ffd10b 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 .
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 c79097ce2..1396636a6 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 7458b393e..adcd7fd1b 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 .
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 511220bff..5a6be74f4 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 cb9afb903..4080b606c 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 .
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 bbee0cb81..b060031d5 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 4876230c0..fbc40094d 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 hits;
scalarField nearestDistSqr
diff --git a/src/mesh/blockMesh/blockFaces/projectFace/projectFace.H b/src/mesh/blockMesh/blockFaces/projectFace/projectFace.H
index 787f5fe15..44a2a25c5 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 .
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 458b7ee2b..366288e5a 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("fastMerge", false));
diff --git a/src/mesh/blockMesh/blockMesh/blockMesh.H b/src/mesh/blockMesh/blockMesh/blockMesh.H
index 2b07036d3..fcd3698c3 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 aaa76ac22..ab9984420 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 000000000..fe8ab41dc
--- /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 .
+
+\*---------------------------------------------------------------------------*/
+
+#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::clone() const
+{
+ NotImplemented;
+ return autoPtr(nullptr);
+}
+
+
+Foam::autoPtr 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
+ (
+ 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(cstrIter()(geometry, is));
+ }
+ else
+ {
+ FatalIOErrorInFunction(is)
+ << "incorrect first token, expected or '(', found "
+ << firstToken.info()
+ << exit(FatalIOError);
+
+ return autoPtr(nullptr);
+ }
+}
+
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.H b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.H
new file mode 100644
index 000000000..7d5bb9fbd
--- /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 .
+
+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 clone() const;
+
+ //- New function which constructs and returns pointer to a blockVertex
+ static autoPtr 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 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 000000000..bfab04c9b
--- /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 .
+
+Typedef
+ Foam::blockVertexList
+
+Description
+ A PtrList of blockVertex
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef blockVertexList_H
+#define blockVertexList_H
+
+#include "blockVertex.H"
+#include "PtrList.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+typedef PtrList 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 000000000..4b3120d98
--- /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 .
+
+\*---------------------------------------------------------------------------*/
+
+#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 000000000..9df74a713
--- /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 .
+
+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 000000000..a3d6c28d7
--- /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 .
+
+\*---------------------------------------------------------------------------*/
+
+#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 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 000000000..23e4fd10b
--- /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 .
+
+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
+
+// ************************************************************************* //