mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Random numbers - updated dependent code from change cachedRandom->Random class
This commit is contained in:
@ -335,7 +335,7 @@ public:
|
||||
label distanceCmp(const point& pt, const treeBoundBox& other) const;
|
||||
|
||||
//- Return slightly wider bounding box
|
||||
// Extends all dimensions with s*span*Random::scalar01()
|
||||
// Extends all dimensions with s*span*Random::sample01<scalar>()
|
||||
// and guarantees in any direction s*mag(span) minimum width
|
||||
inline treeBoundBox extend(Random& rndGen, const scalar s) const;
|
||||
|
||||
|
||||
@ -336,8 +336,8 @@ inline Foam::treeBoundBox Foam::treeBoundBox::extend
|
||||
newSpan[dir] = Foam::max(newSpan[dir], minSpan);
|
||||
}
|
||||
|
||||
bb.min() -= cmptMultiply(s * rndGen.vector01(), newSpan);
|
||||
bb.max() += cmptMultiply(s * rndGen.vector01(), newSpan);
|
||||
bb.min() -= cmptMultiply(s*rndGen.sample01<vector>(), newSpan);
|
||||
bb.max() += cmptMultiply(s*rndGen.sample01<vector>(), newSpan);
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user