![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Cuboid minimum-image fold parameters for hot pair loops. More...
#include <BoxGeometry.hpp>
Public Member Functions | |
| CuboidMinimumImage (Utils::Vector3d const &length, Utils::Vector3d const &length_inv_masked) | |
| ESPRESSO_ATTR_ALWAYS_INLINE double | dist2 (Utils::Vector3d const &a, Utils::Vector3d const &b) const |
| Squared minimum-image distance between two coordinates. | |
| ESPRESSO_ATTR_ALWAYS_INLINE void | batch_vector_dist2 (double xi, double yi, double zi, int m, double const *sx, double const *sy, double const *sz, double *dx0, double *dx1, double *dx2, double *dsq) const |
Batched minimum-image vector and squared distance: one point (xi, yi, zi) against m others held in the SoA arrays sx / sy / sz. | |
Cuboid minimum-image fold parameters for hot pair loops.
Capture an instance by value in a kernel to hoist the box data out of the pair loop: member loads then come from the kernel's own frame and the compiler can keep them in registers, instead of re-reading them through a BoxGeometry reference for every pair. Only valid for cuboid boxes; Lees-Edwards boxes need the full BoxGeometry::get_mi_vector.
Definition at line 107 of file BoxGeometry.hpp.
|
inline |
Definition at line 112 of file BoxGeometry.hpp.
|
inline |
Batched minimum-image vector and squared distance: one point (xi, yi, zi) against m others held in the SoA arrays sx / sy / sz.
Writes the fold vector components to dx0 / dx1 / dx2 and the squared distance to dsq. The loop carries no dependency across the m entries and reads contiguous arrays, so it vectorizes. Each entry is computed as three per-axis detail::get_mi_coord_masked folds followed by Utils::Vector::norm2 (accumulating from zero in component order), so the per-pair results are bitwise-identical to the scalar BoxGeometry::get_mi_vector path for cuboid boxes.
Definition at line 142 of file BoxGeometry.hpp.
References stream.
Referenced by SpecializedForcesKernel< HasCoulomb >::operator()().
|
inline |
Squared minimum-image distance between two coordinates.
Definition at line 118 of file BoxGeometry.hpp.
References stream.