OpenFPM
5.2.0
Project that contain the implementation of distributed structures
common.hpp
1
/*
2
* common.hpp
3
*
4
* Created on: Oct 11, 2015
5
* Author: i-bird
6
*/
7
8
#ifndef OPENFPM_NUMERICS_SRC_UTIL_COMMON_HPP_
9
#define OPENFPM_NUMERICS_SRC_UTIL_COMMON_HPP_
10
11
#define STAGGERED_GRID 1
12
#define NORMAL_GRID 0
13
14
#include "util/common.hpp"
15
16
template
<
typename
T,
typename
Sfinae =
void
>
17
struct
has_grid_type
: std::false_type {};
18
19
28
template
<
typename
T>
29
struct
has_grid_type
<T, typename
Void
<decltype( T::
grid_type
)>::type> : std::true_type
30
{};
31
43
template<typename T, bool has_gt = has_grid_type<T>::type::value >
44
struct
is_grid_staggered
45
{
54
static
bool
value
()
55
{
56
return
T::grid_type == STAGGERED_GRID;
57
};
58
};
59
70
template
<
typename
T>
71
struct
is_grid_staggered
<T,false>
72
{
73
82
static
bool
value
()
83
{
84
return
false
;
85
};
86
};
87
88
#endif
/* OPENFPM_NUMERICS_SRC_UTIL_COMMON_HPP_ */
is_grid_staggered::value
static bool value()
Return true if the grid is staggered.
Definition:
common.hpp:54
is_grid_staggered< T, false >::value
static bool value()
Return true if the grid is staggered.
Definition:
common.hpp:82
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:44
Void
Void structure.
Definition:
common.hpp:73
grid_dist_id
This is a distributed grid.
Definition:
grid_dist_id.hpp:278
openfpm_numerics
src
FiniteDifference
util
common.hpp
Generated by
1.8.17