mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -354,6 +354,28 @@ bool Foam::conformalVoronoiMesh::nearFeaturePt(const Foam::point& pt) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::conformalVoronoiMesh::surfacePtNearFeatureEdge
|
||||||
|
(
|
||||||
|
const Foam::point& pt
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
scalar exclusionRangeSqr = surfacePtExclusionDistanceSqr(pt);
|
||||||
|
|
||||||
|
pointIndexHit info;
|
||||||
|
label featureHit;
|
||||||
|
|
||||||
|
geometryToConformTo_.findEdgeNearest
|
||||||
|
(
|
||||||
|
pt,
|
||||||
|
exclusionRangeSqr,
|
||||||
|
info,
|
||||||
|
featureHit
|
||||||
|
);
|
||||||
|
|
||||||
|
return info.hit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::conformalVoronoiMesh::insertInitialPoints()
|
void Foam::conformalVoronoiMesh::insertInitialPoints()
|
||||||
{
|
{
|
||||||
Info<< nl << "Inserting initial points" << endl;
|
Info<< nl << "Inserting initial points" << endl;
|
||||||
@ -1273,7 +1295,7 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
(vA->internalPoint() || vB->internalPoint())
|
(vA->internalPoint() && vB->internalPoint())
|
||||||
&& (!vA->referred() || !vB->referred())
|
&& (!vA->referred() || !vB->referred())
|
||||||
// ||
|
// ||
|
||||||
// (
|
// (
|
||||||
|
|||||||
@ -351,6 +351,9 @@ private:
|
|||||||
//- Check if a location is in exclusion range around a feature point
|
//- Check if a location is in exclusion range around a feature point
|
||||||
bool nearFeaturePt(const Foam::point& pt) const;
|
bool nearFeaturePt(const Foam::point& pt) const;
|
||||||
|
|
||||||
|
//- Check if a surface point is in exclusion range around a feature edge
|
||||||
|
bool surfacePtNearFeatureEdge(const Foam::point& pt) const;
|
||||||
|
|
||||||
//- Insert the initial points into the triangulation, based on the
|
//- Insert the initial points into the triangulation, based on the
|
||||||
// initialPointsMethod
|
// initialPointsMethod
|
||||||
void insertInitialPoints();
|
void insertInitialPoints();
|
||||||
|
|||||||
@ -389,7 +389,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation()
|
|||||||
// Re-index the point pairs
|
// Re-index the point pairs
|
||||||
ptPairs_.reIndex(oldToNewIndices);
|
ptPairs_.reIndex(oldToNewIndices);
|
||||||
|
|
||||||
writePointPairs("pointPairs_initial.obj");
|
//writePointPairs("pointPairs_initial.obj");
|
||||||
|
|
||||||
// Remove location from surface/edge tree
|
// Remove location from surface/edge tree
|
||||||
|
|
||||||
@ -630,7 +630,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation()
|
|||||||
// Reindex the point pairs
|
// Reindex the point pairs
|
||||||
ptPairs_.reIndex(oldToNewIndices);
|
ptPairs_.reIndex(oldToNewIndices);
|
||||||
|
|
||||||
writePointPairs("pointPairs_" + name(iterationNo) + ".obj");
|
//writePointPairs("pointPairs_" + name(iterationNo) + ".obj");
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -2057,9 +2057,11 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits
|
|||||||
|
|
||||||
bool isNearFeaturePt = nearFeaturePt(surfPt);
|
bool isNearFeaturePt = nearFeaturePt(surfPt);
|
||||||
|
|
||||||
|
bool isNearFeatureEdge = surfacePtNearFeatureEdge(surfPt);
|
||||||
|
|
||||||
bool isNearSurfacePt = nearSurfacePoint(surfHitI);
|
bool isNearSurfacePt = nearSurfacePoint(surfHitI);
|
||||||
|
|
||||||
if (isNearFeaturePt || isNearSurfacePt)
|
if (isNearFeaturePt || isNearSurfacePt || isNearFeatureEdge)
|
||||||
{
|
{
|
||||||
keepSurfacePoint = false;
|
keepSurfacePoint = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user