8 #ifndef SRC_VECTOR_VECTOR_DIST_MULTIPHASE_FUNCTIONS_HPP_
9 #define SRC_VECTOR_VECTOR_DIST_MULTIPHASE_FUNCTIONS_HPP_
11 #include "NN/CellList/CellListM.hpp"
12 #include "NN/VerletList/VerletListM.hpp"
14 template<
typename Vector,
typename CL,
typename T>
20 ver.
Initialize(cl,r_cut,v.getPosVector(),v1.getPosVector(),v.size_local());
25 template<
unsigned int sh_byte,
typename Vector ,
typename Vector1,
typename CL,
typename T>
VerletListM<Vector::dims,typename Vector::stype,sh_byte,CL,shift<Vector::dims,typename Vector::stype>> createVerletM(
size_t pp,
Vector & v, Vector1 & phases, CL & cl, T r_cut)
31 for (
size_t i = 0 ; i < phases.size() ; i++)
34 ver.
Initialize(cl,pp,r_cut,v.getPosVector(),v_phases,v.size_local());
45 if (phases.
size() == 0)
48 box_cl = phases.get(0).getDecomposition().getProcessorBounds();
49 phases.get(0).getCellListParams(r_cut,div,box_cl);
51 NN.Initialize(box_cl,div);
54 for (
size_t i = 0; i < phases.
size() ; i++)
57 auto it = phases.get(i).getDomainAndGhostIterator();
65 NN.
add(xp,
key.getKey(), i);
77 template<
typename Vector,
typename CL,
typename T>
79 createVerletSym(
Vector & v,
Vector & v1, CL & cl, T r_cut)
83 ver.
Initialize(cl,r_cut,v.getPosVector(),v1.getPosVector(),v.size_local());
88 template<
unsigned int sh_byte,
typename Vector,
typename Vector1 ,
typename CL,
typename T>
VerletListM<Vector::dims,typename Vector::stype,sh_byte,CL,shift<Vector::dims,typename Vector::stype>> createVerletSymM(
size_t pp,
Vector & v, Vector1 & phases, CL & cl, T r_cut)
94 for (
size_t i = 0 ; i < phases.size() ; i++)
97 ver.
Initialize(cl,pp,r_cut,v.getPosVector(),v_phases,v.size_local(),VL_SYMMETRIC);
107 if (phases.
size() == 0)
111 CellDecomposer_sm<Vector::dims,typename Vector::stype,shift<Vector::dims,typename Vector::stype>> cd_sm;
114 cl_param_calculateSym(phases.get(0).getDecomposition().getDomain(),cd_sm,phases.get(0).getDecomposition().getGhost(),r_cut,pad);
121 NN.Initialize(cd_sm,pbox,pad);
124 for (
size_t i = 0; i < phases.
size() ; i++)
127 auto it = phases.get(i).getDomainAndGhostIterator();
135 NN.
add(xp,
key.getKey(), i);
Sparse Matrix implementation stub object when OpenFPM is compiled with no linear algebra support...
Class for Verlet list implementation.
This class implement the point shape in an N-dimensional space.
Structure that contain a reference to a vector of particles.
void Initialize(const Box< dim, T > &box, const Box< dim, T > &dom, T r_cut, openfpm::vector< Point< dim, T >> &pos, size_t g_m, size_t opt=VL_NON_SYMMETRIC)
Class for Verlet list implementation with Multiphase.
Class for Multi-Phase cell-list.
This class represent an N-dimensional box.
This class is a trick to indicate the compiler a specific specialization pattern. ...
void add(const T(&pos)[dim], size_t ele, size_t v_id)
Add an element in the cell list.
void Initialize(CellListImpl &cli, size_t pp, T r_cut, const openfpm::vector< Point< dim, T >> &pos, const openfpm::vector< struct pos_v< dim, T >> &pos2, size_t g_m, size_t opt=VL_NON_SYMMETRIC)
Implementation of 1-D std::vector like structure.