sarkas.potentials.force_pm.calc_pot_pm#

sarkas.potentials.force_pm.calc_pot_pm(phi_r, mesh_pos, mesh_points, charges, cao, mesh_sz, mid, pshift)[source]#

Calculates the long range part of particles’ accelerations.

Parameters
  • phi_r (numpy.ndarray) – Potential energy at mesh points.

  • mesh_pos (numpy.ndarray) – Particles’ positions relative to the mesh.

  • mesh_points (numpy.ndarray) – Particles’ positions on the mesh.

  • charges (numpy.ndarray) – Particles’ charges.

  • cao (int) – Charge assignment order.

  • mesh_sz (numpy.ndarray) – Mesh points per direction.

  • mid (numpy.ndarray) – Midpoint flag for the three directions.

  • pshift (numpy.ndarray) – Midpoint shift in each direction.

Returns

pot_p (numpy.ndarray) – Potential energy of each particle.