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") | |
abort (const word &name, const Time &runTime, const dictionary &dict) | |
virtual | ~abort ()=default |
virtual bool | read (const dictionary &dict) |
virtual bool | execute () |
virtual bool | write () |
virtual bool | end () |
![]() | |
timeFunctionObject (const word &name, const Time &runTime) | |
virtual | ~timeFunctionObject ()=default |
const Time & | time () const |
objectRegistry & | storedObjects () |
const objectRegistry & | storedObjects () const |
![]() | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix) | |
autoPtr< functionObject > | clone () const |
virtual | ~functionObject ()=default |
virtual const word & | type () const =0 |
const word & | name () const noexcept |
bool | useNamePrefix () const noexcept |
bool | useNamePrefix (bool on) noexcept |
virtual bool | execute (const label subIndex) |
virtual bool | adjustTimeStep () |
virtual bool | filesModified () const |
virtual void | updateMesh (const mapPolyMesh &mpm) |
virtual void | movePoints (const polyMesh &mesh) |
Additional Inherited Members | |
![]() | |
static autoPtr< functionObject > | New (const word &name, const Time &runTime, const dictionary &dict) |
![]() | |
bool | log |
![]() | |
static int | debug |
static bool | postProcess |
static bool | defaultUseNamePrefix |
static word | outputPrefix |
![]() | |
void | clearOutputObjects (const wordList &objNames) |
timeFunctionObject (const timeFunctionObject &)=delete | |
void | operator= (const timeFunctionObject &)=delete |
![]() | |
word | scopedName (const word &name) const |
![]() | |
const Time & | time_ |
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 | ||
) |
Definition at line 131 of file abort.C.
References dict, Foam::blockMeshTools::read(), and Foam::rm().
|
virtualdefault |
TypeName | ( | "abort" | ) |
|
virtual |
Reimplemented from functionObject.
Definition at line 154 of file abort.C.
References fileName::clean(), dict, Foam::endl(), string::expand(), Enum::getOrDefault(), TimePaths::globalPath(), Foam::Info, fileName::isAbsolute(), Foam::longDescription(), functionObject::name(), Foam::nl, functionObject::read(), Time::stopAtControlNames, timeFunctionObject::time_, and functionObject::type().
|
virtual |
Implements functionObject.
Definition at line 194 of file abort.C.
References Foam::endl(), Foam::getStopAction(), Foam::Info, Foam::isFile(), Foam::longDescription(), UPstream::master(), and Pstream::scatter().
|
virtual |
Implements functionObject.
|
virtual |
Reimplemented from functionObject.
Definition at line 241 of file abort.C.
References UPstream::master(), and Foam::rm().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.