ENH: use simpler boundBox handling

- use default initialize boundBox instead of invertedBox
- reset() instead of assigning from invertedBox
- extend (three parameter version) and grow method
- inflate(Random) instead of extend + re-assigning
This commit is contained in:
Mark Olesen
2022-11-01 12:15:08 +01:00
committed by Andrew Heather
parent 1339c3357b
commit e5006a62d7
60 changed files with 189 additions and 353 deletions

View File

@ -108,14 +108,9 @@ void Foam::patchSeedSet::calcSamples
treeBoundBox patchBb
(
treeBoundBox(pp.points(), pp.meshPoints()).extend
(
rndGen,
1e-4
)
treeBoundBox(pp.points(), pp.meshPoints())
.extend(rndGen, 1e-4, ROOTVSMALL)
);
patchBb.min() -= point::uniform(ROOTVSMALL);
patchBb.max() += point::uniform(ROOTVSMALL);
indexedOctree<treeDataFace> boundaryTree
(
@ -135,15 +130,7 @@ void Foam::patchSeedSet::calcSamples
// to be found
const scalar globalDistSqr
(
//magSqr
//(
// boundBox
// (
// pp.points(),
// pp.meshPoints(),
// true
// ).span()
//)
//boundBox(pp.points(), pp.meshPoints(), true).magSqr()
GREAT
);
@ -168,7 +155,7 @@ void Foam::patchSeedSet::calcSamples
{
point fc(pp[nearInfo.index()].centre(pp.points()));
nearInfo.setPoint(fc);
nearest[sampleI].second().first() = magSqr(fc-sample);
nearest[sampleI].second().first() = sample.magSqr(fc);
nearest[sampleI].second().second() =
Pstream::myProcNo();
}