AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
autopas::VLCCellPairNeighborList< Particle_T > Class Template Reference

Neighbor list to be used with VerletListsCells container. More...

#include <VLCCellPairNeighborList.h>

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

Public Types

using ListType = typename VerletListsCellsHelpers::PairwiseNeighborListsType< 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< 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.
 
size_t getNumberOfPartners (const Particle_T *particle) const override
 Gets the number of neighbors over all neighbor lists that belong to this particle.
 
VerletListsCellsHelpers::PairwiseNeighborListsType< Particle_T > & getAoSNeighborList ()
 Returns the neighbor list in AoS layout.
 
auto & getGlobalToLocalMap ()
 Returns a map of each cell's global index to its local index in another cell's neighbor list.
 
auto & getSoANeighborList ()
 Returns the neighbor list in SoA layout.
 
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.
 
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.
 
- Public Member Functions inherited from autopas::VLCNeighborListInterface< Particle_T >
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.
 
- Protected Attributes inherited from autopas::VLCNeighborListInterface< Particle_T >
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::VLCCellPairNeighborList< Particle_T >

Neighbor list to be used with VerletListsCells container.

Pairwise verlet lists iterates through each pair of neighboring cells and generates a neighbor list for each particle from cell1, which consists of its (potential) partners from cell2.

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

Member Typedef Documentation

◆ SoAListType

template<class Particle_T >
using autopas::VLCCellPairNeighborList< Particle_T >::SoAListType = typename std::vector<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.

◆ SoAPairOfParticleAndList

template<class Particle_T >
using autopas::VLCCellPairNeighborList< 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.

Member Function Documentation

◆ buildAoSNeighborList()

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

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.

Implements autopas::VLCNeighborListInterface< Particle_T >.

◆ generateSoAFromAoS()

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

Parameters
linkedCellsUnderlying linked cells structure.

Implements autopas::VLCNeighborListInterface< Particle_T >.

◆ getAoSNeighborList()

template<class Particle_T >
VerletListsCellsHelpers::PairwiseNeighborListsType< Particle_T > & autopas::VLCCellPairNeighborList< Particle_T >::getAoSNeighborList ( )
inline

Returns the neighbor list in AoS layout.

Returns
Neighbor list in AoS layout.

◆ getContainerType()

template<class Particle_T >
ContainerOption autopas::VLCCellPairNeighborList< Particle_T >::getContainerType ( ) const
inlineoverridevirtual

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.

Implements autopas::VLCNeighborListInterface< Particle_T >.

◆ getGlobalToLocalMap()

template<class Particle_T >
auto & autopas::VLCCellPairNeighborList< Particle_T >::getGlobalToLocalMap ( )
inline

Returns a map of each cell's global index to its local index in another cell's neighbor list.

More specifically, for each cell1: a mapping of the "absolute" index of cell2 (in the base linked cells structure) to its "relative" index in cell1's neighbors.

Returns
a map of each cell's global index to its local index in another cell's neighbor list

◆ getNumberOfPartners()

template<class Particle_T >
size_t autopas::VLCCellPairNeighborList< Particle_T >::getNumberOfPartners ( const Particle_T *  particle) const
inlineoverridevirtual

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

Implements autopas::VLCNeighborListInterface< Particle_T >.

◆ getSoANeighborList()

template<class Particle_T >
auto & autopas::VLCCellPairNeighborList< Particle_T >::getSoANeighborList ( )
inline

Returns the neighbor list in SoA layout.

Returns
Neighbor list in SoA layout.

◆ setUpTraversal()

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

Parameters
traversalthe current traversal

Implements autopas::VLCNeighborListInterface< Particle_T >.


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