Class for Verlet list implementation. More...
#include <VerletList.hpp>
Inheritance diagram for VerletList< dim, T, opt, Mem_type, transform, vPos_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. | |
Public Types inherited from Mem_fast< HeapMemory, local_index_ > | |
| typedef Mem_fast_ker< HeapMemory, 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 | |
| void | initCl (CellListImpl &cellList, const vPos_type &vPos, size_t ghostMarker) |
| Fill the cell-list with data. More... | |
| void | fillCRSSymmetric (const vPos_type &pos, T r_cut, size_t ghostMarker, const openfpm::vector< size_t > &dom, const openfpm::vector< subsub_lin< dim >> &anom) |
| Fill CRS Symmetric Verlet list from a given cell-list. More... | |
| void | fillSymmetric (const vPos_type &pos, T r_cut, size_t ghostMarker, CellListImpl &cellList) |
| Fill Symmetric Verlet list from a given cell-list. More... | |
| void | fillNonSymmetric (const vPos_type &pos, T r_cut, size_t ghostMarker, CellListImpl &cellList) |
| Fill Non-symmetric Verlet list from a given cell-list. More... | |
| template<typename domainIterator_type > | |
| void | fillNonSymmetricIterator (domainIterator_type &it, const vPos_type &pos, T r_cut, size_t ghostMarker, CellListImpl &cellList) |
| Fill Non-symmetric Verlet list from a given cell-list. More... | |
| template<typename domainIterator_type , typename vPos_type2 > | |
| void | fillNonSymmetricIterator (domainIterator_type &it, const vPos_type2 &domainPos, const vPos_type &supportPos, T r_cut, size_t ghostMarker, CellListImpl &cellList) |
| Fill Non-symmetric Verlet list from a given cell-list. More... | |
| void | InitializeNonSymmAdaptive (const Box< dim, T > &box, openfpm::vector< T > &rCuts, const vPos_type &pos, size_t ghostMarker) |
| Initialize non-symmetric adaptive r-cut Verlet list from a list of cut-off radii. More... | |
| template<typename domainIterator_type , typename vPos_type2 > | |
| 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. More... | |
| void | fillNonSymmetricRadius (const vPos_type &pos, T r_cut, size_t ghostMarker, CellListImpl &cellList) |
| Fill Non-symmetric Verlet list from a given cell-list (Radius) More... | |
| size_t | size () |
| Return for how many particles has been constructed this verlet list. More... | |
| void | addPart (size_t p, size_t q) |
| Add a neighborhood particle to a particle. More... | |
| void | replaceNeighbParts (size_t p, const openfpm::vector< size_t > &buffer) |
| Replace the neighborhood particles for the particle id p with the given buffer. More... | |
| void | Initialize (const Box< dim, T > &box, T r_cut, vPos_type &pos, size_t ghostMarker) |
| template<typename domainIterator_type > | |
| void | Initialize (CellListImpl &cellList, T r_cut, domainIterator_type &it, const vPos_type &pos, size_t ghostMarker) |
| template<typename domainIterator_type > | |
| void | Initialize (CellListImpl &cellList, T r_cut, domainIterator_type &it, const vPos_type &domainPos, const vPos_type &supportPos, size_t ghostMarker) |
| void | InitializeSym (const Box< dim, T > &box, const Box< dim, T > &dom, const Ghost< dim, T > &ghostSize, T r_cut, vPos_type &pos, size_t ghostMarker) |
| Initialize the symmetric Verlet-list. More... | |
| void | initializeCrs (const Box< dim, T > &box, const Box< dim, T > &dom, const Ghost< dim, T > &ghostSize, T r_cut, vPos_type &pos, size_t ghostMarker) |
| Initialize the symmetric Verlet-list CRS scheme. More... | |
| void | update (const Box< dim, T > &dom, T r_cut, vPos_type &pos, size_t &ghostMarker) |
| update the Verlet list More... | |
| void | updateCrs (vPos_type &pos, T r_cut, size_t &ghostMarker, const openfpm::vector< size_t > &dom_c, const openfpm::vector< subsub_lin< dim >> &anom_c) |
| update the Verlet list More... | |
| VerletList () | |
| Default Constructor. | |
| VerletList (const VerletList< dim, T, opt, Mem_type, transform, vPos_type, CellListImpl > &cell) | |
| Copy constructor. | |
| VerletList (VerletList< dim, T, opt, Mem_type, transform, vPos_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. More... | |
| VerletList (Box< dim, T > &box, T r_cut, vPos_type &pos, size_t ghostMarker, size_t slot=VERLET_STARTING_NSLOT) | |
| Verlet-list constructor. More... | |
| VerletList (Box< dim, T > &box, Box< dim, T > &dom, T r_cut, vPos_type &pos, size_t ghostMarker, size_t slot=VERLET_STARTING_NSLOT) | |
| Cell list constructor. More... | |
| ~VerletList () | |
| Destructor. | |
| VerletList< dim, T, opt, Mem_type, transform, vPos_type, CellListImpl > & | operator= (VerletList< dim, T, opt, Mem_type, transform, vPos_type, CellListImpl > &&vl) |
| Copy the verlet list. More... | |
| VerletList< dim, T, opt, Mem_type, transform, vPos_type, CellListImpl > & | operator= (const VerletList< dim, T, opt, Mem_type, transform, vPos_type, CellListImpl > &vl) |
| Copy a verlet list. More... | |
| size_t | getNNPart (size_t p) const |
| Return the number of neighborhood particles for the particle id. More... | |
| size_t | get (size_t p, size_t q) const |
| Get the neighborhood element q for the particle p. More... | |
| void | swap (VerletList< dim, T, opt, Mem_type, transform, vPos_type, CellListImpl > &vl) |
| Swap the memory. More... | |
| VerletNNIterator< dim, VerletList< dim, T, opt, Mem_type, transform, vPos_type, CellListImpl > > | getNNIterator (size_t p) |
| Get the Neighborhood iterator. More... | |
| void | clear () |
| Clear the cell list. | |
| const Mem_type::local_index_type & | getStart (typename Mem_type::local_index_type p) |
| Return the starting point of the neighborhood for the particle p. More... | |
| const Mem_type::local_index_type & | getStop (typename Mem_type::local_index_type p) |
| Return the end point of the neighborhood for the particle p. More... | |
| const Mem_type::local_index_type & | get_lin (const typename Mem_type::local_index_type *p) |
| Return the neighborhood id. More... | |
| CellListImpl & | getInternalCellList () |
| Get the internal cell-list used to construct the Verlet-list. More... | |
| void | set_ndec (size_t n_dec) |
| Set the n_dec number. More... | |
| size_t | get_ndec () |
| Set the n_dec number. More... | |
| size_t | getNeighborMaxNum () const |
| Returns the max number of neighbors per particle. Only with opt | VL_NMAX_NEIGHBOR. More... | |
| void | setNeighborMaxNum (size_t neighborMaxNum) |
| Sets the max number of neighbors per particle. Only with opt | VL_NMAX_NEIGHBOR. More... | |
| size_t | getOpt () const |
| Returns the option flag template parameter opt that controls the Verlet list. More... | |
| openfpm::vector< typename Mem_type::local_index_type > & | getParticleSeq () |
| Return the domain particle sequence. More... | |
| T | getRCut () |
| Return the cut-off radius of the Verlet list. More... | |
| T | getRCuts (size_t p) |
| Return the cut-off radii for individual particles. More... | |
| void | clear (typename Mem_type::local_index_type p) |
| Clear support of one particle in the verlet list. More... | |
Public Member Functions inherited from Mem_fast< HeapMemory, local_index_ > | |
| size_t | size () const |
| return the number of elements More... | |
| 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. More... | |
| void | operator= (const Mem_fast< HeapMemory, local_index_ > &mem) |
| copy an object Mem_fast More... | |
| void | operator= (Mem_fast< HeapMemory, local_index_ > &&mem) |
| copy an object Mem_fast More... | |
| void | copy_general (const Mem_fast< Memory2, local_index_ > &mem) |
| copy an object Mem_fast More... | |
| void | addCellGhostMarkers () |
| Add ghost marker to the cell. More... | |
| size_t | getGhostMarker (local_index_ cell_id) const |
| Get ghost marker of the cell. | |
| void | addCell (local_index_ cell_id, local_index_ ele) |
| Add an element to the cell. More... | |
| auto | get (local_index_ cell, local_index_ ele) -> decltype(cl_base.template get< 0 >(cell *slot+ele)) & |
| Get an element in the cell. More... | |
| auto | get (local_index_ cell, local_index_ ele) const -> decltype(cl_base.template get< 0 >(cell *slot+ele)) & |
| Get an element in the cell. More... | |
| void | remove (local_index_ cell_id, local_index_ ele) |
| Remove an element in the cell. More... | |
| size_t | getNelements (const local_index_ cell_id) const |
| Get the number of elements in the cell. More... | |
| void | swap (Mem_fast< HeapMemory, local_index_ > &mem) |
| swap to Mem_fast object More... | |
| void | swap (Mem_fast< HeapMemory, local_index_ > &&mem) |
| swap to Mem_fast object More... | |
| void | clear () |
| Delete all the elements in every cell. | |
| void | clear (local_index_ cell_id) |
| Delete cell elements in Cell p. | |
| const local_index_ & | getStartId (local_index_ cell_id) const |
| Get the first element of a cell (as reference) More... | |
| const local_index_ & | getGhostId (local_index_ cell_id) const |
| Get the index of the first ghost element. More... | |
| const local_index_ & | getStopId (local_index_ cell_id) const |
| Get the last element of a cell (as reference) More... | |
| const local_index_ & | get_lin (const local_index_ *part_id) const |
| Just return the value pointed by part_id. More... | |
| Mem_fast (local_index_ slot) | |
| Constructor. More... | |
| void | set_slot (local_index_ slot) |
| Set the number of slot for each cell. More... | |
| const openfpm::vector< aggregate< local_index_ >, HeapMemory > & | private_get_cl_n () const |
| Return the private data-structure cl_n. More... | |
| const openfpm::vector< size_t > & | getGhostMarkers () const |
| Return the private data-structure ghostMarkers. More... | |
| const int & | private_get_slot () const |
| Return the private slot. More... | |
| const base & | private_get_cl_base () const |
| Return the private data-structure cl_base. More... | |
| void | pack (ExtPreAlloc< HeapMemory > &mem, Pack_stat &sts) const |
| pack a vector selecting the properties to pack More... | |
| void | packRequest (size_t &req) const |
| It calculate the number of byte required to serialize the object. More... | |
| void | unpack (ExtPreAlloc< MemType > &mem, Unpack_stat &ps) |
| unpack a vector More... | |
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 > | domainParticlesCRS |
| Domain particles. | |
| size_t | neighborMaxNum =0 |
| Max number of Nieghbors. Only with opt |= VL_NMAX_NEIGHBOR. | |
| T | rCut |
| Cut-off radius. | |
| openfpm::vector< T > | rCuts |
| Cut-off radius vector. | |
Private Attributes | |
| size_t | n_dec |
| decomposition counter | |
| CellListImpl | cellList |
| Internal cell-list. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mem_fast< HeapMemory, local_index_ > | |
| static bool | pack () |
| static bool | packRequest () |
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 268 of file VerletList.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 911 of file VerletList.hpp.
|
inline |
Verlet-list constructor.
| box | Domain where this cell list is living |
| r_cut | cut-off radius |
| pos | vector position of particles |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 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 931 of file VerletList.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 |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 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 952 of file VerletList.hpp.
|
inline |
Add a neighborhood particle to a particle.
| p | part id where to add |
| q | element to add |
Definition at line 660 of file VerletList.hpp.
|
inline |
Clear support of one particle in the verlet list.
| p | id of particle to clear support |
Definition at line 1218 of file VerletList.hpp.
|
inline |
Fill CRS Symmetric Verlet list from a given cell-list.
| pos | vector of positions |
| r_cut | cut-off radius to get the neighborhood particles |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
| cellList | 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 |
Definition at line 331 of file VerletList.hpp.
|
inline |
Fill non-symmetric adaptive r-cut Verlet list from a list of cut-off radii.
| it | domain iterator of particle ids |
| domainPos | vector of particle positions of the domain vector |
| supportPos | vector of particle positions of the support vector |
| rCuts | list of cut-off radii for every particle in pos |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
Definition at line 568 of file VerletList.hpp.
|
inline |
Fill Non-symmetric Verlet list from a given cell-list.
| pos | vector of positions |
| r_cut | cut-off radius to get the neighborhood particles |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
| cellList | Cell-list elements to use to construct the verlet list |
Definition at line 406 of file VerletList.hpp.
|
inline |
Fill Non-symmetric Verlet list from a given cell-list.
| it | domain iterator of particle ids |
| pos | vector of particle positions |
| r_cut | cut-off radius to get the neighborhood particles |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
| cellList | Cell-list elements to use to construct the verlet list |
Definition at line 443 of file VerletList.hpp.
|
inline |
Fill Non-symmetric Verlet list from a given cell-list.
| it | domain iterator of particle ids |
| domainPos | vector of particle positions of the domain vector |
| supportPos | vector of particle positions of the support vector |
| r_cut | cut-off radius to get the neighborhood particles |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
| cellList | Cell-list elements to use to construct the verlet list |
Definition at line 466 of file VerletList.hpp.
|
inline |
Fill Non-symmetric Verlet list from a given cell-list (Radius)
| pos | vector of positions |
| r_cut | cut-off radius to get the neighborhood particles |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
| cellList | Cell-list elements to use to construct the verlet list |
Definition at line 613 of file VerletList.hpp.
|
inline |
Fill Symmetric Verlet list from a given cell-list.
| pos | vector of positions |
| r_cut | cut-off radius to get the neighborhood particles |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
| cellList | Cell-list elements to use to construct the verlet list |
Definition at line 370 of file VerletList.hpp.
|
inline |
Get the neighborhood element q for the particle p.
| p | particle id |
| q | neighborhood j |
Definition at line 1027 of file VerletList.hpp.
|
inline |
Return the neighborhood id.
| p | particle id |
Definition at line 1112 of file VerletList.hpp.
|
inline |
|
inline |
Get the internal cell-list used to construct the Verlet-list.
Definition at line 1122 of file VerletList.hpp.
|
inline |
Returns the max number of neighbors per particle. Only with opt | VL_NMAX_NEIGHBOR.
Definition at line 1155 of file VerletList.hpp.
|
inline |
Get the Neighborhood iterator.
It iterate across all the neighborhood particles of a selected particle
| p | particle id |
Definition at line 1063 of file VerletList.hpp.
|
inline |
Return the number of neighborhood particles for the particle id.
| p | id of the particle |
Definition at line 1014 of file VerletList.hpp.
|
inline |
Returns the option flag template parameter opt that controls the Verlet list.
Definition at line 1177 of file VerletList.hpp.
|
inline |
Return the domain particle sequence.
Definition at line 1187 of file VerletList.hpp.
|
inline |
Return the cut-off radius of the Verlet list.
Definition at line 1197 of file VerletList.hpp.
|
inline |
Return the cut-off radii for individual particles.
Avaiable only if filled with fillNonSymmAdaptive
Definition at line 1209 of file VerletList.hpp.
|
inline |
Return the starting point of the neighborhood for the particle p.
| p | particle id |
Definition at line 1086 of file VerletList.hpp.
|
inline |
Return the end point of the neighborhood for the particle p.
| p | particle id |
Definition at line 1099 of file VerletList.hpp.
|
inline |
Fill the cell-list with data.
| cellList | Cell-list |
| vPos | vector of positions |
| ghostMarker | marker |
| opt | VL_SYMMETRIC or VL_NON_SYMMETRIC |
Definition at line 305 of file VerletList.hpp.
|
inline |
Initialize the verlet list for Non-Symmetric case from an already filled cell-list
| cellList | external Cell-list |
| r_cut | cutoff-radius |
| it | domain iterator of particle ids |
| domainPos | vector of domain particle positions |
| supportPos | vector of support particle positions |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
Definition at line 751 of file VerletList.hpp.
|
inline |
Initialize the verlet list for Non-Symmetric case from an already filled cell-list
| cellList | external Cell-list |
| r_cut | cutoff-radius |
| it | domain iterator of particle ids |
| pos | vector of particle positions |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
Definition at line 725 of file VerletList.hpp.
|
inline |
Initialize the verlet list for Non-Symmetric case
| box | Domain where this cell list is living |
| r_cut | cut-off radius |
| pos | vector of particle positions |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
Definition at line 690 of file VerletList.hpp.
|
inline |
Initialize the symmetric Verlet-list CRS scheme.
| box | Simulation domain |
| dom | Processor domain |
| ghostSize | ghost size |
| r_cut | cut-off radius |
| pos | vector of particle positions |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
Definition at line 816 of file VerletList.hpp.
|
inline |
Initialize non-symmetric adaptive r-cut Verlet list from a list of cut-off radii.
| box | Domain where this Verlet list is to be created |
| pos | vector of positions |
| rCuts | list of cut-off radii for every particle in pos |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
Definition at line 502 of file VerletList.hpp.
|
inline |
Initialize the symmetric Verlet-list.
| box | Simulation domain |
| dom | Processor domain |
| ghostSize | ghost size |
| r_cut | cut-off radius |
| pos | vector of particle positions |
| ghostMarker | Indicate form which particles to construct the verlet list. For example if we have 120 particles and ghostMarker = 100, the Verlet list will be constructed only for the first 100 particles |
Definition at line 777 of file VerletList.hpp.
|
inline |
Copy a verlet list.
| vl | verlet-list to copy |
Definition at line 993 of file VerletList.hpp.
|
inline |
Copy the verlet list.
| vl | verlet list to copy |
Definition at line 973 of file VerletList.hpp.
|
inline |
Replace the neighborhood particles for the particle id p with the given buffer.
| p | id of the particle |
| buffer | used to update the neighborhood |
Definition at line 671 of file VerletList.hpp.
|
inline |
|
inline |
Sets the max number of neighbors per particle. Only with opt | VL_NMAX_NEIGHBOR.
Definition at line 1166 of file VerletList.hpp.
|
inline |
Return for how many particles has been constructed this verlet list.
Definition at line 649 of file VerletList.hpp.
|
inline |
Swap the memory.
| vl | Verlet list with witch you swap the memory |
Definition at line 1037 of file VerletList.hpp.
|
inline |
update the Verlet list
| r_cut | cutoff radius |
| dom | Processor domain |
| pos | vector of particle positions |
| ghostMarker | ghost marker |
Definition at line 847 of file VerletList.hpp.
|
inline |
update the Verlet list
| r_cut | cutoff radius |
| dom | Processor domain |
| pos | vector of particle positions |
| ghostMarker | ghost marker |
| dom_c | list of cells with normal neighborhood |
| anom_c | list of cells with anormal neighborhood |
Definition at line 871 of file VerletList.hpp.