ParRunControl Class Reference

Helper class for initializing parallel jobs from the command arguments. Also handles cleanup of parallel (or serial) jobs. More...

Public Member Functions

 ParRunControl ()
 Default construct. More...
 
 ~ParRunControl ()
 Destructor. Shutdown (finalize) MPI as required. More...
 
void runPar (int &argc, char **&argv, bool needsThread)
 Initialize Pstream for a parallel run. More...
 
bool parRun () const
 True if this is parallel run. More...
 
bool distributed () const
 True if this is a parallel run and uses distributed roots. More...
 
void distributed (bool on)
 Set use of distributed roots. More...
 

Detailed Description

Helper class for initializing parallel jobs from the command arguments. Also handles cleanup of parallel (or serial) jobs.

Definition at line 50 of file parRun.H.

Constructor & Destructor Documentation

◆ ParRunControl()

ParRunControl ( )
inline

Default construct.

Definition at line 58 of file parRun.H.

◆ ~ParRunControl()

~ParRunControl ( )
inline

Destructor. Shutdown (finalize) MPI as required.

Definition at line 65 of file parRun.H.

References Foam::endl(), Foam::Info, and UPstream::shutdown().

Here is the call graph for this function:

Member Function Documentation

◆ runPar()

void runPar ( int &  argc,
char **&  argv,
bool  needsThread 
)
inline

Initialize Pstream for a parallel run.

Definition at line 77 of file parRun.H.

References Foam::endl(), UPstream::exit(), Foam::Info, and UPstream::init().

Here is the call graph for this function:

◆ parRun()

bool parRun ( ) const
inline

True if this is parallel run.

Definition at line 88 of file parRun.H.

◆ distributed() [1/2]

bool distributed ( ) const
inline

True if this is a parallel run and uses distributed roots.

Definition at line 94 of file parRun.H.

◆ distributed() [2/2]

void distributed ( bool  on)
inline

Set use of distributed roots.

Definition at line 100 of file parRun.H.


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