logFile Class Reference

functionObject support for writing log files More...

Inheritance diagram for logFile:
Collaboration diagram for logFile:

Public Member Functions

 logFile (const objectRegistry &obr, const word &prefix, const word &name)
 Construct from objectRegistry, prefix and file name. More...
 
 logFile (const logFile &)=delete
 Disallow default bitwise copy construction. More...
 
 ~logFile ()
 Destructor. More...
 
const wordname () const
 Return the log file name. More...
 
void writeTimeColumnHeaders (const wordList &titles)
 Write the time and column headers. More...
 
template<class T >
void write (const T &t)
 Write a single column value. More...
 
template<class T , class... Args>
void write (const T &t, const Args &... args)
 Write the column values. More...
 
template<class... Args>
void writeTime (const Args &... args)
 Write the time and column values. More...
 
void operator= (const logFile &)=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...
 

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...
 
- Protected Attributes inherited from writeFile
const objectRegistryfileObr_
 Reference to the region objectRegistry. More...
 
const word prefix_
 Prefix. More...
 

Detailed Description

functionObject support for writing log files

e.g. residuals or integral field values vs time.

See also
Foam::functionObject Foam::functionObjects::writeFile
Source files

Definition at line 57 of file logFile.H.

Constructor & Destructor Documentation

◆ logFile() [1/2]

logFile ( const objectRegistry obr,
const word prefix,
const word name 
)

Construct from objectRegistry, prefix and file name.

Definition at line 43 of file logFile.C.

References writeFile::initStream().

Here is the call graph for this function:

◆ logFile() [2/2]

logFile ( const logFile )
delete

Disallow default bitwise copy construction.

◆ ~logFile()

~logFile ( )

Destructor.

Definition at line 60 of file logFile.C.

Member Function Documentation

◆ name()

const word& name ( ) const

Return the log file name.

◆ writeTimeColumnHeaders()

void writeTimeColumnHeaders ( const wordList titles)

Write the time and column headers.

Definition at line 66 of file logFile.C.

References Foam::endl(), and forAll.

Here is the call graph for this function:

◆ write() [1/2]

void write ( const T t)
inline

Write a single column value.

Definition at line 105 of file logFile.H.

References writeFile::charWidth(), Foam::endl(), Foam::setw(), and Foam::tab.

Referenced by logFile::write(), and logFile::writeTime().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [2/2]

void write ( const T t,
const Args &...  args 
)
inline

Write the column values.

Definition at line 112 of file logFile.H.

References args, writeFile::charWidth(), Foam::setw(), Foam::tab, and logFile::write().

Here is the call graph for this function:

◆ writeTime()

void writeTime ( const Args &...  args)
inline

Write the time and column values.

Definition at line 120 of file logFile.H.

References args, logFile::write(), and writeFile::writeTime().

Here is the call graph for this function:

◆ operator=()

void operator= ( const logFile )
delete

Disallow default bitwise assignment.


The documentation for this class was generated from the following files: