ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
Defines | Functions | Variables
mmm2d.c File Reference

MMM2D algorithm for long range coulomb interaction. More...

#include <math.h>
#include <mpi.h>
#include "utils.h"
#include "communication.h"
#include "grid.h"
#include "particle_data.h"
#include "interaction_data.h"
#include "cells.h"
#include "mmm2d.h"
#include "mmm-common.h"
#include "specfunc.h"
#include "integrate.h"
#include "layered.h"
Include dependency graph for mmm2d.c:

Go to the source code of this file.

Defines

#define LOG_FORCES(x)
 if you define this, the Besselfunctions are calculated up to machine precision, otherwise 10^-14, which should be definitely enough for daily life.
#define K0   LPK0
#define K1   LPK1
#define MAXIMAL_FAR_CUT   100
 Largest reasonable cutoff for far formula.
#define MAXIMAL_B_CUT   50
 Largest reasonable cutoff for Bessel function.
#define MAXIMAL_POLYGAMMA   100
 Largest reasonable order of polygamma series.
#define FARRELPREC   1e-6
 internal relative precision of far formula.
#define COMPLEX_STEP   16
 number of steps in the complex cutoff table
#define COMPLEX_FAC   (COMPLEX_STEP/(.5 + 0.01))
 map numbers from 0 to 1/2 onto the complex cutoff table (with security margin)
#define checkpoint(text, p, q, size)
#define ERROR_LARGE   1
 return codes for MMM2D_tune_near and MMM2D_tune_far
#define ERROR_BOXL   2
 box too large
#define ERROR_BESSEL   3
 no reasonable bessel cutoff found
#define ERROR_POLY   4
 no reasonable polygamma cutoff found
#define ERROR_FARC   5
 no reasonable cutoff for the far formula found
#define ERROR_SMALL   6
 cell too small
#define ERROR_ICL   7
 IC layer requirement.
Product decomposition data organization

For the cell blocks it is assumed that the lower blocks part is in the lower half.

This has to have positive sign, so that has to be first.

#define POQESP   0
#define POQECP   1
#define POQESM   2
#define POQECM   3
#define PQESSP   0
#define PQESCP   1
#define PQECSP   2
#define PQECCP   3
#define PQESSM   4
#define PQESCM   5
#define PQECSM   6
#define PQECCM   7
#define QQEQQP   0
#define QQEQQM   1
#define ABEQQP   0
#define ABEQZP   1
#define ABEQQM   2
#define ABEQZM   3

Functions

void MMM2D_setup_constants ()
MDINLINE void clear_vec (double *pdc, int size)
 pdc = 0
MDINLINE void copy_vec (double *pdc_d, double *pdc_s, int size)
 pdc_d = pdc_s
MDINLINE void add_vec (double *pdc_d, double *pdc_s1, double *pdc_s2, int size)
 pdc_d = pdc_s1 + pdc_s2
MDINLINE void addscale_vec (double *pdc_d, double scale, double *pdc_s1, double *pdc_s2, int size)
 pdc_d = scale*pdc_s1 + pdc_s2
MDINLINE void scale_vec (double scale, double *pdc, int size)
 pdc_d = scale*pdc
MDINLINE double * block (double *p, int index, int size)
MDINLINE double * blwentry (double *p, int index, int e_size)
MDINLINE double * abventry (double *p, int index, int e_size)
static void add_force_contribution (int p, int q)
static double energy_contribution (int p, int q)
double MMM2D_add_far (int f, int e)
 the general long range force/energy calculation
void add_mmm2d_coulomb_pair_force (double charge_factor, double d[3], double dl2, double dl, double force[3])
 pairwise calculated parts of MMM2D force (near neighbors)
MDINLINE double calc_mmm2d_copy_pair_energy (double d[3])
double mmm2d_coulomb_pair_energy (double charge_factor, double dv[3], double d2, double d)
 pairwise calculated parts of MMM2D force (near neighbors)
int MMM2D_set_params (double maxPWerror, double far_cut, double delta_top, double delta_bot)
 set parameters for MMM2D.
int MMM2D_sanity_checks ()
 check that MMM2D can run with the current parameters
void MMM2D_init ()
 initialize the MMM2D constants
void MMM2D_on_resort_particles ()
 if the number of particles has changed (even per node), the particle buffers for the coefficients have to be resized.
void MMM2D_dielectric_layers_force_contribution ()
 force contribution from dielectric layers
