OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > Class Template Reference

Class for Verlet list implementation. More...

Detailed Description

template<unsigned int dim, typename T, typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
class VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >

Class for Verlet list implementation.

  • M = number of particles
  • N_nn_max = maximum number of neighborhood
  • ele = element the structure is storing
Template Parameters
dimDimensionality of the space
Ttype of the space float, double ...
baseBase structure that store the information

Declaration of a Verlet list [VerS == VerletList<3,double,FAST>]

VerS vl2;
vl2.Initialize(box,box,r_cut,pos,pos.size());

Declaration of a Verlet list from external Cell-list [VerS == CellList<3,double,FAST>]

// Initialize an external cell-list
Box<dim,T> bt = box;
// Calculate the divisions for the Cell-lists
cl_param_calculate(bt,div,r_cut,Ghost<dim,T>(0.0));
// Initialize a cell-list
cli.Initialize(bt,div,5);
for (size_t i = 0; i < pos.size() ; i++)
cli.add(pos.get(i), i);
This class represent an N-dimensional box.
Definition Box.hpp:61
Class for FAST cell list implementation.
Definition CellList.hpp:357
CellListImpl cli
Interlal cell-list.
VerS vl1;
vl1.Initialize(cli,r_cut,pos,pos,pos.size());

Usage of Verlet-list

bool ret = true;
auto NN = vl1.getNNIterator(i);
while (NN.isNext())
{
auto k = NN.get();
T dist = p.distance(Point<dim,T>(pos.get(k)));
ret &= (dist < r_cut);
v1.add(k);
++NN;
}
This class implement the point shape in an N-dimensional space.
Definition Point.hpp:28

Definition at line 296 of file VerletListFast.hpp.

#include <VerletListFast.hpp>

+ Inheritance diagram for VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >:

Public Types

typedef Mem_type Mem_type_type
 type for the local index
 
typedef size_t value_type
 Object type that the structure store.
 
typedef CellListImpl CellListImpl_
 CellList implementation used for Verlet list construction.
 
- Public Types inherited from Mem_fast< Memory, local_index >
typedef Mem_fast_ker< Memory, memory_traits_lin, local_index > toKernel_type
 
typedef local_index local_index_type
 
typedef local_index loc_index
 expose the type of the local index
 

Public Member Functions

size_t size ()
 Return for how many particles has been constructed this verlet list.
 
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)
 
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.
 
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.
 
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 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
 
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
 
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)
 
 VerletList ()
 Default Constructor.
 
 VerletList (const VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &cell)
 Copy constructor.
 
 VerletList (VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &&cell)
 Copy constructor.
 
 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.
 
 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.
 
 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.
 
 ~VerletList ()
 Destructor.
 
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.
 
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.
 
size_t getNNPart (size_t part_id) const
 Return the number of neighborhood particles for the particle id.
 
size_t get (size_t i, size_t j) const
 Get the neighborhood element j for the particle i.
 
void swap (VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &vl)
 Swap the memory.
 
template<unsigned int impl = NO_CHECK>
VerletNNIterator< dim, VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > > getNNIterator (size_t part_id)
 Get the Neighborhood iterator.
 
void clear ()
 Clear the cell list.
 
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.
 
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.
 
const Mem_type::local_index_type & get_lin (const typename Mem_type::local_index_type *part_id)
 Return the neighborhood id.
 
CellListImpl & getInternalCellList ()
 Get the internal cell-list used to construct the Verlet-list.
 
void set_ndec (size_t n_dec)
 Set the n_dec number.
 
size_t get_ndec ()
 Set the n_dec number.
 
openfpm::vector< typename Mem_type::local_index_type > & getParticleSeq ()
 Return the domain particle sequence.
 
- Public Member Functions inherited from Mem_fast< Memory, local_index >
size_t size () const
 return the number of elements
 
void destroy ()
 Destroy the internal memory including the retained one.
 
void init_to_zero (local_index slot, local_index tot_n_cell)
 Initialize the data to zero.
 
