Public Types | Public Member Functions | List of all members
abort Class Reference

Watches for presence of the named file in the $FOAM_CASE directory and aborts the calculation if it is present. More...

Inheritance diagram for abort:
Inheritance graph
[legend]
Collaboration diagram for abort:
Collaboration graph
[legend]

Public Types

enum  actionType { noWriteNow, writeNow, nextWrite }
 Enumeration defining the type of action. More...
 

Public Member Functions

 TypeName ("abort")
 Runtime type information. More...
 
 abort (const word &name, const Time &runTime, const dictionary &)
 Construct from Time and dictionary. More...
 
virtual ~abort ()
 Destructor. More...
 
virtual bool read (const dictionary &)
 Read the dictionary settings. More...
 
virtual bool execute ()
 Execute, check existence of abort file and take action. More...
 
virtual bool write ()
 Execute, check existence of abort file and take action. More...
 
virtual bool end ()
 Execute at the final time-loop, used for cleanup. More...
 
- Public Member Functions inherited from functionObject
virtual const wordtype () 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< functionObjectclone () const
 Return clone. More...
 
virtual ~functionObject ()
 Destructor. More...
 
const wordname () const
 Return the name of this functionObject. More...
 
virtual bool setTimeStep ()
 Called by Time::setDeltaT(). Allows the function object to override. More...
 
virtual scalar timeToNextWrite ()
 Called by Time::adjustTimeStep(). Allows the function object to. 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< functionObjectNew (const word &name, const Time &, const dictionary &)
 Select from dictionary, based on its "type" entry. More...
 
- Public Attributes inherited from functionObject
Switch log
 Switch write log to Info. More...
 
- Static Public Attributes inherited from functionObject
static int debug
 
static bool postProcess
 Global post-processing mode switch. More...
 

Detailed Description

Watches for presence of the named file in the $FOAM_CASE directory and aborts the calculation if it is present.

Currently the following action types are supported:

Source files

Definition at line 57 of file abort.H.

Member Enumeration Documentation

◆ actionType

enum actionType
strong

Enumeration defining the type of action.

Enumerator
noWriteNow 

stop immediately without writing data

writeNow 

write data and stop immediately

nextWrite 

stop the next time data are written

Definition at line 66 of file abort.H.

Constructor & Destructor Documentation

◆ abort()

abort ( const word name,
const Time runTime,
const dictionary dict 
)

Construct from Time and dictionary.

Definition at line 88 of file abort.C.

References Foam::read().

Here is the call graph for this function:

◆ ~abort()

~abort ( )
virtual

Destructor.

Definition at line 109 of file abort.C.

Member Function Documentation

◆ TypeName()

TypeName ( "abort"  )

Runtime type information.

◆ read()

bool read ( const dictionary dict)
virtual

Read the dictionary settings.

Reimplemented from functionObject.

Definition at line 115 of file abort.C.

References dictionary::found(), dictionary::lookup(), and dictionary::readIfPresent().

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Execute, check existence of abort file and take action.

Implements functionObject.

Definition at line 135 of file abort.C.

References Foam::endl(), Foam::Info, Foam::isFile(), Time::nextWrite, Time::noWriteNow, Foam::reduce(), and Time::writeNow.

Here is the call graph for this function:

◆ write()

bool write ( )
virtual

Execute, check existence of abort file and take action.

Implements functionObject.

Definition at line 186 of file abort.C.

◆ end()

bool end ( )
virtual

Execute at the final time-loop, used for cleanup.

Reimplemented from functionObject.

Definition at line 192 of file abort.C.


The documentation for this class was generated from the following files: