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 "Utilities/TypeTraits.hpp" 9 : 10 : /// \cond 11 : class ComplexDataVector; 12 : class ComplexModalVector; 13 : class DataVector; 14 : template <size_t Dim> 15 : class Mesh; 16 : class ModalVector; 17 : 18 : namespace gsl { 19 : template <typename T> 20 : class not_null; 21 : } // namespace gsl 22 : /// \endcond 23 : 24 : /// @{ 25 : /*! 26 : * \ingroup SpectralGroup 27 : * \brief Compute the modal coefficients from the nodal coefficients 28 : * 29 : * \see Spectral::nodal_to_modal_matrix 30 : */ 31 : template <size_t Dim> 32 1 : void to_modal_coefficients( 33 : gsl::not_null<ComplexModalVector*> modal_coefficients, 34 : const ComplexDataVector& nodal_coefficients, const Mesh<Dim>& mesh); 35 : 36 : // overload provided instead of templating so that the most common case of 37 : // transforming from `DataVector` to `ModalVector` does not require additional 38 : // `make_not_null`s 39 : template <size_t Dim> 40 1 : void to_modal_coefficients(gsl::not_null<ModalVector*> modal_coefficients, 41 : const DataVector& nodal_coefficients, 42 : const Mesh<Dim>& mesh); 43 : 44 : template <size_t Dim> 45 1 : ModalVector to_modal_coefficients(const DataVector& nodal_coefficients, 46 : const Mesh<Dim>& mesh); 47 : 48 : template <size_t Dim> 49 1 : ComplexModalVector to_modal_coefficients( 50 : const ComplexDataVector& nodal_coefficients, const Mesh<Dim>& mesh); 51 : /// @} 52 : 53 : /// @{ 54 : /*! 55 : * \ingroup SpectralGroup 56 : * \brief Compute the nodal coefficients from the modal coefficients 57 : * 58 : * \see Spectral::modal_to_nodal_matrix 59 : */ 60 : template <size_t Dim> 61 1 : void to_nodal_coefficients(gsl::not_null<ComplexDataVector*> nodal_coefficients, 62 : const ComplexModalVector& modal_coefficients, 63 : const Mesh<Dim>& mesh); 64 : 65 : // overload provided instead of templating so that the most common case of 66 : // transforming from `DataVector` to `ModalVector` does not require additional 67 : // `make_not_null`s 68 : template <size_t Dim> 69 1 : void to_nodal_coefficients(gsl::not_null<DataVector*> nodal_coefficients, 70 : const ModalVector& modal_coefficients, 71 : const Mesh<Dim>& mesh); 72 : 73 : template <size_t Dim> 74 1 : DataVector to_nodal_coefficients(const ModalVector& modal_coefficients, 75 : const Mesh<Dim>& mesh); 76 : 77 : template <size_t Dim> 78 1 : ComplexDataVector to_nodal_coefficients( 79 : const ComplexModalVector& modal_coefficients, const Mesh<Dim>& mesh); 80 : /// @}