39 const word startTimeName =
63 filePtrs_.setSize(names_.size());
81 Foam::functionObjects::logFiles::logFiles
93 Foam::functionObjects::logFiles::logFiles
121 <<
"Request for files() can only be done by the master process" 134 <<
"Request for file(i) can only be done by the master process" 138 if (!filePtrs_.set(i))
141 <<
"File pointer at index " << i <<
" not allocated" const Type & value() const noexcept
Return const reference to value.
virtual bool write()
Write function.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
virtual void createFiles()
Create the output file.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
wordList names_
File names.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void resetFile(const word &name)
Reset internal file pointer to new file with new name.
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
virtual dimensionedScalar startTime() const
Return start time.
#define forAll(list, i)
Loop across all elements in list.
PtrList< OFstream > & files()
Return access to the files.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void initStream(Ostream &os) const
Initialise the output stream for writing.
A class for handling words, derived from Foam::string.
const Time & time() const noexcept
Return time registry.
virtual void resetName(const word &name)
Reset the list of names to a single name entry.
const wordList & names() const
Return const access to the names.
errorManip< error > abort(error &err)
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
virtual autoPtr< OFstream > newFileAtStartTime(const word &name) const
Return autoPtr to a new file using the simulation start time.
virtual bool read(const dictionary &dict)
Read.
List< word > wordList
List of word.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
const objectRegistry & fileObr_
Reference to the region objectRegistry.
Registry of regIOobjects.
Base class for writing single files from the function objects.
PtrList< OFstream > filePtrs_
File pointer.
virtual void resetNames(const wordList &names)
Reset the list of names from a wordList.