1 #include "Vector/vector_dist.hpp" 
    2 #include "data_type/aggregate.hpp" 
    3 #include "Plot/GoogleChart.hpp" 
    4 #include "Plot/util.hpp" 
   29 int main(
int argc, 
char* argv[])
 
   49     openfpm_init(&argc,&argv);
 
   51     constexpr 
int gid = 0;
 
   52     constexpr 
int nn_norm = 1;
 
   53     constexpr 
int nn_sym = 2;
 
   62     size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
 
   80         bool operator<(
const struct point_and_gid & pag)
 const 
  138     size_t start = vd.accum();
 
  140     auto it = vd.getDomainIterator();
 
  146         vd.getPos(
key)[0] = 2.0*L*((float)rand()/RAND_MAX) - L;
 
  147         vd.getPos(
key)[1] = 2.0*L*((float)rand()/RAND_MAX) - L;
 
  148         vd.getPos(
key)[2] = 2.0*L*((float)rand()/RAND_MAX) - L;
 
  150         vd.getProp<gid>(
key) = 
key.getKey() + start;
 
  193     auto NN = vd.getCellList(r_cut);
 
  194     auto p_it = vd.getDomainIterator();
 
  196     while (p_it.isNext())
 
  202         auto Np = NN.getNNIterator(NN.getCell(vd.getPos(p)));
 
  218             float distance = f.
norm();
 
  221             if (distance < r_cut )
 
  223                 vd.getProp<nn_norm>(p).add();
 
  224                 vd.getProp<nn_norm>(p).last().xq = xq;
 
  225                 vd.getProp<nn_norm>(p).last().id = vd.getProp<0>(q);
 
  258     auto NN2 = vd.getCellListSym(r_cut);
 
  260     auto p_it2 = vd.getDomainIterator();
 
  262     while (p_it2.isNext())
 
  264         auto p = p_it2.
get();
 
  268         auto Np = NN2.template getNNIteratorSym<NO_CHECK>(NN2.getCell(vd.getPos(p)),p.getKey(),vd.getPosVector());
 
  285             float distance = f.
norm();
 
  289             if (distance < r_cut )
 
  291                 vd.getProp<nn_sym>(p).add();
 
  292                 vd.getProp<nn_sym>(q).add();
 
  294                 vd.getProp<nn_sym>(p).last().xq = xq;
 
  295                 vd.getProp<nn_sym>(q).last().xq = xp;
 
  296                 vd.getProp<nn_sym>(p).last().id = vd.getProp<0>(q);
 
  297                 vd.getProp<nn_sym>(q).last().id = vd.getProp<0>(p);
 
  351     auto p_it3 = vd.getDomainIterator();
 
  354     while (p_it3.isNext())
 
  356         auto p = p_it3.get();
 
  358         vd.getProp<nn_norm>(p).sort();
 
  359         vd.getProp<nn_sym>(p).sort();
 
  361         ret &= vd.getProp<nn_norm>(p).size() == vd.getProp<nn_sym>(p).size();
 
  363         for (
size_t i = 0 ; i < vd.getProp<1>(p).size() ; i++)
 
  365             ret &= vd.getProp<nn_norm>(p).
get(i).id == vd.getProp<nn_sym>(p).
get(i).id;
 
  367             if (box.isInside(vd.getProp<nn_norm>(p).get(i).xq) == 
true)
 
  369                 ret &= vd.getProp<nn_norm>(p).
get(i).xq == vd.getProp<nn_sym>(p).
get(i).xq;
 
  378         std::cout << 
"ERROR" << std::endl;
 
This structure define the operation add to use with copy general. 
 
This class implement the point shape in an N-dimensional space. 
 
const T & get(size_t i) const 
Get coordinate. 
 
T norm()
norm of the vector 
 
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...
 
Implementation of 1-D std::vector like structure.