24#if defined(ESPRESSO_ELECTROSTATICS) and defined(ESPRESSO_GSL)
28#include <gsl/gsl_sf_zeta.h>
35 std::vector<double> &
series) {
38 auto const deriv =
static_cast<double>(2 * n);
43 series[0] = 2. * (1. - std::numbers::egamma);
75 std::vector<double> &
series) {
76 auto const deriv =
static_cast<double>(2 * n + 1);
96void CoulombMMM1D::create_mod_psi_up_to(
int new_n) {
97 auto const old_n =
static_cast<int>(modPsi.size() >> 1);
99 modPsi.resize(2 *
new_n);
102 for (
int n = 0; n <
old_n; n++)
103 binom *= (-0.5 - n) /
static_cast<double>(n + 1);
108 binom *= (-0.5 - n) /
static_cast<double>(n + 1);
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
constexpr auto round_error_prec
Precision below which a double-precision float is assumed to be zero.
static void preparePolygammaOdd(int n, double binom, std::vector< double > &series)
static void preparePolygammaEven(int n, double binom, std::vector< double > &series)
MMM1D algorithm for long-range Coulomb interactions on the CPU.