Reference documentation for deal.II version Git d9cfe2b8ef 2020-05-28 12:56:35 -0400
\(\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 ()
 
- Public Member Functions inherited from Utilities::MPI::ConsensusAlgorithms::Process< unsigned int, unsigned int >
virtual ~Process ()=default
 
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 281 of file mpi.cc.

Member Typedef Documentation

◆ T1

Definition at line 289 of file mpi.cc.

◆ T2

Definition at line 290 of file mpi.cc.

Constructor & Destructor Documentation

◆ ConsensusAlgorithmsProcessTargets()

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

Definition at line 285 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 293 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 306 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 317 of file mpi.cc.

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 327 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 332 of file mpi.cc.


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