#include <distance.h>
Static Public Member Functions | |
static void | f (double *const x, const double *_ibox, const double *_box) |
meta_image applies the nearest periodic image convention to the coordinates of one particle. In particular, meta_image is called by put_in_box once for each particle. x points to the first coodinate of the particle that should be put in the box. The template meta program expands to apply the nearest image convention to all ndim coordinates in the range [x, x + ndim). The function f of meta_image translates x[k] such that its new value is in the range [-box[k]/2, box[k]/2]. To see this, consider the behavior of std::round. E.g. if the input is x[k] == -0.7 _box[k], then round(x[k] * _ibox[k]) == -1 and finally x[k] -= -1 * _box[k] == 0.3 * _box[k]
Definition at line 117 of file distance.h.
static void pele::meta_image< IDX >::f | ( | double *const | x, |
const double * | _ibox, | ||
const double * | _box | ||
) | [inline, static] |
Definition at line 118 of file distance.h.