From 8058184b0cce02e5493054f4bc91948e5db59f64 Mon Sep 17 00:00:00 2001 From: Alexey Matveichev 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 8e4543a07d..697f90eb98 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(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 d370880aee..b8e8518eb5 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 0f69268500..3017c72a9e 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 1cf848eec4..c746d95dc6 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 7578920f82..6cec128d71 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))