A class representing a contact between two particles.
More...
#include <contact_pp.hpp>
|
| | ContactPP () |
| | Default constructor for the ContactPP class.
|
| |
| | ContactPP (Particle *const p1, Particle *const p2) |
| | Constructor for the ContactPP class that initializes the contact with two particles.
|
| |
| void | Init (Particle *const p1, Particle *const p2) |
| | Initialize the contact with two particles.
|
| |
| void | SetBondModel (ContactModel *const cnt_model) |
| | Set the bond model used to calculate bonded forces between particles.
|
| |
| void | SetCollisionModel (ContactModel *const cnt_model) |
| | Set the collision model used to calculate collision forces between particles.
|
| |
| void | SetDynamicProperty (std::string const &key, double value) |
| | Set the value of a dynamic property identified by the given key.
|
| |
| void | EvaluateForces (double dt) |
| | Calculate and apply the contact forces and moments between particles.
|
| |
| void | ApplyToParticle () |
| | Apply the contact forces and moments to the particles.
|
| |
| void | ApplyToParticle1 () |
| | Apply the contact forces and moments to the first particle in the contact pair.
|
| |
| void | ApplyToParticle2 () |
| | Apply the contact forces and moments to the second particle in the contact pair.
|
| |
| bool | IsActive () |
| | Check if the contact is still active.
|
| |
| void | Clear () |
| | Reset all properties of the contact.
|
| |
| void | Print () const |
| | Print the properties of the contact.
|
| |
A class representing a contact between two particles.
Contains information about the two particles, the contact model used to calculate contact forces, and the collision geometries used by the contact model.
- Examples
- 00_contact_test_sphere.cpp, 01_contact_test_trimesh.cpp, 03_friction_test_sphere.cpp, 04_friction_test_trimesh.cpp, 10_contact_test_sphere.cpp, 10_gen_dataset_trimesh.cpp, 11_contact_test_trimesh.cpp, 11_test_dataset_trimesh.cpp, 16_test_ann_vs_geom_trimesh.cpp, 17_test_ann_vs_geom_trimesh.cpp, 2_ev_gjk_performance.cpp, 31_test_dataset_ellipsoid.cpp, 36_test_ann_vs_geom_ellipsoid.cpp, and 37_test_ann_vs_geom_ellipsoid.cpp.
◆ ContactPP() [1/2]
◆ ContactPP() [2/2]
Constructor for the ContactPP class that initializes the contact with two particles.
- Parameters
-
| p1 | A pointer to the first particle in the contact pair. |
| p2 | A pointer to the second particle in the contact pair. |
◆ ApplyToParticle()
| void ContactPP::ApplyToParticle |
( |
| ) |
|
◆ ApplyToParticle1()
| void ContactPP::ApplyToParticle1 |
( |
| ) |
|
Apply the contact forces and moments to the first particle in the contact pair.
◆ ApplyToParticle2()
| void ContactPP::ApplyToParticle2 |
( |
| ) |
|
Apply the contact forces and moments to the second particle in the contact pair.
◆ Clear()
| void ContactPP::Clear |
( |
| ) |
|
Reset all properties of the contact.
◆ EvaluateForces()
| void ContactPP::EvaluateForces |
( |
double | dt | ) |
|
◆ Init()
Initialize the contact with two particles.
- Parameters
-
| p1 | A pointer to the first particle in the contact pair. |
| p2 | A pointer to the second particle in the contact pair. |
◆ IsActive()
| bool ContactPP::IsActive |
( |
| ) |
|
Check if the contact is still active.
- Returns
- True if the contact is active, false otherwise.
◆ Print()
| void ContactPP::Print |
( |
| ) |
const |
Print the properties of the contact.
◆ SetBondModel()
| void ContactPP::SetBondModel |
( |
ContactModel *const | cnt_model | ) |
|
Set the bond model used to calculate bonded forces between particles.
- Parameters
-
| cnt_model | The bond model to use. |
◆ SetCollisionModel()
| void ContactPP::SetCollisionModel |
( |
ContactModel *const | cnt_model | ) |
|
◆ SetDynamicProperty()
| void ContactPP::SetDynamicProperty |
( |
std::string const & | key, |
|
|
double | value ) |
Set the value of a dynamic property identified by the given key.
- Parameters
-
| key | The key identifying the dynamic property. |
| value | The new value of the dynamic property. |
◆ active
| bool netdem::ContactPP::active {true} |
A flag indicating whether the contact is active.
If true, the contact is still in effect. If false, the contact has been deactivated and should be deleted.
◆ bond_entries
A list of BondEntry objects representing the bonded pairs between particles.
◆ bond_model
The contact model used to calculate contact forces.
◆ collision_entries
◆ collision_model
◆ dynamic_properties
| MiniMap<std::string, double> netdem::ContactPP::dynamic_properties |
A MiniMap object containing dynamic properties of the contact.
◆ particle_1
| Particle* netdem::ContactPP::particle_1 {nullptr} |
A pointer to the first particle in the contact pair.
◆ particle_2
| Particle* netdem::ContactPP::particle_2 {nullptr} |
A pointer to the second particle in the contact pair.
The documentation for this class was generated from the following files:
- /Users/lzhshou/Documents/Research/myProjects/apaam/repo/netdem/src/scene/contact_pp.hpp
- /Users/lzhshou/Documents/Research/myProjects/apaam/repo/netdem/src/scene/contact_pp.cpp