void operator= (const Mem_fast< Memory, local_index > &mem)
 copy an object Mem_fast
 
void operator= (Mem_fast< Memory, local_index > &&mem)
 copy an object Mem_fast
 
template<typename Memory2 >
void copy_general (const Mem_fast< Memory2, local_index > &mem)
 copy an object Mem_fast
 
void addCell (local_index cell_id, local_index ele)
 Add an element to the cell.
 
void add (local_index cell_id, local_index ele)
 Add an element to the cell.
 
auto get (local_index cell, local_index ele) -> decltype(cl_base.template get< 0 >(cell *slot+ele)) &
 Get an element in the cell.
 
auto get (local_index cell, local_index ele) const -> decltype(cl_base.template get< 0 >(cell *slot+ele)) &
 Get an element in the cell.
 
void remove (local_index cell, local_index ele)
 Remove an element in the cell.
 
size_t getNelements (const local_index cell_id) const
 Get the number of elements in the cell.
 
void swap (Mem_fast< Memory, local_index > &mem)
 swap to Mem_fast object
 
void swap (Mem_fast< Memory, local_index > &&mem)
 swap to Mem_fast object
 
void clear ()
 Delete all the elements in the Cell-list.
 
const local_index & getStartId (local_index cell_id) const
 Get the first element of a cell (as reference)
 
const local_index & getStopId (local_index cell_id) const
 Get the last element of a cell (as reference)
 
const local_index & get_lin (const local_index *part_id) const
 Just return the value pointed by part_id.
 
 Mem_fast (local_index slot)
 Constructor.
 
void set_slot (local_index slot)
 Set the number of slot for each cell.
 
const openfpm::vector< aggregate< local_index >, Memory > & private_get_cl_n () const
 Return the private data-structure cl_n.
 
const int & private_get_slot () const
 Return the private slot.
 
const baseprivate_get_cl_base () const
 Return the private data-structure cl_base.
 

Protected Attributes

Mem_type::local_index_type slot
 Number of slot for each particle. Or maximum number of particles for each particle.
 
openfpm::vector< typename Mem_type::local_index_type > dp
 Domain particles.
 

Private Member Functions

void initCl (CellListImpl &cli, vector_pos_type &pos, size_t g_m, size_t opt)
 Fill the cell-list with data.
 
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.
 
template<typename NN_type , int type>
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.
 
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.
 

Private Attributes

size_t n_dec
 decomposition counter
 
CellListImpl cli
 Interlal cell-list.
 

Member Typedef Documentation

◆ CellListImpl_

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
typedef CellListImpl VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::CellListImpl_

CellList implementation used for Verlet list construction.

Definition at line 463 of file VerletListFast.hpp.

◆ Mem_type_type

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
typedef Mem_type VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::Mem_type_type

type for the local index

Definition at line 457 of file VerletListFast.hpp.

◆ value_type

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
typedef size_t VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::value_type

Object type that the structure store.

Definition at line 460 of file VerletListFast.hpp.

Constructor & Destructor Documentation

◆ VerletList() [1/6]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::VerletList ( )
inline

Default Constructor.

Definition at line 681 of file VerletListFast.hpp.

◆ VerletList() [2/6]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::VerletList ( const VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &  cell)
inline

Copy constructor.

Definition at line 686 of file VerletListFast.hpp.

◆ VerletList() [3/6]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::VerletList ( VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &&  cell)
inline

Copy constructor.

Definition at line 693 of file VerletListFast.hpp.

◆ VerletList() [4/6]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::VerletList ( Box< dim, T > &  box,
r_cut,
Matrix< dim, T >  mat,
const size_t  pad = 1,
size_t  slot = STARTING_NSLOT 
)
inline

Verlet-list constructor.

Parameters
boxDomain where this verlet-list is living
r_cutcutoff radius
matMatrix transformation
padpadding for the internal Cell-list padding
slotmaximum number of slots or maximum number of neighborhood per particle

