8 #ifndef SRC_VECTOR_VECTOR_DIST_MULTIPHASE_FUNCTIONS_HPP_
9 #define SRC_VECTOR_VECTOR_DIST_MULTIPHASE_FUNCTIONS_HPP_
11 #include "NN/CellList/multiphase/CellListM.hpp"
12 #include "NN/VerletList/VerletListM.hpp"
14 template<
typename Vector,
typename Vector1,
typename CL,
typename T>
16 createVerletTwoPhase(
Vector & v, Vector1 & v1, CL & cl, T r_cut)
21 auto it = v.getDomainIterator();
23 verletList.
Initialize(cl,r_cut,it,v.getPosVector(),v1.getPosVector(),v.size_local());
28 template<
typename Vector,
typename Vector1,
typename T>
35 auto it = v.getDomainIterator();
42 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>,
typename Vector::internal_position_vector_type>
43 createVerletM(
size_t pp,
Vector & v, Vector1 & phases, CL & cl, T r_cut)
49 for (
size_t i = 0 ; i < phases.size() ; i++)
52 verletList.
Initialize(cl,pp,r_cut,v.getPosVector(),v_phases,v.size_local());
57 template<
unsigned int nbit,
typename Vector,
typename T>
65 if (phases.
size() == 0)
68 box_cl = phases.get(0).getDecomposition().getProcessorBounds();
69 phases.get(0).getCellListParams(r_cut,div,box_cl);
71 NN.Initialize(box_cl,div);
74 for (
size_t i = 0; i < phases.
size() ; i++)
77 auto it = phases.get(i).getDomainAndGhostIterator();
85 NN.
add(xp, key.getKey(), i);
97 template<
typename Vector,
typename CL,
typename T>
99 createVerletSym(
Vector & v,
Vector & v1, CL & cl, T r_cut)
104 auto it = v.getDomainIterator();
106 verletList.
Initialize(cl,r_cut,it,v1.getPosVector(),v.size_local());
111 template<
unsigned int sh_
byte,
typename Vector,
typename Vector1 ,
typename CL,
typename T>
113 createVerletSymM(
size_t pp,
Vector & v, Vector1 & phases, CL & cl, T r_cut)
119 for (
size_t i = 0 ; i < phases.size() ; i++)
122 verletList.
Initialize(cl,pp,r_cut,v.getPosVector(),v_phases,v.size_local(),VL_SYMMETRIC);
127 template<
unsigned int nbit,
typename Vector,
typename T>
134 if (phases.
size() == 0)
138 CellDecomposer_sm<Vector::dims,typename Vector::stype,shift<Vector::dims,typename Vector::stype>> cd_sm;
141 cl_param_calculateSym(phases.get(0).getDecomposition().getDomain(),cd_sm,phases.get(0).getDecomposition().getGhost(),r_cut,pad);
148 NN.Initialize(cd_sm,pbox,pad);
151 for (
size_t i = 0; i < phases.
size() ; i++)
154 auto it = phases.get(i).getDomainAndGhostIterator();
162 NN.
add(xp, key.getKey(), i);
This class represent an N-dimensional box.
Class for Multi-Phase cell-list.
void add(const T(&pos)[dim], size_t ele, size_t v_id)
Add an element in the cell list.
This class implement the point shape in an N-dimensional space.
Sparse Matrix implementation stub object when OpenFPM is compiled with no linear algebra support.
Class for Verlet list implementation with Multiphase.
void Initialize(CellListImpl &cli, size_t pp, T r_cut, const vector_pos_type &pos, const openfpm::vector< struct pos_v< vector_pos_type >> &pos2, size_t ghostMarker, size_t opt=VL_NON_SYMMETRIC)
Class for Verlet list implementation.
void fillNonSymmAdaptiveIterator(domainIterator_type &it, const vPos_type2 &domainPos, const vPos_type &supportPos, openfpm::vector< T > &rCuts, size_t ghostMarker)
Fill non-symmetric adaptive r-cut Verlet list from a list of cut-off radii.
void Initialize(const Box< dim, T > &box, T r_cut, vPos_type &pos, size_t ghostMarker)
Structure that contain a reference to a vector of particles.