Allows specification of different writing frequency of objects registered to the database. More...
Public Types | |
enum | writeOption { AUTO_WRITE , NO_WRITE , ANY_WRITE } |
Re-enumeration defining the write options, based on the original. More... | |
Public Member Functions | |
TypeName ("writeObjects") | |
Runtime type information. More... | |
writeObjects (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
virtual | ~writeObjects ()=default |
Destructor. More... | |
virtual bool | read (const dictionary &) |
Read the writeObjects data. More... | |
virtual bool | execute () |
Do nothing. More... | |
virtual bool | write () |
Write the registered objects. More... | |
![]() | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix) | |
Construct from components. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
virtual | ~functionObject ()=default |
Destructor. More... | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
const word & | name () const noexcept |
Return the name of this functionObject. More... | |
bool | useNamePrefix () const noexcept |
Return the flag for adding a scoping name prefix. More... | |
bool | useNamePrefix (bool on) noexcept |
Modify the flag for adding a scoping name prefix. More... | |
virtual bool | read (const dictionary &dict) |
Read and set the function object if its data have changed. More... | |
virtual bool | execute ()=0 |
Called at each ++ or += of the time-loop. More... | |
virtual bool | execute (const label subIndex) |
Execute using the specified subIndex. More... | |
virtual bool | write ()=0 |
Called at each ++ or += of the time-loop. More... | |
virtual bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
virtual bool | adjustTimeStep () |
Called at the end of Time::adjustDeltaT() if adjustTime is true. More... | |
virtual bool | filesModified () const |
Did any file get changed during execution? More... | |
virtual void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &mesh) |
Update for changes of mesh. More... | |
Static Public Attributes | |
static const Enum< writeOption > | writeOptionNames_ |
![]() | |
static int | debug |
Flag to execute debug content. More... | |
static bool | postProcess |
Global post-processing mode switch. More... | |
static bool | defaultUseNamePrefix |
Global default for useNamePrefix. More... | |
static word | outputPrefix |
Directory prefix. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< functionObject > | New (const word &name, const Time &runTime, const dictionary &dict) |
Select from dictionary, based on its "type" entry. More... | |
![]() | |
bool | log |
Flag to write log into Info. More... | |
![]() | |
word | scopedName (const word &name) const |
Return a scoped (prefixed) name. More... | |
Allows specification of different writing frequency of objects registered to the database.
It has similar functionality as the main time database through the writeControl
setting:
It also has the ability to write the selected objects that were defined with the respective write mode for the requested writeOption
, namely:
\( autoWrite \) | = | objects set to write at output time |
\( noWrite \) | = | objects set to not write by default |
\( anyWrite \) | = | any option of the previous two |
writeObjects1 { type writeObjects; libs (utilityFunctionObjects); ... objects (obj1 obj2); writeOption anyWrite; }
Where the entries comprise:
Property | Description | Required | Default value |
---|---|---|---|
type | type name: writeObjects | yes | |
objects | objects to write | yes | |
writeOption | only those with this write option | no | anyWrite |
Note: Regular expressions can also be used in objects
.
Definition at line 139 of file writeObjects.H.
enum writeOption |
Re-enumeration defining the write options, based on the original.
ones at IOobject::writeOption
Enumerator | |
---|---|
AUTO_WRITE | |
NO_WRITE | |
ANY_WRITE |
Definition at line 149 of file writeObjects.H.
writeObjects | ( | const word & | name, |
const Time & | runTime, | ||
const dictionary & | dict | ||
) |
Construct from Time and dictionary.
Definition at line 82 of file writeObjects.C.
References dict, Foam::name(), and writeObjects::read().
|
virtualdefault |
Destructor.
TypeName | ( | "writeObjects" | ) |
Runtime type information.
|
virtual |
Read the writeObjects data.
Reimplemented from functionObject.
Definition at line 100 of file writeObjects.C.
References dict, and kEpsilonLopesdaCosta< BasicTurbulenceModel >::read().
Referenced by writeObjects::writeObjects().
|
virtual |
|
virtual |
Write the registered objects.
Implements functionObject.
Definition at line 135 of file writeObjects.C.
References bitSet::any(), IOobject::AUTO_WRITE, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::ListOps::found(), Log, IOobject::name(), Foam::name(), Foam::nl, IOobject::NO_WRITE, bitSet::set(), Foam::subset(), Foam::type(), WarningInFunction, regIOobject::write(), and IOobject::writeOpt().
|
static |
Definition at line 156 of file writeObjects.H.