This function object controls when the calculation is terminated based on satisfying user-specified conditions. More...
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 word & | name () 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... | |
![]() | |
functionObjectState (const objectRegistry &obr, const word &name) | |
Construct from components. More... | |
virtual | ~functionObjectState () |
Destructor. More... | |
const word & | name () const |
Return the name. More... | |
bool | active () const |
Return the active flag. More... | |
const IOdictionary & | stateDict () const |
Return access to the state dictionary. More... | |
dictionary & | propertyDict () |
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< word > | objectResultEntries () const |
Retrieve the result entries. More... | |
List< word > | objectResultEntries (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 objectRegistry & | obr_ |
Reference to the database. More... | |
PtrList< runTimeCondition > | conditions_ |
List of conditions to satisfy. More... | |
Map< label > | groupMap_ |
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 | |
![]() | |
functionObjectState (const functionObjectState &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const functionObjectState &) |
Disallow default bitwise assignment. More... | |
![]() | |
const word | name_ |
Name of model. More... | |
bool | active_ |
Flag to indicate whether the object is active. More... | |
IOdictionary & | stateDict_ |
Reference to the state dictionary. More... | |
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.
Definition at line 65 of file runTimeControl.H.
|
private |
Disallow default bitwise copy construct.
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().
|
virtual |
Destructor.
Definition at line 97 of file runTimeControl.C.
|
private |
Disallow default bitwise assignment.
TypeName | ( | "runTimeControl" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the set of runTimeControl.
Definition at line 122 of file runTimeControl.H.
References functionObjectState::name_.
|
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().
|
virtual |
Execute, currently does nothing.
Definition at line 136 of file runTimeControl.C.
References Foam::abort(), runTimeCondition::active(), DynamicList::append(), runTimeCondition::apply(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, runTimeCondition::groupID(), Foam::Info, Foam::nl, Foam::type(), Time::writeAndEnd(), and Time::writeNow().
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 237 of file runTimeControl.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 243 of file runTimeControl.C.
|
virtual |
Calculate the runTimeControl and write.
Definition at line 249 of file runTimeControl.C.
References forAll.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 143 of file runTimeControl.H.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 147 of file runTimeControl.H.
|
private |
Reference to the database.
Definition at line 72 of file runTimeControl.H.
|
private |
List of conditions to satisfy.
Definition at line 75 of file runTimeControl.H.
Map to define group IDs.
Definition at line 78 of file runTimeControl.H.
|
private |
Number of write steps before exiting.
Definition at line 81 of file runTimeControl.H.
|
private |
Current number of steps written.
Definition at line 84 of file runTimeControl.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.