1#include "Grid/grid_dist_id.hpp"
2#include "data_type/aggregate.hpp"
3#include "Decomposition/CartDecomposition.hpp"
28constexpr size_t x = 0;
29constexpr size_t y = 1;
30constexpr size_t z = 2;
32constexpr size_t A = 0;
33constexpr size_t B = 1;
37int main(
int argc,
char* argv[])
55 openfpm_init(&argc,&argv);
61 size_t sz[3] = {100,100,100};
107 auto dom = g_dist.getDomainIterator();
127 auto key = dom.get();
145 auto key_g = g_dist.getGKey(key);
163 g_dist.template get<A>(key) = key_g.get(0)*key_g.get(0) + key_g.get(1)*key_g.get(1) + key_g.get(2)*key_g.get(2);
189 g_dist.template ghost_get<A>();
205 auto dom2 = g_dist.getDomainIterator();
207 while (dom2.isNext())
209 auto key = dom2.get();
212 g_dist.template get<B>(key) = g_dist.template get<A>(key.move(x,1)) + g_dist.template get<A>(key.move(x,-1)) +
213 g_dist.template get<A>(key.move(y,1)) + g_dist.template get<A>(key.move(y,-1)) +
214 g_dist.template get<A>(key.move(z,1)) + g_dist.template get<A>(key.move(z,-1)) -
215 6*g_dist.template get<A>(key);
236 g_dist.write(
"output");
This class represent an N-dimensional box.
This is a distributed grid.
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...