2#define BOOST_TEST_DYN_LINK
3#include <boost/test/unit_test.hpp>
4#include "Vector/vector_dist.hpp"
7BOOST_AUTO_TEST_SUITE( debug_util_test )
9BOOST_AUTO_TEST_CASE( debug_dist_util_test_use )
17 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
28 vd.getPos(0)[0] = 0.1;
29 vd.getPos(0)[1] = 0.2;
30 vd.getPos(0)[2] = 0.3;
32 vd.getPos(1)[0] = 0.2;
33 vd.getPos(1)[1] = 0.3;
34 vd.getPos(1)[2] = 0.4;
36 vd.getPos(2)[0] = 0.3;
37 vd.getPos(2)[1] = 0.4;
38 vd.getPos(2)[2] = 0.5;
40 vd.getPos(3)[0] = 0.4;
41 vd.getPos(3)[1] = 0.5;
42 vd.getPos(3)[2] = 0.6;
47 bool test = debug_is_in_box(vd,box1);
48 BOOST_REQUIRE_EQUAL(test,
false);
50 test = debug_is_in_box(vd,box2,debug_iterator::DOMAIN_IT,debug_run::HOST,
false);
51 BOOST_REQUIRE_EQUAL(test,
true);
54BOOST_AUTO_TEST_CASE( debug_util_test_use )
62 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
73 vd.get<0>(0)[0] = 0.1;
74 vd.get<0>(0)[1] = 0.2;
75 vd.get<0>(0)[2] = 0.3;
77 vd.get<0>(1)[0] = 0.2;
78 vd.get<0>(1)[1] = 0.3;
79 vd.get<0>(1)[2] = 0.4;
81 vd.get<0>(2)[0] = 0.3;
82 vd.get<0>(2)[1] = 0.4;
83 vd.get<0>(2)[2] = 0.5;
85 vd.get<0>(3)[0] = 0.4;
86 vd.get<0>(3)[1] = 0.5;
87 vd.get<0>(3)[2] = 0.6;
92 bool test = debug_is_in_box_single(vd,box1,vd.size());
93 BOOST_REQUIRE_EQUAL(test,
false);
95 test = debug_is_in_box_single(vd,box2,vd.size(),
"",debug_iterator::DOMAIN_IT,debug_run::HOST,
false);
96 BOOST_REQUIRE_EQUAL(test,
true);
99BOOST_AUTO_TEST_SUITE_END()
This class represent an N-dimensional box.
size_t getProcessingUnits()
Get the total number of processors.
Implementation of VCluster class.
Implementation of 1-D std::vector like structure.