sarkas.potentials.tabulated.calc_force_error_quad#

sarkas.potentials.tabulated.calc_force_error_quad(a, beta, rc, pot_matrix)[source]#

Calculate the force error by integrating the square modulus of the force over the neglected volume.n The force error is calculated from

\[\Delta F = \left [ 4 \pi \int_{r_c}^{\infty} dr \, r^2 \left ( \frac{d\phi(r)}{r} \right )^2 ]^{1/2}\]

where \(\phi(r)\) is only the radial part of the potential, \(r_c\) is the cutoff radius, and \(r\) is scaled by the input parameter a.n The integral is calculated using scipy.integrate.quad. The derivative of the potential is obtained from potential_derivatives().

Parameters
  • a (float) – Rescaling length. Usually it is the Wigner-Seitz radius.

  • rc (float) – Cutoff radius to be used as the lower limit of the integral. The lower limit is actually rc /a.

  • pot_matrix (numpy.ndarray) – Slice of the sarkas.potentials.Potential.matrix containing the parameters of the potential. It must be a 1D-array.

Returns

f_err (float) – Force error. It is the sqrt root of the integral. It is calculated using scipy.integrate.quad and potential_derivatives().