Definition at line 709 of file VerletListFast.hpp.

◆ VerletList() [5/6]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::VerletList ( Box< dim, T > &  box,
r_cut,
openfpm::vector< Point< dim, T > > &  pos,
size_t  g_m,
size_t  slot = VERLET_STARTING_NSLOT 
)
inline

Verlet-list constructor.

Parameters
boxDomain where this cell list is living
r_cutcut-off radius
posvector position of particles
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles
slotmaximum number of slots (or maximum number each particle can have)
Note
the maximum number of particle per slot if just an indication for performance

Definition at line 729 of file VerletListFast.hpp.

◆ VerletList() [6/6]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::VerletList ( SpaceBox< dim, T > &  box,
Box< dim, T > &  dom,
r_cut,
openfpm::vector< Point< dim, T > > &  pos,
size_t  g_m,
size_t  slot = VERLET_STARTING_NSLOT 
)
inline

Cell list constructor.

Parameters
boxDomain where this cell list is living
domSimulation domain
r_cutcut-off radius
posvector position of particles
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles
slotmaximum number of slots (or maximum number each particle can have)
Note
the maximum number of particle per slot if just an indication for performance

Definition at line 750 of file VerletListFast.hpp.

◆ ~VerletList()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::~VerletList ( )
inline

Destructor.

Definition at line 760 of file VerletListFast.hpp.

Member Function Documentation

◆ addPart()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::addPart ( size_t  part_id,
size_t  ele 
)
inline

Add a neighborhood particle to a particle.

Parameters
part_idpart id where to add
eleelement to add

Definition at line 481 of file VerletListFast.hpp.

◆ clear()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::clear ( )
inline

Clear the cell list.

Definition at line 872 of file VerletListFast.hpp.

◆ create()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::create ( const vector_pos_type &  pos,
const vector_pos_type &  pos2,
const openfpm::vector< size_t > &  dom,
const openfpm::vector< subsub_lin< dim > > &  anom,
r_cut,
size_t  g_m,
CellListImpl &  cl,
size_t  opt 
)
inlineprivate

Create the Verlet list from a given cell-list.

Parameters
posvector of positions
pos2vector of positions of neighborhood particles
r_cutcut-off radius to get the neighborhood particles
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles
clCell-list elements to use to construct the verlet list
optoptions to create the verlet list like VL_SYMMETRIC or VL_NON_SYMMETRIC

Definition at line 344 of file VerletListFast.hpp.

◆ create_()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
template<typename NN_type , int type>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::create_ ( const vector_pos_type &  pos,
const vector_pos_type &  pos2,
const openfpm::vector< size_t > &  dom,
const openfpm::vector< subsub_lin< dim > > &  anom,
r_cut,
size_t  g_m,
CellListImpl &  cli,
size_t  opt 
)
inlineprivate

Create the Verlet list from a given cell-list.

Parameters
posvector of positions
pos2vector of position for the neighborhood
r_cutcut-off radius to get the neighborhood particles
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles
cliCell-list elements to use to construct the verlet list
domlist of domain cells with normal neighborhood
anomlist of domain cells with non-normal neighborhood
optoptions

Definition at line 374 of file VerletListFast.hpp.

◆ createR()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::createR ( openfpm::vector< Point< dim, T > > &  pos,
r_cut,
size_t  g_m,
CellListImpl &  cl 
)
inlineprivate

Create the Verlet list from a given cell-list with a particular cut-off radius.

Parameters
posvector of positions of particles
r_cutcut-off radius to get the neighborhood particles
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles
clCell-list elements to use to construct the verlet list

Definition at line 424 of file VerletListFast.hpp.

◆ createVerletCrs()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::createVerletCrs ( 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 
)
inline

Create the Verlet-list with the crossing scheme.

Parameters
posvector with the particle positions
g_mghost marker
posvector with the particle positions
r_cutcut-off radius
dom_cdomain cells
anom_ccells with anomalos neighborhood

