38 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; ++cmpt)
40 value.component(cmpt) = scalar01();
51 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; ++cmpt)
53 value.component(cmpt) = GaussNormal<scalar>();
64 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; ++cmpt)
66 value.component(cmpt) +=
67 scalar01()*(end.component(cmpt) - start.component(cmpt));
84 for (label posi = values.size()-1; posi > 0; --posi)
99 value = sample01<Type>();
115 value = GaussNormal<Type>();
131 value = position<Type>(start, end);
145 value = sample01<Type>();
Type position(const Type &start, const Type &end)
Return a sample on the interval [start,end].
void globalRandomise01(Type &value)
Randomise value in the range 0-1.
Type GaussNormal()
Return a sample whose components are normally distributed with zero mean and unity variance N(0,...
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 shuffle(UList< Type > &values)
Shuffle the values in the list.
Type globalPosition(const Type &start, const Type &end)
Return a sample on the interval [start,end].
void randomise01(Type &value)
Randomise value in the range [0,1].
Type globalGaussNormal()
Return a sample whose components are normally distributed with zero mean and unity variance N(0,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
@ broadcast
broadcast [MPI]
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
Exchange contents of lists - see DynamicList::swap().
static constexpr const zero Zero
Global zero (0).