This interface exists to provide a row interface for octree to add its cells. More...
#include <OTTraversalInterface.h>
Public Member Functions | |
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. | |
Protected Member Functions | |
template<typename PairwiseFunctor > | |
void | loadBuffers (utils::DataLayoutConverter< PairwiseFunctor > &dataLayoutConverter, OctreeNodeWrapper< ParticleType > *wrapper, std::vector< OctreeLeafNode< ParticleType > * > &leaves) |
Gather all leaves and load the SoA/AoS buffers. | |
template<typename PairwiseFunctor > | |
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. | |
Protected Attributes | |
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 interface exists to provide a row interface for octree to add its cells.
|
inline |
Create a new traversal interface, which provides functionality that is required by all octree traversals.
interactionLength | The interaction length |
dataLayout | |
useNewton3 |
|
inlineprotected |
Get the octree cell that contains the halo octree.
|
inlineprotected |
Get the octree cell that contains the owned octree.
|
inlineprotected |
Gather all leaves and load the SoA/AoS buffers.
dataLayoutConverter | The converter to convert the buffers |
wrapper | The octree to load the leaves from |
leaves | The list to store the leaves in |
|
inline |
Notify the traversal about the cells that it is able to traverse.
cells | A vector of size 2 containing the owned and the halo octrees. |
|
inlineprotected |
Unload the SoA/AoS buffers and clear the gathered leaves list.
dataLayoutConverter | The converter to convert the buffers |
leaves | The list to unload the leaves from |
|
protected |
A list containing two cells.
The cell at index 0 contains the owned octree, the cell at index 1 contains the halo octree.