stopAtFile Class Reference

Stops the run when the specified file is created in the case directory and optionally write results before stopping. More...

Inheritance diagram for stopAtFile:
Collaboration diagram for stopAtFile:

Public Member Functions

 TypeName ("stopAtFile")
 Runtime type information. More...
 
 stopAtFile (const word &name, const Time &runTime, const dictionary &)
 Construct from Time and dictionary. More...
 
 stopAtFile (const stopAtFile &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~stopAtFile ()
 Destructor. More...
 
virtual bool read (const dictionary &)
 Read the dictionary settings. More...
 
virtual bool end ()
 Execute at the final time-loop, used for cleanup. More...
 
void operator= (const stopAtFile &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from stopAt
 TypeName ("stopAt")
 Runtime type information. More...
 
 stopAt (const word &name, const Time &runTime, const dictionary &)
 Construct from Time and dictionary. More...
 
 stopAt (const stopAt &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~stopAt ()
 Destructor. More...
 
virtual bool execute ()
 Execute, check existence of stopAt file and take action. More...
 
virtual bool write ()
 Execute, check existence of stopAt file and take action. More...
 
void operator= (const stopAt &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from functionObject
 ClassName ("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...
 
 functionObject (const functionObject &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~functionObject ()
 Destructor. More...
 
const wordname () const
 Return the name of this functionObject. More...
 
virtual bool executeAtStart () const
 Return true if the functionObject should be executed at the start. More...
 
virtual scalar timeToNextWrite ()
 Called by Time::adjustTimeStep(). Allows the functionObject 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...
 
void operator= (const functionObject &)=delete
 Disallow default bitwise assignment. More...
 

Additional Inherited Members

- Public Types inherited from stopAt
enum  actionType { noWriteNow, writeNow, nextWrite }
 Enumeration defining the type of action. More...
 
- 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...
 
Switch executeAtStart_
 Switch write log to Info. More...
 
- Static Public Attributes inherited from functionObject
static bool postProcess
 Global post-processing mode switch. More...
 
- Protected Attributes inherited from stopAt
const Timetime_
 Reference to the Time. More...
 
actionType action_
 The type of action. More...
 
bool stopped_
 Set true when the stop action has executed. More...
 
- Static Protected Attributes inherited from stopAt
static const NamedEnum< actionType, 3 > actionTypeNames_
 Action type names. More...
 

Detailed Description

Stops the run when the specified file is created in the case directory and optionally write results before stopping.

The default name of the trigger file is $FOAM_CASE/ <name> where <name> is the name of the functionObject entry.

Currently the following action types are supported:

  • noWriteNow
  • writeNow
  • nextWrite (default)

Examples of function object specification:

stop
{
    type    stopAtFile;
    libs    ("libutilityFunctionObjects.so");
}

will stop the run at the next write after the file "stop" is created in the case directory.

stop
{
    type    stopAtFile;
    libs    ("libutilityFunctionObjects.so");
    file    "$FOAM_CASE/stop";
    action  writeNow;
}

will write the fields and stop the run when the file "stop" is created in the case directory.

Usage
Property Description Required Default value
type type name: stopAtFile yes
file Trigger file path name no $FOAM_CASE/<name>
action Action executed no nextWrite
Source files

Definition at line 110 of file stopAtFile.H.

Constructor & Destructor Documentation

◆ stopAtFile() [1/2]

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

Construct from Time and dictionary.

Definition at line 74 of file stopAtFile.C.

References Foam::read().

Here is the call graph for this function:

◆ stopAtFile() [2/2]

stopAtFile ( const stopAtFile )
delete

Disallow default bitwise copy construction.

◆ ~stopAtFile()

~stopAtFile ( )
virtual

Destructor.

Definition at line 93 of file stopAtFile.C.

Member Function Documentation

◆ TypeName()

TypeName ( "stopAtFile"  )

Runtime type information.

◆ read()

bool read ( const dictionary dict)
virtual

Read the dictionary settings.

Reimplemented from stopAt.

Definition at line 99 of file stopAtFile.C.

References stopAt::read(), and dictionary::readIfPresent().

Here is the call graph for this function:

◆ end()

bool end ( )
virtual

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

Reimplemented from stopAt.

Definition at line 112 of file stopAtFile.C.

◆ operator=()

void operator= ( const stopAtFile )
delete

Disallow default bitwise assignment.


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