OpenFPM_pdata
4.1.0
Project that contain the implementation of distributed structures
Loading...
Searching...
No Matches
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
15
struct
test_grid_type_staggered
16
{
17
static
const
int
grid_type
= STAGGERED_GRID;
18
};
19
20
struct
test_grid_type_normal
21
{
22
static
const
int
grid_type
= NORMAL_GRID;
23
};
24
25
struct
test_grid_type_no_def
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
38
BOOST_REQUIRE_EQUAL(
has_grid_type<test_grid_type_staggered>::type::value
,
true
);
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_ */
grid_dist_id
This is a distributed grid.
Definition
grid_dist_id.hpp:278
has_grid_type
Definition
common.hpp:17
is_grid_staggered
is_grid_staggered analyse T if it has a property grid_type defined and indicate that the grid is stag...
Definition
common.hpp:45
test_grid_type_no_def
Definition
common_test.hpp:26
test_grid_type_normal
Definition
common_test.hpp:21
test_grid_type_staggered
[Define structures]
Definition
common_test.hpp:16
openfpm_numerics
src
FiniteDifference
util
common_test.hpp
Generated by
1.9.8