1 #include "Grid/grid_dist_id.hpp" 
    2 #include "data_type/aggregate.hpp" 
    3 #include "Decomposition/CartDecomposition.hpp" 
   28 constexpr 
size_t x = 0;
 
   29 constexpr 
size_t y = 1;
 
   30 constexpr 
size_t z = 2;
 
   32 constexpr 
size_t A = 0;
 
   33 constexpr 
size_t B = 0;
 
   37 int 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 is a distributed grid. 
 
This class is a trick to indicate the compiler a specific specialization pattern. ...
 
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...