Allows specification of different writing frequency of objects registered to the database. More...


Public Types | |
| enum | writeOption { NO_WRITE, AUTO_WRITE, ANY_WRITE } |
| Re-enumeration defining the write options, Naming based on the IOobjectOption::writeOption. 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 | |
| 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 | 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 bool | defaultUseNamePrefix |
| Global default for useNamePrefix. 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 (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:
| = | objects set to write at output time |
| = | objects set to not write by default |
| = | 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 135 of file writeObjects.H.
| enum writeOption |
Re-enumeration defining the write options, Naming based on the IOobjectOption::writeOption.
| Enumerator | |
|---|---|
| NO_WRITE | |
| AUTO_WRITE | |
| ANY_WRITE | |
Definition at line 147 of file writeObjects.H.
| writeObjects | ( | const word & | name, |
| const Time & | runTime, | ||
| const dictionary & | dict | ||
| ) |
Construct from Time and dictionary.
Definition at line 76 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 93 of file writeObjects.C.
References dict, UList< T >::first(), Enum< EnumType >::getOrDefault(), functionObject::read(), List< T >::resize(), and writeObjects::writeOptionNames_.

|
virtual |
|
virtual |
Write the registered objects.
Implements functionObject.
Definition at line 128 of file writeObjects.C.
References IOobjectOption::AUTO_WRITE, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::ListOps::found(), Log, Foam::name(), IOobject::name(), Foam::nl, IOobjectOption::NO_WRITE, Foam::BitOps::select(), bitSet::set(), Foam::subset(), Foam::type(), WarningInFunction, regIOobject::write(), and IOobjectOption::writeOpt().

|
static |
Definition at line 154 of file writeObjects.H.
Referenced by writeObjects::read().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.