Watches for presence of the named trigger file in the case directory and signals a simulation stop (or other) event if found. More...


Public Member Functions | |
| TypeName ("abort") | |
| Runtime type information. More... | |
| abort (const word &name, const Time &runTime, const dictionary &dict) | |
| Construct from Time and dictionary. More... | |
| virtual | ~abort ()=default |
| Destructor. More... | |
| virtual bool | read (const dictionary &dict) |
| Read the dictionary settings. More... | |
| virtual bool | execute () |
| Check existence of the file and take action. More... | |
| virtual bool | write () |
| No-op. More... | |
| virtual bool | end () |
| Remove the trigger file after the final time-loop. More... | |
Public Member Functions inherited from timeFunctionObject | |
| timeFunctionObject (const word &name, const Time &runTime) | |
| Construct from Time. More... | |
| virtual | ~timeFunctionObject ()=default |
| Destructor. More... | |
| const Time & | time () const |
| Return time database. More... | |
| objectRegistry & | storedObjects () |
| Write access to the output objects ("functionObjectObjects") registered on Time. More... | |
| const objectRegistry & | storedObjects () const |
| Const access to the output objects ("functionObjectObjects") registered on Time. 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 | 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... | |
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... | |
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... | |
Protected Member Functions inherited from timeFunctionObject | |
| void | clearOutputObjects (const wordList &objNames) |
| Remove specified items from "functionObjectObjects". More... | |
| timeFunctionObject (const timeFunctionObject &)=delete | |
| No copy construct. More... | |
| void | operator= (const timeFunctionObject &)=delete |
| No copy assignment. More... | |
Protected Member Functions inherited from functionObject | |
| word | scopedName (const word &name) const |
| Return a scoped (prefixed) name. More... | |
Protected Attributes inherited from timeFunctionObject | |
| const Time & | time_ |
| Reference to the time database. More... | |
Watches for presence of the named trigger file in the case directory and signals a simulation stop (or other) event if found.
The presence of the trigger file is only checked on the master process.
Currently the following action types are supported:
Example of function object specification:
abort
{
type abort;
libs (utilityFunctionObjects);
file "<case>/GOODBYE";
action writeNow
}
Function object usage
| Property | Description | Required | Default |
|---|---|---|---|
type | Type name: abort | yes | |
file | The trigger filename | no | <case>/name |
action | The default action to trigger | no | nextWrite |
When the trigger file is found, it is checked for the following content which corresponds to actions.
action=noWriteNow : triggers Foam::Time::saNoWriteNow (stop without writing data)action=writeNow : triggers Foam::Time::saWriteNow (stop and write data)action=nextWrite : triggers Foam::Time::saNextWrite (stop after next normal data write)action=endTime : triggers Foam::Time::saEndTime (continue simulation to the end)| abort | ( | const word & | name, |
| const Time & | runTime, | ||
| const dictionary & | dict | ||
| ) |
Construct from Time and dictionary.
Definition at line 131 of file abort.C.
References dict, Foam::blockMeshTools::read(), and Foam::rm().

|
virtualdefault |
Destructor.
| TypeName | ( | "abort" | ) |
Runtime type information.
|
virtual |
Read the dictionary settings.
Reimplemented from functionObject.
Definition at line 154 of file abort.C.
References fileName::clean(), dict, Foam::endl(), string::expand(), Enum< EnumType >::getOrDefault(), Time::globalPath(), Foam::Info, fileName::isAbsolute(), Foam::longDescription(), functionObject::name(), Foam::nl, functionObject::read(), Time::stopAtControlNames, timeFunctionObject::time_, and functionObject::type().

|
virtual |
Check existence of the file and take action.
Implements functionObject.
Definition at line 194 of file abort.C.
References Pstream::broadcast(), Foam::endl(), Foam::getStopAction(), Foam::Info, Foam::isFile(), Foam::longDescription(), and UPstream::master().

|
virtual |
|
virtual |
Remove the trigger file after the final time-loop.
Reimplemented from functionObject.
Definition at line 241 of file abort.C.
References UPstream::master(), and Foam::rm().
