Public Member Functions | Protected Member Functions | Protected Attributes
cloudInfo Class Reference

This function object outputs Lagrangian cloud information to a file. The current outputs include: More...

Inheritance diagram for cloudInfo:
Inheritance graph
[legend]
Collaboration diagram for cloudInfo:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("cloudInfo")
 Runtime type information. More...
 
 cloudInfo (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~cloudInfo ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the cloudInfo object. More...
 
virtual void read (const dictionary &)
 Read the field min/max data. More...
 
virtual void execute ()
 Execute, currently does nothing. More...
 
virtual void end ()
 Execute at the final time-loop, currently does nothing. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh. More...
 
- Public Member Functions inherited from functionObjectFile
 functionObjectFile (const objectRegistry &obr, const word &prefix)
 Construct null. More...
 
 functionObjectFile (const objectRegistry &obr, const word &prefix, const word &fileName, const dictionary &dict)
 Construct from components and read options from dictionary. More...
 
virtual ~functionObjectFile ()
 Destructor. More...
 
void read (const dictionary &dict)
 Read. More...
 
OFstreamfile ()
 Return access to the file (if only 1) More...
 
bool writeToFile () const
 Return true if can write to file. 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...
 

Protected Member Functions

virtual void writeFileHeader (Ostream &os) const
 File header information. More...
 
 cloudInfo (const cloudInfo &)
 Disallow default bitwise copy construct. More...
 
void operator= (const cloudInfo &)
 Disallow default bitwise assignment. More...
 
- Protected Member Functions inherited from functionObjectFile
virtual void initStream (Ostream &os) const
 Initialise the output stream for writing. More...
 
virtual fileName baseFileDir () const
 Return the base directory for output. More...
 
virtual fileName baseTimeDir () const
 Return the base directory for the current time value. More...
 
virtual autoPtr< OFstreamcreateFile (const word &name) const
 Return an autoPtr to a new file. More...
 
virtual void resetFile (const word &name)
 Reset internal file pointer to new file with new name. More...
 
virtual Omanip< int > valueWidth (const label offset=0) const
 Return the value width when writing to stream with optional offset. More...
 
 functionObjectFile (const functionObjectFile &)
 Disallow default bitwise copy construct. More...
 
void operator= (const functionObjectFile &)
 Disallow default bitwise assignment. More...
 

Protected Attributes

word name_
 Name of this set of cloudInfo object. More...
 
const objectRegistryobr_
 Reference to the database. More...
 
bool active_
 on/off switch More...
 
Switch log_
 Switch to send output to Info as well. More...
 
wordList cloudNames_
 List of cloud names. More...
 
PtrList< OFstreamfilePtrs_
 Output file per cloud. More...
 
- Protected Attributes inherited from functionObjectFile
bool writeToFile_
 Flag to enable/disable writing to file. More...
 

Additional Inherited Members

- Static Public Attributes inherited from functionObjectFile
static const word outputPrefix = "postProcessing"
 Directory prefix. More...
 
static label addChars = 7
 Additional characters for writing. More...
 

Detailed Description

This function object outputs Lagrangian cloud information to a file. The current outputs include:

- total current number of parcels

Example of function object specification:

cloudInfo1
{
    type        cloudInfo;
    functionObjectLibs ("libcloudFunctionObjects.so");
    ...
    clouds
    (
        kinematicCloud1
        thermoCloud1
    );
}


Function object usage

Property Description Required Default value
type type name: cloudInfo yes
clouds list of clouds names to process yes

The output data of each cloud is written to a file named <cloudName>.dat

See also
Foam::functionObject Foam::OutputFilterFunctionObject
Source files

Definition at line 109 of file cloudInfo.H.

Constructor & Destructor Documentation

◆ cloudInfo() [1/2]

cloudInfo ( const cloudInfo )
protected

Disallow default bitwise copy construct.

◆ cloudInfo() [2/2]

cloudInfo ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 56 of file cloudInfo.C.

References dict, and Foam::read().

Here is the call graph for this function:

◆ ~cloudInfo()

~cloudInfo ( )
virtual

Destructor.

Definition at line 77 of file cloudInfo.C.

Member Function Documentation

◆ writeFileHeader()

void writeFileHeader ( Ostream os) const
protectedvirtual

File header information.

Definition at line 40 of file cloudInfo.C.

References Foam::endl(), functionObjectFile::writeCommented(), functionObjectFile::writeHeader(), and functionObjectFile::writeTabbed().

Here is the call graph for this function:

◆ operator=()

void operator= ( const cloudInfo )
protected

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "cloudInfo"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the cloudInfo object.

Definition at line 174 of file cloudInfo.H.

References cloudInfo::name_.

◆ read()

void read ( const dictionary dict)
virtual

Read the field min/max data.

Definition at line 83 of file cloudInfo.C.

References cloudName(), dict, Foam::endl(), forAll, Foam::Info, dictionary::lookup(), dictionary::lookupOrDefault(), Foam::nl, functionObjectFile::read(), and Foam::type().

Here is the call graph for this function:

◆ execute()

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 125 of file cloudInfo.C.

◆ end()

void end ( )
virtual

Execute at the final time-loop, currently does nothing.

Definition at line 131 of file cloudInfo.C.

◆ timeSet()

void timeSet ( )
virtual

Called when time was set at the end of the Time::operator++.

Definition at line 137 of file cloudInfo.C.

◆ write()

void write ( )
virtual

Write.

Definition at line 143 of file cloudInfo.C.

References cloudName(), Foam::endl(), forAll, Foam::Info, objectRegistry::lookupObject(), UPstream::master(), Foam::nl, Foam::returnReduce(), token::TAB, and Foam::type().

Here is the call graph for this function:

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 195 of file cloudInfo.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 199 of file cloudInfo.H.

Field Documentation

◆ name_

word name_
protected

Name of this set of cloudInfo object.

Definition at line 118 of file cloudInfo.H.

Referenced by cloudInfo::name().

◆ obr_

const objectRegistry& obr_
protected

Reference to the database.

Definition at line 121 of file cloudInfo.H.

◆ active_

bool active_
protected

on/off switch

Definition at line 124 of file cloudInfo.H.

◆ log_

Switch log_
protected

Switch to send output to Info as well.

Definition at line 127 of file cloudInfo.H.

◆ cloudNames_

wordList cloudNames_
protected

List of cloud names.

Definition at line 130 of file cloudInfo.H.

◆ filePtrs_

PtrList<OFstream> filePtrs_
protected

Output file per cloud.

Definition at line 133 of file cloudInfo.H.


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