Class to hold the lists of region meshes and solvers. More...
Classes | |
class | iterator |
Public Member Functions | |
regionSolvers (const Time &runTime) | |
Construct from components. More... | |
regionSolvers (const regionSolvers &)=delete | |
Disallow default bitwise copy construction. More... | |
~regionSolvers () | |
Destructor. More... | |
label | size () const |
Return the number of region solvers. More... | |
void | setGlobalPrefix () const |
Set the Info prefix to space padding for global messages. More... | |
void | setPrefix (const label i) const |
Set the Info prefix to the space padded region name. More... | |
void | resetPrefix () const |
Reset the Info prefix to null. More... | |
iterator | begin () |
Return an iterator to begin traversing the solvers. More... | |
iterator | end () |
Return an iterator to end traversing the solvers. More... | |
operator PtrList< solver > & () | |
Cast to the list of solvers. More... | |
solver & | operator[] (const label i) |
Set the region i prefix and return the corresponding solver. More... | |
void | operator= (const regionSolvers &)=delete |
Disallow default bitwise assignment. More... | |
Friends | |
class | iterator |
Class to hold the lists of region meshes and solvers.
Also provides loop and iteration functionality which automatically set the region Info prefix for each of the solvers returned by the '[]' operator or iterator.
regionSolvers
named solvers: // Create the region meshes and solvers regionSolvers solvers(runTime);
The list of solvers can be looped over:
forAll(solvers, i) { solvers[i].momentumPredictor(); }
where the '[]' operator sets the region Info prefix. After the loop the region Info prefix remains set to the last region prefix and so for global messages, e.g. the global time-step the Info prefix must be specifically reset to spaces by calling the setGlobalPrefix()
function.
Alternatively the list of solvers can be iterated over:
forAllIter(regionSolvers, solvers, solver) { solver->momentumPredictor(); }
where the iterator increment sets the region Info
prefix and at the end automatically resets the Info
prefix to spaces.
Definition at line 81 of file regionSolvers.H.
regionSolvers | ( | const Time & | runTime | ) |
Construct from components.
|
delete |
Disallow default bitwise copy construction.
~regionSolvers | ( | ) |
Destructor.
|
inline |
Return the number of region solvers.
Definition at line 28 of file regionSolversI.H.
void setGlobalPrefix | ( | ) | const |
Set the Info prefix to space padding for global messages.
void setPrefix | ( | const label | i | ) | const |
Set the Info prefix to the space padded region name.
Referenced by regionSolvers::begin().
void resetPrefix | ( | ) | const |
Reset the Info prefix to null.
|
inline |
Return an iterator to begin traversing the solvers.
Definition at line 109 of file regionSolversI.H.
References regionSolvers::iterator, and regionSolvers::setPrefix().
|
inline |
Return an iterator to end traversing the solvers.
Definition at line 119 of file regionSolversI.H.
Cast to the list of solvers.
Definition at line 132 of file regionSolversI.H.
|
delete |
Disallow default bitwise assignment.
|
friend |
Definition at line 131 of file regionSolvers.H.
Referenced by regionSolvers::begin().