33 const unitSets& units,
34 const dictionary&
dict
37 const bool havePeriod =
dict.found(
"period");
38 const bool haveFrequency =
dict.found(
"frequency");
40 if (havePeriod == haveFrequency)
43 << (havePeriod ?
"both" :
"neither") <<
" of keywords "
44 <<
"period " << (havePeriod ?
"and" :
"or")
45 <<
" frequency defined in dictionary " <<
dict.name()
51 ?
dict.lookupOrDefault<scalar>(
"period", units.x, 0)
67 period_(readPeriod(units,
dict)),
68 start_(
dict.lookupOrDefault<scalar>(
"start", units.
x, scalar(0))),
79 value_(se.value_, false)
Run-time selectable general function of one variable.
Function1 which repeats a given 'value' function with a given period or frequency,...
Repeat(const word &name, const unitSets &units, const dictionary &dict)
Construct from name and dictionary.
virtual void write(Ostream &os, const unitSets &units) const
Write data to dictionary stream.
virtual ~Repeat()
Destructor.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void writeEntry(Ostream &os, const omega &a)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void writeEntryIfDifferent(Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2)
Helper function to write the keyword and entry only if the.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
Struct containing two unitSets for use in converting both the argument and the value of a Function1.
unitSet x
Unit conversion for x-axis values.