Reference documentation for deal.II version Git c4a4607bd1 2020-01-22 19:33:00 -0500
\(\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 | Protected Attributes | List of all members
Utilities::MPI::ConsensusAlgorithm< T1, T2 > Class Template Referenceabstract

#include <deal.II/base/mpi.h>

Inheritance diagram for Utilities::MPI::ConsensusAlgorithm< T1, T2 >:
[legend]

Public Member Functions

virtual ~ConsensusAlgorithm ()=default
 
virtual void run ()=0
 

Protected Attributes

ConsensusAlgorithmProcess< T1, T2 > & process
 
const MPI_Comm & comm
 
const unsigned int my_rank
 
const unsigned int n_procs
 

Detailed Description

template<typename T1, typename T2>
class Utilities::MPI::ConsensusAlgorithm< T1, T2 >

A base class for algorithms that implement the task of coming up with communication patterns to retrieve data from other processes in a dynamic-sparse way. In computer science, this is often called a consensus problem.

Dynamic-sparse means in this context:

Naturally, the user has to provide:

This base class only introduces a basic interface to achieve these goals, while derived classes implement different algorithms to actually compute such communication patterns. The last two features of the list above this paragraph are implemented in classes derived from ConsensusAlgorithmProcess.

Template Parameters
T1The type of the elements of the vector to be sent.
T2The type of the elements of the vector to be received.
Author
Peter Munch, 2019

Definition at line 1069 of file mpi.h.

Constructor & Destructor Documentation

◆ ~ConsensusAlgorithm()

template<typename T1 , typename T2 >
virtual Utilities::MPI::ConsensusAlgorithm< T1, T2 >::~ConsensusAlgorithm ( )
virtualdefault

Destructor.

Member Function Documentation

◆ run()

template<typename T1 , typename T2 >
virtual void Utilities::MPI::ConsensusAlgorithm< T1, T2 >::run ( )
pure virtual

Member Data Documentation

◆ process

template<typename T1 , typename T2 >
ConsensusAlgorithmProcess<T1, T2>& Utilities::MPI::ConsensusAlgorithm< T1, T2 >::process
protected

Reference to the process provided by the user.

Definition at line 1090 of file mpi.h.

◆ comm

template<typename T1 , typename T2 >
const MPI_Comm& Utilities::MPI::ConsensusAlgorithm< T1, T2 >::comm
protected

MPI communicator.

Definition at line 1095 of file mpi.h.

◆ my_rank

template<typename T1 , typename T2 >
const unsigned int Utilities::MPI::ConsensusAlgorithm< T1, T2 >::my_rank
protected

Rank of this process.

Definition at line 1100 of file mpi.h.

◆ n_procs

template<typename T1 , typename T2 >
const unsigned int Utilities::MPI::ConsensusAlgorithm< T1, T2 >::n_procs
protected

Number of processes in the communicator.

Definition at line 1105 of file mpi.h.


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