SpECTRE
v2024.04.12
|
The inbox tag for boundary correction communication and DG-subcell ghost zone cells using a BoundaryMessage
object.
More...
#include <InboxTags.hpp>
Public Types | |
using | stored_type = std::unique_ptr< BoundaryMessage< Dim > > |
using | temporal_id = TimeStepId |
using | type = std::map< TimeStepId, DirectionalIdMap< Dim, stored_type > > |
using | message_type = BoundaryMessage< Dim > |
Static Public Member Functions | |
template<typename Inbox > | |
static void | insert_into_inbox (const gsl::not_null< Inbox * > inbox, BoundaryMessage< Dim > *boundary_message) |
The inbox tag for boundary correction communication and DG-subcell ghost zone cells using a BoundaryMessage
object.
To see what is stored within a BoundaryMessage
, see its documentation.
This inbox tag is very similar to BoundaryCorrectionAndGhostCellsInbox
in that it stores subcell/DG data sent from neighboring elements. To see exactly when data is stored and how it's used, see the docs for BoundaryCorrectionAndGhostCellsInbox
. This inbox tag is different than BoundaryCorrectionAndGhostCellsInbox
in that it only takes a pointer to a BoundaryMessage
as an argument to insert_into_inbox
and stores a std::unique_ptr<BoundaryMessage>
inside the inbox.
This inbox tag is meant to be used to avoid unnecessary copies between elements on the same node which share a block of memory. If two elements aren't on the same node, then a copy/send is done regardless.
boundary_message
argument to insert_into_inbox()
will be invalid after the function is called because a std::unique_ptr
now controls the memory. Calling a method on the boundary_message
pointer after the insert_into_inbox()
function is called can result in undefined behaviour.