AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
autopas::OTTraversalInterface< ParticleCell > Class Template Reference

This interface exists to provide a row interface for octree to add its cells. More...

#include <OTTraversalInterface.h>

Inheritance diagram for autopas::OTTraversalInterface< ParticleCell >:
Inheritance graph
[legend]
Collaboration diagram for autopas::OTTraversalInterface< ParticleCell >:
Collaboration graph
[legend]

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.
 
- 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.
 

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.
 
- Protected Attributes inherited from autopas::TraversalInterface
DataLayoutOption _dataLayout
 The datalayout used by this traversal.
 
bool _useNewton3
 If this traversal makes use of newton3.
 

Detailed Description

template<typename ParticleCell>
class autopas::OTTraversalInterface< ParticleCell >

This interface exists to provide a row interface for octree to add its cells.

Constructor & Destructor Documentation

◆ OTTraversalInterface()

template<typename ParticleCell >
autopas::OTTraversalInterface< ParticleCell >::OTTraversalInterface ( double  interactionLength,
DataLayoutOption  dataLayout,
bool  useNewton3 
)
inline

Create a new traversal interface, which provides functionality that is required by all octree traversals.

Parameters
interactionLengthThe interaction length
dataLayout
useNewton3

Member Function Documentation

◆ getHalo()

template<typename ParticleCell >
OctreeNodeWrapper< ParticleType > * autopas::OTTraversalInterface< ParticleCell >::getHalo ( )
inlineprotected

Get the octree cell that contains the halo octree.

Returns
A pointer to a wrapper containing the octree root

◆ getOwned()

template<typename ParticleCell >
OctreeNodeWrapper< ParticleType > * autopas::OTTraversalInterface< ParticleCell >::getOwned ( )
inlineprotected

Get the octree cell that contains the owned octree.

Returns
A pointer to a wrapper containing the octree root

◆ loadBuffers()

template<typename ParticleCell >
template<typename PairwiseFunctor >
void autopas::OTTraversalInterface< ParticleCell >::loadBuffers ( utils::DataLayoutConverter< PairwiseFunctor > &  dataLayoutConverter,
OctreeNodeWrapper< ParticleType > *  wrapper,
std::vector< OctreeLeafNode< ParticleType > * > &  leaves 
)
inlineprotected

Gather all leaves and load the SoA/AoS buffers.

Parameters
dataLayoutConverterThe converter to convert the buffers
wrapperThe octree to load the leaves from
leavesThe list to store the leaves in

◆ setCells()

template<typename ParticleCell >
void autopas::OTTraversalInterface< ParticleCell >::setCells ( std::vector< OctreeNodeWrapper< ParticleType > > *  cells)
inline

Notify the traversal about the cells that it is able to traverse.

Parameters
cellsA vector of size 2 containing the owned and the halo octrees.

◆ unloadBuffers()

template<typename ParticleCell >
template<typename PairwiseFunctor >
void autopas::OTTraversalInterface< ParticleCell >::unloadBuffers ( utils::DataLayoutConverter< PairwiseFunctor > &  dataLayoutConverter,
std::vector< OctreeLeafNode< ParticleType > * > &  leaves 
)
inlineprotected

Unload the SoA/AoS buffers and clear the gathered leaves list.

Parameters
dataLayoutConverterThe converter to convert the buffers
leavesThe list to unload the leaves from

Member Data Documentation

◆ _cells

template<typename ParticleCell >
std::vector<OctreeNodeWrapper<ParticleType> >* autopas::OTTraversalInterface< ParticleCell >::_cells
protected

A list containing two cells.

The cell at index 0 contains the owned octree, the cell at index 1 contains the halo octree.


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