randomGenerator: Global flag

A random generator can now be constructed with a global flag. If the
flag is false then the provided seed will be randomised across the
different processes. If the flag is true then the synchronicity of the
generators state will be checked when performing certain operations in
debug mode.
This commit is contained in:
Will Bainbridge
2024-06-05 12:29:00 +01:00
parent bb43dbe270
commit 125902a872
12 changed files with 363 additions and 92 deletions

View File

@ -56,7 +56,7 @@ int main(int argc, char *argv[])
if (true)
{
randomGenerator rndGen(43544*Pstream::myProcNo());
randomGenerator rndGen(43544);
// Generate random data.
List<Tuple2<label, List<scalar>>> complexData(100);

View File

@ -593,7 +593,7 @@ int main(int argc, char *argv[])
#include "createPolyMesh.H"
randomGenerator rndGen(5341*(Pstream::myProcNo()+1));
randomGenerator rndGen(5341);
// Face sync