Loading...
Searching...
No Matches
subLoopTime Class Reference

A class for managing sub-loops referencing Time. More...

#include <subLoopTime.H>

Inheritance diagram for subLoopTime:
Collaboration diagram for subLoopTime:

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

Timetime_
label index_
 The current sub-cycle index.
label total_
 The total number of cycles in the sub-cycle.

Detailed Description

A class for managing sub-loops referencing Time.

Source files
See also
subCycleTime

Definition at line 49 of file subLoopTime.H.

Constructor & Destructor Documentation

◆ subLoopTime()

subLoopTime ( Time & runTime,
const label nCycles )

Construct from time with fixed number of cycles.

Parameters
runTimethe top-level time
nCyclesthe number of times to loop

Definition at line 25 of file subLoopTime.C.

References index_, nCycles(), runTime, time_, and total_.

Here is the call graph for this function:

◆ ~subLoopTime()

~subLoopTime ( )

Destructor.

Definition at line 35 of file subLoopTime.C.

References stop().

Here is the call graph for this function:

Member Function Documentation

◆ index()

label index ( ) const
inline

The current cycle index.

Definition at line 105 of file subLoopTime.H.

References index_.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ nCycles()

label nCycles ( ) const
inline

The total number of cycles.

Definition at line 113 of file subLoopTime.H.

References total_.

Referenced by loopControl::loopControl(), Foam::operator<<(), and subLoopTime().

Here is the caller graph for this function:

◆ status()

bool status ( ) const

Return true if looping is active.

Definition at line 43 of file subLoopTime.C.

References index_, and total_.

◆ stop()

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().

Here is the caller graph for this function:

◆ loop()

bool loop ( )

True if looping is active, increments the index.

Example usage,

while (control.loop())
{
}
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &solverControls)
Solve returning the solution statistics given convergence tolerance.

Definition at line 56 of file subLoopTime.C.

References index_, operator++(), and total_.

Here is the call graph for this function:

◆ operator++()

Foam::subLoopTime & operator++ ( )

Prefix increment.

Definition at line 73 of file subLoopTime.C.

References index_.

Referenced by loopControl::loop(), and loop().

Here is the caller graph for this function:

Member Data Documentation

◆ time_

Time& time_
protected

Definition at line 68 of file subLoopTime.H.

Referenced by loopControl::loop(), loopControl::loopControl(), and subLoopTime().

◆ index_

label index_
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().

◆ total_

label total_
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().


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