stopAt Class Referenceabstract

Abstract base class for stop conditions. More...

Inheritance diagram for stopAt:
Collaboration diagram for stopAt:

Public Types

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

Public Member Functions

 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 read (const dictionary &)
 Read the dictionary settings. More...
 
virtual wordList fields () const
 Return the list of fields required. 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...
 
virtual bool end ()
 Execute at the final time-loop, used for cleanup. 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, const Time &runTime)
 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 timeToNextAction ()
 Called by Time::adjustTimeStep(). Allows the functionObject to. More...
 
virtual void movePoints (const polyMesh &mesh)
 Update topology using the given map. More...
 
virtual void topoChange (const polyTopoChangeMap &map)
 Update topology using the given map. More...
 
virtual void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
virtual void distribute (const polyDistributionMap &)
 Redistribute or update using the given distribution map. More...
 
void operator= (const functionObject &)=delete
 Disallow default bitwise assignment. More...
 

Protected Member Functions

virtual bool condition () const =0
 Return true when the stop condition is achieved. More...
 

Protected Attributes

actionType action_
 The type of action. More...
 
bool stopped_
 Set true when the stop action has executed. More...
 
- Protected Attributes inherited from functionObject
const Timetime_
 Reference to time. More...
 

Static Protected Attributes

static const NamedEnum< actionType, 3 > actionTypeNames_
 Action type names. 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...
 
Switch executeAtStart_
 Switch write log to Info. More...
 
- Static Public Attributes inherited from functionObject
static bool postProcess
 Global post-processing mode switch. More...
 

Detailed Description

Abstract base class for stop conditions.

Currently the following actions are supported:

  • noWriteNow
  • writeNow
  • nextWrite
Source files

Definition at line 56 of file stopAt.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 63 of file stopAt.H.

Constructor & Destructor Documentation

◆ stopAt() [1/2]

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

Construct from Time and dictionary.

Definition at line 61 of file stopAt.C.

◆ stopAt() [2/2]

stopAt ( const stopAt )
delete

Disallow default bitwise copy construction.

◆ ~stopAt()

~stopAt ( )
virtual

Destructor.

Definition at line 76 of file stopAt.C.

Member Function Documentation

◆ condition()

virtual bool condition ( ) const
protectedpure virtual

Return true when the stop condition is achieved.

◆ TypeName()

TypeName ( "stopAt"  )

Runtime type information.

◆ read()

bool read ( const dictionary dict)
virtual

Read the dictionary settings.

Reimplemented from functionObject.

Reimplemented in stopAtTimeStep, stopAtFile, and stopAtClockTime.

Definition at line 82 of file stopAt.C.

References dict.

Referenced by stopAtClockTime::read(), stopAtFile::read(), stopAtTimeStep::read(), and stopAtEmptyClouds::stopAtEmptyClouds().

Here is the caller graph for this function:

◆ fields()

virtual wordList fields ( ) const
inlinevirtual

Return the list of fields required.

Implements functionObject.

Definition at line 121 of file stopAt.H.

References List< word >::null().

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Execute, check existence of stopAt file and take action.

Implements functionObject.

Definition at line 93 of file stopAt.C.

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

Here is the call graph for this function:

◆ write()

bool write ( )
virtual

Execute, check existence of stopAt file and take action.

Implements functionObject.

Definition at line 149 of file stopAt.C.

◆ end()

bool end ( )
virtual

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

Reimplemented from functionObject.

Reimplemented in stopAtFile.

Definition at line 155 of file stopAt.C.

◆ operator=()

void operator= ( const stopAt )
delete

Disallow default bitwise assignment.

Member Data Documentation

◆ actionTypeNames_

const Foam::NamedEnum< Foam::functionObjects::stopAt::actionType, 3 > actionTypeNames_
staticprotected

Action type names.

Definition at line 76 of file stopAt.H.

◆ action_

actionType action_
protected

The type of action.

Definition at line 79 of file stopAt.H.

Referenced by stopAtTimeStep::stopAtTimeStep().

◆ stopped_

bool stopped_
protected

Set true when the stop action has executed.

Definition at line 82 of file stopAt.H.


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