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/SubcellSolver.hpp" 11 : #include "Evolution/Systems/ScalarAdvection/FiniteDifference/Reconstructor.hpp" 12 : #include "Options/String.hpp" 13 : #include "Utilities/TMPL.hpp" 14 : 15 : namespace ScalarAdvection::fd { 16 0 : namespace OptionTags { 17 : /*! 18 : * \brief Holds the subcell reconstructor in the input file 19 : */ 20 : template <size_t Dim> 21 1 : struct Reconstructor { 22 0 : using type = std::unique_ptr<fd::Reconstructor<Dim>>; 23 : 24 0 : static constexpr Options::String help = {"The reconstruction scheme to use."}; 25 0 : using group = evolution::dg::subcell::OptionTags::SubcellSolverGroup; 26 : }; 27 : } // namespace OptionTags 28 : 29 0 : namespace Tags { 30 : /*! 31 : * \brief Tag for the reconstructor 32 : */ 33 : template <size_t Dim> 34 1 : struct Reconstructor : db::SimpleTag { 35 0 : using type = std::unique_ptr<fd::Reconstructor<Dim>>; 36 0 : using option_tags = tmpl::list<OptionTags::Reconstructor<Dim>>; 37 : 38 0 : static constexpr bool pass_metavariables = false; 39 0 : static type create_from_options(const type& reconstructor) { 40 : return reconstructor->get_clone(); 41 : } 42 : }; 43 : } // namespace Tags 44 : } // namespace ScalarAdvection::fd