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