Skip to content
Snippets Groups Projects
Commit cbaddc0d authored by Martin Nolte's avatar Martin Nolte
Browse files

also add a method to obtain MPI_COMM_SELF or a fake, depending on whether MPI

has been found

[[Imported from SVN: r6388]]
parent 17de3834
No related branches found
No related tags found
No related merge requests found
......@@ -79,17 +79,31 @@ namespace Dune
*/
typedef No_Comm MPICommunicator;
/**
* @brief Get the default communicator.
/** \brief get the default communicator
*
* Return a communicator to exchange data with all processes
*
* @return -1 As we are fake.
* \returns a fake communicator
*/
static MPICommunicator getCommunicator()
static MPICommunicator getCommunicator ()
{
static MPICommunicator comm;
return comm;
}
/** \brief get a local communicator
*
* Returns a communicator to communicate with the local process only
*
* \returns a fake communicator
*/
static MPICommunicator getLocalCommunicator ()
{
return getCommunicator();
}
static CollectiveCommunication<MPICommunicator>
getCollectiveCommunication()
{
......@@ -156,14 +170,28 @@ namespace Dune
*/
typedef MPI_Comm MPICommunicator;
/**
* @brief Get the default communicator.
/** \brief get the default communicator
*
* Return a communicator to exchange data with all processes
*
* @return MPI_COMM_WORLD
* \returns MPI_COMM_WORLD
*/
static MPICommunicator getCommunicator(){
static MPICommunicator getCommunicator ()
{
return MPI_COMM_WORLD;
}
/** \brief get a local communicator
*
* Returns a communicator to exchange data with the local process only
*
* \returns MPI_COMM_SELF
*/
static MPICommunicator getLocalCommunicator ()
{
return MPI_COMM_SELF;
}
static CollectiveCommunication<MPICommunicator>
getCollectiveCommunication()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment