www.cemf.ir
localProcessors Class Reference
+ Inheritance diagram for localProcessors:
+ Collaboration diagram for localProcessors:

Public Member Functions

 localProcessors (const word &name)
 Construct a local processor communication similar to global with specified name. More...
 
 localProcessors (const word &name, const std::vector< int > &ranks)
 Construct a local processor communication from global communicator using a name and ranks. More...
 
const auto & name () const
 return name of the local communicator More...
 
auto localRank () const
 
auto localSize () const
 
bool localMaster () const
 
int localMasterNo () const
 
bool localParallel () const
 
const char * localRunTypeName ()
 
bool isThisActive () const
 
- Public Member Functions inherited from processors
 processors ()
 Constructor. More...
 
 ~processors ()
 Destructor. More...
 

Static Public Member Functions

static bool builtForMPI ()
 
- Static Public Member Functions inherited from processors
static void initProcessors (int argc, char *argv[])
 Initialize MPI processors. More...
 
static void finalizeProcessors ()
 Finalize MPI processors. More...
 
static int globalMasterNo ()
 Master processors number (globaly in MPI). More...
 
static bool globalParallel ()
 Is this a parallel MPI run. More...
 
static const char * globalRunTypeName ()
 
static bool isInitialized ()
 Is MPI initialized? More...
 
static bool isFinalized ()
 Is MPI finalized? More...
 
static bool globalMaster ()
 Is this processor the master processor? More...
 
static int globalSize ()
 Global size of processors. More...
 
static int globalRank ()
 Rank of the processor in the global MPI. More...
 
static int argc ()
 
static char ** argv ()
 
static void abort (int error)
 Abort MPI run or regular run. More...
 

Private Attributes

int localSize_ = 1
 
int localRank_ = 0
 
bool isPartOfLocal_ = true
 
word name_
 

Detailed Description

Definition at line 35 of file localProcessors.hpp.

Constructor & Destructor Documentation

◆ localProcessors() [1/2]

localProcessors ( const word name)

Construct a local processor communication similar to global with specified name.

Parameters
namea given name to the local communicator

Definition at line 22 of file localProcessors.cpp.

◆ localProcessors() [2/2]

localProcessors ( const word name,
const std::vector< int > &  ranks 
)

Construct a local processor communication from global communicator using a name and ranks.

Parameters
namea given name to the local communicator
ranksranks to be included in the new communicator

Definition at line 37 of file localProcessors.cpp.

References CheckMPI, pFlow::endl(), fatalErrorInFunction, fatalExit, processors::globalRank(), and processors::globalSize().

+ Here is the call graph for this function:

Member Function Documentation

◆ name()

const auto& name ( ) const
inline

return name of the local communicator

Definition at line 82 of file localProcessors.hpp.

References localProcessors::name_.

◆ localRank()

auto localRank ( ) const
inline

Definition at line 88 of file localProcessors.hpp.

References localProcessors::localRank_.

Referenced by boundaryBase::thisProcessorNo().

+ Here is the caller graph for this function:

◆ localSize()

auto localSize ( ) const
inline

Definition at line 94 of file localProcessors.hpp.

References localProcessors::localSize_.

◆ localMaster()

bool localMaster ( ) const
inline

Definition at line 102 of file localProcessors.hpp.

References localProcessors::localMasterNo(), and localProcessors::localRank_.

+ Here is the call graph for this function:

◆ localMasterNo()

int localMasterNo ( ) const
inline

Definition at line 108 of file localProcessors.hpp.

Referenced by localProcessors::localMaster().

+ Here is the caller graph for this function:

◆ localParallel()

bool localParallel ( ) const
inline

Definition at line 114 of file localProcessors.hpp.

References localProcessors::localSize_.

Referenced by localProcessors::localRunTypeName().

+ Here is the caller graph for this function:

◆ localRunTypeName()

const char* localRunTypeName ( )
inline

Definition at line 120 of file localProcessors.hpp.

References localProcessors::localParallel().

+ Here is the call graph for this function:

◆ isThisActive()

bool isThisActive ( ) const
inline

Definition at line 129 of file localProcessors.hpp.

References localProcessors::isPartOfLocal_.

◆ builtForMPI()

static bool builtForMPI ( )
inlinestatic

Definition at line 149 of file localProcessors.hpp.

Referenced by main().

+ Here is the caller graph for this function:

Member Data Documentation

◆ localSize_

int localSize_ = 1
private

◆ localRank_

int localRank_ = 0
private

Definition at line 49 of file localProcessors.hpp.

Referenced by localProcessors::localMaster(), and localProcessors::localRank().

◆ isPartOfLocal_

bool isPartOfLocal_ = true
private

Definition at line 51 of file localProcessors.hpp.

Referenced by localProcessors::isThisActive().

◆ name_

word name_
private

Definition at line 53 of file localProcessors.hpp.

Referenced by localProcessors::name().


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