deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Utilities::MPI::ConsensusAlgorithms::Serial< RequestType, AnswerType > Class Template Reference

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

Inheritance diagram for Utilities::MPI::ConsensusAlgorithms::Serial< RequestType, AnswerType >:
Inheritance graph
[legend]

Public Member Functions

 Serial ()=default
 
virtual std::vector< unsigned intrun (const std::vector< unsigned int > &targets, const std::function< RequestType(const unsigned int)> &create_request, const std::function< AnswerType(const unsigned int, const RequestType &)> &answer_request, const std::function< void(const unsigned int, const AnswerType &)> &process_answer, const MPI_Comm comm) override
 
std::vector< unsigned intrun (Process< RequestType, AnswerType > &process, const MPI_Comm comm)
 

Detailed Description

template<typename RequestType, typename AnswerType>
class Utilities::MPI::ConsensusAlgorithms::Serial< RequestType, AnswerType >

A serial fall back for the above classes to allow programming independently of whether MPI is used or not.

Definition at line 786 of file mpi_consensus_algorithms.h.

Constructor & Destructor Documentation

◆ Serial()

template<typename RequestType , typename AnswerType >
Utilities::MPI::ConsensusAlgorithms::Serial< RequestType, AnswerType >::Serial ( )
default

Default constructor.

Member Function Documentation

◆ run() [1/2]

template<typename RequestType , typename AnswerType >
virtual std::vector< unsigned int > Utilities::MPI::ConsensusAlgorithms::Serial< RequestType, AnswerType >::run ( const std::vector< unsigned int > &  targets,
const std::function< RequestType(const unsigned int)> &  create_request,
const std::function< AnswerType(const unsigned int, const RequestType &)> &  answer_request,
const std::function< void(const unsigned int, const AnswerType &)> &  process_answer,
const MPI_Comm  comm 
)
overridevirtual

Run the consensus algorithm and return a vector of process ranks that have requested answers from the current process.

This version of the run() function simply unpacks the functions packaged in process and calls the version of the run() function that takes a number of std::function arguments.

Deprecated:
Instead of deriving a class from the Process base class and providing a corresponding object to this function, use the other run() function in this class that takes function objects as arguments.

Implements Utilities::MPI::ConsensusAlgorithms::Interface< RequestType, AnswerType >.

◆ run() [2/2]

template<typename RequestType , typename AnswerType >
std::vector< unsigned int > Utilities::MPI::ConsensusAlgorithms::Interface< RequestType, AnswerType >::run ( Process< RequestType, AnswerType > &  process,
const MPI_Comm  comm 
)
inherited

Run the consensus algorithm and return a vector of process ranks that have requested answers from the current process.

This version of the run() function simply unpacks the functions packaged in process and calls the version of the run() function that takes a number of std::function arguments.

Deprecated:
Instead of deriving a class from the Process base class and providing a corresponding object to this function, use the other run() function in this class that takes function objects as arguments.

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