Fix ewalds.c test output; n.b. the current long-range parts.
Former-commit-id: f51675842d53a2ba0c6c2821180c11fe60445257
This commit is contained in:
parent
dc80d64e5b
commit
5357d53fc5
|
@ -144,7 +144,7 @@ int ewald32_sigma0(complex double *result, double *err,
|
|||
abort();
|
||||
*result = gam.val * c->legendre0[gsl_sf_legendre_array_index(0,0)] / 2 / M_SQRTPI;
|
||||
if(err)
|
||||
*err = gam.err * c->legendre0[gsl_sf_legendre_array_index(0,0)] / 2 / M_SQRTPI;
|
||||
*err = gam.err * fabs(c->legendre0[gsl_sf_legendre_array_index(0,0)] / 2 / M_SQRTPI);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,16 +68,16 @@ int main() {
|
|||
printf("===============================\n");
|
||||
printf("Kmax = %g, Rmax = %g, lMax = %d, eta = %g, k = %g, beta = (%g,%g)\n",
|
||||
p.maxK, p.maxR, p.lMax, p.eta, p.k, p.beta.x, p.beta.y);
|
||||
|
||||
printf("sigma0: %.16g%+.16gj\n", creal(r->sigma0), cimag(r->sigma0));
|
||||
for (qpms_l_t n = 0; n <= p.lMax; ++n) {
|
||||
for (qpms_m_t m = -n; m <= n; ++m){
|
||||
qpms_y_t y = qpms_mn2y_sc(m,n);
|
||||
qpms_y_t y_conj = qpms_mn2y_sc(-m,n);
|
||||
// y n m sigma_total (err), regsigmas_416 regsigmas_415_recon
|
||||
printf("%zd %d %d: T:%.16g%+.16gj(%.3g) S:%.16g%+.16gj(%.3g) L:%.16g%+.16gj(%.3g) \n| predict %.16g%+.16gj \n| actual %.16g%+.16gj\n",
|
||||
printf("%zd %d %d: T:%.16g%+.16gj(%.3g) L:%.16g%+.16gj(%.3g) S:%.16g%+.16gj(%.3g) \n| predict %.16g%+.16gj \n| actual %.16g%+.16gj\n",
|
||||
y, n, m, creal(r->sigmas_total[y]), cimag(r->sigmas_total[y]),
|
||||
r->err_sigmas_total[y],
|
||||
creal(r->sigmas_long[y]), cimag(r->sigmas_total[y]),
|
||||
creal(r->sigmas_long[y]), cimag(r->sigmas_long[y]),
|
||||
r->err_sigmas_long[y],
|
||||
creal(r->sigmas_short[y]), cimag(r->sigmas_short[y]),
|
||||
r->err_sigmas_short[y],
|
||||
|
|
Loading…
Reference in New Issue