Reference documentation for deal.II version 9.2.0
\(\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 Member Functions | Private Attributes | List of all members
Utilities::MPI::ConsensusAlgorithms::Selector< T1, T2 > Class Template Reference

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

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

Public Member Functions

 Selector (Process< T1, T2 > &process, const MPI_Comm &comm)
 
virtual ~Selector ()=default
 
virtual void run () override
 
- Public Member Functions inherited from Utilities::MPI::ConsensusAlgorithms::Interface< T1, T2 >
 Interface (Process< T1, T2 > &process, const MPI_Comm &comm)
 
virtual ~Interface ()=default
 

Private Attributes

std::shared_ptr< Interface< T1, T2 > > consensus_algo
 

Additional Inherited Members

- Protected Attributes inherited from Utilities::MPI::ConsensusAlgorithms::Interface< T1, T2 >
Process< T1, T2 > & process
 
const MPI_Commcomm
 
const unsigned int my_rank
 
const unsigned int n_procs
 

Detailed Description

template<typename T1, typename T2>
class Utilities::MPI::ConsensusAlgorithms::Selector< T1, T2 >

A class which delegates its task to other ConsensusAlgorithms::Interface implementations depending on the number of processes in the MPI communicator. For a small number of processes it uses PEX and for a large number of processes NBX. The threshold depends if the program is compiled in debug or release mode.

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 464 of file mpi_consensus_algorithms.h.

Constructor & Destructor Documentation

◆ Selector()

template<typename T1 , typename T2 >
Utilities::MPI::ConsensusAlgorithms::Selector< T1, T2 >::Selector ( Process< T1, T2 > &  process,
const MPI_Comm comm 
)

Constructor.

Parameters
processProcess to be run during consensus algorithm.
commMPI Communicator.

◆ ~Selector()

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

Destructor.

Member Function Documentation

◆ run()

template<typename T1 , typename T2 >
virtual void Utilities::MPI::ConsensusAlgorithms::Selector< T1, T2 >::run ( )
overridevirtual

Run consensus algorithm.

Note
The function call is delegated to another ConsensusAlgorithms::Interface implementation.

Implements Utilities::MPI::ConsensusAlgorithms::Interface< T1, T2 >.

Member Data Documentation

◆ consensus_algo

template<typename T1 , typename T2 >
std::shared_ptr<Interface<T1, T2> > Utilities::MPI::ConsensusAlgorithms::Selector< T1, T2 >::consensus_algo
private

Definition at line 490 of file mpi_consensus_algorithms.h.


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