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/Spectral/Basis.hpp" 9 : 10 : namespace Spectral { 11 : /*! 12 : * \brief Maximum number of allowed collocation points. 13 : * 14 : * \details We choose a limit of 24 FD grid points because for DG-subcell the 15 : * number of points in an element is `2 * number_dg_points - 1` for cell 16 : * centered, and `2 * number_dg_points` for face-centered. Because there is no 17 : * way of generically retrieving the maximum number of grid points for a non-FD 18 : * basis, we need to hard-code both values here. If the number of grid points is 19 : * increased for the non-FD bases, it should also be increased for the FD basis. 20 : * Note that for good task-based parallelization 24 grid points is already a 21 : * fairly large number. 22 : */ 23 : template <Basis basis> 24 1 : constexpr size_t maximum_number_of_points = 25 : basis == Basis::Fourier ? 81 26 : : basis == Basis::FiniteDifference ? 40 27 : : 20; 28 : } // namespace Spectral