8 #ifndef SRC_GRID_GRID_UTIL_TEST_HPP_
9 #define SRC_GRID_GRID_UTIL_TEST_HPP_
11 #include "map_grid.hpp"
12 #include "Point_test.hpp"
13 #include "grid_key.hpp"
20 template<
unsigned int dim,
typename T>
void fill_grid(T & grid)
24 auto key_it = grid.getIterator();
26 while (key_it.isNext())
30 grid.template get<P::x>(kk) = grid.getGrid().LinId(kk);
31 grid.template get<P::y>(kk) = grid.getGrid().LinId(kk)+1;
32 grid.template get<P::z>(kk) = grid.getGrid().LinId(kk)+2;
33 grid.template get<P::s>(kk) = grid.getGrid().LinId(kk)+3;
35 grid.template get<P::v>(kk)[0] = grid.getGrid().LinId(kk)+123;
36 grid.template get<P::v>(kk)[1] = grid.getGrid().LinId(kk)+124;
37 grid.template get<P::v>(kk)[2] = grid.getGrid().LinId(kk)+125;
39 grid.template get<P::t>(kk)[0][0] = grid.getGrid().LinId(kk)+567;
40 grid.template get<P::t>(kk)[0][1] = grid.getGrid().LinId(kk)+568;
41 grid.template get<P::t>(kk)[0][2] = grid.getGrid().LinId(kk)+569;
42 grid.template get<P::t>(kk)[1][0] = grid.getGrid().LinId(kk)+570;
43 grid.template get<P::t>(kk)[1][1] = grid.getGrid().LinId(kk)+571;
44 grid.template get<P::t>(kk)[1][2] = grid.getGrid().LinId(kk)+572;
45 grid.template get<P::t>(kk)[2][0] = grid.getGrid().LinId(kk)+573;
46 grid.template get<P::t>(kk)[2][1] = grid.getGrid().LinId(kk)+574;
47 grid.template get<P::t>(kk)[2][2] = grid.getGrid().LinId(kk)+575;
grid_key_dx is the key to access any element in the grid
mem_id get(size_t i) const
Get the i index.
Test structure used for several test.