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/Tensor/TypeAliases.hpp" 9 : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/System.hpp" 10 : #include "Evolution/Systems/GrMhd/ValenciaDivClean/Tags.hpp" 11 : #include "NumericalAlgorithms/SphericalHarmonics/ApplyTensorYlmFilter.hpp" 12 : #include "NumericalAlgorithms/SphericalHarmonics/TensorYlmFilter.hpp" 13 : 14 : /// \cond 15 : class DataVector; 16 : namespace RadiationTransport::NoNeutrinos { 17 : struct System; 18 : } // namespace RadiationTransport::NoNeutrinos 19 : namespace gsl { 20 : template <typename T> 21 : class not_null; 22 : } // namespace gsl 23 : template <typename TagsList> 24 : class Variables; 25 : /// \endcond 26 : 27 : namespace grmhd::GhValenciaDivClean::filter_detail { 28 : 29 : /// The combined GH + Valencia variables tag list for GhValenciaDivClean. 30 : using ghmhd_vars_list = typename grmhd::GhValenciaDivClean::System< 31 : RadiationTransport::NoNeutrinos::System>::variables_tag::tags_list; 32 : 33 : /// The Valencia variables in their "grid frame" (used for YLM filtering). 34 : /// Scalars are frame-independent; TildeS uses Grid frame lower index; 35 : /// TildeB uses Grid frame upper index. 36 : using valencia_grid_vars_list = 37 : tmpl::list<grmhd::ValenciaDivClean::Tags::TildeD, 38 : grmhd::ValenciaDivClean::Tags::TildeYe, 39 : grmhd::ValenciaDivClean::Tags::TildeTau, 40 : grmhd::ValenciaDivClean::Tags::TildeS<Frame::Grid>, 41 : grmhd::ValenciaDivClean::Tags::TildeB<Frame::Grid>, 42 : grmhd::ValenciaDivClean::Tags::TildePhi>; 43 : 44 : } // namespace grmhd::GhValenciaDivClean::filter_detail 45 : 46 : namespace ylm::TensorYlm { 47 : 48 : /*! 49 : * \brief Applies TensorYlm filter to the combined GH+Valencia variables. 50 : * 51 : * Applies the GH specialization to the GH part of the variables and 52 : * applies a standard scalar/vector filter to the Valencia variables. 53 : */ 54 : template <> 55 1 : void apply_tensor_ylm_filter( 56 : gsl::not_null< 57 : Variables<grmhd::GhValenciaDivClean::filter_detail::ghmhd_vars_list>*> 58 : vars, 59 : gsl::not_null< 60 : Variables<grmhd::GhValenciaDivClean::filter_detail::ghmhd_vars_list>*> 61 : temp_storage, 62 : const InverseJacobian<DataVector, 3, Frame::Inertial, Frame::Grid>& 63 : jac_inertial_to_grid, 64 : const InverseJacobian<DataVector, 3, Frame::Grid, Frame::Inertial>& 65 : jac_grid_to_inertial, 66 : const ylm::TensorYlm::FilterMatrixHolder& filter_matrices, size_t ell_max, 67 : size_t radial_extents); 68 : 69 : } // namespace ylm::TensorYlm