OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
ORB_unit_test.hpp
1/*
2 * ORB_unit_test.hpp
3 *
4 * Created on: Mar 16, 2015
5 * Author: i-bird
6 */
7
8#ifndef ORB_UNIT_TEST_HPP_
9#define ORB_UNIT_TEST_HPP_
10
11#include "ORB.hpp"
12#include <random>
13
14BOOST_AUTO_TEST_SUITE( ORB_test )
15
16#define N_POINTS 1024
17
18BOOST_AUTO_TEST_CASE( ORB_test_use)
19{
20 // set the seed
21 // create the random generator engine
22 std::srand(create_vcluster().getProcessUnitID());
23 std::default_random_engine eg;
24 std::uniform_real_distribution<float> ud(0.0f, 1.0f);
25
26 typedef Point<3,float> p;
27
28 // create a random local vector of particles
30
31 // fill the particles
32
33 auto vp_it = vp.getIterator();
34
35 while (vp_it.isNext())
36 {
37 auto key = vp_it.get();
38
39 vp.get<p::x>(key)[0] = ud(eg);
40 vp.get<p::x>(key)[1] = ud(eg);
41 vp.get<p::x>(key)[2] = ud(eg);
42
43 ++vp_it;
44 }
45
46 // Orthogonal Recursive Bisection
47 Box<3,float> dom({0.0,0.0,0.0},{1.0,1.0,1.0});
48
49// ORB<3,float> orb(dom,16,vp);
50
51 //
52}
53
54BOOST_AUTO_TEST_SUITE_END()
55
56#endif /* ORB_UNIT_TEST_HPP_ */
This class represent an N-dimensional box.
Definition Box.hpp:61
This class implement the point shape in an N-dimensional space.
Definition Point.hpp:28
Implementation of 1-D std::vector like structure.