double MMM2D_dielectric_layers_energy_contribution ()
 energy contribution from dielectric layers
Local functions for the near formula
static void prepareBernoulliNumbers (int nmax)
 complex evaluation
static int MMM2D_tune_near (double error)
 cutoff error setup.
void MMM2D_self_energy ()
 energy of all local particles with their copies
Local functions for the far formula
static void prepare_scx_cache ()
 sin/cos storage
static void prepare_scy_cache ()
static void clear_image_contributions (int size)
 clear the image contributions if there is no dielectric contrast and no image charges
static void gather_image_contributions (int size)
 gather the informations for the far away image charges
static void distribute (int size, double fac)
 spread the top/bottom sums
static void setup_z_force ()
 2 pi |z| code
static void setup_z_energy ()
static void add_z_force ()
static double z_energy ()
static void setup_P (int p, double omega, double fac)
 p=0 per frequency code
static void add_P_force ()
static double P_energy (double omega)
static void setup_Q (int q, double omega, double fac)
 q=0 per frequency code
static void add_Q_force ()
static double Q_energy (double omega)
static void setup_PQ (int p, int q, double omega, double fac)
 p,q <> 0 per frequency code
static void add_PQ_force (int p, int q, double omega)
static double PQ_energy (double omega)
static int MMM2D_tune_far (double error)
 cutoff error setup.

Variables

char const * mmm2d_errors []
 error messages, see above
static double part_error
 up to that error the sums in the NF are evaluated
static IntList besselCutoff = {NULL, 0, 0}
 cutoffs for the bessel sum
static int complexCutoff [COMPLEX_STEP+1]
 cutoffs for the complex sum
static DoubleList bon = {NULL, 0, 0}
 bernoulli numbers divided by n
static double self_energy
MMM2D_struct mmm2d_params = { 1e100, 10, 1, 0, 0, 1, 1, 1 }
static int n_localpart = 0
 number of local particles
static double * partblk = NULL
 temporary buffers for product decomposition
static double * lclcblk = NULL
 for all local cells including ghosts
static double * gblcblk = NULL
 collected data from the cells above the top neighbor of a cell rsp.
static double lclimge [8]
 contribution from the image charges
static SCCache * scxcache = NULL
 sin/cos caching
static int n_scxcache
static SCCache * scycache = NULL
 sin/cos caching
static int n_scycache
static double ux
 inverse box dimensions
static double ux2
static double uy
static double uy2
static double uz
static double max_near
 maximal z for near formula, minimal z for far formula.
static double min_far

Detailed Description

MMM2D algorithm for long range coulomb interaction.

For more information about MMM2D, see mmm2d.h.

Definition in file mmm2d.c.


Define Documentation

#define ABEQQM   2

Definition at line 178 of file mmm2d.c.

Referenced by z_energy().

#define ABEQQP   0

Definition at line 176 of file mmm2d.c.

Referenced by setup_z_energy(), and z_energy().

#define ABEQZM   3

Definition at line 179 of file mmm2d.c.

Referenced by z_energy().

#define ABEQZP   1

Definition at line 177 of file mmm2d.c.

Referenced by setup_z_energy(), and z_energy().

#define checkpoint (   text,
  p,
  q,
  size 
)

Definition at line 538 of file mmm2d.c.

Referenced by add_force_contribution(), and energy_contribution().

#define COMPLEX_FAC   (COMPLEX_STEP/(.5 + 0.01))

map numbers from 0 to 1/2 onto the complex cutoff table (with security margin)

Definition at line 97 of file mmm2d.c.

Referenced by add_mmm2d_coulomb_pair_force(), calc_mmm2d_copy_pair_energy(), and MMM2D_tune_near().

#define COMPLEX_STEP   16

number of steps in the complex cutoff table

Definition at line 94 of file mmm2d.c.

Referenced by add_mmm2d_coulomb_pair_force(), calc_mmm2d_copy_pair_energy(), and MMM2D_tune_near().

#define ERROR_BESSEL   3

no reasonable bessel cutoff found

Definition at line 138 of file mmm2d.c.

Referenced by MMM2D_tune_near().

#define ERROR_BOXL   2

box too large

Definition at line 136 of file mmm2d.c.

Referenced by MMM2D_tune_near().

#define ERROR_FARC   5

no reasonable cutoff for the far formula found

Definition at line 142 of file mmm2d.c.

Referenced by MMM2D_tune_far().

