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:
@ -426,8 +426,6 @@ void Foam::conformalVoronoiMesh::insertPoints
|
|||||||
indices,
|
indices,
|
||||||
types
|
types
|
||||||
);
|
);
|
||||||
|
|
||||||
Pout<< pts.size() << " " << indices.size() << " " << types.size() << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -524,43 +522,20 @@ void Foam::conformalVoronoiMesh::insertEdgePointGroups
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::indexedOctree<Foam::treeDataPoint>&
|
|
||||||
Foam::conformalVoronoiMesh::featurePointTree() const
|
|
||||||
{
|
|
||||||
if (featurePointTreePtr_.empty())
|
|
||||||
{
|
|
||||||
treeBoundBox overallBb
|
|
||||||
(
|
|
||||||
geometryToConformTo_.globalBounds().extend(rndGen_, 1e-4)
|
|
||||||
);
|
|
||||||
|
|
||||||
overallBb.min() -= Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
|
||||||
overallBb.max() += Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
|
||||||
|
|
||||||
featurePointTreePtr_.reset
|
|
||||||
(
|
|
||||||
new indexedOctree<treeDataPoint>
|
|
||||||
(
|
|
||||||
treeDataPoint(featurePointLocations_),
|
|
||||||
overallBb, // overall search domain
|
|
||||||
10, // max levels
|
|
||||||
10.0, // maximum ratio of cubes v.s. cells
|
|
||||||
100.0 // max. duplicity; n/a since no bounding boxes.
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return featurePointTreePtr_();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::conformalVoronoiMesh::nearFeaturePt(const Foam::point& pt) const
|
bool Foam::conformalVoronoiMesh::nearFeaturePt(const Foam::point& pt) const
|
||||||
{
|
{
|
||||||
const indexedOctree<treeDataPoint>& tree = featurePointTree();
|
|
||||||
|
|
||||||
scalar exclusionRangeSqr = featurePointExclusionDistanceSqr(pt);
|
scalar exclusionRangeSqr = featurePointExclusionDistanceSqr(pt);
|
||||||
|
|
||||||
pointIndexHit info = tree.findNearest(pt, exclusionRangeSqr);
|
pointIndexHit info;
|
||||||
|
label featureHit;
|
||||||
|
|
||||||
|
geometryToConformTo_.findFeaturePointNearest
|
||||||
|
(
|
||||||
|
pt,
|
||||||
|
exclusionRangeSqr,
|
||||||
|
info,
|
||||||
|
featureHit
|
||||||
|
);
|
||||||
|
|
||||||
return info.hit();
|
return info.hit();
|
||||||
}
|
}
|
||||||
@ -1209,7 +1184,6 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
limitBounds_(),
|
limitBounds_(),
|
||||||
featureVertices_(),
|
featureVertices_(),
|
||||||
featurePointLocations_(),
|
featurePointLocations_(),
|
||||||
featurePointTreePtr_(),
|
|
||||||
edgeLocationTreePtr_(),
|
edgeLocationTreePtr_(),
|
||||||
surfacePtLocationTreePtr_(),
|
surfacePtLocationTreePtr_(),
|
||||||
sizeAndAlignmentLocations_(),
|
sizeAndAlignmentLocations_(),
|
||||||
|
|||||||
@ -169,9 +169,6 @@ private:
|
|||||||
// Single pointField required by the featurePointTree.
|
// Single pointField required by the featurePointTree.
|
||||||
pointField featurePointLocations_;
|
pointField featurePointLocations_;
|
||||||
|
|
||||||
//- Search tree for feature point locations
|
|
||||||
mutable autoPtr<indexedOctree<treeDataPoint> > featurePointTreePtr_;
|
|
||||||
|
|
||||||
//- Search tree for edge point locations
|
//- Search tree for edge point locations
|
||||||
mutable autoPtr<dynamicIndexedOctree<dynamicTreeDataPoint> >
|
mutable autoPtr<dynamicIndexedOctree<dynamicTreeDataPoint> >
|
||||||
edgeLocationTreePtr_;
|
edgeLocationTreePtr_;
|
||||||
@ -487,9 +484,6 @@ private:
|
|||||||
//- Reinsert stored feature point defining points
|
//- Reinsert stored feature point defining points
|
||||||
void reinsertFeaturePoints(bool distribute = false);
|
void reinsertFeaturePoints(bool distribute = false);
|
||||||
|
|
||||||
//- Demand driven construction of octree for feature points
|
|
||||||
const indexedOctree<treeDataPoint>& featurePointTree() const;
|
|
||||||
|
|
||||||
//- 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;
|
||||||
|
|
||||||
|
|||||||
@ -79,9 +79,7 @@ void Foam::conformalVoronoiMesh::calcDualMesh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// REMOVED BECAUSE THIS CODE STOPS ALL FACES NEAR ANY BOUNDARY (PROC OR REAL)
|
// THIS CODE STOPS ALL FACES NEAR ANY PROCESSOR BOUNDARY BEING FILTERED.
|
||||||
// FROM BEING FILTERED.
|
|
||||||
//
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
|
Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
|
||||||
@ -104,19 +102,12 @@ void Foam::conformalVoronoiMesh::calcDualMesh
|
|||||||
// Allow filtering if any vertices are far points. Otherwise faces
|
// Allow filtering if any vertices are far points. Otherwise faces
|
||||||
// with boundary points attached to a cell with a far point will
|
// with boundary points attached to a cell with a far point will
|
||||||
// not be filtered.
|
// not be filtered.
|
||||||
// if
|
|
||||||
// (
|
|
||||||
// (!(*cit)->vertex(0)->real() && !(*cit)->vertex(0)->farPoint())
|
|
||||||
// || (!(*cit)->vertex(1)->real() && !(*cit)->vertex(1)->farPoint())
|
|
||||||
// || (!(*cit)->vertex(2)->real() && !(*cit)->vertex(2)->farPoint())
|
|
||||||
// || (!(*cit)->vertex(3)->real() && !(*cit)->vertex(3)->farPoint())
|
|
||||||
// )
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
(!(*cit)->vertex(0)->real())
|
(!(*cit)->vertex(0)->real() && !(*cit)->vertex(0)->farPoint())
|
||||||
|| (!(*cit)->vertex(1)->real())
|
|| (!(*cit)->vertex(1)->real() && !(*cit)->vertex(1)->farPoint())
|
||||||
|| (!(*cit)->vertex(2)->real())
|
|| (!(*cit)->vertex(2)->real() && !(*cit)->vertex(2)->farPoint())
|
||||||
|| (!(*cit)->vertex(3)->real())
|
|| (!(*cit)->vertex(3)->real() && !(*cit)->vertex(3)->farPoint())
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
hasProcPt = true;
|
hasProcPt = true;
|
||||||
|
|||||||
@ -175,7 +175,43 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation
|
|||||||
// \ . /
|
// \ . /
|
||||||
// ---x----
|
// ---x----
|
||||||
|
|
||||||
|
label countNearBoundaryVertices = 0;
|
||||||
|
|
||||||
|
for
|
||||||
|
(
|
||||||
|
Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
|
||||||
|
vit != finite_vertices_end();
|
||||||
|
vit++
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (vit->internalPoint() && !vit->nearBoundary())
|
||||||
|
{
|
||||||
|
const Foam::point& pt = topoint(vit->point());
|
||||||
|
const scalar range = sqr(2.0*targetCellSize(pt));
|
||||||
|
|
||||||
|
pointIndexHit pHit;
|
||||||
|
label hitSurface;
|
||||||
|
|
||||||
|
geometryToConformTo_.findSurfaceNearest
|
||||||
|
(
|
||||||
|
pt,
|
||||||
|
range,
|
||||||
|
pHit,
|
||||||
|
hitSurface
|
||||||
|
);
|
||||||
|
|
||||||
|
if (pHit.hit())
|
||||||
|
{
|
||||||
|
vit->setNearBoundary();
|
||||||
|
countNearBoundaryVertices++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< " Vertices marked as being near a boundary: "
|
||||||
|
<< countNearBoundaryVertices << " (estimated)" << endl;
|
||||||
|
|
||||||
|
timeCheck("After set near boundary");
|
||||||
|
|
||||||
// Initial surface protrusion conformation - nearest surface point
|
// Initial surface protrusion conformation - nearest surface point
|
||||||
{
|
{
|
||||||
@ -198,7 +234,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation
|
|||||||
vit++
|
vit++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (vit->internalPoint())
|
if (vit->internalPoint() && vit->nearBoundary())
|
||||||
{
|
{
|
||||||
const Foam::point vert = topoint(vit->point());
|
const Foam::point vert = topoint(vit->point());
|
||||||
|
|
||||||
@ -220,11 +256,6 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// This used to be just before this if statement.
|
|
||||||
// Moved because a point is only near the boundary if
|
|
||||||
// the dual cell intersects the surface.
|
|
||||||
vit->setNearBoundary();
|
|
||||||
|
|
||||||
// meshTools::writeOBJ(Pout, vert);
|
// meshTools::writeOBJ(Pout, vert);
|
||||||
// meshTools::writeOBJ(Pout, surfHit.hitPoint());
|
// meshTools::writeOBJ(Pout, surfHit.hitPoint());
|
||||||
// Pout<< "l cr0 cr1" << endl;
|
// Pout<< "l cr0 cr1" << endl;
|
||||||
@ -246,9 +277,18 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation
|
|||||||
existingSurfacePtLocations
|
existingSurfacePtLocations
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vit->setInternal();
|
||||||
|
countNearBoundaryVertices--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< " Vertices marked as being near a boundary: "
|
||||||
|
<< countNearBoundaryVertices
|
||||||
|
<< " (after dual surface intersection)" << endl;
|
||||||
|
|
||||||
label nVerts = number_of_vertices();
|
label nVerts = number_of_vertices();
|
||||||
label nSurfHits = surfaceHits.size();
|
label nSurfHits = surfaceHits.size();
|
||||||
label nFeatEdHits = featureEdgeHits.size();
|
label nFeatEdHits = featureEdgeHits.size();
|
||||||
@ -1179,6 +1219,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
|
|||||||
cIOuter++;
|
cIOuter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timeCheck("End of testing cell influence");
|
||||||
|
|
||||||
// Increasing the circumspheres to increase the overlaps and compensate for
|
// Increasing the circumspheres to increase the overlaps and compensate for
|
||||||
// floating point errors missing some referrals
|
// floating point errors missing some referrals
|
||||||
labelListList circumsphereOverlaps
|
labelListList circumsphereOverlaps
|
||||||
@ -1186,6 +1228,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence
|
|||||||
overlapsProc(circumcentre, sqr(1.01)*circumradiusSqr)
|
overlapsProc(circumcentre, sqr(1.01)*circumradiusSqr)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
timeCheck("End of increasing overlaps");
|
||||||
|
|
||||||
// Reset counters
|
// Reset counters
|
||||||
cIOuter = 0;
|
cIOuter = 0;
|
||||||
|
|
||||||
@ -2144,7 +2188,7 @@ void Foam::conformalVoronoiMesh::buildSizeAndAlignmentTree() const
|
|||||||
treeDataPoint(sizeAndAlignmentLocations_),
|
treeDataPoint(sizeAndAlignmentLocations_),
|
||||||
overallBb, // overall search domain
|
overallBb, // overall search domain
|
||||||
10, // max levels
|
10, // max levels
|
||||||
10.0, // maximum ratio of cubes v.s. cells
|
20.0, // maximum ratio of cubes v.s. cells
|
||||||
100.0 // max. duplicity; n/a since no bounding boxes.
|
100.0 // max. duplicity; n/a since no bounding boxes.
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -2168,13 +2212,13 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits
|
|||||||
DynamicList<Foam::point>& existingSurfacePtLocations
|
DynamicList<Foam::point>& existingSurfacePtLocations
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
bool keepSurfacePoint = true;
|
|
||||||
|
|
||||||
const scalar cellSize = targetCellSize(vert);
|
const scalar cellSize = targetCellSize(vert);
|
||||||
const scalar cellSizeSqr = sqr(cellSize);
|
const scalar cellSizeSqr = sqr(cellSize);
|
||||||
|
|
||||||
forAll(surfHit, sI)
|
forAll(surfHit, sI)
|
||||||
{
|
{
|
||||||
|
bool keepSurfacePoint = true;
|
||||||
|
|
||||||
pointIndexHit surfHitI = surfHit[sI];
|
pointIndexHit surfHitI = surfHit[sI];
|
||||||
label hitSurfaceI = hitSurface[sI];
|
label hitSurfaceI = hitSurface[sI];
|
||||||
|
|
||||||
|
|||||||
@ -619,6 +619,37 @@ void Foam::conformationSurfaces::findSurfaceNearest
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::conformationSurfaces::findFeaturePointNearest
|
||||||
|
(
|
||||||
|
const point& sample,
|
||||||
|
scalar nearestDistSqr,
|
||||||
|
pointIndexHit& fpHit,
|
||||||
|
label& featureHit
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
// Work arrays
|
||||||
|
scalar minDistSqr = nearestDistSqr;
|
||||||
|
pointIndexHit hitInfo;
|
||||||
|
|
||||||
|
forAll(features_, testI)
|
||||||
|
{
|
||||||
|
features_[testI].nearestFeaturePoint
|
||||||
|
(
|
||||||
|
sample,
|
||||||
|
minDistSqr,
|
||||||
|
hitInfo
|
||||||
|
);
|
||||||
|
|
||||||
|
if (hitInfo.hit())
|
||||||
|
{
|
||||||
|
minDistSqr = magSqr(hitInfo.hitPoint()- sample);
|
||||||
|
fpHit = hitInfo;
|
||||||
|
featureHit = testI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::conformationSurfaces::findEdgeNearest
|
void Foam::conformationSurfaces::findEdgeNearest
|
||||||
(
|
(
|
||||||
const point& sample,
|
const point& sample,
|
||||||
|
|||||||
@ -246,6 +246,14 @@ public:
|
|||||||
labelList& hitSurfaces
|
labelList& hitSurfaces
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Find the nearest point on any feature edge
|
||||||
|
void findFeaturePointNearest
|
||||||
|
(
|
||||||
|
const point& sample,
|
||||||
|
scalar nearestDistSqr,
|
||||||
|
pointIndexHit& fpHit,
|
||||||
|
label& featureHit
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Find the nearest point on any feature edge
|
//- Find the nearest point on any feature edge
|
||||||
void findEdgeNearest
|
void findEdgeNearest
|
||||||
|
|||||||
@ -369,6 +369,24 @@ void Foam::processorPolyPatch::updateMesh(PstreamBuffers& pBufs)
|
|||||||
>> nbrPointIndex
|
>> nbrPointIndex
|
||||||
>> nbrEdgeFace
|
>> nbrEdgeFace
|
||||||
>> nbrEdgeIndex;
|
>> nbrEdgeIndex;
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
nbrPointIndex.size() != nPoints()
|
||||||
|
|| nbrEdgeIndex.size() != nEdges()
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"processorPolyPatch::updateMesh(PstreamBuffers&)"
|
||||||
|
) << "Size of data from processor " << neighbProcNo()
|
||||||
|
<< " does not match size of data on processor "
|
||||||
|
<< Pstream::myProcNo() << "." << nl
|
||||||
|
<< " Neighbour has " << nbrPointFace.size()
|
||||||
|
<< " points and " << nbrEdgeFace.size() << " edges." << nl
|
||||||
|
<< " This proc has " << nPoints() << " points and "
|
||||||
|
<< nEdges() << " edges." << exit(FatalError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert neighbour faces and indices into face back into
|
// Convert neighbour faces and indices into face back into
|
||||||
|
|||||||
@ -72,6 +72,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(const IOobject& io)
|
|||||||
edgeNormals_(0),
|
edgeNormals_(0),
|
||||||
featurePointNormals_(0),
|
featurePointNormals_(0),
|
||||||
regionEdges_(0),
|
regionEdges_(0),
|
||||||
|
pointTree_(),
|
||||||
edgeTree_(),
|
edgeTree_(),
|
||||||
edgeTreesByType_()
|
edgeTreesByType_()
|
||||||
{
|
{
|
||||||
@ -159,6 +160,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
|
|||||||
edgeNormals_(fem.edgeNormals()),
|
edgeNormals_(fem.edgeNormals()),
|
||||||
featurePointNormals_(fem.featurePointNormals()),
|
featurePointNormals_(fem.featurePointNormals()),
|
||||||
regionEdges_(fem.regionEdges()),
|
regionEdges_(fem.regionEdges()),
|
||||||
|
pointTree_(),
|
||||||
edgeTree_(),
|
edgeTree_(),
|
||||||
edgeTreesByType_()
|
edgeTreesByType_()
|
||||||
{}
|
{}
|
||||||
@ -185,6 +187,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
|
|||||||
edgeNormals_(0),
|
edgeNormals_(0),
|
||||||
featurePointNormals_(0),
|
featurePointNormals_(0),
|
||||||
regionEdges_(0),
|
regionEdges_(0),
|
||||||
|
pointTree_(),
|
||||||
edgeTree_(),
|
edgeTree_(),
|
||||||
edgeTreesByType_()
|
edgeTreesByType_()
|
||||||
{}
|
{}
|
||||||
@ -222,6 +225,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
|
|||||||
edgeNormals_(0),
|
edgeNormals_(0),
|
||||||
featurePointNormals_(0),
|
featurePointNormals_(0),
|
||||||
regionEdges_(0),
|
regionEdges_(0),
|
||||||
|
pointTree_(),
|
||||||
edgeTree_(),
|
edgeTree_(),
|
||||||
edgeTreesByType_()
|
edgeTreesByType_()
|
||||||
{
|
{
|
||||||
@ -578,6 +582,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
|
|||||||
edgeNormals_(edgeNormals),
|
edgeNormals_(edgeNormals),
|
||||||
featurePointNormals_(featurePointNormals),
|
featurePointNormals_(featurePointNormals),
|
||||||
regionEdges_(regionEdges),
|
regionEdges_(regionEdges),
|
||||||
|
pointTree_(),
|
||||||
edgeTree_(),
|
edgeTree_(),
|
||||||
edgeTreesByType_()
|
edgeTreesByType_()
|
||||||
{}
|
{}
|
||||||
@ -684,6 +689,21 @@ Foam::extendedFeatureEdgeMesh::classifyEdge
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::extendedFeatureEdgeMesh::nearestFeaturePoint
|
||||||
|
(
|
||||||
|
const point& sample,
|
||||||
|
scalar searchDistSqr,
|
||||||
|
pointIndexHit& info
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
info = pointTree().findNearest
|
||||||
|
(
|
||||||
|
sample,
|
||||||
|
searchDistSqr
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::extendedFeatureEdgeMesh::nearestFeatureEdge
|
void Foam::extendedFeatureEdgeMesh::nearestFeatureEdge
|
||||||
(
|
(
|
||||||
const point& sample,
|
const point& sample,
|
||||||
@ -816,6 +836,46 @@ void Foam::extendedFeatureEdgeMesh::allNearestFeatureEdges
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::indexedOctree<Foam::treeDataPoint>&
|
||||||
|
Foam::extendedFeatureEdgeMesh::pointTree() const
|
||||||
|
{
|
||||||
|
if (pointTree_.empty())
|
||||||
|
{
|
||||||
|
Random rndGen(17301893);
|
||||||
|
|
||||||
|
// Slightly extended bb. Slightly off-centred just so on symmetric
|
||||||
|
// geometry there are less face/edge aligned items.
|
||||||
|
treeBoundBox bb
|
||||||
|
(
|
||||||
|
treeBoundBox(points()).extend(rndGen, 1E-4)
|
||||||
|
);
|
||||||
|
|
||||||
|
bb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
||||||
|
bb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
||||||
|
|
||||||
|
const labelList featurePointLabels = identity(nonFeatureStart_);
|
||||||
|
|
||||||
|
pointTree_.reset
|
||||||
|
(
|
||||||
|
new indexedOctree<treeDataPoint>
|
||||||
|
(
|
||||||
|
treeDataPoint
|
||||||
|
(
|
||||||
|
points(),
|
||||||
|
featurePointLabels
|
||||||
|
),
|
||||||
|
bb, // bb
|
||||||
|
8, // maxLevel
|
||||||
|
10, // leafsize
|
||||||
|
3.0 // duplicity
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pointTree_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::indexedOctree<Foam::treeDataEdge>&
|
const Foam::indexedOctree<Foam::treeDataEdge>&
|
||||||
Foam::extendedFeatureEdgeMesh::edgeTree() const
|
Foam::extendedFeatureEdgeMesh::edgeTree() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -61,6 +61,7 @@ SourceFiles
|
|||||||
#include "IOdictionary.H"
|
#include "IOdictionary.H"
|
||||||
#include "indexedOctree.H"
|
#include "indexedOctree.H"
|
||||||
#include "treeDataEdge.H"
|
#include "treeDataEdge.H"
|
||||||
|
#include "treeDataPoint.H"
|
||||||
#include "pointIndexHit.H"
|
#include "pointIndexHit.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -155,6 +156,9 @@ private:
|
|||||||
//- Feature edges which are on the boundary between regions
|
//- Feature edges which are on the boundary between regions
|
||||||
labelList regionEdges_;
|
labelList regionEdges_;
|
||||||
|
|
||||||
|
//- Search tree for all feature points
|
||||||
|
mutable autoPtr<indexedOctree<treeDataPoint> > pointTree_;
|
||||||
|
|
||||||
//- Search tree for all edges
|
//- Search tree for all edges
|
||||||
mutable autoPtr<indexedOctree<treeDataEdge> > edgeTree_;
|
mutable autoPtr<indexedOctree<treeDataEdge> > edgeTree_;
|
||||||
|
|
||||||
@ -247,6 +251,14 @@ public:
|
|||||||
|
|
||||||
// Find
|
// Find
|
||||||
|
|
||||||
|
//- Find nearest surface edge for the sample point.
|
||||||
|
void nearestFeaturePoint
|
||||||
|
(
|
||||||
|
const point& sample,
|
||||||
|
scalar searchDistSqr,
|
||||||
|
pointIndexHit& info
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Find nearest surface edge for the sample point.
|
//- Find nearest surface edge for the sample point.
|
||||||
void nearestFeatureEdge
|
void nearestFeatureEdge
|
||||||
(
|
(
|
||||||
@ -349,6 +361,9 @@ public:
|
|||||||
//- Return the edgeStatus of a specified edge
|
//- Return the edgeStatus of a specified edge
|
||||||
inline edgeStatus getEdgeStatus(label edgeI) const;
|
inline edgeStatus getEdgeStatus(label edgeI) const;
|
||||||
|
|
||||||
|
//- Demand driven construction of octree for feature points
|
||||||
|
const indexedOctree<treeDataPoint>& pointTree() const;
|
||||||
|
|
||||||
//- Demand driven construction of octree for boundary edges
|
//- Demand driven construction of octree for boundary edges
|
||||||
const indexedOctree<treeDataEdge>& edgeTree() const;
|
const indexedOctree<treeDataEdge>& edgeTree() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user