![]() |
Reference documentation for deal.II version 9.4.1
|
#include <deal.II/base/mpi_consensus_algorithms.h>
Public Member Functions | |
Selector ()=default | |
Selector (Process< RequestType, AnswerType > &process, const MPI_Comm &comm) | |
virtual | ~Selector ()=default |
virtual std::vector< unsigned int > | run (const std::vector< unsigned int > &targets, const std::function< RequestType(const unsigned int)> &create_request, const std::function< AnswerType(const unsigned int, const RequestType &)> &answer_request, const std::function< void(const unsigned int, const AnswerType &)> &process_answer, const MPI_Comm &comm) override |
std::vector< unsigned int > | run () |
std::vector< unsigned int > | run (Process< RequestType, AnswerType > &process, const MPI_Comm &comm) |
Private Attributes | |
std::shared_ptr< Interface< RequestType, AnswerType > > | consensus_algo |
Process< RequestType, AnswerType > * | process |
MPI_Comm | comm |
A class which delegates its task to other ConsensusAlgorithms::Interface implementations depending on the number of processes in the MPI communicator. For a small number of processes it uses PEX and for a large number of processes NBX. The threshold depends if the program is compiled in debug or release mode, but the goal is to always use the most efficient algorithm for however many processes participate in the communication.
RequestType | The type of the elements of the vector to be sent. |
AnswerType | The type of the elements of the vector to be received. |
Definition at line 945 of file mpi_consensus_algorithms.h.
|
default |
Default constructor.
Utilities::MPI::ConsensusAlgorithms::Selector< RequestType, AnswerType >::Selector | ( | Process< RequestType, AnswerType > & | process, |
const MPI_Comm & | comm | ||
) |
Constructor.
|
virtualdefault |
Destructor.
|
overridevirtual |
Run the consensus algorithm and return a vector of process ranks that have requested answers from the current process.
Implements Utilities::MPI::ConsensusAlgorithms::Interface< RequestType, AnswerType >.
|
inherited |
Run the consensus algorithm and return a vector of process ranks that have requested answers from the current process.
|
inherited |
|
private |
Definition at line 994 of file mpi_consensus_algorithms.h.
|
privateinherited |
Reference to the process provided by the user.
This member variable is only used in the deprecated constructor and the run() function without argument. It is a nullptr
otherwise
Definition at line 329 of file mpi_consensus_algorithms.h.
|
privateinherited |
MPI communicator.
This member variable is only used in the deprecated constructor and the run() function without argument.
Definition at line 338 of file mpi_consensus_algorithms.h.