Definition at line 595 of file VerletListFast.hpp.

◆ get()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
size_t VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::get ( size_t  i,
size_t  j 
) const
inline

Get the neighborhood element j for the particle i.

Parameters
iparticle id
jneighborhood j
Returns
The element value

Definition at line 825 of file VerletListFast.hpp.

◆ get_lin()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
const Mem_type::local_index_type & VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::get_lin ( const typename Mem_type::local_index_type *  part_id)
inline

Return the neighborhood id.

Parameters
part_idparticle id
Returns
the neighborhood id

Definition at line 911 of file VerletListFast.hpp.

◆ get_ndec()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
size_t VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::get_ndec ( )
inline

Set the n_dec number.

Returns
n_dec

Definition at line 943 of file VerletListFast.hpp.

◆ getInternalCellList()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
CellListImpl & VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::getInternalCellList ( )
inline

Get the internal cell-list used to construct the Verlet-list.

Returns
the internal Cell-list

Definition at line 921 of file VerletListFast.hpp.

◆ getNNIterator()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
template<unsigned int impl = NO_CHECK>
VerletNNIterator< dim, VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > > VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::getNNIterator ( size_t  part_id)
inline

Get the Neighborhood iterator.

It iterate across all the neighborhood particles of a selected particle

Parameters
part_idparticle id
Returns
an interator across the neighborhood particles

Definition at line 862 of file VerletListFast.hpp.

◆ getNNPart()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
size_t VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::getNNPart ( size_t  part_id) const
inline

Return the number of neighborhood particles for the particle id.

Parameters
part_idid of the particle
Returns
number of neighborhood particles for a particular particle id

Definition at line 812 of file VerletListFast.hpp.

◆ getParticleSeq()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
openfpm::vector< typename Mem_type::local_index_type > & VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::getParticleSeq ( )
inline

Return the domain particle sequence.

Returns
the particle sequence

Definition at line 953 of file VerletListFast.hpp.

◆ getStart()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
const Mem_type::local_index_type & VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::getStart ( typename Mem_type::local_index_type  part_id)
inline

Return the starting point of the neighborhood for the particle p.

Parameters
part_idparticle id
Returns
the index

Definition at line 885 of file VerletListFast.hpp.

◆ getStop()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
const Mem_type::local_index_type & VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::getStop ( typename Mem_type::local_index_type  part_id)
inline

Return the end point of the neighborhood for the particle p.

Parameters
part_idparticle id
Returns
the stop index

Definition at line 898 of file VerletListFast.hpp.

◆ initCl()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::initCl ( CellListImpl &  cli,
vector_pos_type &  pos,
size_t  g_m,
size_t  opt 
)
inlineprivate

Fill the cell-list with data.

Parameters
cliCell-list
posvector of positions
g_mmarker
optVL_SYMMETRIC or VL_NON_SYMMETRIC

Definition at line 323 of file VerletListFast.hpp.

◆ Initialize() [1/2]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::Initialize ( CellListImpl &  cli,
r_cut,
const vector_pos_type &  pos,
const vector_pos_type &  pos2,
size_t  g_m,
size_t  opt = VL_NON_SYMMETRIC 
)
inline

Initialize the verlet list from an already filled cell-list

Parameters
cliexternal Cell-list
r_cutcutoff-radius
posvector of particle positions
pos2vector of particle position for the neighborhood
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles
optoptions for the Verlet-list creation

Definition at line 650 of file VerletListFast.hpp.

◆ Initialize() [2/2]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::Initialize ( const Box< dim, T > &  box,
const Box< dim, T > &  dom,
r_cut,
vector_pos_type &  pos,
size_t  g_m,
size_t  opt = VL_NON_SYMMETRIC 
)
inline

Initialize the verlet list

Parameters
boxDomain where this cell list is living
domProcessor domain
r_cutcut-off radius
posvector of particle positions
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles
optoption to generate Verlet list

Definition at line 498 of file VerletListFast.hpp.

