dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Dune::Fem::MPIManager Struct Reference

#include <dune/fem/misc/mpimanager.hh>

Public Types

typedef Dune::CollectiveCommunication< MPIHelper::MPICommunicator > CollectiveCommunication
 

Public Member Functions

 ~MPIManager ()
 destructor calling finalize if this has not been done
 
void _finalize ()
 

Static Public Member Functions

static void finalize ()
 
static void initialize (int &argc, char **&argv)
 
static const CollectiveCommunicationcomm ()
 
static int rank ()
 
static int size ()
 
static void initSingleThreadMode ()
 initialize single thread mode (when in multithread mode)
 
static void initMultiThreadMode ()
 initialize multi thread mode (when in single thread mode)
 
static int maxThreads ()
 return maximal number of threads possible in the current run
 
static int numThreads ()
 return number of current threads
 
static int thread ()
 return thread number
 
static bool isMainThread ()
 return true if the current thread is the main thread (i.e. thread 0)
 
static bool isMaster ()
 
static void setNumThreads (int use)
 set number of threads available during next run
 
static bool singleThreadMode ()
 returns true if program is operating on one thread currently
 
template<typename F , typename... Args>
static void run (F &&f, Args &&... args)
 run functor f with given arguments args in threaded mode
 

Member Typedef Documentation

◆ CollectiveCommunication

typedef Dune::CollectiveCommunication< MPIHelper::MPICommunicator > Dune::Fem::MPIManager::CollectiveCommunication

Constructor & Destructor Documentation

◆ ~MPIManager()

Dune::Fem::MPIManager::~MPIManager ( )
inline

destructor calling finalize if this has not been done

Member Function Documentation

◆ _finalize()

void Dune::Fem::MPIManager::_finalize ( )
inline

◆ comm()

static const CollectiveCommunication & Dune::Fem::MPIManager::comm ( )
inlinestatic

◆ finalize()

static void Dune::Fem::MPIManager::finalize ( )
inlinestatic

◆ initialize()

void Dune::Fem::MPIManager::initialize ( int &  argc,
char **&  argv 
)
inlinestatic

◆ initMultiThreadMode()

static void Dune::Fem::MPIManager::initMultiThreadMode ( )
inlinestatic

initialize multi thread mode (when in single thread mode)

◆ initSingleThreadMode()

static void Dune::Fem::MPIManager::initSingleThreadMode ( )
inlinestatic

initialize single thread mode (when in multithread mode)

◆ isMainThread()

static bool Dune::Fem::MPIManager::isMainThread ( )
inlinestatic

return true if the current thread is the main thread (i.e. thread 0)

◆ isMaster()

static bool Dune::Fem::MPIManager::isMaster ( )
inlinestatic

◆ maxThreads()

static int Dune::Fem::MPIManager::maxThreads ( )
inlinestatic

return maximal number of threads possible in the current run

◆ numThreads()

static int Dune::Fem::MPIManager::numThreads ( )
inlinestatic

return number of current threads

◆ rank()

static int Dune::Fem::MPIManager::rank ( )
inlinestatic

◆ run()

template<typename F , typename... Args>
static void Dune::Fem::MPIManager::run ( F &&  f,
Args &&...  args 
)
inlinestatic

run functor f with given arguments args in threaded mode

◆ setNumThreads()

static void Dune::Fem::MPIManager::setNumThreads ( int  use)
inlinestatic

set number of threads available during next run

◆ singleThreadMode()

static bool Dune::Fem::MPIManager::singleThreadMode ( )
inlinestatic

returns true if program is operating on one thread currently

◆ size()

static int Dune::Fem::MPIManager::size ( )
inlinestatic

◆ thread()

static int Dune::Fem::MPIManager::thread ( )
inlinestatic

return thread number


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