AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor > Class Template Reference

A traversal for VerletClusterLists that uses a coloring over the grids of the container. More...

#include <VCLC06Traversal.h>

Inheritance diagram for autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >:
Inheritance graph
[legend]
Collaboration diagram for autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >:
Collaboration graph
[legend]

Public Member Functions

 VCLC06Traversal (PairwiseFunctor *pairwiseFunctor, size_t clusterSize, DataLayoutOption dataLayout, bool useNewton3)
 Constructor of the VCLClusterIterationTraversal.
 
TraversalOption getTraversalType () const override
 Return a enum representing the name of the traversal class.
 
bool isApplicable () const override
 Checks if the traversal is applicable to the current state of the domain.
 
void initTraversal () override
 Initializes the traversal.
 
void endTraversal () override
 Finalizes the traversal.
 
void traverseParticles () override
 Traverse the particles by pairs, triplets etc.
 
void setSortingThreshold (size_t sortingThreshold) override
 Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks.
 
- Public Member Functions inherited from autopas::ColorBasedTraversal< ParticleCell, PairwiseFunctor >
void initTraversal () override
 load Data Layouts required for this Traversal if cells have been set through setCellsToTraverse().
 
void endTraversal () override
 write Data to AoS if cells have been set through setCellsToTraverse().
 
- Public Member Functions inherited from autopas::CellTraversal< ParticleCell >
 CellTraversal (const std::array< unsigned long, 3 > &dims)
 Constructor of CellTraversal.
 
virtual ~CellTraversal ()=default
 Destructor of CellTraversal.
 
virtual void setCellsToTraverse (std::vector< ParticleCell > &cells)
 Sets the cells to iterate over.
 
virtual void setSortingThreshold (size_t sortingThreshold)=0
 Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks.
 
- Public Member Functions inherited from autopas::TraversalInterface
virtual ~TraversalInterface ()=default
 Destructor of TraversalInterface.
 
 TraversalInterface (DataLayoutOption dataLayout, bool useNewton3)
 Constructor of the TraversalInterface.
 
virtual TraversalOption getTraversalType () const =0
 Return a enum representing the name of the traversal class.
 
virtual bool isApplicable () const =0
 Checks if the traversal is applicable to the current state of the domain.
 
virtual void initTraversal ()=0
 Initializes the traversal.
 
virtual void traverseParticles ()=0
 Traverse the particles by pairs, triplets etc.
 
virtual void endTraversal ()=0
 Finalizes the traversal.
 
bool getUseNewton3 () const
 Return whether the traversal uses newton 3.
 
DataLayoutOption getDataLayout () const
 Return the data layout option.
 
- Public Member Functions inherited from autopas::VCLTraversalInterface< ParticleCell::ParticleType >
virtual ~VCLTraversalInterface ()=default
 virtual default destructor.
 
virtual void setClusterLists (VerletClusterLists< ParticleCell::ParticleType > &verletClusterLists)
 Sets the cluster list for the traversal to iterate over.
 
virtual void setTowers (std::vector< internal::ClusterTower< ParticleCell::ParticleType > > &towers)
 Sets the towers of the cluster list for the traversal to iterate over.
 
virtual bool needsStaticClusterThreadPartition ()
 Returns whether this traversal needs the static cluster thread partiton of the cluster list.
 

Additional Inherited Members

- Protected Member Functions inherited from autopas::ColorBasedTraversal< ParticleCell, PairwiseFunctor >
 ColorBasedTraversal (const std::array< unsigned long, 3 > &dims, PairwiseFunctor *functor, const double interactionLength, const std::array< double, 3 > &cellLength, DataLayoutOption dataLayout, bool useNewton3)
 Constructor of the ColorBasedTraversal.
 
 ~ColorBasedTraversal () override=default
 Destructor of ColorBasedTraversal.
 
void colorTraversal (LoopBody &&loopBody, const std::array< unsigned long, 3 > &end, const std::array< unsigned long, 3 > &stride, const std::array< unsigned long, 3 > &offset={0ul, 0ul, 0ul})
 The main traversal of the ColorBasedTraversal.
 
