#include <deal.II/base/mpi_consensus_algorithms.h>
|
| Serial ()=default |
|
| Serial (Process< RequestType, AnswerType > &process, const MPI_Comm &comm) |
|
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) |
|
template<typename RequestType, typename AnswerType>
class Utilities::MPI::ConsensusAlgorithms::Serial< RequestType, AnswerType >
A serial fall back for the above classes to allow programming independently of whether MPI is used or not.
Definition at line 858 of file mpi_consensus_algorithms.h.
◆ Serial() [1/2]
template<typename RequestType , typename AnswerType >
◆ Serial() [2/2]
template<typename RequestType , typename AnswerType >
Constructor.
- Parameters
-
process | Process to be run during consensus algorithm. |
comm | MPI Communicator (ignored) |
- Deprecated:
- This constructor stores the Process object and the communicator so that one can later call the run() function without arguments. This approach is deprecated. Instead, use the default constructor of this class along with the run() function that takes an argument.
◆ run() [1/3]
template<typename RequestType , typename AnswerType >
virtual std::vector<unsigned int> Utilities::MPI::ConsensusAlgorithms::Serial< RequestType, AnswerType >::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 |
|
) |
| |
|
overridevirtual |
◆ run() [2/3]
template<typename RequestType , typename AnswerType >
Run the consensus algorithm and return a vector of process ranks that have requested answers from the current process.
- Deprecated:
- This function is deprecated. It can be called if the Process object and communicator to be used have previously been provided to the non-default constructor. Use the run() functions taking arguments instead.
◆ run() [3/3]
template<typename RequestType , typename AnswerType >
Run the consensus algorithm and return a vector of process ranks that have requested answers from the current process.
This version of the run() function simply unpacks the functions packaged in process
and calls the version of the run() function that takes a number of std::function
arguments.
◆ process
template<typename RequestType , typename AnswerType >
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 330 of file mpi_consensus_algorithms.h.
◆ comm
template<typename RequestType , typename AnswerType >
The documentation for this class was generated from the following file: