Detailed Description

Kernel which performes collision detection on a pair of two particles and inserts the contact (if existent) into the contact storage passed in the constructor.

Call this kernel on each particle pair to perform contact detection and insert each contact in the contact storage.

#include <DetectAndStoreContacts.h>

Public Member Functions

 DetectAndStoreContacts (data::ContactStorage &cs)
 
template<typename Accessor >
void operator() (size_t idx1, size_t idx2, Accessor &ac, const domain::IDomain &domain, collision_detection::AnalyticContactDetection acd=collision_detection::AnalyticContactDetection())
 Compute if particle 1 and particle 2 collide. More...
 

Private Attributes

data::ContactStoragecs_
 

Constructor & Destructor Documentation

walberla::mesa_pd::kernel::DetectAndStoreContacts::DetectAndStoreContacts ( data::ContactStorage cs)
inlineexplicit

Member Function Documentation

template<typename Accessor >
void walberla::mesa_pd::kernel::DetectAndStoreContacts::operator() ( size_t  idx1,
size_t  idx2,
Accessor &  ac,
const domain::IDomain domain,
collision_detection::AnalyticContactDetection  acd = collision_detection::AnalyticContactDetection() 
)
inline

Compute if particle 1 and particle 2 collide.

If so, insert the contact into the contact storage.

Parameters
idx1The index of particle 1
idx2The index of particle 2
acThe accessor used to access the values of the particles.
domainThe domain of the block (used to decide if the contact has to be treated by this process)
acdThe collision detection to be used. Default parameter: AnalyticContactDetection()

Member Data Documentation

data::ContactStorage& walberla::mesa_pd::kernel::DetectAndStoreContacts::cs_
private

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