Reference documentation for deal.II version Git 160de597a3 2020-01-23 10:46:38 -0700
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Member Functions | Private Attributes | List of all members
Utilities::MPI::ConsensusAlgorithmProcessTargets Class Reference
Inheritance diagram for Utilities::MPI::ConsensusAlgorithmProcessTargets:
[legend]

Public Member Functions

virtual void answer_request (const unsigned int other_rank, const std::vector< T1 > &, std::vector< T2 > &) override
 
virtual std::vector< unsigned int > compute_targets () override
 
std::vector< unsigned int > get_result ()
 
- Public Member Functions inherited from Utilities::MPI::ConsensusAlgorithmProcess< int, int >
virtual ~ConsensusAlgorithmProcess ()=default
 
virtual void create_request (const int other_rank, std::vector< int > &send_buffer)
 
virtual void prepare_buffer_for_answer (const int other_rank, std::vector< int > &recv_buffer)
 
virtual void read_answer (const int other_rank, const std::vector< int > &recv_buffer)
 

Private Attributes

const std::vector< unsigned int > & target
 
std::vector< unsigned int > sources
 

Detailed Description

A re-implementation of compute_point_to_point_communication_pattern using the ConsensusAlgorithm.

Definition at line 227 of file mpi.cc.

Member Function Documentation

◆ answer_request()

virtual void Utilities::MPI::ConsensusAlgorithmProcessTargets::answer_request ( const unsigned int  other_rank,
const std::vector< T1 > &  buffer_recv,
std::vector< T2 > &  request_buffer 
)
inlineoverridevirtual

Prepare the buffer where the payload of the answer of the request to the process with the specified rank is saved in.

Parameters
[in]other_rankrank of the process
[in]buffer_recvreceived payload (optional)
[out]request_bufferpayload to be sent as part of the request (optional)
Note
The request_buffer is empty. Before using it, you have to set its size.

Reimplemented from Utilities::MPI::ConsensusAlgorithmProcess< int, int >.

Definition at line 239 of file mpi.cc.

◆ compute_targets()

virtual std::vector<unsigned int> Utilities::MPI::ConsensusAlgorithmProcessTargets::compute_targets ( )
inlineoverridevirtual

Simply return the user-provided list.

Returns
List of processes this process wants to send requests to.

Implements Utilities::MPI::ConsensusAlgorithmProcess< int, int >.

Definition at line 252 of file mpi.cc.

◆ get_result()

std::vector<unsigned int> Utilities::MPI::ConsensusAlgorithmProcessTargets::get_result ( )
inline

The result of the consensus algorithm.

Returns
Sorted list of ranks of processes wanting to send a request to this process.

Definition at line 263 of file mpi.cc.

Member Data Documentation

◆ target

const std::vector<unsigned int>& Utilities::MPI::ConsensusAlgorithmProcessTargets::target
private

List of processes this process wants to send requests to.

Definition at line 273 of file mpi.cc.

◆ sources

std::vector<unsigned int> Utilities::MPI::ConsensusAlgorithmProcessTargets::sources
private

List of ranks of processes wanting to send a request to this process.

Definition at line 278 of file mpi.cc.


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