41 fieldType field(header, mesh);
48 rndPert /=
mag(rndPert);
49 field[cellI] += pertMag*rndPert;
52 fieldType randomisedField
56 header.
name() +
"Random",
65 randomisedField.
write();
Simple random number generator.
const word & headerClassName() const
Return name of the class name read from header.
Mesh data needed to do the Finite Volume discretisation.
dimensioned< scalar > mag(const dimensioned< Type > &)
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const Time & time() const
Return the top-level database.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual Ostream & write(const token &)=0
Write next token to stream.
void writeRandomField(const IOobject &header, const scalar pertMag, Random &rand, const fvMesh &mesh, bool &processed)
Write component fields.
const word & name() const
Return name.
Generic GeometricField class.
Traits class for primitives.