17 #define NTAB (sizeof(shortrange_force_kernels) / sizeof(shortrange_force_kernels[0]))
27 endrun(0,
"The short range force window is calibrated for Asmth = 1.5, but running with %g\n", Asmth);
32 for(i = 0; i <
NTAB; i++)
58 double i = (r / cellsize / dx);
59 size_t tabindex = floor(i);
60 if(tabindex >=
NTAB - 1)
void endrun(int where, const char *fmt,...)
static float shortrange_table[NTAB]
void gravshort_fill_ntab(const enum ShortRangeForceWindowType ShortRangeForceWindowType, const double Asmth)
static float shortrange_table_tidal[NTAB]
static float shortrange_table_potential[NTAB]
int grav_apply_short_range_window(double r, double *fac, double *pot, const double cellsize)
ShortRangeForceWindowType
@ SHORTRANGE_FORCE_WINDOW_TYPE_ERFC
@ SHORTRANGE_FORCE_WINDOW_TYPE_EXACT
const double shortrange_force_kernels[][5]