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 : 8 : #include "DataStructures/DataBox/Tag.hpp" 9 : #include "Domain/Tags.hpp" 10 : #include "Evolution/DgSubcell/ActiveGrid.hpp" 11 : #include "Evolution/DgSubcell/Tags/ActiveGrid.hpp" 12 : #include "Evolution/DgSubcell/Tags/Mesh.hpp" 13 : #include "ParallelAlgorithms/Events/Tags.hpp" 14 : #include "Utilities/Gsl.hpp" 15 : #include "Utilities/TMPL.hpp" 16 : 17 : /// \cond 18 : template <size_t Dim> 19 : class Mesh; 20 : /// \endcond 21 : 22 : namespace evolution::dg::subcell::Tags { 23 : /// \brief Computes the active mesh, which is the DG mesh if `ActiveGrid` is 24 : /// `Dg` and the subcell mesh if `ActiveGrid` is `Subcell`. 25 : template <size_t Dim> 26 1 : struct ObserverMeshCompute : ::Events::Tags::ObserverMesh<Dim>, db::ComputeTag { 27 0 : using base = ::Events::Tags::ObserverMesh<Dim>; 28 0 : using return_type = typename base::type; 29 0 : using argument_tags = 30 : tmpl::list<::domain::Tags::Mesh<Dim>, subcell::Tags::Mesh<Dim>, 31 : subcell::Tags::ActiveGrid>; 32 0 : static void function(gsl::not_null<return_type*> active_mesh, 33 : const ::Mesh<Dim>& dg_mesh, 34 : const ::Mesh<Dim>& subcell_mesh, 35 : const subcell::ActiveGrid active_grid); 36 : }; 37 : } // namespace evolution::dg::subcell::Tags