VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
fmm::detail::anm_wrapper< N > Struct Template Reference

#include <special_functions.h>

Collaboration diagram for fmm::detail::anm_wrapper< N >:

Public Member Functions

constexpr anm_wrapper ()
 
constexpr double operator() (int n, int m) const
 

Public Attributes

std::array< double, 2 *N *(2 *N+1)/2 > Anm
 

Detailed Description

template<int N>
struct fmm::detail::anm_wrapper< N >

Definition at line 88 of file special_functions.h.

Constructor & Destructor Documentation

◆ anm_wrapper()

template<int N>
constexpr fmm::detail::anm_wrapper< N >::anm_wrapper ( )
inlineconstexpr

Definition at line 91 of file special_functions.h.

91 : Anm()
92 {
93 Anm[0] = 1.0;
94 for (int n = 1; n < 2 * N; ++n)
95 {
96 for (int m = 0; m <= n - 1; ++m)
97 Anm[n * (n + 1) / 2 + m] = Anm[(n - 1) * n / 2 + m] * (n - m) * (n + m);
98 Anm[n * (n + 1) / 2 + n] = Anm[n * (n + 1) / 2 + n - 1] * 2 * n;
99 }
100 for (int n = 1; n < 2 * N; ++n)
101 {
102 for (int m = 0; m <= n; ++m)
104 Anm[n * (n + 1) / 2 + m] = ni(n) / constexpr_sqrt(Anm[n * (n + 1) / 2 + m]);
105#else
106 Anm[n * (n + 1) / 2 + m] = ni(n) / sqrt(Anm[n * (n + 1) / 2 + m]);
107#endif
108 }
109 }
#define FMM_CONSTEXPR_MATH
Definition defs.h:8
double constexpr constexpr_sqrt(double x)
constexpr double ni(int n)
Definition simple_math.h:99
std::array< double, 2 *N *(2 *N+1)/2 > Anm
Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<int N>
constexpr double fmm::detail::anm_wrapper< N >::operator() ( int  n,
int  m 
) const
inlineconstexpr

Definition at line 110 of file special_functions.h.

111 {
112 return Anm[n * (n + 1) / 2 + m];
113 }

Member Data Documentation

◆ Anm

template<int N>
std::array<double, 2 * N * (2 * N + 1) / 2> fmm::detail::anm_wrapper< N >::Anm

Definition at line 90 of file special_functions.h.


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