#define ERROR_ICL   7

IC layer requirement.

Definition at line 146 of file mmm2d.c.

Referenced by MMM2D_set_params().

#define ERROR_LARGE   1

return codes for MMM2D_tune_near and MMM2D_tune_far

cell too large

Definition at line 134 of file mmm2d.c.

Referenced by MMM2D_tune_near().

#define ERROR_POLY   4

no reasonable polygamma cutoff found

Definition at line 140 of file mmm2d.c.

Referenced by MMM2D_tune_near().

#define ERROR_SMALL   6

cell too small

Definition at line 144 of file mmm2d.c.

Referenced by MMM2D_tune_near().

#define FARRELPREC   1e-6

internal relative precision of far formula.

This controls how many p,q vectors are done at once. This has nothing to do with the effective precision, but rather controls how different values can be we add up without loosing the smallest values. In principle one could choose smaller values, but that would not make things faster

Definition at line 91 of file mmm2d.c.

Referenced by MMM2D_add_far().

#define K0   LPK0

Definition at line 65 of file mmm2d.c.

#define K1   LPK1

Definition at line 66 of file mmm2d.c.

#define LOG_FORCES (   x)

if you define this, the Besselfunctions are calculated up to machine precision, otherwise 10^-14, which should be definitely enough for daily life.

Definition at line 61 of file mmm2d.c.

Referenced by add_P_force(), add_PQ_force(), add_Q_force(), and add_z_force().

#define MAXIMAL_B_CUT   50

Largest reasonable cutoff for Bessel function.

The Bessel functions are quite slow, so do not make too large.

Definition at line 79 of file mmm2d.c.

Referenced by MMM2D_tune_near().

#define MAXIMAL_FAR_CUT   100

Largest reasonable cutoff for far formula.

A double cannot overflow with this value.

Definition at line 75 of file mmm2d.c.

Referenced by MMM2D_tune_far().

#define MAXIMAL_POLYGAMMA   100

Largest reasonable order of polygamma series.

These are pretty fast, so use more of them. Also, the real cutoff is determined at run time, so normally we are faster

Definition at line 84 of file mmm2d.c.

Referenced by MMM2D_tune_near().

#define POQECM   3

Definition at line 162 of file mmm2d.c.

Referenced by add_P_force(), add_Q_force(), P_energy(), Q_energy(), setup_P(), and setup_Q().

#define POQECP   1

Definition at line 160 of file mmm2d.c.

Referenced by add_P_force(), add_Q_force(), P_energy(), Q_energy(), setup_P(), and setup_Q().

#define POQESM   2

Definition at line 161 of file mmm2d.c.

Referenced by add_P_force(), add_Q_force(), P_energy(), Q_energy(), setup_P(), and setup_Q().

#define POQESP   0

Definition at line 159 of file mmm2d.c.

Referenced by add_P_force(), add_Q_force(), P_energy(), Q_energy(), setup_P(), and setup_Q().

#define PQECCM   7

Definition at line 171 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define PQECCP   3

Definition at line 167 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define PQECSM   6

Definition at line 170 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define PQECSP   2

Definition at line 166 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define PQESCM   5

Definition at line 169 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define PQESCP   1

Definition at line 165 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define PQESSM   4

Definition at line 168 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define PQESSP   0

Definition at line 164 of file mmm2d.c.

Referenced by add_PQ_force(), PQ_energy(), and setup_PQ().

#define QQEQQM   1

Definition at line 174 of file mmm2d.c.

Referenced by add_z_force(), and setup_z_force().

#define QQEQQP   0

Definition at line 173 of file mmm2d.c.

Referenced by add_z_force(), and setup_z_force().


Function Documentation

MDINLINE double* abventry ( double *  p,
int  index,
int  e_size 
)
static void add_force_contribution ( int  p,
int  q 
) [static]
void add_mmm2d_coulomb_pair_force ( double  charge_factor,
double  d[3],
double  dl2,
double  dl,
double  force[3] 
)
static void add_P_force ( ) [static]
static void add_PQ_force ( int  p,
int  q,
double  omega 
) [static]
static void add_Q_force ( ) [static]
MDINLINE void add_vec ( double *  pdc_d,
double *  pdc_s1,
double *  pdc_s2,
int  size 
)

pdc_d = pdc_s1 + pdc_s2

Definition at line 359 of file mmm2d.c.

References i.

