8 #ifndef OPENFPM_NUMERICS_SRC_PSE_KERNELS_UNIT_TESTS_HPP_
9 #define OPENFPM_NUMERICS_SRC_PSE_KERNELS_UNIT_TESTS_HPP_
11 #include "PSE/Kernels_test_util.hpp"
12 #ifdef HAVE_LIBQUADMATH
13 #include <boost/multiprecision/float128.hpp>
16 BOOST_AUTO_TEST_SUITE( pse_kernels_unit_tests )
18 BOOST_AUTO_TEST_CASE( pse_ker )
31 #ifdef HAVE_LIBQUADMATH
32 y_res.load(
"test/PSE_convergence");
34 y_res.load(
"test/PSE_convergence_osx");
38 for (
size_t i = 250 ; i <= 2097152000 ; i*=2)
46 #ifdef HAVE_LIBQUADMATH
48 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,2,err);
49 y.last().add(err.linf_error);
51 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,4,err);
52 y.last().add(err.linf_error);
55 PSE_test<double,Lap_PSE<1,double,2>>(i,2,err);
56 y.last().add(err.linf_error);
58 PSE_test<double,Lap_PSE<1,double,2>>(i,4,err);
59 y.last().add(err.linf_error);
61 PSE_test<float,Lap_PSE<1,float,2>>(i,2,err);
62 y.last().add(err.linf_error);
64 PSE_test<float,Lap_PSE<1,float,2>>(i,4,err);
65 y.last().add(err.linf_error);
69 #ifdef HAVE_LIBQUADMATH
71 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,4>>(i,2,err);
72 y.last().add(err.linf_error);
74 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,4>>(i,4,err);
75 y.last().add(err.linf_error);
80 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,6>>(i,2,err);
81 y.last().add(err.linf_error);
83 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,6>>(i,4,err);
84 y.last().add(err.linf_error);
90 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,8>>(i,8,err);
91 y.last().add(err.linf_error);
93 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,8>>(i,16,err);
94 y.last().add(err.linf_error);
100 for (
size_t i = 0 ; i < y.
size(); i++)
102 for (
size_t j = 0 ; j < y.get(i).
size(); j++)
104 double c1 = y.get(i).get(j);
105 double c2 = y_res.get(i).get(j);
107 #ifdef HAVE_LIBQUADMATH
111 if (j != 4 && j != 5)
112 {BOOST_REQUIRE_CLOSE(c1,c2,3.0);}
118 if (j != 2 && j != 3)
119 {BOOST_REQUIRE_CLOSE(c1,c2,3.0);}
126 BOOST_AUTO_TEST_SUITE_END()
Implementation of VCluster class.
Implementation of 1-D std::vector like structure.
size_t getProcessingUnits()
Get the total number of processors.