ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <CollisionDetection.hpp>
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< CollisionPair > | 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. | |
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< System > | m_system |
Definition at line 39 of file core/collision_detection/CollisionDetection.hpp.
|
default |
|
inline |
Definition at line 68 of file core/collision_detection/CollisionDetection.hpp.
|
inline |
Definition at line 57 of file core/collision_detection/CollisionDetection.hpp.
References INACTIVE_CUTOFF.
|
inline |
Detect (and queue) a collision between the given particles.
Definition at line 71 of file core/collision_detection/CollisionDetection.hpp.
References Particle::id().
|
inline |
Get currently active collision protocol.
Definition at line 45 of file core/collision_detection/CollisionDetection.hpp.
void CollisionDetection::CollisionDetection::handle_collisions | ( | ) |
Handle queued collisions.
Definition at line 34 of file CollisionDetection.cpp.
void CollisionDetection::CollisionDetection::initialize | ( | ) |
Validate parameters and create particle types if needed.
Definition at line 46 of file CollisionDetection.cpp.
|
inline |
Definition at line 53 of file core/collision_detection/CollisionDetection.hpp.
void CollisionDetection::CollisionDetection::set_protocol | ( | std::shared_ptr< ActiveProtocol > | protocol | ) |
Set a new collision protocol.
Definition at line 55 of file CollisionDetection.cpp.
void CollisionDetection::CollisionDetection::unset_protocol | ( | ) |
Delete the currently active collision protocol.
Definition at line 61 of file CollisionDetection.cpp.
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.