ryujin 2.1.1 revision 78f48c86fcb9c040da63d5afdaec959ac4463738
Public Member Functions | List of all members
ryujin::MPIEnsembleContainer< T > Class Template Reference

#include <source/mpi_ensemble_container.h>

Public Member Functions

template<typename... Args>
 MPIEnsembleContainer (const MPIEnsemble &mpi_ensemble, const std::string &subsection, Args &&...args)
 
const T & get () const
 
 operator const T & () const
 

Detailed Description

template<typename T>
class ryujin::MPIEnsembleContainer< T >

A specialized wrapper container used in the TimeLoop that helps creating instances of HyperbolicSystem / ParabolicSystem / InitialValues that are MPIEnsemble "aware:"

@fixme For HyperbolicSystem/ ParabolicSystem / InitialValues realizations that are already MPIEnsemble "aware" we should fall back to only creating one instance - possibly by checking for and calling a modified constructor that takes an mpi_ensemble as an argument.

Definition at line 35 of file mpi_ensemble_container.h.

Constructor & Destructor Documentation

◆ MPIEnsembleContainer()

template<typename T >
template<typename... Args>
ryujin::MPIEnsembleContainer< T >::MPIEnsembleContainer ( const MPIEnsemble mpi_ensemble,
const std::string &  subsection,
Args &&...  args 
)
inline

Create an independent instance of T for every ensemble of the MPI ensemble collection. The subsection string for the ParameterAcceptor is appended by "/ensemble n".

Definition at line 44 of file mpi_ensemble_container.h.

References ryujin::MPIEnsemble::ensemble(), and ryujin::MPIEnsemble::n_ensembles().

Member Function Documentation

◆ get()

template<typename T >
const T & ryujin::MPIEnsembleContainer< T >::get ( ) const
inline

Return a const reference to the appropriate class instance for the current MPI ensemble.

Definition at line 70 of file mpi_ensemble_container.h.

◆ operator const T &()

template<typename T >
ryujin::MPIEnsembleContainer< T >::operator const T & ( ) const
inline

Conversion operator that returns the appropriate class instance for the current MPI ensemble.

Definition at line 79 of file mpi_ensemble_container.h.


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