diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3Ddefs.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3Ddefs.H index 7d77df4169a209a7d0b919b22f97d5dbfea7e56f..3206ff673e26f6eec8a56b68ac045c2a764aca71 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3Ddefs.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3Ddefs.H @@ -31,9 +31,6 @@ Description otherwise the more robust but much less efficient Exact_predicates_exact_constructions will be used. - Define CGAL_HIERARCHY to use hierarchical Delaunay triangulation which is - faster but uses more memory than the standard Delaunay triangulation. - \*---------------------------------------------------------------------------*/ #ifndef CGALTriangulation3Ddefs_H @@ -60,20 +57,12 @@ Description typedef CGAL::indexedVertex<K> Vb; typedef CGAL::indexedCell<K> Cb; -#ifdef CGAL_HIERARCHY - // Data structures for hierarchical Delaunay triangulation which is more - // efficient but also uses more storage - #include "CGAL/Triangulation_hierarchy_3.h" - typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vb> Vbh; - typedef CGAL::Triangulation_data_structure_3<Vbh, Cb> Tds; - typedef CGAL::Delaunay_triangulation_3<K, Tds> Triangulation; - typedef CGAL::Triangulation_hierarchy_3<Triangulation> HTriangulation; -#else - // Data structures for standard Delaunay triangulation - typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds; - typedef CGAL::Delaunay_triangulation_3<K, Tds> Triangulation; - typedef Triangulation HTriangulation; -#endif +typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds; +typedef CGAL::Delaunay_triangulation_3 <K, Tds, CGAL::Fast_location> Delaunay; + +typedef Delaunay::Vertex_handle Vertex_handle; +typedef Delaunay::Cell_handle Cell_handle; +typedef Delaunay::Point Point; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index bcbc68c97b69644f62bd8059419cd5d6f2faae57..2b915374e5e40cf6d5cf8749320832e0f5dc9369 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -32,7 +32,7 @@ License Foam::tensor Foam::conformalVoronoiMesh::requiredAlignment ( - const point& pt + const Foam::point& pt ) const { pointIndexHit surfHit; @@ -126,7 +126,7 @@ Foam::tensor Foam::conformalVoronoiMesh::requiredAlignment //external spoke - point mirrorPt = pt + 2*d; + Foam::point mirrorPt = pt + 2*d; geometryToConformTo_.findSurfaceNearestIntersection ( @@ -220,7 +220,7 @@ void Foam::conformalVoronoiMesh::insertSurfacePointPairs const vector& normal = norm[0]; - const point& surfacePt(surfaceHits[i].hitPoint()); + const Foam::point& surfacePt(surfaceHits[i].hitPoint()); insertPointPair ( @@ -232,7 +232,7 @@ void Foam::conformalVoronoiMesh::insertSurfacePointPairs if(cvMeshControls().objOutput() && fName != fileName::null) { - List<point> surfacePts(surfaceHits.size()); + List<Foam::point> surfacePts(surfaceHits.size()); forAll(surfacePts, i) { @@ -272,7 +272,7 @@ void Foam::conformalVoronoiMesh::insertEdgePointGroups if(cvMeshControls().objOutput() && fName != fileName::null) { - List<point> edgePts(edgeHits.size()); + List<Foam::point> edgePts(edgeHits.size()); forAll(edgePts, i) { @@ -335,7 +335,7 @@ void Foam::conformalVoronoiMesh::insertExternalEdgePointGroup const pointIndexHit& edHit ) { - const point& edgePt = edHit.hitPoint(); + const Foam::point& edgePt = edHit.hitPoint(); scalar ppDist = pointPairDistance(edgePt); @@ -347,7 +347,7 @@ void Foam::conformalVoronoiMesh::insertExternalEdgePointGroup const vector& nB = feNormals[edNormalIs[1]]; // Convex. So refPt will be inside domain and hence a master point - point refPt = edgePt - ppDist*(nA + nB)/(1 + (nA & nB) + VSMALL); + Foam::point refPt = edgePt - ppDist*(nA + nB)/(1 + (nA & nB) + VSMALL); // Insert the master point referring the the first slave label masterPtIndex = insertPoint(refPt, number_of_vertices() + 1); @@ -355,10 +355,10 @@ void Foam::conformalVoronoiMesh::insertExternalEdgePointGroup // Insert the slave points by reflecting refPt in both faces. // with each slave refering to the master - point reflectedA = refPt + 2*ppDist*nA; + Foam::point reflectedA = refPt + 2*ppDist*nA; insertPoint(reflectedA, masterPtIndex); - point reflectedB = refPt + 2*ppDist*nB; + Foam::point reflectedB = refPt + 2*ppDist*nB; insertPoint(reflectedB, masterPtIndex); } @@ -369,7 +369,7 @@ void Foam::conformalVoronoiMesh::insertInternalEdgePointGroup const pointIndexHit& edHit ) { - const point& edgePt = edHit.hitPoint(); + const Foam::point& edgePt = edHit.hitPoint(); scalar ppDist = pointPairDistance(edgePt); @@ -381,15 +381,15 @@ void Foam::conformalVoronoiMesh::insertInternalEdgePointGroup const vector& nB = feNormals[edNormalIs[1]]; // Concave. master and reflected points inside the domain. - point refPt = edgePt - ppDist*(nA + nB)/(1 + (nA & nB) + VSMALL); + Foam::point refPt = edgePt - ppDist*(nA + nB)/(1 + (nA & nB) + VSMALL); // Generate reflected master to be outside. - point reflMasterPt = refPt + 2*(edgePt - refPt); + Foam::point reflMasterPt = refPt + 2*(edgePt - refPt); // Reflect reflMasterPt in both faces. - point reflectedA = reflMasterPt - 2*ppDist*nA; + Foam::point reflectedA = reflMasterPt - 2*ppDist*nA; - point reflectedB = reflMasterPt - 2*ppDist*nB; + Foam::point reflectedB = reflMasterPt - 2*ppDist*nB; scalar totalAngle = radToDeg(constant::mathematical::pi + acos(mag(nA & nB))); @@ -418,10 +418,10 @@ void Foam::conformalVoronoiMesh::insertInternalEdgePointGroup } else if (nAddPoints == 2) { - point reflectedAa = refPt + ppDist*nB; + Foam::point reflectedAa = refPt + ppDist*nB; insertPoint(reflectedAa, reflectedMaster); - point reflectedBb = refPt + ppDist*nA; + Foam::point reflectedBb = refPt + ppDist*nA; insertPoint(reflectedBb, reflectedMaster); } @@ -436,7 +436,7 @@ void Foam::conformalVoronoiMesh::insertFlatEdgePointGroup const pointIndexHit& edHit ) { - const point& edgePt = edHit.hitPoint(); + const Foam::point& edgePt = edHit.hitPoint(); scalar ppDist = pointPairDistance(edgePt); @@ -518,7 +518,7 @@ void Foam::conformalVoronoiMesh::createFeaturePoints() for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); vit++ ) @@ -558,12 +558,13 @@ void Foam::conformalVoronoiMesh::insertConvexFeaturePoints() { vectorField featPtNormals = feMesh.featurePointNormals(ptI); - const point& featPt = feMesh.points()[ptI]; + const Foam::point& featPt = feMesh.points()[ptI]; vector cornerNormal = sum(featPtNormals); cornerNormal /= mag(cornerNormal); - point internalPt = featPt - pointPairDistance(featPt)*cornerNormal; + Foam::point internalPt = + featPt - pointPairDistance(featPt)*cornerNormal; label internalPtIndex = insertPoint(internalPt, number_of_vertices() + 1); @@ -574,7 +575,7 @@ void Foam::conformalVoronoiMesh::insertConvexFeaturePoints() plane planeN = plane(featPt, n); - point externalPt = + Foam::point externalPt = internalPt + 2.0 * planeN.distance(internalPt) * n; insertPoint(externalPt, internalPtIndex); @@ -601,12 +602,13 @@ void Foam::conformalVoronoiMesh::insertConcaveFeaturePoints() { vectorField featPtNormals = feMesh.featurePointNormals(ptI); - const point& featPt = feMesh.points()[ptI]; + const Foam::point& featPt = feMesh.points()[ptI]; vector cornerNormal = sum(featPtNormals); cornerNormal /= mag(cornerNormal); - point externalPt = featPt + pointPairDistance(featPt)*cornerNormal; + Foam::point externalPt = + featPt + pointPairDistance(featPt)*cornerNormal; label externalPtIndex = number_of_vertices() + featPtNormals.size(); @@ -618,7 +620,7 @@ void Foam::conformalVoronoiMesh::insertConcaveFeaturePoints() plane planeN = plane(featPt, n); - point internalPt = + Foam::point internalPt = externalPt - 2.0 * planeN.distance(externalPt) * n; internalPtIndex = insertPoint(internalPt, externalPtIndex); @@ -686,7 +688,7 @@ void Foam::conformalVoronoiMesh::insertMixedFeaturePoints() continue; } - const point& pt(feMesh.points()[ptI]); + const Foam::point& pt(feMesh.points()[ptI]); scalar edgeGroupDistance = mixedFeaturePointDistance(pt); @@ -694,7 +696,7 @@ void Foam::conformalVoronoiMesh::insertMixedFeaturePoints() { label edgeI = pEds[e]; - point edgePt = + Foam::point edgePt = pt + edgeGroupDistance*feMesh.edgeDirection(edgeI, ptI); pointIndexHit edgeHit(true, edgePt, edgeI); @@ -709,7 +711,7 @@ void Foam::conformalVoronoiMesh::insertMixedFeaturePoints() void Foam::conformalVoronoiMesh::constructFeaturePointLocations() { - DynamicList<point> ftPtLocs; + DynamicList<Foam::point> ftPtLocs; const PtrList<featureEdgeMesh>& feMeshes(geometryToConformTo_.features()); @@ -753,8 +755,8 @@ Foam::conformalVoronoiMesh::featurePointTree() const treeBoundBox(geometryToConformTo_.bounds()).extend(rndGen_, 1E-4) ); - overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); - overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + overallBb.min() -= Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + overallBb.max() += Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); featurePointTreePtr_.reset ( @@ -773,7 +775,7 @@ Foam::conformalVoronoiMesh::featurePointTree() const } -bool Foam::conformalVoronoiMesh::nearFeaturePt(const point& pt) const +bool Foam::conformalVoronoiMesh::nearFeaturePt(const Foam::point& pt) const { const indexedOctree<treeDataPoint>& tree = featurePointTree(); @@ -883,14 +885,14 @@ void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment() for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); vit++ ) { if (vit->internalOrBoundaryPoint()) { - point pt(topoint(vit->point())); + Foam::point pt(topoint(vit->point())); pointIndexHit info = tree.findNearest(pt, spanSqr); @@ -904,7 +906,7 @@ void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment() // for // ( - // Triangulation::Finite_vertices_iterator vit = + // Delaunay::Finite_vertices_iterator vit = // finite_vertices_begin(); // vit != finite_vertices_end(); // vit++ @@ -924,7 +926,7 @@ void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment() Foam::face Foam::conformalVoronoiMesh::buildDualFace ( - const Triangulation::Finite_edges_iterator& eit + const Delaunay::Finite_edges_iterator& eit ) const { Cell_circulator ccStart = incident_cells(*eit); @@ -1000,7 +1002,7 @@ Foam::face Foam::conformalVoronoiMesh::buildDualFace Foam::label Foam::conformalVoronoiMesh::maxFilterCount ( - const Triangulation::Finite_edges_iterator& eit + const Delaunay::Finite_edges_iterator& eit ) const { Cell_circulator ccStart = incident_cells(*eit); @@ -1128,7 +1130,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh const dictionary& cvMeshDict ) : - HTriangulation(), + Delaunay(), runTime_(runTime), rndGen_(7864293), allGeometry_ @@ -1233,7 +1235,7 @@ void Foam::conformalVoronoiMesh::move() // Find the dual point of each tetrahedron and assign it an index. for ( - Triangulation::Finite_cells_iterator cit = finite_cells_begin(); + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); cit != finite_cells_end(); ++cit ) @@ -1286,7 +1288,7 @@ void Foam::conformalVoronoiMesh::move() for ( - Triangulation::Finite_edges_iterator eit = finite_edges_begin(); + Delaunay::Finite_edges_iterator eit = finite_edges_begin(); eit != finite_edges_end(); ++eit ) @@ -1303,8 +1305,8 @@ void Foam::conformalVoronoiMesh::move() Vertex_handle vA = c->vertex(eit->second); Vertex_handle vB = c->vertex(eit->third); - point dVA = topoint(vA->point()); - point dVB = topoint(vB->point()); + Foam::point dVA = topoint(vA->point()); + Foam::point dVB = topoint(vB->point()); Field<vector> alignmentDirsA = vA->alignment() & cartesianDirections; @@ -1505,7 +1507,7 @@ void Foam::conformalVoronoiMesh::move() // Limit displacements that pierce, or get too close to the surface for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) @@ -1528,7 +1530,7 @@ void Foam::conformalVoronoiMesh::move() for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index f154aad463945224d8dd197c34dcb7c70743c7cc..356a8cfa7c7f20183304f4258503ee2b48e326a0 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -37,7 +37,6 @@ SourceFiles #define conformalVoronoiMesh_H //#define CGAL_INEXACT -#define CGAL_HIERARCHY #include "CGALTriangulation3Ddefs.H" #include "uint.H" @@ -64,6 +63,7 @@ SourceFiles #include "labelPair.H" #include "HashSet.H" #include "memInfo.H" +#include "point.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -84,7 +84,7 @@ class faceAreaWeightModel; class conformalVoronoiMesh : - public HTriangulation + public Delaunay { public: @@ -178,7 +178,7 @@ private: // to be on a surface. inline scalar targetCellSize ( - const point& pt, + const Foam::point& pt, bool isSurfacePoint = false ) const; @@ -204,34 +204,40 @@ private: // a dual edge inline scalar averageAnyCellSize ( - const Triangulation::Finite_facets_iterator& fit + const Delaunay::Finite_facets_iterator& fit ) const; //- Return the local point pair separation at the given location - inline scalar pointPairDistance(const point& pt) const; + inline scalar pointPairDistance(const Foam::point& pt) const; //- Return the local mixed feature point placement distance - inline scalar mixedFeaturePointDistance(const point& pt) const; + inline scalar mixedFeaturePointDistance(const Foam::point& pt) const; //- Return the square of the local feature point exclusion distance - inline scalar featurePointExclusionDistanceSqr(const point& pt) const; + inline scalar featurePointExclusionDistanceSqr + ( + const Foam::point& pt + ) const; //- Return the square of the local feature edge exclusion distance - inline scalar featureEdgeExclusionDistanceSqr(const point& pt) const; + inline scalar featureEdgeExclusionDistanceSqr + ( + const Foam::point& pt + ) const; //- Return the square of the local surface search distance - inline scalar surfaceSearchDistanceSqr(const point& pt) const; + inline scalar surfaceSearchDistanceSqr(const Foam::point& pt) const; //- Return the local maximum surface protrusion distance - inline scalar maxSurfaceProtrusion(const point& pt) const; + inline scalar maxSurfaceProtrusion(const Foam::point& pt) const; //- Return the required alignment directions at the given location - tensor requiredAlignment(const point& pt) const; + tensor requiredAlignment(const Foam::point& pt) const; //- Insert point and return its index inline label insertPoint ( - const point& pt, + const Foam::point& pt, const label type ); @@ -244,7 +250,7 @@ private: inline void insertPointPair ( const scalar ppDist, - const point& surfPt, + const Foam::point& surfPt, const vector& n ); @@ -343,7 +349,7 @@ private: const indexedOctree<treeDataPoint>& featurePointTree() const; //- Check if a location is in exclusion range around a feature point - bool nearFeaturePt(const point& pt) const; + bool nearFeaturePt(const Foam::point& pt) const; //- Insert the initial points into the triangulation, based on the // initialPointsMethod @@ -365,7 +371,7 @@ private: //- Builds a dual face by circulating around the supplied edge. face buildDualFace ( - const Triangulation::Finite_edges_iterator& eit + const Delaunay::Finite_edges_iterator& eit ) const; //- Finds the maximum filterCount of the dual vertices @@ -373,7 +379,7 @@ private: // supplied edge label maxFilterCount ( - const Triangulation::Finite_edges_iterator& eit + const Delaunay::Finite_edges_iterator& eit ) const; //- Determines the owner and neighbour labels for dual cells @@ -406,14 +412,14 @@ private: // intersects the boundary and hence reqires a point-pair bool dualCellSurfaceAnyIntersection ( - const Triangulation::Finite_vertices_iterator& vit + const Delaunay::Finite_vertices_iterator& vit ) const; //- Find the "worst" protrusion of a dual cell through the surface, // subject to the tolerance void dualCellLargestSurfaceProtrusion ( - const Triangulation::Finite_vertices_iterator& vit, + const Delaunay::Finite_vertices_iterator& vit, pointIndexHit& surfHit, label& hitSurface ) const; @@ -422,7 +428,7 @@ private: // surface to be meshed or come too close to it void limitDisplacement ( - const Triangulation::Finite_vertices_iterator& vit, + const Delaunay::Finite_vertices_iterator& vit, vector& displacement, label callCount = 0 ) const; @@ -431,8 +437,8 @@ private: //- edge conformation location bool nearFeatureEdgeLocation ( - const point& pt, - DynamicList<point>& newEdgeLocations, + const Foam::point& pt, + DynamicList<Foam::point>& newEdgeLocations, pointField& existingEdgeLocations, autoPtr<indexedOctree<treeDataPoint> >& edgeLocationTree ) const; @@ -451,8 +457,8 @@ private: // and edge conformation locations to add void addSurfaceAndEdgeHits ( - const Triangulation::Finite_vertices_iterator& vit, - const point& vert, + const Delaunay::Finite_vertices_iterator& vit, + const Foam::point& vert, const pointIndexHit& surfHit, label hitSurface, scalar surfacePtReplaceDistCoeffSqr, @@ -461,7 +467,7 @@ private: DynamicList<label>& hitSurfaces, DynamicList<pointIndexHit>& featureEdgeHits, DynamicList<label>& featureEdgeFeaturesHit, - DynamicList<point>& newEdgeLocations, + DynamicList<Foam::point>& newEdgeLocations, pointField& existingEdgeLocations, autoPtr<indexedOctree<treeDataPoint> >& edgeLocationTree ) const; @@ -504,14 +510,14 @@ private: // edge is a boundary face inline bool isBoundaryDualFace ( - const Triangulation::Finite_edges_iterator& eit + const Delaunay::Finite_edges_iterator& eit ) const; //- Determines if the dual vertex constructed by the Delaunay // cell is a boundary vertex inline bool isBoundaryDualVertex ( - const Triangulation::Finite_cells_iterator& cit + const Delaunay::Finite_cells_iterator& cit ) const; //- Merge vertices that are very close together @@ -691,19 +697,19 @@ public: //- Conversion functions between point (OpenFOAM) and Point (CGAL) # ifdef CGAL_INEXACT - typedef const point& pointFromPoint; + typedef const Foam::point& pointFromPoint; typedef const Point& PointFrompoint; # else - typedef point pointFromPoint; + typedef Foam::point pointFromPoint; typedef Point PointFrompoint; # endif inline pointFromPoint topoint(const Point&) const; - inline PointFrompoint toPoint(const point&) const; + inline PointFrompoint toPoint(const Foam::point&) const; typedef K::Vector_3 CGALVector; - inline CGALVector toCGALVector(const point& pt) const; + inline CGALVector toCGALVector(const Foam::point& pt) const; // Access @@ -739,7 +745,7 @@ public: void writePoints ( const fileName& fName, - const List<point>& points + const List<Foam::point>& points ) const; //- Write the internal Delaunay vertices of the tessellation as a diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index ef877df0d0008d1493e1a4267da723ce27c6bbd5..3e165380bdea30d405772ee734e3acc2622a9c05 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -59,7 +59,7 @@ void Foam::conformalVoronoiMesh::calcDualMesh for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) @@ -81,7 +81,7 @@ void Foam::conformalVoronoiMesh::calcDualMesh for ( - Triangulation::Finite_cells_iterator cit = finite_cells_begin(); + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); cit != finite_cells_end(); ++cit ) @@ -236,7 +236,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) @@ -255,7 +255,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh for ( - Triangulation::Finite_cells_iterator cit = finite_cells_begin(); + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); cit != finite_cells_end(); ++cit ) @@ -302,7 +302,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh for ( - Triangulation::Finite_facets_iterator fit = finite_facets_begin(); + Delaunay::Finite_facets_iterator fit = finite_facets_begin(); fit != finite_facets_end(); ++fit ) @@ -457,7 +457,7 @@ Foam::label Foam::conformalVoronoiMesh::mergeCloseDualVertices for ( - Triangulation::Finite_facets_iterator fit = finite_facets_begin(); + Delaunay::Finite_facets_iterator fit = finite_facets_begin(); fit != finite_facets_end(); ++fit ) @@ -542,7 +542,7 @@ void Foam::conformalVoronoiMesh::smoothSurface if (++iterI > cvMeshControls().maxCollapseIterations()) { - Info<< nl << "maxCollapseIterations reached, stopping collapse" + Info<< " maxCollapseIterations reached, stopping collapse" << endl; break; @@ -554,7 +554,7 @@ void Foam::conformalVoronoiMesh::smoothSurface for ( - Triangulation::Finite_cells_iterator cit = finite_cells_begin(); + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); cit != finite_cells_end(); ++cit ) @@ -574,7 +574,7 @@ void Foam::conformalVoronoiMesh::smoothSurface { if (boundaryPts[ptI] == true) { - point& pt = pts[ptI]; + Foam::point& pt = pts[ptI]; pointIndexHit surfHit; label hitSurface; @@ -617,7 +617,7 @@ Foam::label Foam::conformalVoronoiMesh::smoothSurfaceDualFaces for ( - Triangulation::Finite_edges_iterator eit = finite_edges_begin(); + Delaunay::Finite_edges_iterator eit = finite_edges_begin(); eit != finite_edges_end(); ++eit ) @@ -802,7 +802,7 @@ Foam::label Foam::conformalVoronoiMesh::collapseFaces for ( - Triangulation::Finite_edges_iterator eit = finite_edges_begin(); + Delaunay::Finite_edges_iterator eit = finite_edges_begin(); eit != finite_edges_end(); ++eit ) @@ -935,7 +935,7 @@ Foam::conformalVoronoiMesh::collapseFace labelList facePts(f); - const point fC = f.centre(pts); + const Foam::point fC = f.centre(pts); vector fN = f.normal(pts); @@ -1057,7 +1057,7 @@ Foam::conformalVoronoiMesh::collapseFace forAll(f, fPtI) { - const point& pt = pts[f[fPtI]]; + const Foam::point& pt = pts[f[fPtI]]; d[fPtI] = (collapseAxis & (pt - fC)); } @@ -1190,7 +1190,7 @@ Foam::conformalVoronoiMesh::collapseFace label collapseToPtI = facePtsNeg.first(); - point collapseToPt = + Foam::point collapseToPt = collapseAxis*(sum(dNeg)/dNeg.size() - dShift) + fC; forAll(facePtsNeg, fPtI) @@ -1260,7 +1260,7 @@ Foam::conformalVoronoiMesh::collapseFace { label collapseToPtI = facePts.first(); - point collapseToPt = fC; + Foam::point collapseToPt = fC; forAll(facePts, fPtI) { @@ -1592,7 +1592,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality for ( - Triangulation::Finite_cells_iterator cit = finite_cells_begin(); + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); cit != finite_cells_end(); ++cit ) @@ -1638,7 +1638,7 @@ void Foam::conformalVoronoiMesh::indexDualVertices for ( - Triangulation::Finite_cells_iterator cit = finite_cells_begin(); + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); cit != finite_cells_end(); ++cit ) @@ -1689,7 +1689,7 @@ void Foam::conformalVoronoiMesh::reindexDualVertices { for ( - Triangulation::Finite_cells_iterator cit = finite_cells_begin(); + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); cit != finite_cells_end(); ++cit ) @@ -1737,7 +1737,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches for ( - Triangulation::Finite_edges_iterator eit = finite_edges_begin(); + Delaunay::Finite_edges_iterator eit = finite_edges_begin(); eit != finite_edges_end(); ++eit ) @@ -1768,8 +1768,8 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches { // boundary face - point ptA = topoint(vA->point()); - point ptB = topoint(vB->point()); + Foam::point ptA = topoint(vA->point()); + Foam::point ptB = topoint(vB->point()); label patchIndex = geometryToConformTo_.findPatch(ptA, ptB); @@ -1846,7 +1846,7 @@ void Foam::conformalVoronoiMesh::createCellCentres for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index e2907bd36c3d8f82d030396ed0011707e19b1626..c409ca912f0e5c3b2cc83ab0102161723b190429 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -105,7 +105,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation startOfSurfacePointPairs_ = number_of_vertices(); // Initialise containers to store the edge conformation locations - DynamicList<point> newEdgeLocations; + DynamicList<Foam::point> newEdgeLocations; pointField existingEdgeLocations(0); @@ -132,7 +132,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation for ( - Triangulation::Finite_vertices_iterator vit = + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); vit++ @@ -140,7 +140,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation { if (vit->internalPoint()) { - point vert(topoint(vit->point())); + Foam::point vert(topoint(vit->point())); scalar searchDistanceSqr = surfaceSearchDistanceSqr(vert); pointIndexHit surfHit; label hitSurface; @@ -247,7 +247,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation for ( - Triangulation::Finite_vertices_iterator vit = + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); vit++ @@ -259,7 +259,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation if (vit->nearBoundary() || vit->ppMaster()) { - point vert(topoint(vit->point())); + Foam::point vert(topoint(vit->point())); pointIndexHit surfHit; label hitSurface; @@ -336,7 +336,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation // for // ( - // Triangulation::Finite_vertices_iterator vit = + // Delaunay::Finite_vertices_iterator vit = // finite_vertices_begin(); // vit != finite_vertices_end(); // vit++ @@ -344,7 +344,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation // { // if (vit->internalOrBoundaryPoint()) // { - // point vert(topoint(vit->point())); + // Foam::point vert(topoint(vit->point())); // pointIndexHit surfHit; // label hitSurface; @@ -371,7 +371,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation bool Foam::conformalVoronoiMesh::dualCellSurfaceAnyIntersection ( - const Triangulation::Finite_vertices_iterator& vit + const Delaunay::Finite_vertices_iterator& vit ) const { std::list<Facet> facets; @@ -393,7 +393,7 @@ bool Foam::conformalVoronoiMesh::dualCellSurfaceAnyIntersection return true; } - point dE0 = topoint(dual(fit->first)); + Foam::point dE0 = topoint(dual(fit->first)); // If edge end is outside bounding box then edge cuts boundary if (!geometryToConformTo_.bounds().contains(dE0)) @@ -401,7 +401,7 @@ bool Foam::conformalVoronoiMesh::dualCellSurfaceAnyIntersection return true; } - point dE1 = topoint(dual(fit->first->neighbor(fit->second))); + Foam::point dE1 = topoint(dual(fit->first->neighbor(fit->second))); // If other edge end is outside bounding box then edge cuts boundary if (!geometryToConformTo_.bounds().contains(dE1)) @@ -422,7 +422,7 @@ bool Foam::conformalVoronoiMesh::dualCellSurfaceAnyIntersection void Foam::conformalVoronoiMesh::dualCellLargestSurfaceProtrusion ( - const Triangulation::Finite_vertices_iterator& vit, + const Delaunay::Finite_vertices_iterator& vit, pointIndexHit& surfHitLargest, label& hitSurfaceLargest ) const @@ -430,7 +430,7 @@ void Foam::conformalVoronoiMesh::dualCellLargestSurfaceProtrusion std::list<Facet> facets; incident_facets(vit, std::back_inserter(facets)); - point vert(topoint(vit->point())); + Foam::point vert(topoint(vit->point())); scalar maxProtrusionDistance = maxSurfaceProtrusion(vert); @@ -447,7 +447,7 @@ void Foam::conformalVoronoiMesh::dualCellLargestSurfaceProtrusion && !is_infinite(fit->first->neighbor(fit->second)) ) { - point edgeMid = + Foam::point edgeMid = 0.5 *( topoint(dual(fit->first)) @@ -495,7 +495,7 @@ void Foam::conformalVoronoiMesh::dualCellLargestSurfaceProtrusion void Foam::conformalVoronoiMesh::limitDisplacement ( - const Triangulation::Finite_vertices_iterator& vit, + const Delaunay::Finite_vertices_iterator& vit, vector& displacement, label callCount ) const @@ -508,8 +508,8 @@ void Foam::conformalVoronoiMesh::limitDisplacement return; } - point pt = topoint(vit->point()); - point dispPt = pt + displacement; + Foam::point pt = topoint(vit->point()); + Foam::point dispPt = pt + displacement; bool limit = false; @@ -582,8 +582,8 @@ void Foam::conformalVoronoiMesh::limitDisplacement bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation ( - const point& pt, - DynamicList<point>& newEdgeLocations, + const Foam::point& pt, + DynamicList<Foam::point>& newEdgeLocations, pointField& existingEdgeLocations, autoPtr<indexedOctree<treeDataPoint> >& edgeLocationTree ) const @@ -637,8 +637,8 @@ void Foam::conformalVoronoiMesh::buildEdgeLocationTree treeBoundBox(geometryToConformTo_.bounds()).extend(rndGen_, 1E-4) ); - overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); - overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + overallBb.min() -= Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + overallBb.max() += Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); edgeLocationTree.reset ( @@ -661,8 +661,8 @@ void Foam::conformalVoronoiMesh::buildSizeAndAlignmentTree() const treeBoundBox(geometryToConformTo_.bounds()).extend(rndGen_, 1E-4) ); - overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); - overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + overallBb.min() -= Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + overallBb.max() += Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); sizeAndAlignmentTreePtr_.reset ( @@ -680,8 +680,8 @@ void Foam::conformalVoronoiMesh::buildSizeAndAlignmentTree() const void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits ( - const Triangulation::Finite_vertices_iterator& vit, - const point& vert, + const Delaunay::Finite_vertices_iterator& vit, + const Foam::point& vert, const pointIndexHit& surfHit, label hitSurface, scalar surfacePtReplaceDistCoeffSqr, @@ -690,7 +690,7 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits DynamicList<label>& hitSurfaces, DynamicList<pointIndexHit>& featureEdgeHits, DynamicList<label>& featureEdgeFeaturesHit, - DynamicList<point>& newEdgeLocations, + DynamicList<Foam::point>& newEdgeLocations, pointField& existingEdgeLocations, autoPtr<indexedOctree<treeDataPoint> >& edgeLocationTree ) const @@ -727,7 +727,7 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits // loop as they will prevent nearby edge locations of different types being // conformed to. - DynamicList<point> currentEdgeLocations; + DynamicList<Foam::point> currentEdgeLocations; forAll(edHits, i) { @@ -799,7 +799,7 @@ void Foam::conformalVoronoiMesh::storeSurfaceConformation() for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); vit++ ) diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C index 5ae7202ac36539444552df4b27f40a394c88535a..59e920da4f1c78e206eda40dbff36913dcc31624 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C @@ -94,13 +94,258 @@ bool Foam::conformalVoronoiMesh::insertSpecialisedFeaturePoint if (nExternal == 2 && nInternal == 1) { - Info<< "nExternal == 2 && nInternal == 1" << endl; + // Info<< "nExternal == 2 && nInternal == 1" << endl; + + // const Foam::point& featPt = feMesh.points()[ptI]; + + // scalar ppDist = pointPairDistance(featPt); + + // const vectorField& normals = feMesh.normals(); + + // const labelListList& edgeNormals = feMesh.edgeNormals(); + + // label concaveEdgeI = pEds + // [ + // findIndex(allEdStat, featureEdgeMesh::INTERNAL) + // ]; + + // // // Find which planes are joined to the concave edge + + // // List<label> concaveEdgePlanes(2,label(-1)); + + // // label concaveEdgeI = concaveEdges[0]; + + // // // Pick up the two faces adjacent to the concave feature edge + // // const labelList& eFaces = qSurf_.edgeFaces()[concaveEdgeI]; + + // // label faceA = eFaces[0]; + + // // vector nA = qSurf_.faceNormals()[faceA]; + + // // scalar maxNormalDotProduct = -SMALL; + + // // forAll(uniquePlaneNormals, uPN) + // // { + // // scalar normalDotProduct = nA & uniquePlaneNormals[uPN]; + + // // if (normalDotProduct > maxNormalDotProduct) + // // { + // // maxNormalDotProduct = normalDotProduct; + + // // concaveEdgePlanes[0] = uPN; + // // } + // // } + + // // label faceB = eFaces[1]; + // // vector nB = qSurf_.faceNormals()[faceB]; + + // // maxNormalDotProduct = -SMALL; + + // // forAll(uniquePlaneNormals, uPN) + // // { + // // scalar normalDotProduct = nB & uniquePlaneNormals[uPN]; + + // // if (normalDotProduct > maxNormalDotProduct) + // // { + // // maxNormalDotProduct = normalDotProduct; + + // // concaveEdgePlanes[1] = uPN; + // // } + // // } + + // // const vector& concaveEdgePlaneANormal = + // // uniquePlaneNormals[concaveEdgePlanes[0]]; + + // // const vector& concaveEdgePlaneBNormal = + // // uniquePlaneNormals[concaveEdgePlanes[1]]; + + // // label convexEdgesPlaneI; + + // // if (findIndex(concaveEdgePlanes, 0) == -1) + // // { + // // convexEdgesPlaneI = 0; + // // } + // // else if (findIndex(concaveEdgePlanes, 1) == -1) + // // { + // // convexEdgesPlaneI = 1; + // // } + // // else + // // { + // // convexEdgesPlaneI = 2; + // // } + + // // const vector& convexEdgesPlaneNormal = + // // uniquePlaneNormals[convexEdgesPlaneI]; + + // // const edge& concaveEdge = edges[concaveEdgeI]; + + // // // Check direction of edge, if the feature point is at the end() + // // // the reverse direction. + + // // scalar edgeDirection = 1.0; + + // // if (ptI == concaveEdge.end()) + // // { + // // edgeDirection *= -1.0; + // // } + + + // const vector& concaveEdgePlaneANormal = + // normals[edgeNormals[concaveEdgeI][0]]; + + // const vector& concaveEdgePlaneBNormal = + // normals[edgeNormals[concaveEdgeI][1]]; + + // // Intersect planes parallel to the concave edge planes offset + // // by ppDist and the plane defined by featPt and the edge + // // vector. + // plane planeA + // ( + // featPt + ppDist*concaveEdgePlaneANormal, + // concaveEdgePlaneANormal + // ); + + // plane planeB + // ( + // featPt + ppDist*concaveEdgePlaneBNormal, + // concaveEdgePlaneBNormal + // ); + + // const vector& concaveEdgeDir = feMesh.edgeDirection + // ( + // concaveEdgeI, + // ptI + // ); + + // Foam::point concaveEdgeLocalFeatPt = featPt + ppDist*concaveEdgeDir; + + // // Finding the nearest point on the intersecting line to the + // // edge point. Floating point errors often encountered using + // // planePlaneIntersect + + // plane planeF(concaveEdgeLocalFeatPt, concaveEdgeDir); + + // Foam::point concaveEdgeExternalPt = planeF.planePlaneIntersect + // ( + // planeA, + // planeB + // ); + + // label concaveEdgeExternalPtI = number_of_vertices() + 4; + + // // Redefine planes to be on the feature surfaces to project + // // through + + // planeA = plane(featPt, concaveEdgePlaneANormal); + + // planeB = plane(featPt, concaveEdgePlaneBNormal); + + // Foam::point internalPtA = + // concaveEdgeExternalPt + // - 2*planeA.distance(concaveEdgeExternalPt) + // *concaveEdgePlaneANormal; + + // label internalPtAI = insertPoint + // ( + // internalPtA, + // concaveEdgeExternalPtI + // ); + + // Foam::point internalPtB = + // concaveEdgeExternalPt + // - 2*planeB.distance(concaveEdgeExternalPt) + // *concaveEdgePlaneBNormal; + + // label internalPtBI = insertPoint + // ( + // internalPtB, + // concaveEdgeExternalPtI + // ); + + // // TEMPORARY VARIABLE TO TEST + // vector convexEdgesPlaneNormal = -concaveEdgeDir; + + // plane planeC(featPt, convexEdgesPlaneNormal); + // Foam::point externalPtD = + // internalPtA + // + 2*planeC.distance(internalPtA)*convexEdgesPlaneNormal; + + // insertPoint(externalPtD, internalPtAI); + + // Foam::point externalPtE = + // internalPtB + // + 2*planeC.distance(internalPtB)*convexEdgesPlaneNormal; + + // insertPoint(externalPtE, internalPtBI); + + // insertPoint(concaveEdgeExternalPt, internalPtAI); + + // Info<< nl << "# featPt " << endl; + // meshTools::writeOBJ(Info, featPt); + // Info<< "# internalPtA" << endl; + // meshTools::writeOBJ(Info, internalPtA); + // Info<< "# internalPtB" << endl; + // meshTools::writeOBJ(Info, internalPtB); + // Info<< "# externalPtD" << endl; + // meshTools::writeOBJ(Info, externalPtD); + // Info<< "# externalPtE" << endl; + // meshTools::writeOBJ(Info, externalPtE); + + // scalar totalAngle = radToDeg + // ( + // constant::mathematical::pi + + // acos(mag(concaveEdgePlaneANormal & concaveEdgePlaneBNormal)) + // ); + + // if (totalAngle > cvMeshControls().maxQuadAngle()) + // { + // // Add additional mitering points + + // scalar angleSign = 1.0; + + // if + // ( + // geometryToConformTo_.outside + // ( + // featPt - convexEdgesPlaneNormal*ppDist + // ) + // ) + // { + // angleSign = -1.0; + // } + + // scalar phi = + // angleSign*acos(concaveEdgeDir & -convexEdgesPlaneNormal); + + // scalar guard = + // ( + // 1 + sin(phi)*ppDist/mag + // ( + // concaveEdgeLocalFeatPt - concaveEdgeExternalPt + // ) + // )/cos(phi) - 1; + + // Foam::point internalPtF = + // concaveEdgeExternalPt + // + (2 + guard)*(concaveEdgeLocalFeatPt - concaveEdgeExternalPt); + + // label internalPtFI = + // insertPoint(internalPtF, number_of_vertices() + 1); + + // Foam::point externalPtG = + // internalPtF + // + 2*planeC.distance(internalPtF) * convexEdgesPlaneNormal; + + // insertPoint(externalPtG, internalPtFI); + // } + + // return true; return false; } else if (nExternal == 1 && nInternal == 2) { - Info<< "nExternal == 1 && nInternal == 2" << endl; + // Info<< "nExternal == 1 && nInternal == 2" << endl; return false; } diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H index bd48286a7268cd2c569a904266009f311bd348b4..79058f4b8e3ec1e67aa74db138b33e856829a32f 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H @@ -27,7 +27,7 @@ License inline Foam::scalar Foam::conformalVoronoiMesh::targetCellSize ( - const point& pt, + const Foam::point& pt, bool isSurfacePoint ) const { @@ -93,7 +93,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::averageAnyCellSize inline Foam::scalar Foam::conformalVoronoiMesh::averageAnyCellSize ( - const Triangulation::Finite_facets_iterator& fit + const Delaunay::Finite_facets_iterator& fit ) const { // Geometric mean @@ -138,7 +138,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::averageAnyCellSize inline Foam::scalar Foam::conformalVoronoiMesh::pointPairDistance ( - const point& pt + const Foam::point& pt ) const { // Point pair distances are always going to be at the surface, so the @@ -150,7 +150,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::pointPairDistance inline Foam::scalar Foam::conformalVoronoiMesh::mixedFeaturePointDistance ( - const point& pt + const Foam::point& pt ) const { return @@ -161,7 +161,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::mixedFeaturePointDistance inline Foam::scalar Foam::conformalVoronoiMesh::featurePointExclusionDistanceSqr ( - const point& pt + const Foam::point& pt ) const { // Exclusion distance tests are always going to be at the surface, so the @@ -178,7 +178,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::featurePointExclusionDistanceSqr inline Foam::scalar Foam::conformalVoronoiMesh::featureEdgeExclusionDistanceSqr ( - const point& pt + const Foam::point& pt ) const { // Exclusion distance tests are always going to be at the surface, so the @@ -195,7 +195,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::featureEdgeExclusionDistanceSqr inline Foam::scalar Foam::conformalVoronoiMesh::surfaceSearchDistanceSqr ( - const point& pt + const Foam::point& pt ) const { return @@ -205,7 +205,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::surfaceSearchDistanceSqr inline Foam::scalar Foam::conformalVoronoiMesh::maxSurfaceProtrusion ( - const point& pt + const Foam::point& pt ) const { return targetCellSize(pt)*cvMeshControls().maxSurfaceProtrusionCoeff(); @@ -214,7 +214,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::maxSurfaceProtrusion inline Foam::label Foam::conformalVoronoiMesh::insertPoint ( - const point& p, + const Foam::point& p, const label type ) { @@ -254,7 +254,7 @@ inline void Foam::conformalVoronoiMesh::insertPoints for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) @@ -270,7 +270,7 @@ inline void Foam::conformalVoronoiMesh::insertPoints inline void Foam::conformalVoronoiMesh::insertPointPair ( const scalar ppDist, - const point& surfPt, + const Foam::point& surfPt, const vector& n ) { @@ -319,7 +319,7 @@ inline void Foam::conformalVoronoiMesh::insertVb(const Vb& v, label offset) inline bool Foam::conformalVoronoiMesh::isBoundaryDualFace ( - const Triangulation::Finite_edges_iterator& eit + const Delaunay::Finite_edges_iterator& eit ) const { Cell_handle c = eit->first; @@ -344,7 +344,7 @@ inline bool Foam::conformalVoronoiMesh::isBoundaryDualFace inline bool Foam::conformalVoronoiMesh::isBoundaryDualVertex ( - const Triangulation::Finite_cells_iterator& cit + const Delaunay::Finite_cells_iterator& cit ) const { // A dual vertex on the boundary will result from a Delaunay cell @@ -385,7 +385,7 @@ Foam::conformalVoronoiMesh::topoint inline Foam::conformalVoronoiMesh::PointFrompoint Foam::conformalVoronoiMesh::toPoint ( - const point& p + const Foam::point& p ) const { return reinterpret_cast<PointFrompoint>(p); @@ -400,7 +400,7 @@ Foam::conformalVoronoiMesh::topoint const Point& P ) const { - return point + return Foam::point ( CGAL::to_double(P.x()), CGAL::to_double(P.y()), @@ -412,7 +412,7 @@ Foam::conformalVoronoiMesh::topoint inline Foam::conformalVoronoiMesh::PointFrompoint Foam::conformalVoronoiMesh::toPoint ( - const point& p + const Foam::point& p ) const { return Point(p.x(), p.y(), p.z()); @@ -422,7 +422,7 @@ Foam::conformalVoronoiMesh::toPoint inline Foam::conformalVoronoiMesh::CGALVector -Foam::conformalVoronoiMesh::toCGALVector(const point& pt) const +Foam::conformalVoronoiMesh::toCGALVector(const Foam::point& pt) const { return CGALVector(pt.x(), pt.y(), pt.z()); } diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index a4925257518c189ff9205ec5c1c63c2fbc7f4c76..18526f92b5731a657c3500120bdc813745031a50 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -79,7 +79,7 @@ void Foam::conformalVoronoiMesh::writePoints for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) @@ -95,7 +95,7 @@ void Foam::conformalVoronoiMesh::writePoints void Foam::conformalVoronoiMesh::writePoints ( const fileName& fName, - const List<point>& points + const List<Foam::point>& points ) const { if (points.size()) @@ -124,7 +124,7 @@ void Foam::conformalVoronoiMesh::writeInternalDelaunayVertices for ( - Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); vit != finite_vertices_end(); ++vit ) diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H index 092205a5694852ce63e91b7b35e69dee52d271a0..870bd53658f635e999e0da7e1507b6576f348291 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H @@ -313,7 +313,7 @@ public: } - // inline void operator=(const Triangulation::Finite_vertices_iterator vit) + // inline void operator=(const Delaunay::Finite_vertices_iterator vit) // { // Vb::operator=indexedVertex(vit->point()); diff --git a/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H b/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H index a5d321bc751229548aa9dec9f6df5776321715c2..bbf8d0a7e7d70fee750c2396fde9e97743ccc3bd 100644 --- a/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H +++ b/src/mesh/conformalVoronoiMesh/cvControls/cvControlsI.H @@ -188,4 +188,5 @@ Foam::cvControls::maxCollapseFaceToPointSideLengthCoeff() const return maxCollapseFaceToPointSideLengthCoeff_; } + // ************************************************************************* //