AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
autopas::VLCNeighborListInterface< Particle_T > Class Template Referenceabstract

Interface of neighbor lists to be used with VerletListsCells container. More...

#include <VLCNeighborListInterface.h>

Inheritance diagram for autopas::VLCNeighborListInterface< Particle_T >:
Inheritance graph
[legend]
Collaboration diagram for autopas::VLCNeighborListInterface< Particle_T >:
Collaboration graph
[legend]

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.
 

Detailed Description

template<class Particle_T>
class autopas::VLCNeighborListInterface< Particle_T >

Interface of neighbor lists to be used with VerletListsCells container.

Template Parameters
Particle_TType of particle to be used for the neighbor list.

Member Function Documentation

◆ applyBuildFunctor()

template<class Particle_T >
virtual void autopas::VLCNeighborListInterface< Particle_T >::applyBuildFunctor ( LinkedCells< Particle_T > &  linkedCells,
bool  useNewton3,
double  cutoff,
double  skin,
double  interactionLength,
const TraversalOption &  vlcTraversalOpt,
typename VerletListsCellsHelpers::VLCBuildType  buildType 
)
protectedpure virtual

Creates and applies a generator functor for the building of the neighbor list.

Parameters
linkedCellsLinked Cells object used to build the neighbor list.
useNewton3Whether Newton 3 should be used for the neighbor list.
cutoffCutoff radius.
skinSkin of the verlet list.
interactionLengthInteraction length of the underlying linked cells object.
vlcTraversalOptTraversal for which this neighbor list is built.
buildTypeType of build functor to be used for the generation of the neighbor list.

◆ buildAoSNeighborList()

template<class Particle_T >
virtual void autopas::VLCNeighborListInterface< Particle_T >::buildAoSNeighborList ( LinkedCells< Particle_T > &  linkedCells,
bool  useNewton3,
double  cutoff,
double  skin,
double  interactionLength,
const TraversalOption  vlcTraversalOpt,
typename VerletListsCellsHelpers::VLCBuildType  buildType 
)
pure virtual

Builds AoS neighbor list from underlying linked cells object.

Parameters
linkedCellsLinked Cells object used to build the neighbor list.
useNewton3Whether Newton 3 should be used for the neighbor list.
cutoffCutoff radius.
skinSkin of the verlet list.
interactionLengthInteraction length of the underlying linked cells object.
vlcTraversalOptTraversal for which this neighbor list is built.
buildTypeType 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 >.

◆ extractSoA()

template<class Particle_T >
template<class TFunctor >
void autopas::VLCNeighborListInterface< Particle_T >::extractSoA ( TFunctor *  f)
inline

Extracts cells from structure of arrays.

Template Parameters
TFunctor
Parameters
fFunctor that handles the extraction.

◆ generateSoAFromAoS()

template<class Particle_T >
virtual void autopas::VLCNeighborListInterface< Particle_T >::generateSoAFromAoS ( LinkedCells< Particle_T > &  linkedCells)
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.

Parameters
linkedCellsUnderlying linked cells structure.

Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.

◆ getContainerType()

template<class Particle_T >
virtual ContainerOption autopas::VLCNeighborListInterface< Particle_T >::getContainerType ( ) const
pure virtual

Returns the container type of this neighbor list and the container it belongs to.

Returns
ContainerOption for this neighbor list and the container it belongs to.

Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.

◆ getNumberOfPartners()

template<class Particle_T >
virtual size_t autopas::VLCNeighborListInterface< Particle_T >::getNumberOfPartners ( const Particle_T *  particle) const
pure virtual

Gets the number of neighbors over all neighbor lists that belong to this particle.

Parameters
particle
Returns
the size of the neighbor list(s) of this particle

Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.

◆ loadSoA()

template<class Particle_T >
template<class TFunctor >
auto * autopas::VLCNeighborListInterface< Particle_T >::loadSoA ( TFunctor *  f)
inline

Loads cells into structure of arrays.

Template Parameters
TFunctor
Parameters
fFunctor that handles the loading.
Returns
loaded structure of arrays

◆ setLinkedCellsPointer()

template<class Particle_T >
void autopas::VLCNeighborListInterface< Particle_T >::setLinkedCellsPointer ( LinkedCells< Particle_T > *  linkedCells)
inline

Set the Linked Cells Pointer for this List.

Parameters
linkedCells

◆ setUpTraversal()

template<class Particle_T >
virtual void autopas::VLCNeighborListInterface< Particle_T >::setUpTraversal ( TraversalInterface traversal)
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.

Parameters
traversalthe current traversal

Implemented in autopas::VLCAllCellsNeighborList< Particle_T >, autopas::VLCCellPairNeighborList< Particle_T >, and autopas::VLCCellPairNeighborList< ParticleCell::ParticleType >.

Member Data Documentation

◆ _internalLinkedCells

template<class Particle_T >
LinkedCells<Particle_T>* autopas::VLCNeighborListInterface< Particle_T >::_internalLinkedCells
protected

Internal linked cells structure.

Necessary for loading and extracting SoA.


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