4#define BOOST_TEST_DYN_LINK
5#include <boost/test/unit_test.hpp>
11BOOST_AUTO_TEST_SUITE(HelpFunctionsTestSuite)
12 const size_t Field = 0;
14 BOOST_AUTO_TEST_CASE(get_min_val_test)
16 const size_t grid_dim = 1;
17 const double box_lower = -1.0;
18 const double box_upper = 1.0;
23 const size_t sz[grid_dim] = {32};
27 double smaller_value = 0.1;
28 auto dom = g_dist.getDomainIterator();
29 auto key_0 = dom.get();
30 g_dist.template get<Field>(key_0) = smaller_value;
34 double bigger_value = 0.5;
38 g_dist.template get<Field>(key) = bigger_value;
43 auto min_value = get_min_val<Field>(g_dist);
44 double tolerance = 1e-12;
50 BOOST_AUTO_TEST_CASE(get_max_val_test)
52 const size_t grid_dim = 1;
53 const double box_lower = -1.0;
54 const double box_upper = 1.0;
59 const size_t sz[grid_dim] = {32};
63 double smaller_value = 0.1;
64 auto dom = g_dist.getDomainIterator();
65 auto key_0 = dom.get();
66 g_dist.template get<Field>(key_0) = smaller_value;
70 double bigger_value = 0.5;
74 g_dist.template get<Field>(key) = bigger_value;
79 auto max_value = get_max_val<Field>(g_dist);
80 double tolerance = 1e-12;
85BOOST_AUTO_TEST_SUITE_END()
Header file containing help-functions that perform on OpenFPM-grids.
Header file containing small mathematical help-functions that are needed e.g. for the Sussman redista...
This class represent an N-dimensional box.
This is a distributed grid.
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...