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"
14template<
typename Vector,
typename CL,
typename T>
20 ver.
Initialize(cl,r_cut,v.getPosVector(),v1.getPosVector(),v.size_local());
25template<
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>
26createVerletM(
size_t pp,
Vector & v, Vector1 & phases, CL & cl, T r_cut)
32 for (
size_t i = 0 ; i < phases.size() ; i++)
35 ver.
Initialize(cl,pp,r_cut,v.getPosVector(),v_phases,v.size_local());
40template<
unsigned int nbit,
typename Vector,
typename T>
48 if (phases.
size() == 0)
51 box_cl = phases.get(0).getDecomposition().getProcessorBounds();
52 phases.get(0).getCellListParams(r_cut,div,box_cl);
54 NN.Initialize(box_cl,div);
57 for (
size_t i = 0; i < phases.
size() ; i++)
60 auto it = phases.get(i).getDomainAndGhostIterator();
68 NN.
add(xp, key.getKey(), i);
80template<
typename Vector,
typename CL,
typename T>
82createVerletSym(
Vector & v,
Vector & v1, CL & cl, T r_cut)
86 ver.
Initialize(cl,r_cut,v.getPosVector(),v1.getPosVector(),v.size_local());
91template<
unsigned int sh_
byte,
typename Vector,
typename Vector1 ,
typename CL,
typename T>
93createVerletSymM(
size_t pp,
Vector & v, Vector1 & phases, CL & cl, T r_cut)
99 for (
size_t i = 0 ; i < phases.size() ; i++)
102 ver.
Initialize(cl,pp,r_cut,v.getPosVector(),v_phases,v.size_local(),VL_SYMMETRIC);
107template<
unsigned int nbit,
typename Vector,
typename T>
114 if (phases.
size() == 0)
118 CellDecomposer_sm<Vector::dims,typename Vector::stype,shift<Vector::dims,typename Vector::stype>> cd_sm;
121 cl_param_calculateSym(phases.get(0).getDecomposition().getDomain(),cd_sm,phases.get(0).getDecomposition().getGhost(),r_cut,pad);
128 NN.Initialize(cd_sm,pbox,pad);
131 for (
size_t i = 0; i < phases.
size() ; i++)
134 auto it = phases.get(i).getDomainAndGhostIterator();
142 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 g_m, size_t opt=VL_NON_SYMMETRIC)
Class for Verlet list implementation.
void Initialize(const Box< dim, T > &box, const Box< dim, T > &dom, T r_cut, vector_pos_type &pos, size_t g_m, size_t opt=VL_NON_SYMMETRIC)
Implementation of 1-D std::vector like structure.
Structure that contain a reference to a vector of particles.