A class for managing sub-loops referencing Time. More...
#include <subLoopTime.H>


Public Member Functions | |
| subLoopTime (Time &runTime, const label nCycles) | |
| Construct from time with fixed number of cycles. | |
| ~subLoopTime () | |
| Destructor. | |
| label | index () const |
| The current cycle index. | |
| label | nCycles () const |
| The total number of cycles. | |
| bool | status () const |
| Return true if looping is active. | |
| void | stop () |
| Force terminate the loop. | |
| bool | loop () |
| True if looping is active, increments the index. | |
| subLoopTime & | operator++ () |
| Prefix increment. | |
Protected Attributes | |
| Time & | time_ |
| label | index_ |
| The current sub-cycle index. | |
| label | total_ |
| The total number of cycles in the sub-cycle. | |
A class for managing sub-loops referencing Time.
Definition at line 49 of file subLoopTime.H.
| subLoopTime | ( | Time & | runTime, |
| const label | nCycles ) |
| ~subLoopTime | ( | ) |
Destructor.
Definition at line 35 of file subLoopTime.C.
References stop().

|
inline |
The current cycle index.
Definition at line 105 of file subLoopTime.H.
References index_.
Referenced by Foam::operator<<().

|
inline |
The total number of cycles.
Definition at line 113 of file subLoopTime.H.
References total_.
Referenced by loopControl::loopControl(), Foam::operator<<(), and subLoopTime().

| bool status | ( | ) | const |
Return true if looping is active.
Definition at line 43 of file subLoopTime.C.
| void stop | ( | ) |
Force terminate the loop.
Definition at line 49 of file subLoopTime.C.
References index_, and total_.
Referenced by loopControl::loop(), loopControl::~loopControl(), and ~subLoopTime().

| bool loop | ( | ) |
True if looping is active, increments the index.
Example usage,
Definition at line 56 of file subLoopTime.C.
References index_, operator++(), and total_.

| Foam::subLoopTime & operator++ | ( | ) |
Prefix increment.
Definition at line 73 of file subLoopTime.C.
References index_.
Referenced by loopControl::loop(), and loop().

|
protected |
Definition at line 68 of file subLoopTime.H.
Referenced by loopControl::loop(), loopControl::loopControl(), and subLoopTime().
|
protected |
The current sub-cycle index.
Definition at line 73 of file subLoopTime.H.
Referenced by index(), loopControl::loop(), loop(), operator++(), status(), stop(), and subLoopTime().
|
protected |
The total number of cycles in the sub-cycle.
Definition at line 78 of file subLoopTime.H.
Referenced by loopControl::loop(), loop(), nCycles(), status(), stop(), and subLoopTime().