polyMesh: Stopped re-seeding of RNG on each cell-tree update

This is a quick fix. What actually needs doing is the Random and
cachedRandom classes need rewriting in terms of the random number
functionality in the C++11 STL. These can be initialised/seeded
per-object, which makes this sort of bug go away.

This resolves bug report https://bugs.openfoam.org/view.php?id=2772
This commit is contained in:
Will Bainbridge
2017-11-29 11:31:16 +00:00
parent 4aaf2da1de
commit 78338e590e

View File

@ -878,7 +878,7 @@ Foam::polyMesh::cellTree() const
{
treeBoundBox overallBb(points());
Random rndGen(261782);
static Random rndGen(261782);
overallBb = overallBb.extend(rndGen, 1e-4);
overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);