From 8058184b0cce02e5493054f4bc91948e5db59f64 Mon Sep 17 00:00:00 2001 From: Alexey Matveichev <alexey@matveichev.com> Date: Fri, 1 Jun 2018 14:10:17 +0200 Subject: [PATCH] COMP: resolve 'point' ambiguity in foamyQuadMesh - CGAL Triangulation_2.h (version 4.12) defines a point function, which interferes with the Foam::point typedef. --- .../mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C | 4 ++-- .../mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H | 6 +++--- .../mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H | 6 +++--- .../mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C | 4 ++-- .../foamyQuadMesh/insertBoundaryConformPointPairs.C | 2 +- .../foamyMesh/foamyQuadMesh/insertFeaturePoints.C | 4 ++-- .../foamyQuadMesh/insertSurfaceNearestPointPairs.C | 5 +++-- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C index 8e4543a07d3..697f90eb983 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C @@ -150,7 +150,7 @@ Foam::CV2D::CV2D ), z_ ( - point + Foam::point ( cvMeshDict.subDict("surfaceConformation").lookup("locationInMesh") ).z() @@ -260,7 +260,7 @@ void Foam::CV2D::insertGrid() { for (int j=0; j<nj; j++) { - point p(x0 + i*deltax, y0 + j*deltay, 0); + Foam::point p(x0 + i*deltax, y0 + j*deltay, 0); if (meshControls().randomiseInitialGrid()) { diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H index c0e0e48987e..5a8eda8a5c5 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H @@ -347,9 +347,9 @@ public: // Conversion functions between point2D, point and Point - inline const point2D& toPoint2D(const point&) const; + inline const point2D& toPoint2D(const Foam::point&) const; inline const point2DField toPoint2D(const pointField&) const; - inline point toPoint3D(const point2D&) const; + inline Foam::point toPoint3D(const point2D&) const; #ifdef CGAL_INEXACT typedef const point2D& point2DFromPoint; @@ -361,7 +361,7 @@ public: inline point2DFromPoint toPoint2D(const Point&) const; inline PointFromPoint2D toPoint(const point2D&) const; - inline point toPoint3D(const Point&) const; + inline Foam::point toPoint3D(const Point&) const; // Point insertion diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H index e2720cc5ed8..5f848212d5d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H @@ -121,7 +121,7 @@ inline const Foam::cv2DControls& Foam::CV2D::meshControls() const } -inline const Foam::point2D& Foam::CV2D::toPoint2D(const point& p) const +inline const Foam::point2D& Foam::CV2D::toPoint2D(const Foam::point& p) const { return reinterpret_cast<const point2D&>(p); } @@ -140,7 +140,7 @@ inline const Foam::point2DField Foam::CV2D::toPoint2D(const pointField& p) const inline Foam::point Foam::CV2D::toPoint3D(const point2D& p) const { - return point(p.x(), p.y(), z_); + return Foam::point(p.x(), p.y(), z_); } @@ -175,7 +175,7 @@ inline Foam::CV2D::PointFromPoint2D Foam::CV2D::toPoint(const point2D& p) const inline Foam::point Foam::CV2D::toPoint3D(const Point& P) const { - return point(CGAL::to_double(P.x()), CGAL::to_double(P.y()), z_); + return Foam::point(CGAL::to_double(P.x()), CGAL::to_double(P.y()), z_); } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C index d370880aeee..b8e8518eb5f 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C @@ -210,8 +210,8 @@ void Foam::CV2D::extractPatches || (vB->internalOrBoundaryPoint() && !vA->internalOrBoundaryPoint()) ) { - point ptA = toPoint3D(vA->point()); - point ptB = toPoint3D(vB->point()); + Foam::point ptA = toPoint3D(vA->point()); + Foam::point ptB = toPoint3D(vB->point()); label patchIndex = qSurf_.findPatch(ptA, ptB); diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C index 0f69268500e..3017c72a9e7 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C @@ -295,7 +295,7 @@ void Foam::CV2D::markNearBoundaryPoints() { if (vit->internalPoint()) { - point vert(toPoint3D(vit->point())); + Foam::point vert(toPoint3D(vit->point())); pointIndexHit pHit; label hitSurface = -1; diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C index 1cf848eec46..c746d95dc62 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C @@ -109,8 +109,8 @@ void Foam::CV2D::insertFeaturePoints() { const edge& e = feMesh.edges()[edgeI]; - const point& ep0 = points[e.start()]; - const point& ep1 = points[e.end()]; + const Foam::point& ep0 = points[e.start()]; + const Foam::point& ep1 = points[e.end()]; const linePointRef line(ep0, ep1); diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C index 7578920f824..6cec128d71d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.C @@ -39,7 +39,7 @@ bool Foam::CV2D::dualCellSurfaceIntersection { if (!is_infinite(ec)) { - point e0 = toPoint3D(circumcenter(ec->first)); + Foam::point e0 = toPoint3D(circumcenter(ec->first)); // If edge end is outside bounding box then edge cuts boundary if (!qSurf_.globalBounds().contains(e0)) @@ -47,7 +47,8 @@ bool Foam::CV2D::dualCellSurfaceIntersection return true; } - point e1 = toPoint3D(circumcenter(ec->first->neighbor(ec->second))); + Foam::point e1 = + toPoint3D(circumcenter(ec->first->neighbor(ec->second))); // If other edge end is outside bounding box then edge cuts boundary if (!qSurf_.globalBounds().contains(e1)) -- GitLab