15#include "gadgetconfig.h"
23#include "../data/allvars.h"
24#include "../data/dtypes.h"
25#include "../data/mymalloc.h"
26#include "../data/symtensors.h"
27#include "../gravity/ewaldtensors.h"
28#include "../gravtree/gravtree.h"
30#include "../system/system.h"
37#if defined(GRAVITY_TALLBOX) && defined(FMM)
38#error "FFM and GRAVITY_TALLBOX cannot be used together"
43#define EN (1 << EWLEVEL)
77 double ewald_D0(
double x,
double y,
double z);
93 inline int ewd_offset(
int i,
int j,
int k) {
return (i * (
ENY + 1) + j) * (
ENZ + 1) + k; }
94 inline double specerf(
double z,
double k,
double alpha);
95 inline double d_specerf(
double z,
double k,
double alpha);
96 inline double dd_specerf(
double z,
double k,
double alpha);
97 inline double ddd_specerf(
double z,
double k,
double alpha);
99 double Ewd_fac_intp[3];
119 int ewald_is_initialized = 0;
121 void test_interpolation_accuracy(
void);
126#if defined(EVALPOTENTIAL) && defined(FMM) && defined(PERIODIC) && !defined(PMGRID)
127 double ewald_gridlookup_origin_D0(
void) {
return Ewd->
D0phi; }
Ewald correction functionality.
symtensor3< double > ewald_D3(double x, double y, double z)
ewaldtensor6< double > ewald_P6(void)
double ewald_D0(double x, double y, double z)
This function computes the potential correction term by means of Ewald summation.
symtensor4< double > ewald_D4(double x, double y, double z)
void ewald_corr(double dx, double dy, double dz, enum interpolate_options, ewald_data &fper)
void ewald_init(void)
This function initializes tables with the correction force and the correction potential due to the pe...
symtensor6< double > ewald_D6(double x, double y, double z)
ewaldtensor10< double > ewald_P10(void)
ewaldtensor8< double > ewald_P8(void)
symtensor7< double > ewald_D7(double x, double y, double z)
symtensor5< double > ewald_D5(double x, double y, double z)
vector< double > ewald_D1(double x, double y, double z)
This function computes the force correction term (difference between full force of infinite lattice a...
void ewald_corr_exact(double dx, double dy, double dz, enum interpolate_options flag, ewald_data &fper)
symtensor2< double > ewald_D2(double x, double y, double z)
void ewald_gridlookup(const MyIntPosType *p_intpos, const MyIntPosType *target_intpos, enum interpolate_options flag, ewald_data &fper)