36 const word startTimeName =
49 IFstream is(outputDir/(fName +
".dat"));
94 Foam::functionObjects::logFiles::logFiles
125 <<
"Request for file() can only be done by the master process" 132 <<
"Requested single file, but multiple files are present" 139 <<
"File pointer at index " << 0 <<
" not allocated" 152 <<
"Request for files() can only be done by the master process" 165 <<
"Request for file(i) can only be done by the master process" 172 <<
"File pointer at index " << i <<
" not allocated" #define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write function.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
virtual void createFiles()
Create the output file.
wordList names_
File names.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
virtual dimensionedScalar startTime() const
Return start time.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
bool good() const
Return true if next operation might succeed.
virtual void writeFileHeader(const label i=0)=0
File header information.
PtrList< OFstream > & files()
Return access to the files.
void initStream(Ostream &os) const
Initialise the output stream for writing.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from string.
void append(const T &)
Append an element at the end of the list.
const Type & value() const
Return const reference to value.
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)
const word prefix_
Prefix.
const Time & time() const
Return time.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
word name(const complex &)
Return a string representation of a complex.
fileName baseFileDir() const
Return the base directory for output.
#define WarningInFunction
Report a warning using Foam::Warning.
const objectRegistry & fileObr_
Reference to the region objectRegistry.
OFstream & file()
Return access to the file (if only 1)
Registry of regIOobjects.
functionObject base class for writing single files
PtrList< OFstream > filePtrs_
File pointer.
virtual void resetNames(const wordList &names)
Reset the list of names from a wordList.
virtual ~logFiles()
Destructor.