NetDEM v1.0
Loading...
Searching...
No Matches
netdem::SolverSphereSphere Class Reference

A class used to solve collisions between two spheres. More...

#include <solver_sphere_sphere.hpp>

Inheritance diagram for netdem::SolverSphereSphere:
netdem::CollisionSolverPP

Public Member Functions

 SolverSphereSphere ()
 Default constructor for SolverSphereSphere class.
 
 SolverSphereSphere (Particle *const p1, Particle *const p2)
 Constructor for SolverSphereSphere class.
 
CollisionSolverPPClone () const override
 Clones the current SolverSphereSphere instance.
 
void Init (Particle *const p1, Particle *const p2) override
 Initializes the SolverSphereSphere instance with the given particles.
 
bool Detect () override
 Detects if there is a collision between the two particles.
 
void ResolveInit (ContactPP *const cnt, double timestep) override
 Resolves the collision based on the initial contact information and timestep.
 
void ResolveUpdate (ContactPP *const cnt, double timestep) override
 Updates the contact information object and resolves the collision based on the updated information and timestep.
 
void ResolveInit (CollisionGeometries *const cnt_geoms, double timestep)
 Resolves the collision between the two particles based on the initial contact geometries and timestep.
 
void ResolveUpdate (CollisionGeometries *const cnt_geoms, double timestep)
 Updates the contact geometries object and resolves the collision based on the updated information and timestep.
 
- Public Member Functions inherited from netdem::CollisionSolverPP
 CollisionSolverPP ()
 
 CollisionSolverPP (Particle *const p1, Particle *const p2)
 
virtual bool Detect (ContactPP *const cnt)
 
virtual ~CollisionSolverPP ()
 

Additional Inherited Members

- Public Attributes inherited from netdem::CollisionSolverPP
Particleparticle_1 {nullptr}
 
Particleparticle_2 {nullptr}
 
- Protected Member Functions inherited from netdem::CollisionSolverPP
void InitBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep)
 
void UpdateBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep, Vec3d const &dir_n_old)
 Update the basic contact geometries associated with a collision.
 

Detailed Description

A class used to solve collisions between two spheres.

The SolverSphereSphere class is used to solve collisions between two spheres in a particle-particle collision detection system.

Constructor & Destructor Documentation

◆ SolverSphereSphere() [1/2]

netdem::SolverSphereSphere::SolverSphereSphere ( )

Default constructor for SolverSphereSphere class.

◆ SolverSphereSphere() [2/2]

netdem::SolverSphereSphere::SolverSphereSphere ( Particle *const p1,
Particle *const p2 )

Constructor for SolverSphereSphere class.

Parameters
p1A pointer to the first particle involved in the collision.
p2A pointer to the second particle involved in the collision.

Member Function Documentation

◆ Clone()

CollisionSolverPP * netdem::SolverSphereSphere::Clone ( ) const
overridevirtual

Clones the current SolverSphereSphere instance.

Returns
A pointer to the cloned SolverSphereSphere instance.

Implements netdem::CollisionSolverPP.

◆ Detect()

bool netdem::SolverSphereSphere::Detect ( )
overridevirtual

Detects if there is a collision between the two particles.

Returns
True if there is a collision, false otherwise.

Implements netdem::CollisionSolverPP.

◆ Init()

void netdem::SolverSphereSphere::Init ( Particle *const p1,
Particle *const p2 )
overridevirtual

Initializes the SolverSphereSphere instance with the given particles.

Parameters
p1A pointer to the first particle involved in the collision.
p2A pointer to the second particle involved in the collision.

Reimplemented from netdem::CollisionSolverPP.

◆ ResolveInit() [1/2]

void netdem::SolverSphereSphere::ResolveInit ( CollisionGeometries *const cnt_geoms,
double timestep )

Resolves the collision between the two particles based on the initial contact geometries and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

◆ ResolveInit() [2/2]

void netdem::SolverSphereSphere::ResolveInit ( ContactPP *const cnt,
double timestep )
overridevirtual

Resolves the collision based on the initial contact information and timestep.

Parameters
cntA pointer to the contact information object.
timestepThe timestep to use for resolving the collision.

Implements netdem::CollisionSolverPP.

◆ ResolveUpdate() [1/2]

void netdem::SolverSphereSphere::ResolveUpdate ( CollisionGeometries *const cnt_geoms,
double timestep )

Updates the contact geometries object and resolves the collision based on the updated information and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

◆ ResolveUpdate() [2/2]

void netdem::SolverSphereSphere::ResolveUpdate ( ContactPP *const cnt,
double timestep )
overridevirtual

Updates the contact information object and resolves the collision based on the updated information and timestep.

Parameters
cntA pointer to the contact information object.
timestepThe timestep to use for resolving the collision.

Implements netdem::CollisionSolverPP.


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