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 <iosfwd> 8 : #include <optional> 9 : 10 : #include "DataStructures/DataVector.hpp" 11 : #include "NumericalAlgorithms/Spectral/Mesh.hpp" 12 : #include "Time/TimeStepId.hpp" 13 : 14 : namespace evolution::dg { 15 : /*! 16 : * \brief The data communicated between neighber elements. 17 : * 18 : * The stored data consists of the following: 19 : * 20 : * 1. the mesh of the ghost cell data we received. This allows eliding 21 : * projection when all neighboring elements are doing DG. 22 : * 2. the mesh of the neighboring element's face (not the mortar mesh!) 23 : * 3. the variables at the ghost zone cells for finite difference/volume 24 : * reconstruction 25 : * 4. the data on the mortar needed for computing the boundary corrections (e.g. 26 : * fluxes, characteristic speeds, conserved variables) 27 : * 5. the TimeStepId beyond which the boundary terms are no longer valid, when 28 : * using local time stepping. 29 : * 6. the troubled cell indicator status used for determining halos around 30 : * troubled cells. 31 : * 7. the integration order of the time-stepper 32 : */ 33 : template <size_t Dim> 34 1 : struct BoundaryData { 35 : // NOLINTNEXTLINE(google-runtime-references) 36 0 : void pup(PUP::er& p); 37 : 38 0 : Mesh<Dim> volume_mesh_ghost_cell_data{}; 39 0 : Mesh<Dim - 1> interface_mesh{}; 40 0 : std::optional<DataVector> ghost_cell_data{}; 41 0 : std::optional<DataVector> boundary_correction_data{}; 42 0 : ::TimeStepId validity_range{}; 43 0 : int tci_status{}; 44 0 : size_t integration_order{std::numeric_limits<size_t>::max()}; 45 : }; 46 : 47 : template <size_t Dim> 48 0 : bool operator==(const BoundaryData<Dim>& lhs, const BoundaryData<Dim>& rhs); 49 : template <size_t Dim> 50 0 : bool operator!=(const BoundaryData<Dim>& lhs, const BoundaryData<Dim>& rhs); 51 : template <size_t Dim> 52 0 : std::ostream& operator<<(std::ostream& os, const BoundaryData<Dim>& value); 53 : } // namespace evolution::dg