This function object outputs Lagrangian cloud information to a file. The current outputs include: More...
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 word & | name () 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... | |
![]() | |
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... | |
OFstream & | file () |
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... | |
![]() | |
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< OFstream > | createFile (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 objectRegistry & | obr_ |
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< OFstream > | filePtrs_ |
Output file per cloud. More... | |
![]() | |
bool | writeToFile_ |
Flag to enable/disable writing to file. More... | |
Additional Inherited Members | |
![]() | |
static const word | outputPrefix = "postProcessing" |
Directory prefix. More... | |
static label | addChars = 7 |
Additional characters for writing. More... | |
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
Definition at line 109 of file cloudInfo.H.
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().
|
virtual |
Destructor.
Definition at line 77 of file cloudInfo.C.
|
protectedvirtual |
File header information.
Definition at line 40 of file cloudInfo.C.
References Foam::endl(), functionObjectFile::writeCommented(), functionObjectFile::writeHeader(), and functionObjectFile::writeTabbed().
|
protected |
Disallow default bitwise assignment.
TypeName | ( | "cloudInfo" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the cloudInfo object.
Definition at line 174 of file cloudInfo.H.
References cloudInfo::name_.
|
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().
|
virtual |
Execute, currently does nothing.
Definition at line 125 of file cloudInfo.C.
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 131 of file cloudInfo.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 137 of file cloudInfo.C.
|
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().
|
inlinevirtual |
Update for changes of mesh.
Definition at line 195 of file cloudInfo.H.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 199 of file cloudInfo.H.
|
protected |
Name of this set of cloudInfo object.
Definition at line 118 of file cloudInfo.H.
Referenced by cloudInfo::name().
|
protected |
Reference to the database.
Definition at line 121 of file cloudInfo.H.
|
protected |
on/off switch
Definition at line 124 of file cloudInfo.H.
|
protected |
Switch to send output to Info as well.
Definition at line 127 of file cloudInfo.H.
|
protected |
List of cloud names.
Definition at line 130 of file cloudInfo.H.
Output file per cloud.
Definition at line 133 of file cloudInfo.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.