ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
CollisionDetection::CollisionDetection Class Reference

#include <CollisionDetection.hpp>

+ Inheritance diagram for CollisionDetection::CollisionDetection:
+ Collaboration diagram for CollisionDetection::CollisionDetection:

Public Member Functions

 CollisionDetection ()=default
 
auto get_protocol () const
 Get currently active collision protocol.
 
void set_protocol (std::shared_ptr< ActiveProtocol > protocol)
 Set a new collision protocol.
 
void unset_protocol ()
 Delete the currently active collision protocol.
 
void initialize ()
 Validate parameters and create particle types if needed.
 
auto is_off () const
 
auto cutoff () const
 
void handle_collisions ()
 Handle queued collisions.
 
void clear_queue ()
 
void detect_collision (Particle const &p1, Particle const &p2, double const dist_sq)
 Detect (and queue) a collision between the given particles.
 
- Public Member Functions inherited from System::Leaf< CollisionDetection >
void bind_system (std::shared_ptr< System > const &system)
 
void detach_system (std::shared_ptr< System > const &system)
 

Public Attributes

std::vector< CollisionPairlocal_collision_queue
 During force calculation, colliding particles are recorded in the queue. The queue is processed after force calculation, when it is safe to add particles.
 

Additional Inherited Members

- Protected Member Functions inherited from System::Leaf< CollisionDetection >
auto & get_system ()
 
auto & get_system () const
 
- Protected Attributes inherited from System::Leaf< CollisionDetection >
std::weak_ptr< Systemm_system
 

Detailed Description

Constructor & Destructor Documentation

◆ CollisionDetection()

CollisionDetection::CollisionDetection::CollisionDetection ( )
default

Member Function Documentation

◆ clear_queue()

void CollisionDetection::CollisionDetection::clear_queue ( )
inline

◆ cutoff()

auto CollisionDetection::CollisionDetection::cutoff ( ) const
inline

Definition at line 57 of file core/collision_detection/CollisionDetection.hpp.

References INACTIVE_CUTOFF.

◆ detect_collision()

void CollisionDetection::CollisionDetection::detect_collision ( Particle const &  p1,
Particle const &  p2,
double const  dist_sq 
)
inline

Detect (and queue) a collision between the given particles.

Definition at line 71 of file core/collision_detection/CollisionDetection.hpp.

References Particle::id().

◆ get_protocol()

auto CollisionDetection::CollisionDetection::get_protocol ( ) const
inline

Get currently active collision protocol.

Definition at line 45 of file core/collision_detection/CollisionDetection.hpp.

◆ handle_collisions()

void CollisionDetection::CollisionDetection::handle_collisions ( )

Handle queued collisions.

Definition at line 34 of file CollisionDetection.cpp.

◆ initialize()

void CollisionDetection::CollisionDetection::initialize ( )

Validate parameters and create particle types if needed.

Definition at line 46 of file CollisionDetection.cpp.

◆ is_off()

auto CollisionDetection::CollisionDetection::is_off ( ) const
inline

◆ set_protocol()

void CollisionDetection::CollisionDetection::set_protocol ( std::shared_ptr< ActiveProtocol protocol)

Set a new collision protocol.

Definition at line 55 of file CollisionDetection.cpp.

◆ unset_protocol()

void CollisionDetection::CollisionDetection::unset_protocol ( )

Delete the currently active collision protocol.

Definition at line 61 of file CollisionDetection.cpp.

Member Data Documentation

◆ local_collision_queue

std::vector<CollisionPair> CollisionDetection::CollisionDetection::local_collision_queue

During force calculation, colliding particles are recorded in the queue. The queue is processed after force calculation, when it is safe to add particles.

Definition at line 88 of file core/collision_detection/CollisionDetection.hpp.


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