A class for managing sub-loops referencing Time. More...
Public Member Functions | |
| subLoopTime (Time &runTime, const label nCycles) | |
| Construct from time with fixed number of cycles. More... | |
| ~subLoopTime () | |
| Destructor. More... | |
| label | index () const |
| The current cycle index. More... | |
| label | nCycles () const |
| The total number of cycles. More... | |
| bool | status () const |
| Return true if looping is active. More... | |
| void | stop () |
| Force terminate the loop. More... | |
| bool | loop () |
| True if looping is active, increments the index. More... | |
| subLoopTime & | operator++ () |
| Prefix increment. More... | |
Protected Attributes | |
| Time & | time_ |
| label | index_ |
| The current sub-cycle index. More... | |
| label | total_ |
| The total number of cycles in the sub-cycle. More... | |
A class for managing sub-loops referencing Time.
Definition at line 53 of file subLoopTime.H.
| subLoopTime | ( | Time & | runTime, |
| const label | nCycles | ||
| ) |
Construct from time with fixed number of cycles.
| runTime | the top-level time |
| nCycles | the number of times to loop |
Definition at line 32 of file subLoopTime.C.
| ~subLoopTime | ( | ) |
Destructor.
Definition at line 42 of file subLoopTime.C.
|
inline |
The current cycle index.
Definition at line 94 of file subLoopTime.H.
References subLoopTime::index_.
Referenced by Foam::operator<<().
|
inline |
The total number of cycles.
Definition at line 100 of file subLoopTime.H.
References subLoopTime::total_.
Referenced by Foam::operator<<().
| bool status | ( | ) | const |
Return true if looping is active.
Definition at line 50 of file subLoopTime.C.
| void stop | ( | ) |
Force terminate the loop.
Definition at line 56 of file subLoopTime.C.
| bool loop | ( | ) |
True if looping is active, increments the index.
Example usage,
Definition at line 63 of file subLoopTime.C.
| Foam::subLoopTime & operator++ | ( | ) |
Prefix increment.
Definition at line 80 of file subLoopTime.C.
|
protected |
Definition at line 68 of file subLoopTime.H.
|
protected |
The current sub-cycle index.
Definition at line 71 of file subLoopTime.H.
Referenced by subLoopTime::index().
|
protected |
The total number of cycles in the sub-cycle.
Definition at line 74 of file subLoopTime.H.
Referenced by subLoopTime::nCycles().