sarkas.potentials.force_pm#

Module for handling the Particle-Mesh part of the force and potential calculation.

Functions

assgnmnt_func(cao, x)

Calculate the charge assignment function as given in Ref.:cite:Deserno1998

calc_acc_pm(E_x_r, E_y_r, E_z_r, mesh_pos, ...)

Calculates the long range part of particles' accelerations.

calc_charge_dens(mesh_pos, mesh_points, ...)

Assigns Charges to Mesh Points.

calc_field(phi_k, kx_v, ky_v, kz_v)

Numba'd function that calculates the Electric field in Fourier space.

calc_mesh_coord(pos, h_array, cao)

Calculate the particles positions with respect to the mesh and their closest point on the mesh.

calc_pot_pm(phi_r, mesh_pos, mesh_points, ...)

Calculates the long range part of particles' accelerations.

create_k_aliases(aliases, mesh_sizes, ...)

Calculate the alias arrays of the reciprocal space arrays for anti-aliasing.

create_k_arrays(mesh_sizes, non_zero_box_lengths)

Calculate the reciprocal space arrays.

force_optimized_green_function(box_lengths, ...)

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

mesh_point_shift(cao)

Calculate the required shift based on the parity of the charge assignment orders.

sum_over_aliases(kx, ky, kz, kx_M, ky_M, ...)

Perform the sum over aliases in each direction.

update(pos, charges, masses, mesh_sizes, ...)

Calculate the long range part of particles' accelerations.