Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <array> 7 : #include <cstddef> 8 : #include <utility> 9 : 10 : #include "Domain/Structure/DirectionalIdMap.hpp" 11 : #include "Evolution/Systems/ScalarAdvection/Tags.hpp" 12 : #include "Utilities/TMPL.hpp" 13 : 14 : /// \cond 15 : class DataVector; 16 : template <size_t Dim> 17 : class Direction; 18 : template <size_t Dim> 19 : class Element; 20 : template <size_t Dim> 21 : class ElementId; 22 : template <size_t Dim> 23 : class Mesh; 24 : template <typename TagsList> 25 : class Variables; 26 : namespace gsl { 27 : template <typename> 28 : class not_null; 29 : } // namespace gsl 30 : namespace evolution::dg::subcell { 31 : class GhostData; 32 : } // namespace evolution::dg::subcell 33 : /// \endcond 34 : 35 : namespace ScalarAdvection::fd { 36 : /*! 37 : * \brief Reconstructs the scalar field \f$U\f$. All results are written into 38 : * `vars_on_lower_face` and `vars_on_upper_face`. 39 : */ 40 : template <size_t Dim, typename TagsList, typename Reconstructor> 41 1 : void reconstruct_work( 42 : gsl::not_null<std::array<Variables<TagsList>, Dim>*> vars_on_lower_face, 43 : gsl::not_null<std::array<Variables<TagsList>, Dim>*> vars_on_upper_face, 44 : const Reconstructor& reconstruct, 45 : const Variables<tmpl::list<Tags::U>> volume_vars, 46 : const Element<Dim>& element, 47 : const DirectionalIdMap<Dim, evolution::dg::subcell::GhostData>& ghost_data, 48 : const Mesh<Dim>& subcell_mesh, const size_t ghost_zone_size); 49 : 50 : /*! 51 : * \brief Reconstructs the scalar field \f$U\f$ for a given direction. All 52 : * results are written into `vars_on_face`. 53 : * 54 : * This is used on DG elements to reconstruct \f$U\f$ with their subcell 55 : * neighbors' solution (ghost data received) on the shared faces. 56 : */ 57 : template <size_t Dim, typename TagsList, typename ReconstructLower, 58 : typename ReconstructUpper> 59 1 : void reconstruct_fd_neighbor_work( 60 : gsl::not_null<Variables<TagsList>*> vars_on_face, 61 : const ReconstructLower& reconstruct_lower_neighbor, 62 : const ReconstructUpper& reconstruct_upper_neighbor, 63 : const Variables<tmpl::list<Tags::U>>& subcell_volume_vars, 64 : const Element<Dim>& element, 65 : const DirectionalIdMap<Dim, evolution::dg::subcell::GhostData>& ghost_data, 66 : const Mesh<Dim>& subcell_mesh, 67 : const Direction<Dim>& direction_to_reconstruct, 68 : const size_t ghost_zone_size); 69 : } // namespace ScalarAdvection::fd