virtual void notifyColorChange (unsigned long newColor)
 This method is called when the color during the traversal has changed.
 
- Protected Attributes inherited from autopas::ColorBasedTraversal< ParticleCell, PairwiseFunctor >
const double _interactionLength
 Interaction length (cutoff + skin).
 
const std::array< double, 3 > _cellLength
 cell length in CellBlock3D.
 
std::array< unsigned long, 3 > _overlap
 overlap of interacting cells.
 
- Protected Attributes inherited from autopas::CellTraversal< ParticleCell >
std::array< unsigned long, 3 > _cellsPerDimension
 The dimensions of the cellblock.
 
std::vector< ParticleCell > * _cells
 The cells to traverse.
 
- Protected Attributes inherited from autopas::TraversalInterface
DataLayoutOption _dataLayout
 The datalayout used by this traversal.
 
bool _useNewton3
 If this traversal makes use of newton3.
 
- Protected Attributes inherited from autopas::VCLTraversalInterface< ParticleCell::ParticleType >
VerletClusterLists< ParticleCell::ParticleType > * _verletClusterLists
 The cluster list to iterate over.
 
std::vector< internal::ClusterTower< ParticleCell::ParticleType > > * _towers
 The towers of the cluster list to iterate over.
 

Detailed Description

template<class ParticleCell, class PairwiseFunctor>
class autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >

A traversal for VerletClusterLists that uses a coloring over the grids of the container.

The traversal uses a 2D coloring with a stride of x=3, y=2, so 3*2=6 colors.

When disabling newton 3, interactions inside a cluster are still calculated using newton 3.

Template Parameters
ParticleCell
PairwiseFunctor

Constructor & Destructor Documentation

◆ VCLC06Traversal()

template<class ParticleCell , class PairwiseFunctor >
autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >::VCLC06Traversal ( PairwiseFunctor pairwiseFunctor,
size_t  clusterSize,
DataLayoutOption  dataLayout,
bool  useNewton3 
)
inlineexplicit

Constructor of the VCLClusterIterationTraversal.

Parameters
pairwiseFunctorThe functor to use for the traversal.
clusterSizeNumber of particles per cluster.
dataLayoutThe data layout with which this traversal should be initialized.
useNewton3Parameter to specify whether the traversal makes use of newton3 or not.

Member Function Documentation

◆ endTraversal()

template<class ParticleCell , class PairwiseFunctor >
void autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >::endTraversal ( )
inlineoverridevirtual

Finalizes the traversal.

Should be called after traverse().

Implements autopas::TraversalInterface.

◆ getTraversalType()

template<class ParticleCell , class PairwiseFunctor >
TraversalOption autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >::getTraversalType ( ) const
inlineoverridevirtual

Return a enum representing the name of the traversal class.

Returns
Enum representing traversal.

Implements autopas::TraversalInterface.

◆ initTraversal()

template<class ParticleCell , class PairwiseFunctor >
void autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >::initTraversal ( )
inlineoverridevirtual

Initializes the traversal.

Should be called before traverse().

Implements autopas::TraversalInterface.

◆ isApplicable()

template<class ParticleCell , class PairwiseFunctor >
bool autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >::isApplicable ( ) const
inlineoverridevirtual

Checks if the traversal is applicable to the current state of the domain.

Returns
true iff the traversal can be applied.

Implements autopas::TraversalInterface.

◆ setSortingThreshold()

template<class ParticleCell , class PairwiseFunctor >
void autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >::setSortingThreshold ( size_t  sortingThreshold)
inlineoverridevirtual

Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks.

Parameters
sortingThresholdSum of the number of particles in two cells from which sorting should be enabled This traversal does not use the CellFunctor, so the function has no effect here

Implements autopas::CellTraversal< ParticleCell >.

◆ traverseParticles()

template<class ParticleCell , class PairwiseFunctor >
void autopas::VCLC06Traversal< ParticleCell, PairwiseFunctor >::traverseParticles ( )
inlineoverridevirtual

Traverse the particles by pairs, triplets etc.

as determined by the Functor type.

Implements autopas::TraversalInterface.


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