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:
@ -73,7 +73,7 @@ SourceFiles
|
||||
#include "fvMeshFunctionObject.H"
|
||||
#include "writeFile.H"
|
||||
#include "scalarField.H"
|
||||
#include "cachedRandom.H"
|
||||
#include "Random.H"
|
||||
#include "Tuple2.H"
|
||||
#include "writer.H"
|
||||
|
||||
@ -107,7 +107,7 @@ protected:
|
||||
word tagFieldName_;
|
||||
|
||||
//- Random number generator - used by distribution models
|
||||
cachedRandom rndGen_;
|
||||
Random rndGen_;
|
||||
|
||||
//- Writer
|
||||
autoPtr<writer<scalar>> writerPtr_;
|
||||
|
||||
@ -47,7 +47,7 @@ bool Foam::functionObjects::randomise::calcRandomised()
|
||||
forAll(field, celli)
|
||||
{
|
||||
Type rndPert;
|
||||
rand.randomise(rndPert);
|
||||
rand.randomise01(rndPert);
|
||||
rndPert = 2.0*rndPert - pTraits<Type>::one;
|
||||
rndPert /= mag(rndPert);
|
||||
rfield[celli] += magPerturbation_*rndPert;
|
||||
|
||||
Reference in New Issue
Block a user