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 <optional> 8 : 9 : #include "DataStructures/DataBox/Tag.hpp" 10 : #include "DataStructures/Tensor/TypeAliases.hpp" 11 : #include "Domain/Tags.hpp" 12 : #include "Evolution/DgSubcell/Tags/ActiveGrid.hpp" 13 : #include "Evolution/DgSubcell/Tags/Mesh.hpp" 14 : #include "Evolution/DgSubcell/Tags/ReconstructionOrder.hpp" 15 : #include "Evolution/DgSubcell/Tags/SubcellOptions.hpp" 16 : #include "Utilities/TMPL.hpp" 17 : 18 : /// \cond 19 : class DataVector; 20 : namespace gsl { 21 : template <typename T> 22 : class not_null; 23 : } // namespace gsl 24 : template <size_t Dim> 25 : class Mesh; 26 : namespace evolution::dg::subcell { 27 : class SubcellOptions; 28 : } // namespace evolution::dg::subcell 29 : /// \endcond 30 : 31 : namespace evolution::dg::subcell::Tags { 32 : /// @{ 33 : /// The order of the numerical method used. 34 : /// 35 : /// \note This is intended to be used during observations. 36 : template <size_t Dim> 37 1 : struct MethodOrder : db::SimpleTag { 38 0 : using type = std::optional<tnsr::I<DataVector, Dim, Frame::ElementLogical>>; 39 : }; 40 : 41 : template <size_t Dim> 42 0 : struct MethodOrderCompute : db::ComputeTag, MethodOrder<Dim> { 43 0 : using base = MethodOrder<Dim>; 44 0 : using return_type = typename base::type; 45 0 : using argument_tags = 46 : tmpl::list<::domain::Tags::Mesh<Dim>, Mesh<Dim>, ActiveGrid, 47 : ReconstructionOrder<Dim>, SubcellOptions<Dim>>; 48 0 : static void function( 49 : gsl::not_null<return_type*> method_order, const ::Mesh<Dim>& dg_mesh, 50 : const ::Mesh<Dim>& subcell_mesh, subcell::ActiveGrid active_grid, 51 : const std::optional<tnsr::I<DataVector, Dim, Frame::ElementLogical>>& 52 : reconstruction_order, 53 : const subcell::SubcellOptions& subcell_options); 54 : }; 55 : /// @} 56 : } // namespace evolution::dg::subcell::Tags