OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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
16template<typename T, typename Sfinae = void>
17struct has_grid_type: std::false_type {};
18
19
28template<typename T>
29struct has_grid_type<T, typename Void<decltype( T::grid_type )>::type> : std::true_type
30{};
31
43template<typename T, bool has_gt = has_grid_type<T>::type::value >
45{
54 static bool value()
55 {
56 return T::grid_type == STAGGERED_GRID;
57 };
58};
59
70template<typename T>
71struct 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_ */
This is a distributed grid.
Void structure.
Definition common.hpp:74
static bool value()
Return true if the grid is staggered.
Definition common.hpp:82
is_grid_staggered analyse T if it has a property grid_type defined and indicate that the grid is stag...
Definition common.hpp:45
static bool value()
Return true if the grid is staggered.
Definition common.hpp:54