mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: foamyHexMesh: Split boundary point priority into separate function
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|| type_ == vtExternalFeatureEdgeBaffle
|
||||
);
|
||||
return (type_ == vtExternalSurfaceBaffle);
|
||||
}
|
||||
|
||||
template<class Gt, class Vb>
|
||||
inline bool CGAL::indexedVertex<Gt, Vb>::externalBaffleEdgePoint() const
|
||||
{
|
||||
return (type_ == vtExternalFeatureEdgeBaffle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user