SpECTRE  v2025.08.19
FourierTestFunctions::ProductOfPolynomials Class Reference

Product of polynomials regular on the surface of a circle. More...

#include <FourierTestFunctions.hpp>

Public Member Functions

 ProductOfPolynomials (size_t pow_nx, size_t pow_ny)
 
DataVector operator() (const DataVector &phi) const
 
double operator() (double phi) const
 
DataVector df_dph (const DataVector &phi) const
 
double definite_integral () const
 
DataVector modes () const
 A modal vector of the Fourier modes. More...
 

Detailed Description

Product of polynomials regular on the surface of a circle.

Details

Computes \( n_x^{k_x} n_y^{k_y} \) where \(n_x = \cos \phi\) and \(n_y = \sin \phi\). The function and its first derivatives are exactly representable by Fourier modes of order \((M)\) if \(M > k_x + k_y\).

Member Function Documentation

◆ modes()

DataVector FourierTestFunctions::ProductOfPolynomials::modes ( ) const

A modal vector of the Fourier modes.

Details

The modal coefficients are stored in a ModalVector as \(\{u_0, u_1, u_{-1}, u_2, u_{-2}, \ldots, u_M, u_{-M}\}\).

The modes can be determined from Equation 18 of [141]

\begin{align*} \cos^p \phi \sin^q \phi = \frac{(-1)^{q/2}}{2^{p+q}} \sum_{s=0}^p \sum_{\ell=0}^q \binom{p}{s} \binom{q}{\ell} (-1)^{q-\ell} \times & \begin{cases} \cos \left[(2s-p+2\ell-q)\phi\right],\; q \text{ is even} \\ \sin \left[(2s-p+2\ell-q)\phi\right],\; q \text{ is odd} \end{cases} \end{align*}


The documentation for this class was generated from the following file: