sarkas.potentials.force_pm.force_optimized_green_function#

sarkas.potentials.force_pm.force_optimized_green_function(box_lengths, h_array, mesh_sizes, aliases, p, constants)[source]#

Numba’d function to calculate the Optimized Green Function given by eq.(22) of Ref.:cite:Stern2008.

Parameters
  • box_lengths (numpy.ndarray) – Length of simulation’s box in each direction.

  • h_array (numpy.ndarray) – Mesh spacings.

  • mesh_sizes (numpy.ndarray) – Number of mesh points in x,y,z.

  • aliases (numpy.ndarray) – Number of aliases in each direction.

  • p (numpy.ndarray) – Array of charge assignment order (cao) for each dimension.

  • constants (numpy.ndarray) – Screening parameter, Ewald parameter, \(4 \pi \eplison_0\).

Returns

  • G_k (numpy.ndarray) – Optimal Green Function

  • PM_err (float) – Error in the force calculation due to the optimized Green’s function. eq.(28) of [Dharuman et al., 2017] .