From 7cf0c8c282eaf07784ebc374746d0357ba539729 Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Mon, 3 Dec 2012 11:11:18 +0100 Subject: [PATCH] add test for Fejer2 quadrature --- libsharp/sharp_test.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libsharp/sharp_test.c b/libsharp/sharp_test.c index 61dc1de..dc9bbff 100644 --- a/libsharp/sharp_test.c +++ b/libsharp/sharp_test.c @@ -193,7 +193,8 @@ int main(int argc, char **argv) MPI_Init(NULL,NULL); #endif sharp_module_startup("sharp_test",argc,7, - " ",1); + " ", + 1); int lmax=atoi(argv[2]); int niter=atoi(argv[4]); @@ -217,7 +218,7 @@ int main(int argc, char **argv) } else if (strcmp(argv[1],"ecp")==0) { - int nrings=2*lmax+2; + int nrings=2*lmax+1; int ppring=atoi(argv[3]); ptrdiff_t npix=(ptrdiff_t)nrings*ppring; printf("\nTesting ECP grid (%d rings, %d pixels/ring, %ld pixels)\n", @@ -248,6 +249,17 @@ int main(int argc, char **argv) check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); sharp_destroy_geom_info(tinfo); } + else if (strcmp(argv[1],"fejer2")==0) + { + int nrings=2*lmax+1; + int ppring=atoi(argv[3]); + ptrdiff_t npix=(ptrdiff_t)nrings*ppring; + printf("\nTesting Fejer2 grid (%d rings, %d pixels/ring, %ld pixels)\n", + nrings,ppring,(long)npix); + sharp_make_fejer2_geom_info (nrings, ppring, 0., 1, ppring, &tinfo); + check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); + sharp_destroy_geom_info(tinfo); + } else UTIL_FAIL("unknown grid geometry");