NetDEM v1.0
Loading...
Searching...
No Matches
solver_sphere_sphere.hpp
Go to the documentation of this file.
1#pragma once
2
5#include "contact_forces.hpp"
6#include "particle.hpp"
7#include "shape.hpp"
8#include "shape_sphere.hpp"
9#include "wall.hpp"
10
11namespace netdem {
12
20public:
25
32 SolverSphereSphere(Particle *const p1, Particle *const p2);
33
39 CollisionSolverPP *Clone() const override;
40
48 void Init(Particle *const p1, Particle *const p2) override;
49
55 bool Detect() override;
56
64 void ResolveInit(ContactPP *const cnt, double timestep) override;
65
73 void ResolveUpdate(ContactPP *const cnt, double timestep) override;
74
82 void ResolveInit(CollisionGeometries *const cnt_geoms, double timestep);
83
91 void ResolveUpdate(CollisionGeometries *const cnt_geoms, double timestep);
92
93private:
94 double radius_1, radius_2;
95 Vec3d dpos_12;
96};
97
98} // namespace netdem
A class representing the geometries associated with a collision.
Definition collision_geometries.hpp:15
An abstract base class for particle-particle collision solvers.
Definition collision_solver_pp.hpp:18
A class representing a contact between two particles.
Definition contact_pp.hpp:20
Definition particle.hpp:26
A class used to solve collisions between two spheres.
Definition solver_sphere_sphere.hpp:19
CollisionSolverPP * Clone() const override
Clones the current SolverSphereSphere instance.
Definition solver_sphere_sphere.cpp:15
void Init(Particle *const p1, Particle *const p2) override
Initializes the SolverSphereSphere instance with the given particles.
Definition solver_sphere_sphere.cpp:19
SolverSphereSphere()
Default constructor for SolverSphereSphere class.
Definition solver_sphere_sphere.cpp:9
void ResolveInit(ContactPP *const cnt, double timestep) override
Resolves the collision based on the initial contact information and timestep.
Definition solver_sphere_sphere.cpp:34
bool Detect() override
Detects if there is a collision between the two particles.
Definition solver_sphere_sphere.cpp:29
void ResolveUpdate(ContactPP *const cnt, double timestep) override
Updates the contact information object and resolves the collision based on the updated information an...
Definition solver_sphere_sphere.cpp:42
Definition bond_entry.hpp:7
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18