SpECTRE
v2024.09.29
|
The inbox tag for boundary correction communication and DG-subcell ghost zone cells. More...
#include <InboxTags.hpp>
Public Types | |
using | stored_type = evolution::dg::BoundaryData< Dim > |
using | temporal_id = TimeStepId |
using | type_map = std::map< TimeStepId, DirectionalIdMap< Dim, stored_type > > |
using | type_spsc = evolution::dg::AtomicInboxBoundaryData< Dim > |
using | type = tmpl::conditional_t< UseNodegroupDgElements, type_spsc, type_map > |
using | value_type = type |
Public Member Functions | |
void | pup (PUP::er &) |
Static Public Member Functions | |
template<typename ReceiveDataType > | |
static size_t | insert_into_inbox (const gsl::not_null< type_spsc * > inbox, const temporal_id &time_step_id, ReceiveDataType &&data) |
template<typename ReceiveDataType > | |
static size_t | insert_into_inbox (const gsl::not_null< type_map * > inbox, const temporal_id &time_step_id, ReceiveDataType &&data) |
static std::string | output_inbox (const type_spsc &inbox, const size_t padding_size) |
static std::string | output_inbox (const type_map &inbox, const size_t padding_size) |
The inbox tag for boundary correction communication and DG-subcell ghost zone cells.
The stored data consists of the following:
The TimeStepId is the neighboring element's next time step. When using local time stepping, the neighbor's boundary data is valid up until this time, which may include multiple local time steps. By receiving and storing the neighbor time step, the local element knows whether or not it should remove boundary data and expect new data to be sent from the neighbor.
The ghost cell data will be valid whenever a DG-subcell scheme is being used. Whenever a DG-subcell scheme is being used, elements using DG and not FD/FV always send both the ghost cells and boundary correction data together. Elements using FD/FV send the ghost cells first followed by the boundary correction data once the element has received all neighbor ghost cell data. Note that the second send/receive only modifies the flux and the TimeStepId used for the flux validity range.
When only a DG scheme (not a DG-subcell scheme) is used the ghost cell data will never be valid.
In the DG-subcell scheme this tag is used both for communicating the ghost cell data needed for the FD/FV reconstruction step and the data needed for the boundary corrections.
type_map
the insert_into_inbox
function returns the size of the inbox.type_spsc
the insert_into_inbox
function returns the number of neighbor data contributions made that allow the element to take its next time step/needs a message called on it. When this number is equal to the number of neighbors, a Charm++ message must be sent to the element to have it continue the algorithm. This is so as to minimize the number of communications made through Charm++ and instead to move data atomically between neighbors whenever possible.If you are using the DgElementCollection
then you must set UseNodegroupDgElements
to true
. The actions that use this tag check that the parallel component and the UseNodegroupDgElements
is consistent.