OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
VerletListFast.hpp
1/*
2 * VerletListFast.hpp
3 *
4 * Created on: Aug 16, 2016
5 * Author: i-bird
6 */
7
8#ifndef OPENFPM_DATA_SRC_NN_VERLETLIST_VERLETLISTFAST_HPP_
9#define OPENFPM_DATA_SRC_NN_VERLETLIST_VERLETLISTFAST_HPP_
10
11#include "VerletNNIterator.hpp"
12#include "NN/CellList/CellList_util.hpp"
13#include "NN/Mem_type/MemFast.hpp"
14#include "NN/Mem_type/MemBalanced.hpp"
15#include "NN/Mem_type/MemMemoryWise.hpp"
16
17#define VERLET_STARTING_NSLOT 128
18
19
20#define WITH_RADIUS 3
21
31template<unsigned int dim, typename T, typename CellListImpl, typename PartIt, int type, typename local_index>
32struct NNType
33{
45 template<typename vector_pos_type>
46 static inline auto get(const PartIt & it,
47 const vector_pos_type & v,
48 Point<dim,T> & xp,
49 size_t p,
50 CellListImpl & cl,
51 T r_cut) -> decltype(cl.template getNNIterator<NO_CHECK>(0))
52 {
53 return cl.template getNNIterator<NO_CHECK>(cl.getCell(xp));
54 }
55
62 static inline void add(local_index p, openfpm::vector<local_index> & pc)
63 {
64 }
65};
66
67
78template<unsigned int dim, typename T, typename CellListImpl, typename PartIt, typename local_index>
79struct NNType<dim,T,CellListImpl,PartIt,WITH_RADIUS,local_index>
80{
92 template<typename vector_pos_type>
93 static inline auto get(const PartIt & it,
94 const vector_pos_type & v,
95 Point<dim,T> & xp,
96 size_t p,
97 CellListImpl & cl,
98 T r_cut) -> decltype(cl.template getNNIteratorRadius<NO_CHECK>(0,0.0))
99 {
100 return cl.template getNNIteratorRadius<NO_CHECK>(cl.getCell(xp),r_cut);
101 }
102
109 static inline void add(local_index p, openfpm::vector<local_index> & pc)
110 {
111 }
112};
113
114
125template<unsigned int dim, typename T, typename CellListImpl, typename PartIt, typename local_index>
126struct NNType<dim,T,CellListImpl,PartIt,VL_SYMMETRIC,local_index>
127{
139 template<typename vector_pos_type>
140 static inline auto get(const PartIt & it,
141 const vector_pos_type & v,
142 Point<dim,T> & xp,
143 size_t p,
144 CellListImpl & cl,
145 T r_cut) -> decltype(cl.template getNNIteratorSym<NO_CHECK>(0,0,vector_pos_type()))
146 {
147 return cl.template getNNIteratorSym<NO_CHECK>(cl.getCell(xp),p,v);
148 }
149
156 static inline void add(local_index p, openfpm::vector<local_index> & pc)
157 {
158 }
159};
160
161
172template<unsigned int dim, typename T, typename CellListImpl, typename PartIt, typename local_index>
173struct NNType<dim,T,CellListImpl,PartIt,VL_CRS_SYMMETRIC,local_index>
174{
187 template<typename vector_pos_type>
188 static inline auto get(const PartIt & it,
189 const vector_pos_type & v,
190 Point<dim,T> & xp,
191 size_t p,
192 CellListImpl & cl,
193 T r_cut) -> decltype(it.getNNIteratorCSR(v))
194 {
195 return it.getNNIteratorCSR(v);
196 }
197
198
205 static inline void add(local_index p, openfpm::vector<local_index> & pc)
206 {
207 pc.add(p);
208 }
209};
210
217template<unsigned int type, unsigned int dim, typename vector, typename CellList>
219{
220public:
221
234 static inline auto get(const vector & pos, const openfpm::vector<size_t> & dom, const openfpm::vector<subsub_lin<dim>> & anom, CellList & cli, size_t g_m, size_t & end) -> decltype(pos.getIteratorTo(0))
235 {
236 end = g_m;
237 return pos.getIteratorTo(end);
238 }
239};
240
247template<unsigned int dim, typename vector, typename CellList>
248class PartItNN<VL_CRS_SYMMETRIC,dim,vector,CellList>
249{
250public:
251
264 static inline ParticleItCRS_Cells<dim,CellList,vector> get(const vector & pos, const openfpm::vector<size_t> & dom, const openfpm::vector<subsub_lin<dim>> & anom, CellList & cli, size_t g_m, size_t & end)
265 {
266 end = pos.size();
267 return ParticleItCRS_Cells<dim,CellList,vector>(cli,dom,anom,cli.getNNc_sym());
268 }
269};
270
290template<unsigned int dim,
291 typename T,
292 typename Mem_type = Mem_fast<HeapMemory,local_index_>,
293 typename transform = no_transform<dim,T>,
294 typename vector_pos_type = openfpm::vector<Point<dim,T>>,
295 typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type> >
296class VerletList: public Mem_type
297{
298protected:
299
301 typename Mem_type::local_index_type slot;
302
305
306private:
307
309 size_t n_dec;
310
312 CellListImpl cli;
313
314
323 void initCl(CellListImpl & cli, vector_pos_type & pos, size_t g_m, size_t opt)
324 {
325 gpu::ofp_context_t context(gpu::gpu_context_opt::dummy);
326 if (opt & VL_SYMMETRIC || opt & VL_CRS_SYMMETRIC)
327 {populate_cell_list(pos,cli,context,g_m,CL_SYMMETRIC,cl_construct_opt::Full);}
328 else
329 {populate_cell_list(pos,cli,context,g_m,CL_NON_SYMMETRIC,cl_construct_opt::Full);}
330 }
331
344 inline void create(const vector_pos_type & pos, const vector_pos_type & pos2, const openfpm::vector<size_t> & dom, const openfpm::vector<subsub_lin<dim>> & anom, T r_cut, size_t g_m, CellListImpl & cl, size_t opt)
345 {
346 if (opt == VL_CRS_SYMMETRIC)
347 {
348 create_<CellNNIteratorSym<dim,CellListImpl,vector_pos_type,RUNTIME,NO_CHECK>,VL_CRS_SYMMETRIC>(pos,pos2,dom,anom,r_cut,g_m,cl,opt);
349 }
350 else if (opt == VL_SYMMETRIC)
351 {
352 create_<decltype(cl.template getNNIteratorSym<NO_CHECK>(0,0,pos)),VL_SYMMETRIC>(pos,pos2,dom,anom,r_cut,g_m,cl,opt);
353 }
354 else
355 {
356 create_<decltype(cl.template getNNIterator<NO_CHECK>(0)),VL_NON_SYMMETRIC>(pos,pos2,dom,anom,r_cut,g_m,cl,opt);
357 }
358 }
359
374 template<typename NN_type, int type> inline void create_(const vector_pos_type & pos, const vector_pos_type & pos2 , const openfpm::vector<size_t> & dom, const openfpm::vector<subsub_lin<dim>> & anom, T r_cut, size_t g_m, CellListImpl & cli, size_t opt)
375 {
376 size_t end;
377
378 auto it = PartItNN<type,dim,vector_pos_type,CellListImpl>::get(pos,dom,anom,cli,g_m,end);
379
380 Mem_type::init_to_zero(slot,end);
381
382 dp.clear();
383
384 // square of the cutting radius
385 T r_cut2 = r_cut * r_cut;
386
387 // iterate the particles
388 while (it.isNext())
389 {
390 typename Mem_type::local_index_type i = it.get();
391 Point<dim,T> xp = pos.template get<0>(i);
392
393 // Get the neighborhood of the particle
394 auto NN = NNType<dim,T,CellListImpl,decltype(it),type,typename Mem_type::local_index_type>::get(it,pos,xp,i,cli,r_cut);
395 NNType<dim,T,CellListImpl,decltype(it),type,typename Mem_type::local_index_type>::add(i,dp);
396
397 while (NN.isNext())
398 {
399 auto nnp = NN.get();
400
401 Point<dim,T> xq = pos2.template get<0>(nnp);
402
403 if (xp.distance2(xq) < r_cut2)
404 addPart(i,nnp);
405
406 // Next particle
407 ++NN;
408 }
409
410 ++it;
411 }
412 }
413
424 inline void createR(openfpm::vector<Point<dim,T>> & pos, T r_cut, size_t g_m, CellListImpl & cl)
425 {
426
427 Mem_type::init_to_zero(slot,g_m);
428
429 // square of the cutting radius
430 T r_cut2 = r_cut * r_cut;
431
432 // iterate the particles
433 for (size_t i = 0 ; i < g_m ; i++)
434 {
435 Point<dim,T> p = pos.template get<0>(i);
436
437 // Get the neighborhood of the particle
438 auto NN = cl.template getNNIteratorRadius<NO_CHECK>(cl.getCell(p),r_cut);
439 while (NN.isNext())
440 {
441 auto nnp = NN.get();
442
443 Point<dim,T> q = pos.template get<0>(nnp);
444
445 if (p.distance2(q) < r_cut2)
446 addPart(i,nnp);
447
448 // Next particle
449 ++NN;
450 }
451 }
452 }
453
454public:
455
457 typedef Mem_type Mem_type_type;
458
460 typedef size_t value_type;
461
463 typedef CellListImpl CellListImpl_;
464
470 size_t size()
471 {
472 return Mem_type::size();
473 }
474
481 inline void addPart(size_t part_id, size_t ele)
482 {
483 Mem_type::addCell(part_id,ele);
484 }
485
498 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)
499 {
500 // Number of divisions
501 size_t div[dim];
502
503 Box<dim,T> bt = box;
504
505 // Calculate the divisions for the Cell-lists
506 cl_param_calculate(bt,div,r_cut,Ghost<dim,T>(0.0));
507
508 // Initialize a cell-list
509 cli.Initialize(bt,div);
510
511 initCl(cli,pos,g_m,opt);
512
513 // Unuseful empty vector
516
517 // create verlet
518 create(pos, pos,dom_c,anom_c,r_cut,g_m,cli,opt);
519 }
520
533 void InitializeSym(const Box<dim,T> & box, const Box<dim,T> & dom, const Ghost<dim,T> & g, T r_cut, openfpm::vector<Point<dim,T>> & pos, size_t g_m)
534 {
535 // Padding
536 size_t pad = 0;
537
538 // Cell decomposer
539 CellDecomposer_sm<dim,T,shift<dim,T>> cd_sm;
540
541 // Calculate the divisions for the Cell-lists
542 cl_param_calculateSym<dim,T>(box,cd_sm,g,r_cut,pad);
543
544 // Initialize a cell-list
545 cli.Initialize(cd_sm,dom,pad);
546 initCl(cli,pos,g_m,VL_SYMMETRIC);
547
548 // Unused
551
552 // create verlet
553 create(pos, pos,dom_c,anom_c,r_cut,g_m,cli,VL_SYMMETRIC);
554 }
555
556
569 void InitializeCrs(const Box<dim,T> & box, const Box<dim,T> & dom, const Ghost<dim,T> & g, T r_cut, openfpm::vector<Point<dim,T>> & pos, size_t g_m)
570 {
571 // Padding
572 size_t pad = 0;
573
574 // Cell decomposer
575 CellDecomposer_sm<dim,T,shift<dim,T>> cd_sm;
576
577 // Calculate the divisions for the Cell-lists
578 cl_param_calculateSym<dim,T>(box,cd_sm,g,r_cut,pad);
579
580 // Initialize a cell-list
581 cli.Initialize(cd_sm,dom,pad);
582 initCl(cli,pos,g_m,VL_SYMMETRIC);
583 }
584
596 {
597 // create verlet
598 create(pos, pos,dom_c,anom_c,r_cut,g_m,cli,VL_CRS_SYMMETRIC);
599 }
600
610 void update(const Box<dim,T> & dom, T r_cut, openfpm::vector<Point<dim,T>> & pos, size_t & g_m, size_t opt)
611 {
612 initCl(cli,pos,g_m,opt);
613
614 // Unused
617
618 create(pos, pos,dom_c,anom_c,r_cut,g_m,cli,opt);
619 }
620
631 void updateCrs(const Box<dim,T> & dom, T r_cut, openfpm::vector<Point<dim,T>> & pos, size_t & g_m, const openfpm::vector<size_t> & dom_c, const openfpm::vector<subsub_lin<dim>> & anom_c)
632 {
633 initCl(cli,pos,g_m,VL_CRS_SYMMETRIC);
634
635 create(pos,pos,dom_c,anom_c,r_cut,g_m,cli,VL_CRS_SYMMETRIC);
636 }
637
650 void Initialize(CellListImpl & cli,
651 T r_cut,
652 const vector_pos_type & pos,
653 const vector_pos_type & pos2,
654 size_t g_m, size_t opt = VL_NON_SYMMETRIC)
655 {
656 Point<dim,T> spacing = cli.getCellBox().getP2();
657
658 // Create with radius or not
659 bool wr = true;
660
661 for (size_t i = 0 ; i < dim ; i++)
662 wr &= r_cut <= spacing.get(i);
663
664 if (wr == true || opt == VL_SYMMETRIC)
665 {
668
669 create(pos,pos2,dom_c,anom_c,r_cut,g_m,cli,opt);
670 }
671 else
672 {
675
676 create_<decltype(cli.template getNNIteratorRadius<NO_CHECK>(0,0.0)),WITH_RADIUS>(pos,pos2,dom_c,anom_c,r_cut,g_m,cli,VL_NON_SYMMETRIC);
677 }
678 }
679
682 :Mem_type(VERLET_STARTING_NSLOT),slot(VERLET_STARTING_NSLOT),n_dec(0)
683 {};
684
687 :Mem_type(VERLET_STARTING_NSLOT),slot(VERLET_STARTING_NSLOT)
688 {
689 this->operator=(cell);
690 }
691
694 :Mem_type(VERLET_STARTING_NSLOT),slot(VERLET_STARTING_NSLOT),n_dec(0)
695 {
696 this->operator=(cell);
697 }
698
699
709 VerletList(Box<dim,T> & box, T r_cut, Matrix<dim,T> mat, const size_t pad = 1, size_t slot=STARTING_NSLOT)
710 :slot(VERLET_STARTING_NSLOT),CellDecomposer_sm<dim,T,transform>(box,div,mat,box.getP1(),pad)
711 {
712 SpaceBox<dim,T> sbox(box);
713 Initialize(sbox,r_cut,pad,slot);
714 }
715
729 VerletList(Box<dim,T> & box, T r_cut, openfpm::vector<Point<dim,T>> & pos, size_t g_m, size_t slot=VERLET_STARTING_NSLOT)
730 :slot(slot)
731 {
732 SpaceBox<dim,T> sbox(box);
733 Initialize(sbox,r_cut,pos,g_m);
734 }
735
750 VerletList(SpaceBox<dim,T> & box, Box<dim,T> & dom, T r_cut, openfpm::vector<Point<dim,T>> & pos, size_t g_m, size_t slot=VERLET_STARTING_NSLOT)
751 :slot(slot)
752 {
753 Initialize(box,r_cut,pos);
754 }
755
761 {}
762
772 {
773 slot = vl.slot;
774
775 Mem_type::operator=(vl);
776 dp.swap(vl.dp);
777
778 n_dec = vl.n_dec;
779
780 return *this;
781 }
782
792 {
793 slot = vl.slot;
794
795 Mem_type::operator=(vl);
796
797 cli = vl.cli;
798
799 dp = vl.dp;
800 n_dec = vl.n_dec;
801
802 return *this;
803 }
804
812 inline size_t getNNPart(size_t part_id) const
813 {
814 return Mem_type::getNelements(part_id);
815 }
816
825 inline size_t get(size_t i, size_t j) const
826 {
827 return Mem_type::get(i,j);
828 }
829
836 {
837 Mem_type::swap(vl);
838 dp.swap(vl.dp);
839
840 size_t vl_slot_tmp = vl.slot;
841 vl.slot = slot;
842 slot = vl_slot_tmp;
843
844 cli.swap(vl.cli);
845
846 size_t n_dec_tmp = vl.n_dec;
847 vl.n_dec = n_dec;
848 n_dec = n_dec_tmp;
849 }
850
860 template<unsigned int impl=NO_CHECK>
862 getNNIterator(size_t part_id)
863 {
865
866 return vln;
867 }
868
872 void clear()
873 {
874 Mem_type::clear();
875 }
876
884 inline const typename Mem_type::local_index_type &
885 getStart(typename Mem_type::local_index_type part_id)
886 {
887 return Mem_type::getStartId(part_id);
888 }
889
897 inline const typename Mem_type::local_index_type &
898 getStop(typename Mem_type::local_index_type part_id)
899 {
900 return Mem_type::getStopId(part_id);
901 }
902
910 inline const typename Mem_type::local_index_type &
911 get_lin(const typename Mem_type::local_index_type * part_id)
912 {
913 return Mem_type::get_lin(part_id);
914 }
915
921 CellListImpl & getInternalCellList()
922 {
923 return cli;
924 }
925
931 void set_ndec(size_t n_dec)
932 {
933 this->n_dec = n_dec;
934
935 cli.set_ndec(n_dec);
936 }
937
943 size_t get_ndec()
944 {
945 return n_dec;
946 }
947
954 {
955 return dp;
956 }
957};
958
959
960
961#endif /* OPENFPM_DATA_SRC_NN_VERLETLIST_VERLETLISTFAST_HPP_ */
This class represent an N-dimensional box.
Definition Box.hpp:61
Class for FAST cell list implementation.
Definition CellList.hpp:357
const NNc_array< dim,(unsigned int) openfpm::math::pow(3, dim)/2+1 > & getNNc_sym() const
Get the symmetric neighborhood.
This class implement an NxN (dense) matrix.
Definition Matrix.hpp:33
It is a class that work like a vector of vector.
Definition MemFast.hpp:89
void add(local_index cell_id, local_index ele)
Add an element to the cell.
Definition MemFast.hpp:239
static ParticleItCRS_Cells< dim, CellList, vector > get(const vector &pos, const openfpm::vector< size_t > &dom, const openfpm::vector< subsub_lin< dim > > &anom, CellList &cli, size_t g_m, size_t &end)
It return the particle iterator.
In general different NN scheme like full symmetric or CRS require different iterators over particles ...
static auto get(const vector &pos, const openfpm::vector< size_t > &dom, const openfpm::vector< subsub_lin< dim > > &anom, CellList &cli, size_t g_m, size_t &end) -> decltype(pos.getIteratorTo(0))
It return the particle iterator.
This iterator iterate across the particles of a Cell-list following the Cell structure.
This class implement the point shape in an N-dimensional space.
Definition Point.hpp:28
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
Definition Point.hpp:172
T distance2(const Point< dim, T > &q) const
It calculate the square distance between 2 points.
Definition Point.hpp:269
This class represent an N-dimensional box.
Definition SpaceBox.hpp:27
Class for Verlet list implementation.
const Mem_type::local_index_type & getStart(typename Mem_type::local_index_type part_id)
Return the starting point of the neighborhood for the particle p.
VerletList(SpaceBox< dim, T > &box, Box< dim, T > &dom, T r_cut, openfpm::vector< Point< dim, T > > &pos, size_t g_m, size_t slot=VERLET_STARTING_NSLOT)
Cell list constructor.
void createVerletCrs(T r_cut, size_t g_m, openfpm::vector< Point< dim, T > > &pos, openfpm::vector< size_t > &dom_c, openfpm::vector< subsub_lin< dim > > &anom_c)
Create the Verlet-list with the crossing scheme.
void updateCrs(const Box< dim, T > &dom, T r_cut, openfpm::vector< Point< dim, T > > &pos, size_t &g_m, const openfpm::vector< size_t > &dom_c, const openfpm::vector< subsub_lin< dim > > &anom_c)
update the Verlet list
size_t get_ndec()
Set the n_dec number.
void set_ndec(size_t n_dec)
Set the n_dec number.
VerletList()
Default Constructor.
void update(const Box< dim, T > &dom, T r_cut, openfpm::vector< Point< dim, T > > &pos, size_t &g_m, size_t opt)
update the Verlet list
const Mem_type::local_index_type & get_lin(const typename Mem_type::local_index_type *part_id)
Return the neighborhood id.
size_t get(size_t i, size_t j) const
Get the neighborhood element j for the particle i.
void create(const vector_pos_type &pos, const vector_pos_type &pos2, const openfpm::vector< size_t > &dom, const openfpm::vector< subsub_lin< dim > > &anom, T r_cut, size_t g_m, CellListImpl &cl, size_t opt)
Create the Verlet list from a given cell-list.
void clear()
Clear the cell list.
const Mem_type::local_index_type & getStop(typename Mem_type::local_index_type part_id)
Return the end point of the neighborhood for the particle p.
openfpm::vector< typename Mem_type::local_index_type > dp
Domain particles.
void Initialize(CellListImpl &cli, T r_cut, const vector_pos_type &pos, const vector_pos_type &pos2, size_t g_m, size_t opt=VL_NON_SYMMETRIC)
size_t size()
Return for how many particles has been constructed this verlet list.
VerletList(Box< dim, T > &box, T r_cut, openfpm::vector< Point< dim, T > > &pos, size_t g_m, size_t slot=VERLET_STARTING_NSLOT)
Verlet-list constructor.
void initCl(CellListImpl &cli, vector_pos_type &pos, size_t g_m, size_t opt)
Fill the cell-list with data.
Mem_type::local_index_type slot
Number of slot for each particle. Or maximum number of particles for each particle.
size_t n_dec
decomposition counter
void addPart(size_t part_id, size_t ele)
Add a neighborhood particle to a particle.
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)
VerletList(const VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &cell)
Copy constructor.
size_t getNNPart(size_t part_id) const
Return the number of neighborhood particles for the particle id.
void InitializeSym(const Box< dim, T > &box, const Box< dim, T > &dom, const Ghost< dim, T > &g, T r_cut, openfpm::vector< Point< dim, T > > &pos, size_t g_m)
Initialize the symmetric Verlet-list.
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > & operator=(VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &&vl)
Copy the verlet list.
CellListImpl & getInternalCellList()
Get the internal cell-list used to construct the Verlet-list.
VerletList(Box< dim, T > &box, T r_cut, Matrix< dim, T > mat, const size_t pad=1, size_t slot=STARTING_NSLOT)
Verlet-list constructor.
openfpm::vector< typename Mem_type::local_index_type > & getParticleSeq()
Return the domain particle sequence.
void InitializeCrs(const Box< dim, T > &box, const Box< dim, T > &dom, const Ghost< dim, T > &g, T r_cut, openfpm::vector< Point< dim, T > > &pos, size_t g_m)
Initialize the symmetric Verlet-list CRS scheme.
~VerletList()
Destructor.
void swap(VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &vl)
Swap the memory.
void create_(const vector_pos_type &pos, const vector_pos_type &pos2, const openfpm::vector< size_t > &dom, const openfpm::vector< subsub_lin< dim > > &anom, T r_cut, size_t g_m, CellListImpl &cli, size_t opt)
Create the Verlet list from a given cell-list.
CellListImpl cli
Interlal cell-list.
CellListImpl CellListImpl_
CellList implementation used for Verlet list construction.
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > & operator=(const VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &vl)
Copy a verlet list.
Mem_type Mem_type_type
type for the local index
VerletList(VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &&cell)
Copy constructor.
size_t value_type
Object type that the structure store.
VerletNNIterator< dim, VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > > getNNIterator(size_t part_id)
Get the Neighborhood iterator.
void createR(openfpm::vector< Point< dim, T > > &pos, T r_cut, size_t g_m, CellListImpl &cl)
Create the Verlet list from a given cell-list with a particular cut-off radius.
Iterator for the neighborhood of the cell structures.
No transformation.
Implementation of 1-D std::vector like structure.
static auto get(const PartIt &it, const vector_pos_type &v, Point< dim, T > &xp, size_t p, CellListImpl &cl, T r_cut) -> decltype(it.getNNIteratorCSR(v))
Get the neighborhood.
static void add(local_index p, openfpm::vector< local_index > &pc)
Add particle in the list of the domain particles.
static auto get(const PartIt &it, const vector_pos_type &v, Point< dim, T > &xp, size_t p, CellListImpl &cl, T r_cut) -> decltype(cl.template getNNIteratorSym< NO_CHECK >(0, 0, vector_pos_type()))
Get the neighborhood.
static void add(local_index p, openfpm::vector< local_index > &pc)
Add particle in the list of the domain particles.
static void add(local_index p, openfpm::vector< local_index > &pc)
Add particle in the list of the domain particles.
static auto get(const PartIt &it, const vector_pos_type &v, Point< dim, T > &xp, size_t p, CellListImpl &cl, T r_cut) -> decltype(cl.template getNNIteratorRadius< NO_CHECK >(0, 0.0))
Get the neighborhood.
Get the neighborhood iterator based on type.
static auto get(const PartIt &it, const vector_pos_type &v, Point< dim, T > &xp, size_t p, CellListImpl &cl, T r_cut) -> decltype(cl.template getNNIterator< NO_CHECK >(0))
Get the neighborhood.
static void add(local_index p, openfpm::vector< local_index > &pc)
Add particle in the list of the domain particles.
Linearized version of subsub.