This traversal is capable of iterating over particles stored in the Octree data structure. More...
#include <OTC18Traversal.h>
Public Types | |
using | ParticleCell = OctreeLeafNode< Particle_T > |
A shortcut to specify the type of the actual iterated cell. | |
Public Member Functions | |
OTC18Traversal (PairwiseFunctor *pairwiseFunctor, double cutoff, double interactionLength, DataLayoutOption dataLayout, bool useNewton3) | |
Constructor for the Octree traversal. | |
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. | |
![]() | |
CellTraversal (const std::array< unsigned long, 3 > &dims) | |
Constructor of CellTraversal. | |
virtual | ~CellTraversal ()=default |
Destructor of CellTraversal. | |
virtual void | setCellsToTraverse (std::vector< OctreeLeafNode< Particle_T > > &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. | |
![]() | |
OTTraversalInterface (double interactionLength, DataLayoutOption dataLayout, bool useNewton3) | |
Create a new traversal interface, which provides functionality that is required by all octree traversals. | |
void | setCells (std::vector< OctreeNodeWrapper< ParticleType > > *cells) |
Notify the traversal about the cells that it is able to traverse. | |
![]() | |
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. | |
Static Public Member Functions | |
static void | assignIDs (std::vector< OctreeLeafNode< Particle_T > * > &leaves, int startID=0) |
Assign an integer ID to every leaf. | |
Additional Inherited Members | |
![]() | |
void | loadBuffers (utils::DataLayoutConverter< PairwiseFunctor > &dataLayoutConverter, OctreeNodeWrapper< ParticleType > *wrapper, std::vector< OctreeLeafNode< ParticleType > * > &leaves) |
Gather all leaves and load the SoA/AoS buffers. | |
void | unloadBuffers (utils::DataLayoutConverter< PairwiseFunctor > &dataLayoutConverter, std::vector< OctreeLeafNode< ParticleType > * > &leaves) |
Unload the SoA/AoS buffers and clear the gathered leaves list. | |
OctreeNodeWrapper< ParticleType > * | getOwned () |
Get the octree cell that contains the owned octree. | |
OctreeNodeWrapper< ParticleType > * | getHalo () |
Get the octree cell that contains the halo octree. | |
![]() | |
std::array< unsigned long, 3 > | _cellsPerDimension |
The dimensions of the cellblock. | |
std::vector< OctreeLeafNode< Particle_T > > * | _cells |
The cells to traverse. | |
![]() | |
std::vector< OctreeNodeWrapper< ParticleType > > * | _cells |
A list containing two cells. | |
std::vector< OctreeLeafNode< ParticleType > * > | _ownedLeaves |
A list of all leaves in the owned octree. | |
std::vector< OctreeLeafNode< ParticleType > * > | _haloLeaves |
A list of all leaves in the halo octree. | |
double | _interactionLength |
The interaction length is used for finding neighbors. | |
![]() | |
DataLayoutOption | _dataLayout |
The datalayout used by this traversal. | |
bool | _useNewton3 |
If this traversal makes use of newton3. | |
This traversal is capable of iterating over particles stored in the Octree data structure.
This traversal does not use any parallelization or speed-increasing strategies and is therefore called naive.
Particle_T | |
PairwiseFunctor |
|
inlineexplicit |
Constructor for the Octree traversal.
pairwiseFunctor | The functor that defines the interaction of two particles. |
cutoff | cutoff (this is enough for the octree traversal, please don't use the interaction length here.) |
interactionLength | The interaction length |
dataLayout | The data layout with which this traversal should be initialized. |
useNewton3 | Parameter to specify whether the traversal makes use of newton3 or not. |
|
inlinestatic |
Assign an integer ID to every leaf.
leaves | A list of leaves to assign the IDs to |
startID | The minimum ID |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Return a enum representing the name of the traversal class.
Implements autopas::TraversalInterface.
|
inlineoverridevirtual |
Initializes the traversal.
Should be called before traverse().
Implements autopas::TraversalInterface.
|
inlineoverridevirtual |
Checks if the traversal is applicable to the current state of the domain.
Implements autopas::TraversalInterface.
|
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.
sortingThreshold | Sum of the number of particles in two cells from which sorting should be enabled |
Implements autopas::CellTraversal< OctreeLeafNode< Particle_T > >.
|
inlineoverridevirtual |
Traverse the particles by pairs, triplets etc.
as determined by the Functor type.
Implements autopas::TraversalInterface.