static void add_z_force ( ) [static]
MDINLINE void addscale_vec ( double *  pdc_d,
double  scale,
double *  pdc_s1,
double *  pdc_s2,
int  size 
)

pdc_d = scale*pdc_s1 + pdc_s2

Definition at line 367 of file mmm2d.c.

References i.

MDINLINE double* block ( double *  p,
int  index,
int  size 
)

Definition at line 387 of file mmm2d.c.

MDINLINE double* blwentry ( double *  p,
int  index,
int  e_size 
)
MDINLINE double calc_mmm2d_copy_pair_energy ( double  d[3])
void clear_image_contributions ( int  size) [static]

clear the image contributions if there is no dielectric contrast and no image charges

Definition at line 404 of file mmm2d.c.

References abventry(), blwentry(), clear_vec(), gblcblk, n_layers, n_nodes, and this_node.

Referenced by add_force_contribution(), and energy_contribution().

MDINLINE void clear_vec ( double *  pdc,
int  size 
)

pdc = 0

Definition at line 343 of file mmm2d.c.

References i.

MDINLINE void copy_vec ( double *  pdc_d,
double *  pdc_s,
int  size 
)

pdc_d = pdc_s

Definition at line 351 of file mmm2d.c.

References i.

void distribute ( int  size,
double  fac 
) [static]

spread the top/bottom sums

Definition at line 434 of file mmm2d.c.

References abventry(), addscale_vec(), blwentry(), comm_cart, copy_vec(), gblcblk, lclcblk, MPI_DOUBLE, MPI_Recv(), MPI_Send(), n_layers, n_nodes, and this_node.

Referenced by add_force_contribution(), and energy_contribution().

static double energy_contribution ( int  p,
int  q 
) [static]
void gather_image_contributions ( int  size) [static]

gather the informations for the far away image charges

Definition at line 416 of file mmm2d.c.

References abventry(), blwentry(), comm_cart, copy_vec(), gblcblk, lclimge, MPI_Allreduce(), MPI_DOUBLE, MPI_SUM, n_layers, n_nodes, and this_node.

Referenced by add_force_contribution(), and energy_contribution().

double MMM2D_add_far ( int  f,
int  e 
)
double mmm2d_coulomb_pair_energy ( double  charge_factor,
double  dv[3],
double  d2,
double  d 
)

pairwise calculated parts of MMM2D force (near neighbors)

Definition at line 1796 of file mmm2d.c.

References calc_mmm2d_copy_pair_energy(), coulomb, and Coulomb_parameters::prefactor.

Referenced by add_non_bonded_pair_energy(), and MMM2D_dielectric_layers_energy_contribution().

double MMM2D_dielectric_layers_energy_contribution ( )
void MMM2D_dielectric_layers_force_contribution ( )
void MMM2D_init ( )
void MMM2D_on_resort_particles ( )

if the number of particles has changed (even per node), the particle buffers for the coefficients have to be resized.

Definition at line 1944 of file mmm2d.c.

References cell_structure, CELL_STRUCTURE_LAYERED, cells_get_n_particles(), MMM2D_struct::far_cut, gblcblk, lclcblk, MMM2D_self_energy(), n_cells, n_scxcache, n_scycache, partblk, realloc, scxcache, scycache, CellStructure::type, ux, and uy.

Referenced by on_resort_particles().

int MMM2D_sanity_checks ( )

check that MMM2D can run with the current parameters

Definition at line 1891 of file mmm2d.c.

References cell_structure, CELL_STRUCTURE_LAYERED, CELL_STRUCTURE_NSQUARE, ERROR_SPRINTF, PERIODIC, runtime_error(), and CellStructure::type.

Referenced by check_obs_calc_initialized(), and MMM2D_init().

void MMM2D_self_energy ( )

energy of all local particles with their copies

Definition at line 1807 of file mmm2d.c.

References calc_mmm2d_copy_pair_energy(), CellPList::cell, coulomb, i, local_cells, CellPList::n, ParticleList::n, part, ParticleList::part, Coulomb_parameters::prefactor, self_energy, and SQR().

Referenced by MMM2D_on_resort_particles().

int MMM2D_set_params ( double  maxPWerror,
double  far_cut,
double  delta_top,
double  delta_mid 
)

set parameters for MMM2D.

This assumes that the particles do NOT leave the box. For the near formula (nsquared cell structure), precision might be lost, while the far formula might have problems with overflows.

