Public Member Functions | Private Member Functions | Private Attributes
runTimeControl Class Reference

This function object controls when the calculation is terminated based on satisfying user-specified conditions. More...

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

Public Member Functions

 TypeName ("runTimeControl")
 Runtime type information. More...
 
 runTimeControl (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~runTimeControl ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the set of runTimeControl. More...
 
virtual void read (const dictionary &)
 Read the runTimeControl data. More...
 
virtual void execute ()
 Execute, currently does nothing. More...
 
virtual void end ()
 Execute at the final time-loop, currently does nothing. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Calculate the runTimeControl and write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh. More...
 
- Public Member Functions inherited from functionObjectState
 functionObjectState (const objectRegistry &obr, const word &name)
 Construct from components. More...
 
virtual ~functionObjectState ()
 Destructor. More...
 
const wordname () const
 Return the name. More...
 
bool active () const
 Return the active flag. More...
 
const IOdictionarystateDict () const
 Return access to the state dictionary. More...
 
dictionarypropertyDict ()
 Return access to the property dictionary. More...
 
template<class Type >
bool setActive ()
 Set the active status by querying objectRegistry type. More...
 
bool foundProperty (const word &entryName) const
 Return true if the property exists. More...
 
template<class Type >
Type getProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve generic property. More...
 
template<class Type >
void getProperty (const word &entryName, Type &value) const
 Retrieve generic property. More...
 
template<class Type >
void setProperty (const word &entryName, const Type &value)
 Add generic property. More...
 
template<class Type >
Type getObjectProperty (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve generic property from named object. More...
 
template<class Type >
void getObjectProperty (const word &objectName, const word &entryName, Type &value) const
 Retrieve generic property from named object. More...
 
template<class Type >
void setObjectProperty (const word &objectName, const word &entryName, const Type &value)
 Add generic property from named object. More...
 
template<class Type >
void setResult (const word &entryName, const Type &value)
 Add result. More...
 
template<class Type >
void setObjectResult (const word &objectName, const word &entryName, const Type &value)
 Add result from named object. More...
 
template<class Type >
Type getResult (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve result. More...
 
template<class Type >
Type getObjectResult (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve result from named object. More...
 
template<class Type >
void getObjectResult (const word &objectName, const word &entryName, Type &value) const
 Retrieve result from named object. More...
 
word resultType (const word &entryName) const
 Retrieve the result type. More...
 
word objectResultType (const word &objectName, const word &entryName) const
 Return the type of result. More...
 
List< wordobjectResultEntries () const
 Retrieve the result entries. More...
 
List< wordobjectResultEntries (const word &objectName) const
 Return result entries for named object. More...
 

Private Member Functions

 runTimeControl (const runTimeControl &)
 Disallow default bitwise copy construct. More...
 
void operator= (const runTimeControl &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const objectRegistryobr_
 Reference to the database. More...
 
PtrList< runTimeConditionconditions_
 List of conditions to satisfy. More...
 
Map< labelgroupMap_
 Map to define group IDs. More...
 
label nWriteStep_
 Number of write steps before exiting. More...
 
label writeStepI_
 Current number of steps written. More...
 

Additional Inherited Members

- Protected Member Functions inherited from functionObjectState
 functionObjectState (const functionObjectState &)
 Disallow default bitwise copy construct. More...
 
void operator= (const functionObjectState &)
 Disallow default bitwise assignment. More...
 
- Protected Attributes inherited from functionObjectState
const word name_
 Name of model. More...
 
bool active_
 Flag to indicate whether the object is active. More...
 
IOdictionarystateDict_
 Reference to the state dictionary. More...
 

Detailed Description

This function object controls when the calculation is terminated based on satisfying user-specified conditions.

Optionally specify a number of write steps before the calculation is terminated. Here, a write is performed each time that all conditons are satisfied.

Source files

Definition at line 65 of file runTimeControl.H.

Constructor & Destructor Documentation

◆ runTimeControl() [1/2]

runTimeControl ( const runTimeControl )
private

Disallow default bitwise copy construct.

◆ runTimeControl() [2/2]

runTimeControl ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 43 of file runTimeControl.C.

References dict, Foam::endl(), forAll, Foam::Info, Foam::nl, Foam::read(), and Foam::type().

Here is the call graph for this function:

◆ ~runTimeControl()

~runTimeControl ( )
virtual

Destructor.

Definition at line 97 of file runTimeControl.C.

Member Function Documentation

◆ operator=()

void operator= ( const runTimeControl )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "runTimeControl"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the set of runTimeControl.

Definition at line 122 of file runTimeControl.H.

References functionObjectState::name_.

◆ read()

void read ( const dictionary dict)
virtual

Read the runTimeControl data.

Definition at line 103 of file runTimeControl.C.

References dict, forAll, runTimeCondition::New(), dictionary::readIfPresent(), dictionary::set(), List::size(), dictionary::subDict(), and dictionary::toc().

Here is the call graph for this function:

◆ execute()

void execute ( )
virtual

◆ end()

void end ( )
virtual

Execute at the final time-loop, currently does nothing.

Definition at line 237 of file runTimeControl.C.

◆ timeSet()

void timeSet ( )
virtual

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

Definition at line 243 of file runTimeControl.C.

◆ write()

void write ( )
virtual

Calculate the runTimeControl and write.

Definition at line 249 of file runTimeControl.C.

References forAll.

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 143 of file runTimeControl.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 147 of file runTimeControl.H.

Field Documentation

◆ obr_

const objectRegistry& obr_
private

Reference to the database.

Definition at line 72 of file runTimeControl.H.

◆ conditions_

PtrList<runTimeCondition> conditions_
private

List of conditions to satisfy.

Definition at line 75 of file runTimeControl.H.

◆ groupMap_

Map<label> groupMap_
private

Map to define group IDs.

Definition at line 78 of file runTimeControl.H.

◆ nWriteStep_

label nWriteStep_
private

Number of write steps before exiting.

Definition at line 81 of file runTimeControl.H.

◆ writeStepI_

label writeStepI_
private

Current number of steps written.

Definition at line 84 of file runTimeControl.H.


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