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 <memory> 8 : 9 : #include "DataStructures/DataBox/Tag.hpp" 10 : #include "Evolution/DgSubcell/Tags/Reconstructor.hpp" 11 : #include "Evolution/DgSubcell/Tags/SubcellSolver.hpp" 12 : #include "Evolution/Systems/ForceFree/FiniteDifference/Reconstructor.hpp" 13 : #include "Evolution/Systems/ForceFree/Tags.hpp" 14 : #include "Options/String.hpp" 15 : #include "Utilities/TMPL.hpp" 16 : 17 : namespace ForceFree::fd { 18 : 19 : // A tag list of variables used for FD reconstruction process. For the ForceFree 20 : // evolution system, we use the whole set of evolved variables and the 21 : // generalized current density TildeJ. 22 0 : using tags_list_for_reconstruction = 23 : tmpl::list<ForceFree::Tags::TildeJ, ForceFree::Tags::TildeE, 24 : ForceFree::Tags::TildeB, ForceFree::Tags::TildePsi, 25 : ForceFree::Tags::TildePhi, ForceFree::Tags::TildeQ>; 26 : 27 0 : namespace OptionTags { 28 : /*! 29 : * \brief Holds the subcell reconstructor in the input file 30 : */ 31 1 : struct Reconstructor { 32 0 : using type = std::unique_ptr<fd::Reconstructor>; 33 : 34 0 : static constexpr Options::String help = {"The reconstruction scheme to use."}; 35 0 : using group = evolution::dg::subcell::OptionTags::SubcellSolverGroup; 36 : }; 37 : } // namespace OptionTags 38 : 39 0 : namespace Tags { 40 : /*! 41 : * \brief Tag for the reconstructor 42 : */ 43 1 : struct Reconstructor : db::SimpleTag, 44 : evolution::dg::subcell::Tags::Reconstructor { 45 0 : using type = std::unique_ptr<fd::Reconstructor>; 46 0 : using option_tags = tmpl::list<OptionTags::Reconstructor>; 47 : 48 0 : static constexpr bool pass_metavariables = false; 49 0 : static type create_from_options(const type& reconstructor) { 50 : return reconstructor->get_clone(); 51 : } 52 : }; 53 : } // namespace Tags 54 : } // namespace ForceFree::fd