45 #ifndef randomGenerator_H
46 #define randomGenerator_H
60 class randomGenerator;
61 Istream&
operator>>(Istream&, randomGenerator&);
62 Ostream&
operator<<(Ostream&,
const randomGenerator&);
86 inline uint64_t x(
const bool global)
const;
110 static const uint64_t
A = 0x5DEECE66D,
C = 0xB,
M = uint64_t(1) << 48;
125 void checkSync()
const;
128 inline uint64_t sample();
135 inline scalar scalar01NoCheckSync();
139 inline scalar scalarABNoCheckSync(
const scalar a,
const scalar
b);
147 inline Type sample01NoCheckSync();
152 inline Type sampleABNoCheckSync(
const Type& a,
const Type&
b);
185 const bool global =
false
204 inline scalar
scalarAB(
const scalar a,
const scalar
b);
230 inline Type
sampleAB(
const Type& a,
const Type&
b);
244 template<
class Container>
245 inline void permute(Container& l);
271 inline scalar randomGenerator::sample01NoCheckSync();
274 inline label randomGenerator::sample01NoCheckSync();
277 inline scalar randomGenerator::sampleABNoCheckSync
284 inline label randomGenerator::sampleABNoCheckSync
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
Graphite solid properties.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
seed(const label s)
Construct from a label.
scalar scalarAB(const scalar a, const scalar b)
Return a scalar uniformly distributed between two limits.
friend Ostream & operator<<(Ostream &, const randomGenerator &)
Write to stream.
randomGenerator(const seed s, const bool global=false)
Construct from a seed.
scalar scalar01()
Return a scalar uniformly distributed between zero and one.
void operator=(const randomGenerator &)
Copy-assignment.
randomGenerator generator()
Create a randomly seeded generator.
Type sample01()
Return a type with components uniformly distributed between.
friend Istream & operator>>(Istream &, randomGenerator &)
Read from stream.
void permute(Container &l)
Randomly permute a list.
Type sampleAB(const Type &a, const Type &b)
Return a type with components uniformly distributed between two.
~randomGenerator()
Destructor.
A class for managing temporary objects.
A class for handling words, derived from string.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Istream & operator>>(Istream &, pistonPointEdgeData &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
randomGenerator rndGen(653213)