38 hasGaussSample_(false),
49 hasGaussSample_ =
false;
51 generator_.
seed(seed_);
68 return round(scalar01());
77 hasGaussSample_ =
false;
87 v1 = 2*scalar01() - 1;
88 v2 = 2*scalar01() - 1;
90 }
while (rsq >= 1 || rsq == 0);
94 gaussSample_ = v1*
fac;
95 hasGaussSample_ =
true;
104 return round(GaussNormal<scalar>());
115 return start + scalar01()*(end - start);
126 <<
"start index " << start <<
" > end index " << end <<
nl
135 const label val = start + label(scalar01()*(end - start + 1));
139 return min(val, end);
146 scalar value(-GREAT);
166 value = round(scalar01());
178 scalar value(-GREAT);
182 value = GaussNormal<scalar>();
198 value = GaussNormal<label>();
214 scalar value(-GREAT);
218 value = position<scalar>(start, end);
238 value = position<label>(start, end);
Inter-processor communication reduction functions.
static void scatter(const List< commsStruct > &comms, T &value, const int tag, const label comm)
Broadcast data: Distribute without modification.
void seed(uint32_t val=default_seed)
Reseed the generator.
Type sample01()
Return a sample whose components lie in the range [0,1].
Type globalSample01()
Return a sample whose components lie in the range [0,1].
void reset(const label seedValue)
Reset the random number generator seed.
Type globalPosition(const Type &start, const Type &end)
Return a sample on the interval [start,end].
splitCell * master() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
constexpr char nl
The newline '\n' character (0x0a)
Calculate the second temporal derivative.