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

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

Public Types

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

Public Member Functions

 TypeName ("abort")
 Runtime type information. More...
 
 abortCalculation (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFilesUnused=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~abortCalculation ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the abort file. More...
 
virtual void read (const dictionary &)
 Read the dictionary settings. More...
 
virtual void execute ()
 Execute, check existence of abort file and take action. More...
 
virtual void end ()
 Execute at the final time-loop, used for cleanup. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Execute, check existence of abort file and take action. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh - does nothing. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh - does nothing. 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 64 of file abortCalculation.H.

Member Enumeration Documentation

enum actionType

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 71 of file abortCalculation.H.

Constructor & Destructor Documentation

abortCalculation ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFilesUnused = false 
)

Construct for given objectRegistry and dictionary.

Definition at line 81 of file abortCalculation.C.

References Foam::read().

Here is the call graph for this function:

~abortCalculation ( )
virtual

Destructor.

Definition at line 103 of file abortCalculation.C.

Member Function Documentation

TypeName ( "abort"  )

Runtime type information.

virtual const word& name ( ) const
inlinevirtual

Return name of the abort file.

Definition at line 134 of file abortCalculation.H.

References abortCalculation::end(), abortCalculation::execute(), abortCalculation::read(), abortCalculation::timeSet(), and abortCalculation::write().

Here is the call graph for this function:

void read ( const dictionary dict)
virtual

Read the dictionary settings.

Definition at line 109 of file abortCalculation.C.

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

Referenced by abortCalculation::name().

Here is the call graph for this function:

Here is the caller graph for this function:

void execute ( )
virtual

Execute, check existence of abort file and take action.

Definition at line 127 of file abortCalculation.C.

References Foam::endl(), Foam::Info, Foam::isFile(), Foam::reduce(), Time::saNextWrite, Time::saNoWriteNow, and Time::saWriteNow.

Referenced by abortCalculation::name().

Here is the call graph for this function:

Here is the caller graph for this function:

void end ( )
virtual

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

Definition at line 176 of file abortCalculation.C.

Referenced by abortCalculation::name().

Here is the caller graph for this function:

void timeSet ( )
virtual

Called when time was set at the end of the Time::operator++.

Definition at line 182 of file abortCalculation.C.

Referenced by abortCalculation::name().

Here is the caller graph for this function:

void write ( )
virtual

Execute, check existence of abort file and take action.

Definition at line 188 of file abortCalculation.C.

Referenced by abortCalculation::name().

Here is the caller graph for this function:

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh - does nothing.

Definition at line 155 of file abortCalculation.H.

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh - does nothing.

Definition at line 159 of file abortCalculation.H.


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