# Is there any method to incorporate boundary periodic conditions into the kernel summation over unstructured data points?

Supposing that there are $$N$$ particles distributed inside a periodic cubic box of volume $$V=L^3$$, I want to divide the cube into a regular mesh and calculate the following summation at each grid point $$r_i$$,

$$z_i = \sum\limits_{j=0}^N K\left(\left\| r_i-r_j \right\|\right)y_j$$

where $$r_j$$ is the position vector of the $$j$$-th particle of mass $$y_j$$, and $$K(r)$$ is one isotropic kernel function.

However, I really don't know how to incorporate periodic boundary conditions into the kernel summation over these unstructured data points. Is there any method or algorithm to solve this issue? • hey, I went ahead and just put $...$ around your in-line LaTeX. (see my edit to your question!) Next time, this is easy for you to do yourself :) Apr 13 at 8:08
• Are the particle positions exactly the grid positions, or why are the also called $r_\cdot$? Because now, if I tell you something about $r_8$, is that a grid position or a particle position? And why do you call the function $K$, which takes a real number as it seems, "$K(r)$", which implies it takes a position? I think you might want to overhaul your notation, and things might get a bit easier to communicate about :) Apr 13 at 8:11
• Also note that you have no boundary conditions specified at all in your problem, so it's a bit impossible to know which periodic boundary conditions you're referring to! Apr 13 at 8:13
• I also close voted, but I'll note that you may be confused by the whole "DFT assumes periodic" thing. It doesn't assume anything, and your cube, in virtually any application, most certainly isn't periodic. You should clarify what you're really trying to achieve, or explain "periodic boundary conditions" more. E.g. why not periodic-pad then unpad? Apr 13 at 12:31