ParRunControl Class Reference

Helper class for initializing parallel jobs from the command arguments. More...

Public Member Functions

 ParRunControl ()
 Construct null. More...
 
 ~ParRunControl ()
 Destructor, triggers Pstream::exit. 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.

This class also handles cleanup of parallel or serial jobs in a uniform manner.

Definition at line 52 of file parRun.H.

Constructor & Destructor Documentation

◆ ParRunControl()

ParRunControl ( )
inline

Construct null.

Definition at line 60 of file parRun.H.

◆ ~ParRunControl()

~ParRunControl ( )
inline

Destructor, triggers Pstream::exit.

Definition at line 67 of file parRun.H.

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

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 80 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 92 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 98 of file parRun.H.

◆ distributed() [2/2]

void distributed ( bool  on)
inline

Set use of distributed roots.

Definition at line 104 of file parRun.H.


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