Neighbor list to be used with VerletListsCells container. More...
#include <VLCAllCellsNeighborList.h>
Public Types | |
using | ListType = typename VerletListsCellsHelpers::AllCellsNeighborListsType< Particle_T > |
Type of the data structure used to save the neighbor lists. | |
using | SoAPairOfParticleAndList = std::pair< size_t, std::vector< size_t, autopas::AlignedAllocator< size_t > > > |
Helper type definition. | |
using | SoAListType = typename std::vector< std::vector< SoAPairOfParticleAndList > > |
Helper type definition. | |
Public Member Functions | |
ContainerOption | getContainerType () const override |
Returns the container type of this neighbor list and the container it belongs to. | |
void | buildAoSNeighborList (LinkedCells< Particle_T > &linkedCells, bool useNewton3, double cutoff, double skin, double interactionLength, const TraversalOption vlcTraversalOpt, typename VerletListsCellsHelpers::VLCBuildType buildType) override |
Builds AoS neighbor list from underlying linked cells object. | |
size_t | getNumberOfPartners (const Particle_T *particle) const override |
Gets the number of neighbors over all neighbor lists that belong to this particle. | |
VerletListsCellsHelpers::AllCellsNeighborListsType< Particle_T > & | getAoSNeighborList () |
Returns the neighbor list in AoS layout. | |
auto & | getSoANeighborList () |
Returns the neighbor list in SoA layout. | |
void | generateSoAFromAoS (LinkedCells< Particle_T > &linkedCells) override |
Generates neighbor list in SoA layout from available neighbor list in AoS layout. | |
void | setUpTraversal (TraversalInterface *traversal) override |
Assigns the current traversal to the correct traversal interface. | |
![]() | |
virtual | ~VLCNeighborListInterface ()=default |
Virtual default destructor. | |
virtual void | buildAoSNeighborList (LinkedCells< Particle_T > &linkedCells, bool useNewton3, double cutoff, double skin, double interactionLength, const TraversalOption vlcTraversalOpt, typename VerletListsCellsHelpers::VLCBuildType buildType)=0 |
Builds AoS neighbor list from underlying linked cells object. | |
virtual size_t | getNumberOfPartners (const Particle_T *particle) const =0 |
Gets the number of neighbors over all neighbor lists that belong to this particle. | |
virtual ContainerOption | getContainerType () const =0 |
Returns the container type of this neighbor list and the container it belongs to. | |
virtual void | generateSoAFromAoS (LinkedCells< Particle_T > &linkedCells)=0 |
Generates neighbor list in SoA layout from available neighbor list in AoS layout. | |
template<class TFunctor > | |
auto * | loadSoA (TFunctor *f) |
Loads cells into structure of arrays. | |
template<class TFunctor > | |
void | extractSoA (TFunctor *f) |
Extracts cells from structure of arrays. | |
virtual void | setUpTraversal (TraversalInterface *traversal)=0 |
Assigns the current traversal to the correct traversal interface. | |
void | setLinkedCellsPointer (LinkedCells< Particle_T > *linkedCells) |
Set the Linked Cells Pointer for this List. | |
Additional Inherited Members | |
virtual void | applyBuildFunctor (LinkedCells< Particle_T > &linkedCells, bool useNewton3, double cutoff, double skin, double interactionLength, const TraversalOption &vlcTraversalOpt, typename VerletListsCellsHelpers::VLCBuildType buildType)=0 |
Creates and applies a generator functor for the building of the neighbor list. | |
![]() | |
LinkedCells< Particle_T > * | _internalLinkedCells |
Internal linked cells structure. | |
SoA< typename Particle_T::SoAArraysType > | _soa |
Structure of arrays necessary for SoA data layout. | |
Neighbor list to be used with VerletListsCells container.
Classic implementation of verlet lists based on linked cells.
Particle_T | Type of particle to be used for this neighbor list. |
using autopas::VLCAllCellsNeighborList< Particle_T >::SoAListType = typename std::vector<std::vector<SoAPairOfParticleAndList> > |
Helper type definition.
Vector of cells, for each cell a vector of neighbors. For each pair of cells, a vector of mappings from particle to its neighbor list.
using autopas::VLCAllCellsNeighborList< Particle_T >::SoAPairOfParticleAndList = std::pair<size_t, std::vector<size_t, autopas::AlignedAllocator<size_t> >> |
Helper type definition.
Pair of particle and neighbor list for SoA layout.
|
inlineoverridevirtual |
Builds AoS neighbor list from underlying linked cells object.
linkedCells | Linked Cells object used to build the neighbor list. |
useNewton3 | Whether Newton 3 should be used for the neighbor list. |
cutoff | Cutoff radius. |
skin | Skin of the verlet list. |
interactionLength | Interaction length of the underlying linked cells object. |
vlcTraversalOpt | Traversal for which this neighbor list is built. |
buildType | Type of build functor to be used for the generation of the neighbor list. |
Implements autopas::VLCNeighborListInterface< Particle_T >.
|
inlineoverridevirtual |
Generates neighbor list in SoA layout from available neighbor list in AoS layout.
Copies the structure of the AoS neighbor list and replaces the particle pointers with the global indices of the particles.
linkedCells | Underlying linked cells structure. |
Implements autopas::VLCNeighborListInterface< Particle_T >.
|
inline |
Returns the neighbor list in AoS layout.
|
inlineoverridevirtual |
Returns the container type of this neighbor list and the container it belongs to.
Implements autopas::VLCNeighborListInterface< Particle_T >.
|
inlineoverridevirtual |
Gets the number of neighbors over all neighbor lists that belong to this particle.
particle |
Implements autopas::VLCNeighborListInterface< Particle_T >.
|
inline |
|
inlineoverridevirtual |
Assigns the current traversal to the correct traversal interface.
The choice of traversal interface depends on the type(s) of neighbor list allowed to use the current traversal. Currently VLCCellPairTraversalInterface handles the traversals allowed solely for VLCCellPairNeighborList, while VLCTraversalInterface handles the traversals allowed for both VLCCellPairNeighborList and VLCAllCellsNeighborList.
traversal | the current traversal |
Implements autopas::VLCNeighborListInterface< Particle_T >.