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 "NumericalAlgorithms/LinearOperators/Filters/FilledCylinder.hpp" 9 : #include "NumericalAlgorithms/LinearOperators/Filters/Filter.hpp" 10 : #include "NumericalAlgorithms/LinearOperators/Filters/HollowCylinder.hpp" 11 : #include "NumericalAlgorithms/LinearOperators/Filters/Hypercube.hpp" 12 : #include "NumericalAlgorithms/LinearOperators/Filters/None.hpp" 13 : #include "Utilities/TMPL.hpp" 14 : 15 : namespace Filters { 16 : /*! 17 : * \ingroup DiscontinuousGalerkinGroup 18 : * \brief A `tmpl::list` of all concrete `Filters::Filter<Dim, TagList>` 19 : * subclasses available for a given `Dim` and `TagList`. 20 : * 21 : * Use this alias in a metavariables `factory_creation::factory_classes` map to 22 : * register all filters without having to enumerate them individually: 23 : * ```cpp 24 : * tmpl::pair<Filters::Filter<volume_dim, FilterTagList>, 25 : * Filters::all_filters<volume_dim, FilterTagList>>, 26 : * ``` 27 : * 28 : * `Filters::HollowCylinder` and `Filters::FilledCylinder` are included for 29 : * `Dim == 3`. 30 : * 31 : * Note: `Filters::SphericalShell` and `Filters::FilledSphere` are not included 32 : * here because they require system-specific instantiation of 33 : * `ylm::TensorYlm::apply_tensor_ylm_filter`. Executables that support them 34 : * must add them to their `factory_classes` manually and include the 35 : * appropriate system-specific header. 36 : */ 37 : template <size_t Dim, typename TagList> 38 1 : using all_filters = tmpl::append< 39 : tmpl::list<Hypercube<Dim, TagList>, None<Dim, TagList>>, 40 : tmpl::conditional_t< 41 : Dim == 3, tmpl::list<HollowCylinder<TagList>, FilledCylinder<TagList>>, 42 : tmpl::list<>>>; 43 : } // namespace Filters