Static Public Member Functions | List of all members
observers::Actions::RegisterWithObservers< RegisterHelper > Struct Template Reference

Register an observation ID with the observers. More...

#include <RegisterWithObservers.hpp>

Static Public Member Functions

template<typename ParallelComponent , typename DbTagList , typename Metavariables , typename ArrayIndex >
static void perform_registration (db::DataBox< DbTagList > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index) noexcept
 
template<typename ParallelComponent , typename DbTagList , typename Metavariables , typename ArrayIndex >
static void perform_deregistration (db::DataBox< DbTagList > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index) noexcept
 
template<typename DbTagList , typename... InboxTags, typename Metavariables , typename ArrayIndex , typename ActionList , typename ParallelComponent >
static std::tuple< db::DataBox< DbTagList > && > apply (db::DataBox< DbTagList > &box, const tuples::TaggedTuple< InboxTags... > &, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ActionList, const ParallelComponent *const) noexcept
 

Detailed Description

template<typename RegisterHelper>
struct observers::Actions::RegisterWithObservers< RegisterHelper >

Register an observation ID with the observers.

Warning
If registering events, you should use RegisterEventsWithObservers instead. If your event is not compatible with RegisterEventsWithObservers, please make it so.

The RegisterHelper passed as a template parameter must have a static register_info function that takes as its first template parameter the ParallelComponent and as function arguments a db::DataBox and the array component index. The function must return a std::pair<observers::TypeOfObservation, observers::ObservationId>

When this struct is used as an action, the apply function will perform the registration with observers. However, this struct also offers the static member functions perform_registriation and perform_deregistration that are needed for either registering when an element is added to a core outside of initialization or deregistering when an element is being eliminated from a core. The use of separate functions is necessary to provide an interface usable outside of iterable actions, e.g. in specialized pup functions.


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