mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
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:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user