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/DgSubcell/GhostData.hpp" 12 : #include "Evolution/Systems/ForceFree/FiniteDifference/Tags.hpp" 13 : #include "Evolution/Systems/ForceFree/System.hpp" 14 : #include "Evolution/Systems/ForceFree/Tags.hpp" 15 : #include "Utilities/TMPL.hpp" 16 : 17 : /// \cond 18 : class DataVector; 19 : template <size_t Dim> 20 : class Direction; 21 : template <size_t Dim> 22 : class Element; 23 : template <size_t Dim> 24 : class ElementId; 25 : template <size_t Dim> 26 : class Mesh; 27 : template <typename TagsList> 28 : class Variables; 29 : namespace gsl { 30 : template <typename> 31 : class not_null; 32 : } // namespace gsl 33 : /// \endcond 34 : 35 : namespace ForceFree::fd { 36 : /*! 37 : * \brief Reconstructs the evolved variables \f$\tilde{E}^i, \tilde{B}^i, 38 : * \tilde{\psi}, \tilde{\phi}, \tilde{q}\f$ and the generalized electric current 39 : * density \f$\tilde{J}^i\f$. All results are written into `vars_on_lower_face` 40 : * and `vars_on_upper_face`. 41 : * 42 : */ 43 : template <typename TagsList, typename Reconstructor> 44 1 : void reconstruct_work( 45 : gsl::not_null<std::array<Variables<TagsList>, 3>*> vars_on_lower_face, 46 : gsl::not_null<std::array<Variables<TagsList>, 3>*> vars_on_upper_face, 47 : const Reconstructor& reconstruct, 48 : const Variables<System::variables_tag::tags_list>& volume_evolved_vars, 49 : const tnsr::I<DataVector, 3, Frame::Inertial>& volume_tilde_j, 50 : const Element<3>& element, 51 : const DirectionalIdMap<3, evolution::dg::subcell::GhostData>& neighbor_data, 52 : const Mesh<3>& subcell_mesh, const size_t ghost_zone_size); 53 : 54 : /*! 55 : * \brief Reconstructs the evolved variables \f$\tilde{E}^i, \tilde{B}^i, 56 : * \tilde{\psi}, \tilde{\phi}, \tilde{q}\f$ and the generalized electric current 57 : * density \f$\tilde{J}^i\f$. 58 : * 59 : * All results are written into `vars_on_face`. 60 : * 61 : * This is used on DG elements to reconstruct their subcell neighbors' solution 62 : * on the shared faces. 63 : */ 64 : template <typename TagsList, typename ReconstructLower, 65 : typename ReconstructUpper> 66 1 : void reconstruct_fd_neighbor_work( 67 : gsl::not_null<Variables<TagsList>*> vars_on_face, 68 : const ReconstructLower& reconstruct_lower_neighbor, 69 : const ReconstructUpper& reconstruct_upper_neighbor, 70 : const Variables<System::variables_tag::tags_list>& 71 : subcell_volume_evolved_vars, 72 : const tnsr::I<DataVector, 3, Frame::Inertial>& subcell_volume_tilde_j, 73 : const Element<3>& element, 74 : const DirectionalIdMap<3, evolution::dg::subcell::GhostData>& ghost_data, 75 : const Mesh<3>& subcell_mesh, const Direction<3>& direction_to_reconstruct, 76 : const size_t ghost_zone_size); 77 : 78 : } // namespace ForceFree::fd