Go to the documentation of this file.
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));
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);
Type globalSample01()
Return a sample whose components lie in the range [0,1].
Type sample01()
Return a sample whose components lie in the range [0,1].
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
Random(const label seedValue=defaultSeed)
Construct with seed value.
void reset(const label seedValue)
Reset the random number generator seed.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
void seed(uint32_t val=default_seed)
Reseed the generator.
dimensionedScalar log(const dimensionedScalar &ds)
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
errorManip< error > abort(error &err)
Calculate the second temporal derivative.
Inter-processor communication reduction functions.
static bool master(const label communicator=0)
Am I the master process.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Type position(const Type &start, const Type &end)
Return a sample on the interval [start,end].
dimensionedScalar sqrt(const dimensionedScalar &ds)
Type globalPosition(const Type &start, const Type &end)
Return a sample on the interval [start,end].