8 #ifndef OPENFPM_NUMERICS_SRC_UTIL_GRID_DIST_TESTING_HPP_ 9 #define OPENFPM_NUMERICS_SRC_UTIL_GRID_DIST_TESTING_HPP_ 11 #include "Grid/grid_dist_key.hpp" 12 #include "Grid/grid_dist_key.hpp" 13 #include "Grid/map_grid.hpp" 15 template<
unsigned int dim>
30 grid_test.setMemory();
34 auto dom = grid_test.getIterator();
35 const auto & gs = grid_test.getGrid();
41 grid_test.template get<0>(key) = gs.LinId(key);
55 std::cerr <<
"Error: " << __FILE__ <<
":" << __LINE__ <<
" mapping grid is suppose to have only one scalar size_t \n";
57 return grid_test.template get<0>(key.
getKey());
base_key getKey() const
Get the key.
size_t get(const grid_dist_key_dx< dim > &key) const
Get the element at position key.
grid_dist_testing(const size_t(&g_sz)[dim])
It create a test map suitable for testing.
grid_key_dx< dim > getGKey(const grid_dist_key_dx< dim > &key) const
Return the global key.