OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
common_test.hpp
1 /*
2  * common_test.hpp
3  *
4  * Created on: Oct 11, 2015
5  * Author: i-bird
6  */
7 
8 #ifndef OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_UTIL_COMMON_TEST_HPP_
9 #define OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_UTIL_COMMON_TEST_HPP_
10 
11 #include "FiniteDifference/util/common.hpp"
12 
14 
16 {
17  static const int grid_type = STAGGERED_GRID;
18 };
19 
21 {
22  static const int grid_type = NORMAL_GRID;
23 };
24 
26 {
27 };
28 
30 
31 BOOST_AUTO_TEST_SUITE( util_pdata_test )
32 
33 BOOST_AUTO_TEST_CASE( check_pdata_templates_util_function )
34 {
35  {
37 
39  BOOST_REQUIRE_EQUAL(has_grid_type<test_grid_type_normal>::type::value,true);
40  BOOST_REQUIRE_EQUAL(has_grid_type<test_grid_type_no_def>::type::value,false);
41 
43  }
44 
45  {
47 
48  BOOST_REQUIRE_EQUAL(is_grid_staggered<test_grid_type_staggered>::value(),true);
49  BOOST_REQUIRE_EQUAL(is_grid_staggered<test_grid_type_normal>::value(),false);
50  BOOST_REQUIRE_EQUAL(is_grid_staggered<test_grid_type_no_def>::value(),false);
51 
53  }
54 }
55 
56 BOOST_AUTO_TEST_SUITE_END()
57 
58 #endif /* OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_UTIL_COMMON_TEST_HPP_ */
[Define structures]
Definition: common_test.hpp:15
This is a distributed grid.
is_grid_staggered analyse T if it has a property grid_type defined and indicate that the grid is stag...
Definition: common.hpp:42