Class for Verlet list implementation. More...
Class for Verlet list implementation.
dim | Dimensionality of the space |
T | type of the space float, double ... |
base | Base structure that store the information |
Definition at line 296 of file VerletListFast.hpp.
#include <VerletListFast.hpp>
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 base & | private_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. | |
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.
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.
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.
|
inline |
Default Constructor.
Definition at line 681 of file VerletListFast.hpp.
|
inline |
Copy constructor.
Definition at line 686 of file VerletListFast.hpp.
|
inline |
Copy constructor.
Definition at line 693 of file VerletListFast.hpp.
|
inline |
Verlet-list constructor.
box | Domain where this verlet-list is living |
r_cut | cutoff radius |
mat | Matrix transformation |
pad | padding for the internal Cell-list padding |
slot | maximum number of slots or maximum number of neighborhood per particle |
Definition at line 709 of file VerletListFast.hpp.
|
inline |
Verlet-list constructor.
box | Domain where this cell list is living |
r_cut | cut-off radius |
pos | vector position of particles |
g_m | Indicate 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 |
slot | maximum number of slots (or maximum number each particle can have) |
Definition at line 729 of file VerletListFast.hpp.
|
inline |
Cell list constructor.
box | Domain where this cell list is living |
dom | Simulation domain |
r_cut | cut-off radius |
pos | vector position of particles |
g_m | Indicate 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 |
slot | maximum number of slots (or maximum number each particle can have) |
Definition at line 750 of file VerletListFast.hpp.
|
inline |
Destructor.
Definition at line 760 of file VerletListFast.hpp.
|
inline |
Add a neighborhood particle to a particle.
part_id | part id where to add |
ele | element to add |
Definition at line 481 of file VerletListFast.hpp.
|
inline |
Clear the cell list.
Definition at line 872 of file VerletListFast.hpp.
|
inlineprivate |
Create the Verlet list from a given cell-list.
pos | vector of positions |
pos2 | vector of positions of neighborhood particles |
r_cut | cut-off radius to get the neighborhood particles |
g_m | Indicate 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 |
cl | Cell-list elements to use to construct the verlet list |
opt | options to create the verlet list like VL_SYMMETRIC or VL_NON_SYMMETRIC |
Definition at line 344 of file VerletListFast.hpp.
|
inlineprivate |
Create the Verlet list from a given cell-list.
pos | vector of positions |
pos2 | vector of position for the neighborhood |
r_cut | cut-off radius to get the neighborhood particles |
g_m | Indicate 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 |
cli | Cell-list elements to use to construct the verlet list |
dom | list of domain cells with normal neighborhood |
anom | list of domain cells with non-normal neighborhood |
opt | options |
Definition at line 374 of file VerletListFast.hpp.
|
inlineprivate |
Create the Verlet list from a given cell-list with a particular cut-off radius.
pos | vector of positions of particles |
r_cut | cut-off radius to get the neighborhood particles |
g_m | Indicate 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 |
cl | Cell-list elements to use to construct the verlet list |
Definition at line 424 of file VerletListFast.hpp.
|
inline |
Create the Verlet-list with the crossing scheme.
pos | vector with the particle positions |
g_m | ghost marker |
pos | vector with the particle positions |
r_cut | cut-off radius |
dom_c | domain cells |
anom_c | cells with anomalos neighborhood |
Definition at line 595 of file VerletListFast.hpp.
|
inline |
Get the neighborhood element j for the particle i.
i | particle id |
j | neighborhood j |
Definition at line 825 of file VerletListFast.hpp.
|
inline |
Return the neighborhood id.
part_id | particle id |
Definition at line 911 of file VerletListFast.hpp.
|
inline |
|
inline |
Get the internal cell-list used to construct the Verlet-list.
Definition at line 921 of file VerletListFast.hpp.
|
inline |
Get the Neighborhood iterator.
It iterate across all the neighborhood particles of a selected particle
part_id | particle id |
Definition at line 862 of file VerletListFast.hpp.
|
inline |
Return the number of neighborhood particles for the particle id.
part_id | id of the particle |
Definition at line 812 of file VerletListFast.hpp.
|
inline |
Return the domain particle sequence.
Definition at line 953 of file VerletListFast.hpp.
|
inline |
Return the starting point of the neighborhood for the particle p.
part_id | particle id |
Definition at line 885 of file VerletListFast.hpp.
|
inline |
Return the end point of the neighborhood for the particle p.
part_id | particle id |
Definition at line 898 of file VerletListFast.hpp.
|
inlineprivate |
Fill the cell-list with data.
cli | Cell-list |
pos | vector of positions |
g_m | marker |
opt | VL_SYMMETRIC or VL_NON_SYMMETRIC |
Definition at line 323 of file VerletListFast.hpp.
|
inline |
Initialize the verlet list from an already filled cell-list
cli | external Cell-list |
r_cut | cutoff-radius |
pos | vector of particle positions |
pos2 | vector of particle position for the neighborhood |
g_m | Indicate 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 |
opt | options for the Verlet-list creation |
Definition at line 650 of file VerletListFast.hpp.
|
inline |
Initialize the verlet list
box | Domain where this cell list is living |
dom | Processor domain |
r_cut | cut-off radius |
pos | vector of particle positions |
g_m | Indicate 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 |
opt | option to generate Verlet list |
Definition at line 498 of file VerletListFast.hpp.
|
inline |
Initialize the symmetric Verlet-list CRS scheme.
box | Simulation domain |
dom | Processor domain |
g | ghost size |
r_cut | cut-off radius |
pos | vector of particle positions |
g_m | Indicate 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.
|
inline |
Initialize the symmetric Verlet-list.
box | Simulation domain |
dom | Processor domain |
g | ghost size |
r_cut | cut-off radius |
pos | vector of particle positions |
g_m | Indicate 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.
|
inline |
Copy a verlet list.
vl | verlet-list to copy |
Definition at line 791 of file VerletListFast.hpp.
|
inline |
Copy the verlet list.
vl | verlet list to copy |
Definition at line 771 of file VerletListFast.hpp.
|
inline |
|
inline |
Return for how many particles has been constructed this verlet list.
Definition at line 470 of file VerletListFast.hpp.
|
inline |
Swap the memory.
vl | Verlet list with witch you swap the memory |
Definition at line 835 of file VerletListFast.hpp.
|
inline |
update the Verlet list
r_cut | cutoff radius |
dom | Processor domain |
pos | vector of particle positions |
g_m | ghost marker |
opt | option to create the Verlet list |
Definition at line 610 of file VerletListFast.hpp.
|
inline |
update the Verlet list
r_cut | cutoff radius |
dom | Processor domain |
pos | vector of particle positions |
g_m | ghost marker |
dom_c | list of cells with normal neighborhood |
anom_c | list of cells with anormal neighborhood |
Definition at line 631 of file VerletListFast.hpp.
|
private |
Interlal cell-list.
Definition at line 312 of file VerletListFast.hpp.
|
protected |
Domain particles.
Definition at line 304 of file VerletListFast.hpp.
|
private |
decomposition counter
Definition at line 309 of file VerletListFast.hpp.
|
protected |
Number of slot for each particle. Or maximum number of particles for each particle.
Definition at line 301 of file VerletListFast.hpp.