Go to the documentation of this file.
41 fieldType field(header,
mesh);
48 rndPert /=
mag(rndPert);
49 field[cellI] += pertMag*rndPert;
52 fieldType randomisedField
56 header.
name() +
"Random",
57 mesh.time().timeName(),
65 randomisedField.
write();
Simple random number generator.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define forAll(list, i)
Loop across all elements in list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
void writeRandomField(const IOobject &header, const scalar pertMag, Random &rand, const fvMesh &mesh, bool &processed)
Write component fields.
const word & headerClassName() const
Return name of the class name read from header.
virtual Ostream & write(const token &)=0
Write next token to stream.
const word & name() const
Return name.
Mesh data needed to do the Finite Volume discretisation.
Traits class for primitives.
Generic GeometricField class.