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

Traversal for VerletClusterLists. More...

#include <VCLC01BalancedTraversal.h>

Inheritance diagram for autopas::VCLC01BalancedTraversal< Particle_T, PairwiseFunctor >:
Inheritance graph
[legend]
Collaboration diagram for autopas::VCLC01BalancedTraversal< Particle_T, PairwiseFunctor >:
Collaboration graph
[legend]

Public Member Functions

 VCLC01BalancedTraversal (PairwiseFunctor *pairwiseFunctor, size_t clusterSize, DataLayoutOption dataLayout, bool useNewton3)
 Constructor of the VCLC01BalancedTraversal.
 
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.
 
bool needsStaticClusterThreadPartition () override
 Returns whether this traversal needs the static cluster thread partiton of the cluster list.
 
- 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< Particle_T >
virtual ~VCLTraversalInterface ()=default
 virtual default destructor.
 
virtual void setClusterLists (VerletClusterLists< Particle_T > &verletClusterLists)
 Sets the cluster list for the traversal to iterate over.
 
virtual void setTowers (std::vector< internal::ClusterTower< Particle_T > > &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 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< Particle_T >
VerletClusterLists< Particle_T > * _verletClusterLists
 The cluster list to iterate over.
 
std::vector< internal::ClusterTower< Particle_T > > * _towers
 The towers of the cluster list to iterate over.
 

Detailed Description

template<class Particle_T, class PairwiseFunctor>
class autopas::VCLC01BalancedTraversal< Particle_T, PairwiseFunctor >

Traversal for VerletClusterLists.

Does not support newton 3.

It uses a static scheduling that gives each thread about the same amount of cluster pairs to handle.

Template Parameters
Particle_TParticle Type.
PairwiseFunctorThe type of the functor.

Constructor & Destructor Documentation

◆ VCLC01BalancedTraversal()

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

Constructor of the VCLC01BalancedTraversal.

Parameters
pairwiseFunctorThe functor to use for the traversal.
clusterSizeNumber of particles per cluster.
dataLayoutThe data layout to use.
useNewton3If newton 3 should be used. Only false is supported.

Member Function Documentation

◆ endTraversal()

template<class Particle_T , class PairwiseFunctor >
void autopas::VCLC01BalancedTraversal< Particle_T, PairwiseFunctor >::endTraversal ( )
inlineoverridevirtual

Finalizes the traversal.

Should be called after traverse().

Implements autopas::TraversalInterface.

◆ getTraversalType()

template<class Particle_T , class PairwiseFunctor >
TraversalOption autopas::VCLC01BalancedTraversal< Particle_T, PairwiseFunctor >::getTraversalType ( ) const
inlineoverridevirtual

Return a enum representing the name of the traversal class.

Returns
Enum representing traversal.

Implements autopas::TraversalInterface.

◆ initTraversal()

template<class Particle_T , class PairwiseFunctor >
void autopas::VCLC01BalancedTraversal< Particle_T, PairwiseFunctor >::initTraversal ( )
inlineoverridevirtual

Initializes the traversal.

Should be called before traverse().

Implements autopas::TraversalInterface.

◆ isApplicable()

template<class Particle_T , class PairwiseFunctor >
bool autopas::VCLC01BalancedTraversal< Particle_T, 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.

◆ needsStaticClusterThreadPartition()

template<class Particle_T , class PairwiseFunctor >
bool autopas::VCLC01BalancedTraversal< Particle_T, PairwiseFunctor >::needsStaticClusterThreadPartition ( )
inlineoverridevirtual

Returns whether this traversal needs the static cluster thread partiton of the cluster list.

Returns
whether this traversal needs the static cluster thread partiton of the cluster list.

Reimplemented from autopas::VCLTraversalInterface< Particle_T >.

◆ traverseParticles()

template<class Particle_T , class PairwiseFunctor >
void autopas::VCLC01BalancedTraversal< Particle_T, 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: