9 #define BOOST_TEST_DYN_LINK
10 #include <boost/test/unit_test.hpp>
11 #include "poly_levelset.hpp"
12 #include "Vector/vector_dist.hpp"
13 #include "DMatrix/EMatrix.hpp"
15 BOOST_AUTO_TEST_SUITE( Regression_test )
19 BOOST_AUTO_TEST_CASE ( PolyLevelset_Sphere )
24 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
31 vectorType vd(1024,domain,bc,g);
33 constexpr
int mean_curvature = 0;
34 constexpr
int gauss_curvature = 1;
37 auto it = vd.getDomainIterator();
41 double theta = ((double)rand() / RAND_MAX) * M_PI;
42 double phi = ((double)rand() / RAND_MAX) * 2.0 * M_PI;
44 vd.getPos(key)[0] = cos(theta) * sin(phi);
45 vd.getPos(key)[1] = cos(theta) * cos(phi);
46 vd.getPos(key)[2] = sin(theta);
48 vd.template getProp<mean_curvature>(key) = 0.0;
49 vd.template getProp<gauss_curvature>(key) = 0.0;
91 BOOST_AUTO_TEST_SUITE_END()
This class represent an N-dimensional box.