Interface of neighbor lists to be used with VerletListsCells container. More...
#include <VLCNeighborListInterface.h>
Public Member Functions | |
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. | |
Protected Member Functions | |
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. | |
Protected Attributes | |
LinkedCells< Particle_T > * | _internalLinkedCells |
Internal linked cells structure. | |
SoA< typename Particle_T::SoAArraysType > | _soa |
Structure of arrays necessary for SoA data layout. | |
Interface of neighbor lists to be used with VerletListsCells container.
Particle_T | Type of particle to be used for the neighbor list. |
|
protectedpure virtual |
Creates and applies a generator functor for the building of the neighbor list.
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. |
|
pure virtual |
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. |
Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.
|
inline |
Extracts cells from structure of arrays.
TFunctor |
f | Functor that handles the extraction. |
|
pure virtual |
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. |
Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.
|
pure virtual |
Returns the container type of this neighbor list and the container it belongs to.
Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.
|
pure virtual |
Gets the number of neighbors over all neighbor lists that belong to this particle.
particle |
Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.
|
inline |
Loads cells into structure of arrays.
TFunctor |
f | Functor that handles the loading. |
|
inline |
Set the Linked Cells Pointer for this List.
linkedCells |
|
pure virtual |
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 |
Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.
|
protected |
Internal linked cells structure.
Necessary for loading and extracting SoA.