From 0a7da94b4f0c044e328646d7fb69c93537ca2e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Tue, 1 May 2018 20:13:39 +0300 Subject: [PATCH] Fix "zero" ray in plane wave test Former-commit-id: cd30bf7acb9c68bc325fd60524a3a21df26629bc --- qpms/tests/ray_planewaves.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qpms/tests/ray_planewaves.c b/qpms/tests/ray_planewaves.c index 51f4c3e..47654c6 100644 --- a/qpms/tests/ray_planewaves.c +++ b/qpms/tests/ray_planewaves.c @@ -1,4 +1,4 @@ -// c99 -o raypwtest1 -I .. ray_planewaves.c -lgsl -lm ../legendre.c ../vswf.c ../bessel.c -lblas +// c99 -o ../../tests/pwraytests/raypwtest1 -I .. ray_planewaves.c -lgsl -lm ../legendre.c ../vswf.c ../bessel.c -lblas #include #include #include @@ -57,9 +57,9 @@ int main(int argc, char **argv) { cart3_t rays[nrays]; double relerrs[nrays]; memset(rays, 0, nrays * sizeof(cart3_t)); - rays[1].x = rays[2].y = rays[3].z = sigma; + rays[0].x = rays[1].y = rays[2].z = sigma; double relerrthreshold = 1e-11; - for (unsigned i = 4; i < nrays; ++i) { + for (unsigned i = 3; i < nrays; ++i) { cart3_t *w = rays+i; w->x = gsl_ran_gaussian(rng, sigma); w->y = gsl_ran_gaussian(rng, sigma);