functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged field data vs time. More...
Public Member Functions | |
logFiles (const objectRegistry &obr, const word &prefix) | |
Construct from objectRegistry and prefix. More... | |
logFiles (const logFiles &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~logFiles () |
Destructor. More... | |
const wordList & | toc () const |
Return the list of log file names. More... | |
const wordList & | names () const |
Return the list of log file names. More... | |
PtrList< OFstream > & | files () |
Return access to the files. More... | |
OFstream & | file () |
Return access to the file (if only 1) More... | |
OFstream & | file (const label i) |
Return file 'i'. More... | |
virtual bool | write () |
Write function. More... | |
void | operator= (const logFiles &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from writeFile | |
writeFile (const objectRegistry &obr, const word &prefix) | |
Construct from objectRegistry and prefix. More... | |
writeFile (const writeFile &)=delete | |
Disallow default bitwise copy construction. More... | |
~writeFile () | |
Destructor. More... | |
void | initStream (Ostream &os) const |
Initialise the output stream for writing. More... | |
fileName | baseFileDir () const |
Return the base directory for output. More... | |
fileName | baseTimeDir () const |
Return the base directory for the current time value. More... | |
Omanip< int > | valueWidth (const label offset=0) const |
Return the value width when writing to stream with optional offset. More... | |
void | writeCommented (Ostream &os, const string &str) const |
Write a commented string to stream. More... | |
void | writeTabbed (Ostream &os, const string &str) const |
Write a tabbed string to stream. More... | |
void | writeHeader (Ostream &os, const string &str) const |
Write a commented header to stream. More... | |
void | writeTime (Ostream &os) const |
Write the current time to stream. More... | |
template<class Type > | |
void | writeHeaderValue (Ostream &os, const string &property, const Type &value) const |
Write a (commented) header property and value pair. More... | |
label | charWidth () const |
Return width of character stream output. More... | |
void | operator= (const writeFile &)=delete |
Disallow default bitwise assignment. More... | |
Protected Member Functions | |
virtual void | createFiles () |
Create the output file. More... | |
virtual void | resetNames (const wordList &names) |
Reset the list of names from a wordList. More... | |
virtual void | resetName (const word &name) |
Reset the list of names to a single name entry. More... | |
virtual void | writeFileHeader (const label i=0)=0 |
File header information. More... | |
Protected Attributes | |
wordList | names_ |
File names. More... | |
PtrList< OFstream > | filePtrs_ |
File pointer. More... | |
Protected Attributes inherited from writeFile | |
const objectRegistry & | fileObr_ |
Reference to the region objectRegistry. More... | |
const word | prefix_ |
Prefix. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from writeFile | |
static const word | outputPrefix |
Directory prefix. More... | |
static label | addChars = 8 |
Additional characters for writing. More... | |
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged field data vs time.
Definition at line 57 of file logFiles.H.
logFiles | ( | const objectRegistry & | obr, |
const word & | prefix | ||
) |
Construct from objectRegistry and prefix.
Definition at line 81 of file logFiles.C.
|
virtual |
Destructor.
Definition at line 95 of file logFiles.C.
|
protectedvirtual |
Create the output file.
Definition at line 32 of file logFiles.C.
References writeFile::baseFileDir(), writeFile::fileObr_, logFiles::filePtrs_, forAll, writeFile::initStream(), UPstream::master(), Foam::mkDir(), dimensioned< Type >::name(), logFiles::names_, writeFile::prefix_, objectRegistry::time(), timeName, and logFiles::writeFileHeader().
|
protectedvirtual |
Reset the list of names from a wordList.
Definition at line 53 of file logFiles.C.
References UPstream::master().
|
protectedvirtual |
Reset the list of names to a single name entry.
Definition at line 66 of file logFiles.C.
References UPstream::master(), and Foam::name().
|
protectedpure virtual |
File header information.
Implemented in sixDoFRigidBodyState, rigidBodyState, rigidBodyPoints, interfaceHeight, cloudInfo, multiValveEngineState, userTimeStep, timeStep, time, residuals, forcesBase, forceCoeffs, wallHeatTransferCoeff, volFieldValue, surfaceFieldValue, and fieldValueDelta.
Referenced by logFiles::createFiles().
const Foam::wordList & toc | ( | ) | const |
Return the list of log file names.
Definition at line 101 of file logFiles.C.
const Foam::wordList & names | ( | ) | const |
Return the list of log file names.
Definition at line 107 of file logFiles.C.
Referenced by forcesBase::createFileNames().
Foam::PtrList< Foam::OFstream > & files | ( | ) |
Return access to the files.
Definition at line 140 of file logFiles.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and UPstream::master().
Foam::OFstream & file | ( | ) |
Return access to the file (if only 1)
Definition at line 113 of file logFiles.C.
References FatalErrorInFunction, and UPstream::master().
Referenced by forcesBase::file(), fieldValueDelta::writeFileHeader(), wallHeatTransferCoeff::writeFileHeader(), cloudInfo::writeFileHeader(), and residuals::writeFileHeader().
Foam::OFstream & file | ( | const label | i | ) |
Return file 'i'.
Definition at line 153 of file logFiles.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and UPstream::master().
|
virtual |
Write function.
Reimplemented in specieReactionRates, sixDoFRigidBodyState, rigidBodyState, rigidBodyPoints, cloudInfo, multiValveEngineState, userTimeStep, timeStep, time, residuals, forcesBase, forceCoeffs, yPlus, wallShearStress, wallHeatTransferCoeff, wallHeatFlux, turbulenceIntensity, interfaceHeight, volFieldValue, surfaceFieldValue, fieldValueDelta, and fieldValue.
Definition at line 173 of file logFiles.C.
Referenced by fieldValue::write(), fieldValueDelta::write(), interfaceHeight::write(), turbulenceIntensity::write(), wallHeatFlux::write(), wallHeatTransferCoeff::write(), wallShearStress::write(), yPlus::write(), forceCoeffs::write(), forcesBase::write(), residuals::write(), time::write(), timeStep::write(), userTimeStep::write(), multiValveEngineState::write(), cloudInfo::write(), rigidBodyPoints::write(), rigidBodyState::write(), sixDoFRigidBodyState::write(), and specieReactionRates::write().
|
delete |
Disallow default bitwise assignment.
|
protected |