◆ InitializeCrs()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::InitializeCrs ( const Box< dim, T > &  box,
const Box< dim, T > &  dom,
const Ghost< dim, T > &  g,
r_cut,
openfpm::vector< Point< dim, T > > &  pos,
size_t  g_m 
)
inline

Initialize the symmetric Verlet-list CRS scheme.

Parameters
boxSimulation domain
domProcessor domain
gghost size
r_cutcut-off radius
posvector of particle positions
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles

Definition at line 569 of file VerletListFast.hpp.

◆ InitializeSym()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::InitializeSym ( const Box< dim, T > &  box,
const Box< dim, T > &  dom,
const Ghost< dim, T > &  g,
r_cut,
openfpm::vector< Point< dim, T > > &  pos,
size_t  g_m 
)
inline

Initialize the symmetric Verlet-list.

Parameters
boxSimulation domain
domProcessor domain
gghost size
r_cutcut-off radius
posvector of particle positions
g_mIndicate form which particles to construct the verlet list. For example if we have 120 particles and g_m = 100, the Verlet list will be constructed only for the first 100 particles

Definition at line 533 of file VerletListFast.hpp.

◆ operator=() [1/2]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > & VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::operator= ( const VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &  vl)
inline

Copy a verlet list.

Parameters
vlverlet-list to copy
Returns
itself

Definition at line 791 of file VerletListFast.hpp.

◆ operator=() [2/2]

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > & VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::operator= ( VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &&  vl)
inline

Copy the verlet list.

Parameters
vlverlet list to copy
Returns
itself

Definition at line 771 of file VerletListFast.hpp.

◆ set_ndec()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::set_ndec ( size_t  n_dec)
inline

Set the n_dec number.

Parameters
n_dec

Definition at line 931 of file VerletListFast.hpp.

◆ size()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
size_t VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::size ( )
inline

Return for how many particles has been constructed this verlet list.

Returns
number of particles

Definition at line 470 of file VerletListFast.hpp.

◆ swap()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::swap ( VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl > &  vl)
inline

Swap the memory.

Parameters
vlVerlet list with witch you swap the memory

Definition at line 835 of file VerletListFast.hpp.

◆ update()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::update ( const Box< dim, T > &  dom,
r_cut,
openfpm::vector< Point< dim, T > > &  pos,
size_t &  g_m,
size_t  opt 
)
inline

update the Verlet list

Parameters
r_cutcutoff radius
domProcessor domain
posvector of particle positions
g_mghost marker
optoption to create the Verlet list

Definition at line 610 of file VerletListFast.hpp.

◆ updateCrs()

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
void VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::updateCrs ( const Box< dim, T > &  dom,
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 
)
inline

update the Verlet list

Parameters
r_cutcutoff radius
domProcessor domain
posvector of particle positions
g_mghost marker
dom_clist of cells with normal neighborhood
anom_clist of cells with anormal neighborhood

Definition at line 631 of file VerletListFast.hpp.

Field Documentation

◆ cli

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
CellListImpl VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::cli
private

Interlal cell-list.

Definition at line 312 of file VerletListFast.hpp.

◆ dp

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
openfpm::vector<typename Mem_type::local_index_type> VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::dp
protected

Domain particles.

Definition at line 304 of file VerletListFast.hpp.

◆ n_dec

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
size_t VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::n_dec
private

decomposition counter

Definition at line 309 of file VerletListFast.hpp.

◆ slot

template<unsigned int dim, typename T , typename Mem_type = Mem_fast<HeapMemory,local_index_>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>, typename CellListImpl = CellList<dim,T,Mem_fast<HeapMemory,typename Mem_type::local_index_type>,transform,vector_pos_type>>
Mem_type::local_index_type VerletList< dim, T, Mem_type, transform, vector_pos_type, CellListImpl >::slot
protected

Number of slot for each particle. Or maximum number of particles for each particle.

Definition at line 301 of file VerletListFast.hpp.


The documentation for this class was generated from the following file: