Commit 45edfc90 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

various

parent 8705186d
......@@ -20,8 +20,8 @@ libmrutil_la_SOURCES = \
mr_util/constants.h \
mr_util/error_handling.cc \
mr_util/error_handling.h \
mr_util/morton_utils.cc \
mr_util/morton_utils.h \
mr_util/space_filling.cc \
mr_util/space_filling.h \
mr_util/fft.h \
mr_util/gl_integrator.h \
mr_util/mav.h \
......@@ -72,13 +72,13 @@ nobase_include_HEADERS = \
EXTRA_DIST = runtest.sh
check_PROGRAMS = sharp2_testsuite morton_test
check_PROGRAMS = sharp2_testsuite space_filling_test
sharp2_testsuite_SOURCES = test/sharp2_testsuite.cc
sharp2_testsuite_LDADD = libmrutil.la
morton_test_SOURCES = test/morton_test.cc
morton_test_LDADD = libmrutil.la
space_filling_test_SOURCES = test/space_filling_test.cc
space_filling_test_LDADD = libmrutil.la
TESTS = runtest.sh
TESTS = test/test_libsharp.sh test/test_space_filling.sh
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = @PACKAGE_NAME@.pc
......
......@@ -243,7 +243,8 @@ unique_ptr<sharp_geom_info> sharp_make_fejer1_geom_info (size_t nrings, size_t p
weight[2*k ]=2./(1.-4.*k*k)*sin((k*pi)/nrings);
}
if ((nrings&1)==0) weight[nrings-1]=0.;
mr::r2r_fftpack({size_t(nrings)}, {1}, {1}, {0}, false, false, weight.data(), weight.data(), 1.);
auto tmp = fmav(weight.data(),{nrings});
mr::r2r_fftpack(tmp, tmp, {0}, false, false, 1.);
for (size_t m=0; m<(nrings+1)/2; ++m)
{
......@@ -275,7 +276,8 @@ unique_ptr<sharp_geom_info> sharp_make_cc_geom_info (size_t nrings, size_t pprin
for (size_t k=1; k<=(n/2-1); ++k)
weight[2*k-1]=2./(1.-4.*k*k) + dw;
weight[2*(n/2)-1]=(n-3.)/(2*(n/2)-1) -1. -dw*((2-(n&1))*n-1);
mr::r2r_fftpack({size_t(n)}, {1}, {1}, {0}, false, false, weight.data(), weight.data(), 1.);
auto tmp = fmav(weight.data(),{n});
mr::r2r_fftpack(tmp, tmp, {0}, false, false, 1.);
weight[n]=weight[0];
for (size_t m=0; m<(nrings+1)/2; ++m)
......@@ -308,7 +310,8 @@ unique_ptr<sharp_geom_info> sharp_make_fejer2_geom_info (size_t nrings, size_t p
for (size_t k=1; k<=(n/2-1); ++k)
weight[2*k-1]=2./(1.-4.*k*k);
weight[2*(n/2)-1]=(n-3.)/(2*(n/2)-1) -1.;
mr::r2r_fftpack({size_t(n)}, {1}, {1}, {0}, false, false, weight.data(), weight.data(), 1.);
auto tmp = fmav(weight.data(),{n});
mr::r2r_fftpack(tmp, tmp, {0}, false, false, 1.);
for (size_t m=0; m<nrings; ++m)
weight[m]=weight[m+1];
......
......@@ -29,7 +29,7 @@
* Author: Martin Reinecke
*/
#include "mr_util/morton_utils.h"
#include "mr_util/space_filling.h"
namespace mr {
......
......@@ -30,8 +30,8 @@
* Author: Martin Reinecke
*/
#ifndef MRUTIL_MORTON_UTILS_H
#define MRUTIL_MORTON_UTILS_H
#ifndef MRUTIL_SPACE_FILLING_H
#define MRUTIL_SPACE_FILLING_H
#include <cstdint>
#include <array>
......
#include <functional>
#include "mr_util/morton_utils.h"
#include "mr_util/space_filling.h"
#include "mr_util/error_handling.h"
using namespace std;
......
#!/bin/sh
./space_filling_test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment