VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
fmm::detail_interp::KernelTables Struct Reference

#include <simple_math.h>

Public Member Functions

 KernelTables ()
 

Public Attributes

double lambda [TABLE_SIZE]
 
double eta [TABLE_SIZE]
 
double lambdaA [TABLE_SIZE]
 
double etaA [TABLE_SIZE]
 

Detailed Description

Definition at line 164 of file simple_math.h.

Constructor & Destructor Documentation

◆ KernelTables()

fmm::detail_interp::KernelTables::KernelTables ( )
inline

Definition at line 170 of file simple_math.h.

170 {
171 constexpr double sqrtPi = 1.7724538509055159; // sqrt(π)
172 for (int i = 0; i < TABLE_SIZE; ++i) {
173 double xi = i / INV_STEP;
174 if (xi < 1e-10) {
175 lambda[i] = 8.0 / (3.0 * sqrtPi);
176 eta[i] = 8.0 / (5.0 * sqrtPi);
177 lambdaA[i] = 0.0;
178 etaA[i] = 0.0;
179 } else {
180 double xi2 = xi * xi, xi3 = xi2 * xi, xi4 = xi2 * xi2;
181 double xi5 = xi3 * xi2, xi6 = xi4 * xi2;
182 double e = std::erf(xi), ex = std::exp(-xi2);
183 lambda[i] = -e/xi3 + (2/sqrtPi)*(2 + 1/xi2)*ex;
184 eta[i] = 3*e/xi5 - (2/sqrtPi/xi2)*(2 + 3/xi2)*ex;
185 lambdaA[i] = 3*e/xi4 - (8/sqrtPi)*(3/(4*xi3) + 1/(2*xi) + xi)*ex;
186 etaA[i] = -15*e/xi6 + (1/sqrtPi)*(8/xi + 20/xi3 + 30/xi5)*ex;
187 }
188 }
189 }
static constexpr int TABLE_SIZE
static constexpr double INV_STEP

Member Data Documentation

◆ eta

double fmm::detail_interp::KernelTables::eta[TABLE_SIZE]

Definition at line 166 of file simple_math.h.

◆ etaA

double fmm::detail_interp::KernelTables::etaA[TABLE_SIZE]

Definition at line 168 of file simple_math.h.

◆ lambda

double fmm::detail_interp::KernelTables::lambda[TABLE_SIZE]

Definition at line 165 of file simple_math.h.

◆ lambdaA

double fmm::detail_interp::KernelTables::lambdaA[TABLE_SIZE]

Definition at line 167 of file simple_math.h.


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