91 perTimeStep_ =
dict.getOrDefault(
"perTimeStep",
false);
106 writeCurrentTime(file());
108 const scalar cpuTimeNow(time_.elapsedCpuTime());
109 const scalar clockTimeNow(time_.elapsedClockTime());
113 <<
tab << clockTimeNow;
118 <<
tab << (cpuTimeNow - cpuTime0_)
119 <<
tab << (clockTimeNow - clockTime0_);
121 cpuTime0_ = cpuTimeNow;
122 clockTime0_ = clockTimeNow;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
virtual bool read(const dictionary &dict)
Read and set the function object if its data have changed.
Virtual base class for function objects with a reference to Time.
const Time & time_
Reference to the time database.
timeFunctionObject(const timeFunctionObject &)=delete
No copy construct.
Writes the run time (time-step), cpuTime and clockTime - optionally with cpuTime and clockTime change...
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
virtual void writeFileHeader(Ostream &os)
Output file header information.
virtual bool execute()
Execute the function-object operations (no-op).
timeInfo(const timeInfo &)=delete
No copy construct.
virtual bool write()
Write the function-object results.
Base class for writing single files from the function objects.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
virtual bool read(const dictionary &dict)
Read.
virtual OFstream & file()
Return access to the file (if only 1).
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
virtual void writeCurrentTime(Ostream &os) const
Write the current time to stream.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
static constexpr const zero Zero
Global zero (0).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
constexpr char nl
The newline '\n' character (0x0a).
constexpr char tab
The tab '\t' character(0x09).