Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 : #include <utility>
8 :
9 : /// \cond
10 : template <size_t VolumeDim>
11 : class DirectionalId;
12 : namespace db {
13 : class Access;
14 : } // namespace db
15 : namespace evolution::dg {
16 : template <size_t Dim>
17 : struct BoundaryData;
18 : } // namespace evolution::dg
19 : namespace gsl {
20 : template <class T>
21 : class not_null;
22 : } // namespace gsl
23 : /// \endcond
24 :
25 : namespace evolution::dg::subcell {
26 : /*!
27 : * \brief Copies the subcell data received from a neighbor into the DataBox.
28 : *
29 : * This is invoked by elements doing DG for every neighbor across a mortar
30 : * without local time stepping, whether or not the element or the neighbor can
31 : * use subcell. Elements whose mesh does not support subcell store nothing.
32 : *
33 : * The mesh and data needed for reconstruction are copied over into
34 : * `subcell::Tags::MeshForGhostData` and
35 : * `subcell::Tags::GhostDataForReconstruction`.
36 : * Additionally, the max/min of the evolved variables from neighboring elements
37 : * that is used for the relaxed discrete maximum principle troubled-cell
38 : * indicator is combined with the data from the local element and stored in
39 : * `subcell::Tags::DataForRdmpTci`. We handle the RDMP
40 : * data now because it is sent in the same buffer as the data for
41 : * reconstruction.
42 : *
43 : * Neighbors don't send this data to elements that can never use subcell, i.e.
44 : * that are in or border a DG-only block (see
45 : * `evolution::dg::subcell::prepare_neighbor_data`), so for those elements a
46 : * message without ghost data is ignored. It is an error for any other element.
47 : */
48 : template <size_t VolumeDim>
49 1 : void receive_subcell_data_for_dg(
50 : gsl::not_null<db::Access*> box, const DirectionalId<VolumeDim>& mortar_id,
51 : const evolution::dg::BoundaryData<VolumeDim>& received_mortar_data);
52 : } // namespace evolution::dg::subcell
|