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

#include <special_functions.h>

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

Public Member Functions

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

Public Attributes

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

Detailed Description

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

Definition at line 57 of file special_functions.h.

Constructor & Destructor Documentation

◆ knm_wrapper()

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

Definition at line 60 of file special_functions.h.

60 : Knm()
61 {
62 Knm[0] = 1.0;
63 for (int n = 1; n < N; ++n)
64 {
65 for (int m = 0; m <= n - 1; ++m)
66 Knm[n * (n + 1) / 2 + m] = Knm[n * (n - 1) / 2 + m] * (n - m) / (n + m);
67 Knm[n * (n + 1) / 2 + n] = Knm[n * (n + 1) / 2 + n - 1] / (2 * n);
68 }
69 for (int n = 1; n < N; ++n)
70 {
71 for (int m = 0; m <= n; ++m)
73 Knm[n * (n + 1) / 2 + m] = constexpr_sqrt(Knm[n * (n + 1) / 2 + m]);
74#else
75 Knm[n * (n + 1) / 2 + m] = sqrt(Knm[n * (n + 1) / 2 + m]);
76#endif
77 }
78 }
#define FMM_CONSTEXPR_MATH
Definition defs.h:8
double constexpr constexpr_sqrt(double x)
std::array< double, N *(N+1)/2 > Knm
Here is the call graph for this function:

Member Function Documentation

◆ operator()()

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

Definition at line 79 of file special_functions.h.

80 {
81 return Knm[n * (n + 1) / 2 + m];
82 }

Member Data Documentation

◆ Knm

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

Definition at line 59 of file special_functions.h.


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