A class for managing arbitrary loops with the ability to invoke function object execution. More...
Public Member Functions | |
loopControl (Time &runTime, const label nCycles, const word &dictName="loop") | |
loopControl (Time &runTime, const word &algorithmName, const word &dictName="loop") | |
loopControl (Time &runTime, const dictionary &algorithmDict, const word &dictName="loop") | |
~loopControl () | |
const word & | name () const |
label | interval () const |
bool | loop () |
![]() | |
subLoopTime (Time &runTime, const label nCycles) | |
~subLoopTime () | |
label | index () const |
label | nCycles () const |
bool | status () const |
void | stop () |
bool | loop () |
subLoopTime & | operator++ () |
Protected Attributes | |
word | name_ |
label | interval_ |
dictionary | convergenceDict_ |
wordRes | onLoop_ |
wordRes | onConverged_ |
wordRes | onEnd_ |
bool | converged_ |
![]() | |
Time & | time_ |
label | index_ |
label | total_ |
A class for managing arbitrary loops with the ability to invoke function object execution.
SIMPLE { energyCoupling { iterations 100; onLoop (); onConverged ( externalCoupled "loopThings.*" ); convergence { "h" 1e-3; } } }
Where the loop entries comprise:
Property | Description | Required | Default |
---|---|---|---|
enabled | activate/deactivate loop | no | true |
iteration | times to loop | no | 0 |
timeStart | begin time for loop activation | no | -VGREAT |
timeEnd | end time of loop activation | no | VGREAT |
interval | sub-interval to execute onLoop | no | 0 |
onLoop | function object names to call at executeInterval | no | |
onConverged | function object names to call when converged | no | |
onEnd | function object names to call when loop ends | no | |
convergence | dictionary of convergence values to check | no |
The function object names listed by onLoop
, onConverged
, onEnd
must implement an execute(int)
method. If the time controls timeStart
or timeEnd
are used for the loop, these values are only inspected upon creation, not during execution.
Definition at line 136 of file loopControl.H.
loopControl | ( | Time & | runTime, |
const label | nCycles, | ||
const word & | dictName = "loop" |
||
) |
Definition at line 138 of file loopControl.C.
loopControl | ( | Time & | runTime, |
const word & | algorithmName, | ||
const word & | dictName = "loop" |
||
) |
Definition at line 176 of file loopControl.C.
References dictName(), dictionary::findDict(), Foam::read(), and solution::solutionDict().
loopControl | ( | Time & | runTime, |
const dictionary & | algorithmDict, | ||
const word & | dictName = "loop" |
||
) |
Definition at line 156 of file loopControl.C.
References dictName(), dictionary::findDict(), and Foam::read().
~loopControl | ( | ) |
Definition at line 205 of file loopControl.C.
|
inline |
Definition at line 233 of file loopControl.H.
References loopControl::name_.
Referenced by Foam::operator<<().
|
inline |
Definition at line 239 of file loopControl.H.
References loopControl::interval_.
bool loop | ( | ) |
Definition at line 213 of file loopControl.C.
|
protected |
Definition at line 163 of file loopControl.H.
Referenced by loopControl::name().
|
protected |
Definition at line 166 of file loopControl.H.
Referenced by loopControl::interval().
|
protected |
Definition at line 169 of file loopControl.H.
|
protected |
Definition at line 172 of file loopControl.H.
|
protected |
Definition at line 175 of file loopControl.H.
|
protected |
Definition at line 179 of file loopControl.H.
|
protected |
Definition at line 182 of file loopControl.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.