Reference documentation for deal.II version 9.3.3
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Types | Public Member Functions | Private Attributes | List of all members
Utilities::MPI::ConsensusAlgorithmsProcessTargets Class Reference
Inheritance diagram for Utilities::MPI::ConsensusAlgorithmsProcessTargets:
[legend]

Public Types

using T1 = unsigned int
 
using T2 = unsigned int
 

Public Member Functions

 ConsensusAlgorithmsProcessTargets (const std::vector< unsigned int > &target)
 
virtual void answer_request (const unsigned int other_rank, const std::vector< T1 > &, std::vector< T2 > &) override
 
virtual std::vector< unsigned intcompute_targets () override
 
std::vector< unsigned intget_result ()
 
virtual void create_request (const unsigned int other_rank, std::vector< unsigned int > &send_buffer)
 
virtual void prepare_buffer_for_answer (const unsigned int other_rank, std::vector< unsigned int > &recv_buffer)
 
virtual void read_answer (const unsigned int other_rank, const std::vector< unsigned int > &recv_buffer)
 

Private Attributes

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

Detailed Description

A re-implementation of compute_point_to_point_communication_pattern using a ConsensusAlgorithm.

Definition at line 302 of file mpi.cc.

Member Typedef Documentation

◆ T1

Definition at line 310 of file mpi.cc.

◆ T2

Definition at line 311 of file mpi.cc.

Constructor & Destructor Documentation

◆ ConsensusAlgorithmsProcessTargets()

Utilities::MPI::ConsensusAlgorithmsProcessTargets::ConsensusAlgorithmsProcessTargets ( const std::vector< unsigned int > &  target)
inline

Definition at line 306 of file mpi.cc.

Member Function Documentation

◆ answer_request()

virtual void Utilities::MPI::ConsensusAlgorithmsProcessTargets::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::ConsensusAlgorithms::Process< unsigned int, unsigned int >.

Definition at line 314 of file mpi.cc.

◆ compute_targets()

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

Simply return the user-provided list.

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

Implements Utilities::MPI::ConsensusAlgorithms::Process< unsigned int, unsigned int >.

Definition at line 327 of file mpi.cc.

◆ get_result()

std::vector< unsigned int > Utilities::MPI::ConsensusAlgorithmsProcessTargets::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 338 of file mpi.cc.

◆ create_request()

virtual void Utilities::MPI::ConsensusAlgorithms::Process< unsigned int , unsigned int >::create_request ( const unsigned int  other_rank,
std::vector< unsigned int > &  send_buffer 
)
virtualinherited

Add to the request to the process with the specified rank a payload.

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

◆ prepare_buffer_for_answer()

virtual void Utilities::MPI::ConsensusAlgorithms::Process< unsigned int , unsigned int >::prepare_buffer_for_answer ( const unsigned int  other_rank,
std::vector< unsigned int > &  recv_buffer 
)
virtualinherited

Prepare the buffer where the payload of the answer of the request to the process with the specified rank is saved in. The most obvious task is to resize the buffer, since it is empty when the function is called.

Parameters
[in]other_rankrank of the process
[out]recv_bufferdata to be sent part of the request (optional)

◆ read_answer()

virtual void Utilities::MPI::ConsensusAlgorithms::Process< unsigned int , unsigned int >::read_answer ( const unsigned int  other_rank,
const std::vector< unsigned int > &  recv_buffer 
)
virtualinherited

Process the payload of the answer of the request to the process with the specified rank.

Parameters
[in]other_rankrank of the process
[in]recv_bufferdata to be sent part of the request (optional)

Member Data Documentation

◆ target

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

List of processes this process wants to send requests to.

Definition at line 348 of file mpi.cc.

◆ sources

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

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

Definition at line 353 of file mpi.cc.


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