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... | |
Public Member Functions inherited from functionObject | |
| virtual const word & | type () const =0 |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
| functionObject (const word &name) | |
| Construct from components. More... | |
| autoPtr< functionObject > | clone () const |
| Return clone. More... | |
| virtual | ~functionObject ()=default |
| Destructor. More... | |
| const word & | name () const |
| Return the name of this functionObject. More... | |
| virtual bool | execute (const label subIndex) |
| Execute using the specified subIndex. 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 Public Attributes inherited from functionObject | |
| static int | debug |
| Flag to execute debug content. More... | |
| static bool | postProcess |
| Global post-processing mode switch. More... | |
| static word | outputPrefix |
| Directory prefix. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from functionObject | |
| static autoPtr< functionObject > | New (const word &name, const Time &runTime, const dictionary &dict) |
| Select from dictionary, based on its "type" entry. More... | |
Public Attributes inherited from functionObject | |
| bool | log |
| Flag to write log into Info. More... | |
Protected Member Functions inherited from functionObject | |
| word | scopedName (const word &name) const |
| Return a scoped name, e.g. used to construct local field names. 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 67 of file writeObjects.C.
References dict, and Foam::blockMeshTools::read().
|
virtualdefault |
Destructor.
| TypeName | ( | "writeObjects" | ) |
Runtime type information.
|
virtual |
Read the writeObjects data.
Reimplemented from functionObject.
Definition at line 90 of file writeObjects.C.
References dict, Enum< EnumType >::getOrDefault(), functionObject::read(), List< T >::resize(), and writeObjects::writeOptionNames_.
|
virtual |
|
virtual |
Write the registered objects.
Implements functionObject.
Definition at line 125 of file writeObjects.C.
References 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.
Referenced by writeObjects::read().