Parameters:
maxPWerrorthe maximal error for the pairwise interactions. Both for potential and force components. The potential is therefore always slightly more precise
far_cutsets the cutoff for the far formula in inverse lengths. If -1, the far cutoff is determined by maxPWerror. Manual setting is probably only good for testing
delta_topdielectric contrast at top of the simulation box
delta_middielectric contrast in the middle of the simulation box

Definition at line 1835 of file mmm2d.c.

References cell_structure, CELL_STRUCTURE_LAYERED, CELL_STRUCTURE_NSQUARE, coulomb, COULOMB_MMM2D, MMM2D_struct::delta_mid_bot, MMM2D_struct::delta_mid_top, MMM2D_struct::delta_mult, MMM2D_struct::dielectric_contrast_on, err, ERROR_ICL, ES_ERROR, ES_OK, MMM2D_struct::far_calculated, MMM2D_struct::far_cut, MMM2D_struct::far_cut2, MMM2D_struct::maxPWerror, Coulomb_parameters::method, MMM2D_setup_constants(), MMM2D_tune_far(), MMM2D_tune_near(), mpi_bcast_coulomb_params(), n_nodes, SQR(), and CellStructure::type.

Referenced by tclcommand_inter_coulomb_parse_mmm2d().

void MMM2D_setup_constants ( )
static int MMM2D_tune_far ( double  error) [static]

cutoff error setup.

Returns error code

Definition at line 1373 of file mmm2d.c.

References C_2PI, dmin(), err, ERROR_FARC, MMM2D_struct::far_cut, MMM2D_struct::far_cut2, layer_h, M_PI, MAXIMAL_FAR_CUT, min_far, SQR(), ux, and uy.

Referenced by MMM2D_init(), and MMM2D_set_params().

static int MMM2D_tune_near ( double  error) [static]
static double P_energy ( double  omega) [static]

Definition at line 938 of file mmm2d.c.

References block(), cells, gblcblk, i, ParticleList::n, n_layers, partblk, POQECM, POQECP, POQESM, and POQESP.

Referenced by energy_contribution().

static double PQ_energy ( double  omega) [static]

Definition at line 1167 of file mmm2d.c.

References block(), cells, gblcblk, ParticleList::n, n_layers, partblk, PQECCM, PQECCP, PQECSM, PQECSP, PQESCM, PQESCP, PQESSM, and PQESSP.

Referenced by energy_contribution().

static void prepare_scx_cache ( ) [static]

sin/cos storage

Definition at line 290 of file mmm2d.c.

References C_2PI, cells, i, ParticleList::n, n_layers, n_localpart, n_scxcache, ParticlePosition::p, part, ParticleList::part, Particle::r, scxcache, and ux.

Referenced by MMM2D_add_far().

static void prepare_scy_cache ( ) [static]
static void prepareBernoulliNumbers ( int  nmax) [static]

complex evaluation

Definition at line 1469 of file mmm2d.c.

References DoubleList::e, DoubleList::n, realloc_doublelist(), and uy.

Referenced by MMM2D_tune_near().

static double Q_energy ( double  omega) [static]

Definition at line 988 of file mmm2d.c.

References block(), cells, gblcblk, i, ParticleList::n, n_layers, partblk, POQECM, POQECP, POQESM, and POQESP.

Referenced by energy_contribution().

MDINLINE void scale_vec ( double  scale,
double *  pdc,
int  size 
)

pdc_d = scale*pdc

Definition at line 375 of file mmm2d.c.

References i.

static void setup_P ( int  p,
double  omega,
double  fac 
) [static]
static void setup_PQ ( int  p,
int  q,
double  omega,
double  fac 
) [static]
static void setup_Q ( int  q,
double  omega,
double  fac 
) [static]
static void setup_z_energy ( ) [static]
static void setup_z_force ( ) [static]
static double z_energy ( ) [static]

Variable Documentation

IntList besselCutoff = {NULL, 0, 0} [static]

cutoffs for the bessel sum

Definition at line 107 of file mmm2d.c.

DoubleList bon = {NULL, 0, 0} [static]

bernoulli numbers divided by n

Definition at line 112 of file mmm2d.c.

int complexCutoff[COMPLEX_STEP+1] [static]

cutoffs for the complex sum

Definition at line 110 of file mmm2d.c.

Referenced by add_mmm2d_coulomb_pair_force(), calc_mmm2d_copy_pair_energy(), and MMM2D_tune_near().

