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:
@ -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);
|
||||
|
||||
@ -593,7 +593,7 @@ int main(int argc, char *argv[])
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
|
||||
randomGenerator rndGen(5341*(Pstream::myProcNo()+1));
|
||||
randomGenerator rndGen(5341);
|
||||
|
||||
|
||||
// Face sync
|
||||
|
||||
Reference in New Issue
Block a user