![]() |
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 () |
| 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.
References local_collision_queue.
Referenced by handle_collisions().
|
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(), and local_collision_queue.
|
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 35 of file CollisionDetection.cpp.
References clear_queue(), System::Leaf< CollisionDetection >::get_system(), and local_collision_queue.
| void CollisionDetection::CollisionDetection::initialize | ( | ) |
Validate parameters and create particle types if needed.
Definition at line 47 of file CollisionDetection.cpp.
References System::Leaf< CollisionDetection >::get_system().
Referenced by set_protocol().
|
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 57 of file CollisionDetection.cpp.
References initialize().
| void CollisionDetection::CollisionDetection::unset_protocol | ( | ) |
Delete the currently active collision protocol.
Definition at line 63 of file CollisionDetection.cpp.
References System::Leaf< CollisionDetection >::get_system().
| 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.
Referenced by clear_queue(), detect_collision(), and handle_collisions().