double* gblcblk = NULL [static]

collected data from the cells above the top neighbor of a cell rsp.

below the bottom neighbor (P=below, M=above, as the signs in the exp).

Definition at line 193 of file mmm2d.c.

Referenced by add_P_force(), add_PQ_force(), add_Q_force(), add_z_force(), clear_image_contributions(), distribute(), gather_image_contributions(), MMM2D_on_resort_particles(), P_energy(), PQ_energy(), Q_energy(), and z_energy().

double* lclcblk = NULL [static]

for all local cells including ghosts

Definition at line 189 of file mmm2d.c.

Referenced by distribute(), MMM2D_on_resort_particles(), setup_P(), setup_PQ(), setup_Q(), setup_z_energy(), and setup_z_force().

double lclimge[8] [static]

contribution from the image charges

Definition at line 196 of file mmm2d.c.

Referenced by gather_image_contributions(), setup_P(), setup_PQ(), setup_Q(), and setup_z_force().

double max_near [static]

maximal z for near formula, minimal z for far formula.

Is identical in the theory, but with the verlet tricks this is no longer true, the skin has to be added/subtracted

Definition at line 123 of file mmm2d.c.

Referenced by MMM2D_setup_constants(), and MMM2D_tune_near().

double min_far

Definition at line 123 of file mmm2d.c.

Referenced by MMM2D_setup_constants(), MMM2D_tune_far(), and MMM2D_tune_near().

char const* mmm2d_errors[]
Initial value:
 {
   "ok",
   "Layer height too large for MMM2D near formula, increase n_layers",
   "box_l[1]/box_l[0] too large for MMM2D near formula, please exchange x and y",
   "Could find not reasonable Bessel cutoff. Please decrease n_layers or the error bound",
   "Could find not reasonable Polygamma cutoff. Consider exchanging x and y",
   "Far cutoff too large, decrease the error bound",
   "Layer height too small for MMM2D far formula, decrease n_layers or skin",
   "IC requires layered cellsystem with more than 3 layers",
}

error messages, see above

Definition at line 41 of file mmm2d.c.

Referenced by MMM2D_init(), and tclcommand_inter_coulomb_parse_mmm2d().

MMM2D_struct mmm2d_params = { 1e100, 10, 1, 0, 0, 1, 1, 1 }

Definition at line 129 of file mmm2d.c.

Referenced by mpi_bcast_coulomb_params_slave(), and tclprint_to_result_MMM2D().

int n_localpart = 0 [static]

number of local particles

Definition at line 184 of file mmm2d.c.

Referenced by prepare_scx_cache(), prepare_scy_cache(), and setup_PQ().

int n_scxcache [static]

Definition at line 204 of file mmm2d.c.

Referenced by MMM2D_add_far(), MMM2D_on_resort_particles(), and prepare_scx_cache().

int n_scycache [static]

Definition at line 207 of file mmm2d.c.

Referenced by MMM2D_add_far(), MMM2D_on_resort_particles(), and prepare_scy_cache().

double part_error [static]

up to that error the sums in the NF are evaluated

Definition at line 104 of file mmm2d.c.

Referenced by add_mmm2d_coulomb_pair_force(), calc_mmm2d_copy_pair_energy(), and MMM2D_tune_near().

double* partblk = NULL [static]

temporary buffers for product decomposition

Definition at line 187 of file mmm2d.c.

Referenced by add_P_force(), add_PQ_force(), add_Q_force(), MMM2D_on_resort_particles(), P_energy(), PQ_energy(), Q_energy(), setup_P(), setup_PQ(), and setup_Q().

SCCache* scxcache = NULL [static]

sin/cos caching

Definition at line 203 of file mmm2d.c.

Referenced by MMM2D_on_resort_particles(), prepare_scx_cache(), setup_P(), and setup_PQ().

SCCache* scycache = NULL [static]

sin/cos caching

Definition at line 206 of file mmm2d.c.

Referenced by MMM2D_on_resort_particles(), prepare_scy_cache(), setup_PQ(), and setup_Q().

double self_energy [static]

Definition at line 127 of file mmm2d.c.

Referenced by MMM2D_add_far(), and MMM2D_self_energy().

double ux [static]
double ux2

Definition at line 116 of file mmm2d.c.

double uy

Definition at line 116 of file mmm2d.c.

double uy2

Definition at line 116 of file mmm2d.c.

double uz

Definition at line 116 of file mmm2d.c.