SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
Parallel::InboxInserters::Map< InboxTag > Struct Template Reference

Inserter for inserting data that is received as the value_type (with non-const key_type) of a map data structure. More...

#include <InboxInserters.hpp>

Static Public Member Functions

template<typename Inbox, typename TemporalId, typename ReceiveDataType>
static bool insert_into_inbox (const gsl::not_null< Inbox * > inbox, const TemporalId &temporal_id, ReceiveDataType &&data)

Detailed Description

template<typename InboxTag>
struct Parallel::InboxInserters::Map< InboxTag >

Inserter for inserting data that is received as the value_type (with non-const key_type) of a map data structure.

An example would be a std::unordered_map<int, int>, where the first int is the "spatial" id of the parallel component array. The data type that is sent to the component would be a std::pair<int, int>, or more generally a std::pair<key_type, mapped_type>. The inbox tag would be:

struct MapTag : public Parallel::InboxInserters::Map<MapTag> {
using temporal_id = size_t;
using type = std::unordered_map<temporal_id, std::unordered_map<int, int>>;
};

The documentation for this struct was generated from the following file:
  • src/Parallel/InboxInserters.hpp