This comes after PR #413 , which updates the distance interface in ewald2d.
Several separate functions computed the same distances to calculate different contributions to the Ewald sum.
This PR also consolidates those functions, removing redundant distance computations and repeated code.
The real_cij function in ewald.py is separated out of the Ewald class so that Ewald2d can import it, rather than defining the same function.
This comes after PR #413 , which updates the distance interface in ewald2d.
Several separate functions computed the same distances to calculate different contributions to the Ewald sum. This PR also consolidates those functions, removing redundant distance computations and repeated code. The real_cij function in ewald.py is separated out of the Ewald class so that Ewald2d can import it, rather than defining the same function.