diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index 61b669882a83a9ee225562d5d3c7183f0f2e7ada..2996493dbec4fa6f31fc9ca08a3c3d1f11ddb033 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -728,6 +728,8 @@ private: // elements damage the mesh quality, allowing backtracking. labelHashSet checkPolyMeshQuality(const pointField& pts) const; + label classifyBoundaryPoint(Cell_handle cit) const; + //- Index all of the the Delaunay cells and calculate their //- dual points void indexDualVertices diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index e220556fa59a47cd8235599e6ca6b8c9bbf66926..7a2476df3e7ae7f82fa453c8a00fc32a11670309 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1199,6 +1199,41 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality } +Foam::label Foam::conformalVoronoiMesh::classifyBoundaryPoint +( + Cell_handle cit +) const +{ + if (cit->boundaryDualVertex()) + { + if (cit->featurePointDualVertex()) + { + return featurePoint; + } + else if (cit->featureEdgeDualVertex()) + { + return featureEdge; + } + else + { + return surface; + } + } + else if (cit->baffleSurfaceDualVertex()) + { + return surface; + } + else if (cit->baffleEdgeDualVertex()) + { + return featureEdge; + } + else + { + return internal; + } +} + + void Foam::conformalVoronoiMesh::indexDualVertices ( pointField& pts, @@ -1448,29 +1483,7 @@ void Foam::conformalVoronoiMesh::indexDualVertices // } // } - if (cit->boundaryDualVertex()) - { - if (cit->featurePointDualVertex()) - { - boundaryPts[cit->cellIndex()] = featurePoint; - } - else if (cit->featureEdgeDualVertex()) - { - boundaryPts[cit->cellIndex()] = featureEdge; - } - else - { - boundaryPts[cit->cellIndex()] = surface; - } - } - else if (cit->baffleBoundaryDualVertex()) - { - boundaryPts[cit->cellIndex()] = surface; - } - else - { - boundaryPts[cit->cellIndex()] = internal; - } + boundaryPts[cit->cellIndex()] = classifyBoundaryPoint(cit); } else { diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H index 977f6fd7ffe0debd016eef69dfc2dec4876004ae..f4397070c9a333e59fdb717e4673709502e9442f 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H @@ -221,7 +221,9 @@ public: // least one Delaunay vertex outside and at least one inside inline bool boundaryDualVertex() const; - inline bool baffleBoundaryDualVertex() const; + inline bool baffleSurfaceDualVertex() const; + + inline bool baffleEdgeDualVertex() const; //- A dual vertex on a feature edge will result from this Delaunay cell inline bool featureEdgeDualVertex() const; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H index f4890b50fb31be625d7c3cb30fcc5dd5893e6b19..d0ae6137a5d33211d65581ee86a22b0ee31f0722 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H @@ -443,21 +443,42 @@ inline bool CGAL::indexedCell<Gt, Cb>::boundaryDualVertex() const template<class Gt, class Cb> -inline bool CGAL::indexedCell<Gt, Cb>::baffleBoundaryDualVertex() const +inline bool CGAL::indexedCell<Gt, Cb>::baffleSurfaceDualVertex() const { return ( ( - this->vertex(0)->internalBafflePoint() - || this->vertex(1)->internalBafflePoint() - || this->vertex(2)->internalBafflePoint() - || this->vertex(3)->internalBafflePoint() + this->vertex(0)->internalBaffleSurfacePoint() + || this->vertex(1)->internalBaffleSurfacePoint() + || this->vertex(2)->internalBaffleSurfacePoint() + || this->vertex(3)->internalBaffleSurfacePoint() ) && ( - this->vertex(0)->externalBafflePoint() - || this->vertex(1)->externalBafflePoint() - || this->vertex(2)->externalBafflePoint() - || this->vertex(3)->externalBafflePoint() + this->vertex(0)->externalBaffleSurfacePoint() + || this->vertex(1)->externalBaffleSurfacePoint() + || this->vertex(2)->externalBaffleSurfacePoint() + || this->vertex(3)->externalBaffleSurfacePoint() + ) + ); +} + + +template<class Gt, class Cb> +inline bool CGAL::indexedCell<Gt, Cb>::baffleEdgeDualVertex() const +{ + return + ( + ( + this->vertex(0)->internalBaffleEdgePoint() + || this->vertex(1)->internalBaffleEdgePoint() + || this->vertex(2)->internalBaffleEdgePoint() + || this->vertex(3)->internalBaffleEdgePoint() + ) + && ( + this->vertex(0)->externalBaffleEdgePoint() + || this->vertex(1)->externalBaffleEdgePoint() + || this->vertex(2)->externalBaffleEdgePoint() + || this->vertex(3)->externalBaffleEdgePoint() ) ); } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H index 362e457d74895ce0492a33bbd1b76b499ff9ed0e..311329da0a9db34a870aec4072ff8948a3bf857a 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H @@ -243,10 +243,12 @@ public: inline bool surfacePoint() const; inline bool internalBoundaryPoint() const; - inline bool internalBafflePoint() const; + inline bool internalBaffleSurfacePoint() const; + inline bool internalBaffleEdgePoint() const; inline bool externalBoundaryPoint() const; - inline bool externalBafflePoint() const; + inline bool externalBaffleSurfacePoint() const; + inline bool externalBaffleEdgePoint() const; inline bool constrained() const; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexI.H index c5930395c3df929a497d94cd085020aa1f2cb1f7..688e9f28e1e27f3598e345ceb5ebd6483557349b 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexI.H @@ -308,15 +308,16 @@ inline bool CGAL::indexedVertex<Gt, Vb>::internalBoundaryPoint() const } template<class Gt, class Vb> -inline bool CGAL::indexedVertex<Gt, Vb>::internalBafflePoint() const +inline bool CGAL::indexedVertex<Gt, Vb>::internalBaffleSurfacePoint() const { - return - ( - type_ == vtInternalSurfaceBaffle - || type_ == vtInternalFeatureEdgeBaffle - ); + return (type_ == vtInternalSurfaceBaffle); } +template<class Gt, class Vb> +inline bool CGAL::indexedVertex<Gt, Vb>::internalBaffleEdgePoint() const +{ + return (type_ == vtInternalFeatureEdgeBaffle); +} template<class Gt, class Vb> inline bool CGAL::indexedVertex<Gt, Vb>::externalBoundaryPoint() const @@ -325,13 +326,15 @@ inline bool CGAL::indexedVertex<Gt, Vb>::externalBoundaryPoint() const } template<class Gt, class Vb> -inline bool CGAL::indexedVertex<Gt, Vb>::externalBafflePoint() const +inline bool CGAL::indexedVertex<Gt, Vb>::externalBaffleSurfacePoint() const +{ + return (type_ == vtExternalSurfaceBaffle); +} + +template<class Gt, class Vb> +inline bool CGAL::indexedVertex<Gt, Vb>::externalBaffleEdgePoint() const { - return - ( - type_ == vtExternalSurfaceBaffle - || type_ == vtExternalFeatureEdgeBaffle - ); + return (type_ == vtExternalFeatureEdgeBaffle); }