NetDEM v1.0
Loading...
Searching...
No Matches
netdem::CollisionSolverPW Class Referenceabstract

An abstract class representing a collision solver for a particle and a wall. More...

#include <collision_solver_pw.hpp>

Inheritance diagram for netdem::CollisionSolverPW:
netdem::SolverANNPPlane netdem::SolverANNPW netdem::SolverBooleanPW netdem::SolverGJKPW netdem::SolverSDFPW netdem::SolverSpherePlane netdem::SolverSphereTriangle

Public Member Functions

 CollisionSolverPW ()
 
 CollisionSolverPW (Particle *const p, Wall *const w)
 
virtual CollisionSolverPWClone () const =0
 
virtual void Init (Particle *const p, Wall *const w)
 
virtual bool Detect ()=0
 
virtual bool Detect (ContactPW *const cnt)
 
virtual void ResolveInit (ContactPW *const cnt, double timestep)=0
 
virtual void ResolveUpdate (ContactPW *const cnt, double timestep)=0
 
virtual ~CollisionSolverPW ()
 

Public Attributes

Particleparticle {nullptr}
 
Wallwall {nullptr}
 

Protected Member Functions

void InitBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep)
 
void UpdateBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep, Vec3d const &dir_n_old)
 

Detailed Description

An abstract class representing a collision solver for a particle and a wall.

This class provides an interface for detecting and resolving collisions between a particle and a wall, and includes methods for initializing and updating the contact geometries associated with each collision. Subclasses are expected to implement the core collision detection and resolution logic.

Constructor & Destructor Documentation

◆ CollisionSolverPW() [1/2]

netdem::CollisionSolverPW::CollisionSolverPW ( )
inline

Constructor for an empty CollisionSolverPW.

◆ CollisionSolverPW() [2/2]

netdem::CollisionSolverPW::CollisionSolverPW ( Particle *const p,
Wall *const w )
inline

Constructor for a CollisionSolverPW with specific particle and wall.

Parameters
pThe particle involved in the collision.
wThe wall involved in the collision.

◆ ~CollisionSolverPW()

virtual netdem::CollisionSolverPW::~CollisionSolverPW ( )
inlinevirtual

Virtual destructor for CollisionSolverPW.

Member Function Documentation

◆ Clone()

virtual CollisionSolverPW * netdem::CollisionSolverPW::Clone ( ) const
pure virtual

◆ Detect() [1/2]

virtual bool netdem::CollisionSolverPW::Detect ( )
pure virtual

Detect whether a collision has occurred between the particle and the wall.

Returns
true if a collision has occurred, false otherwise.

Implemented in netdem::SolverANNPPlane, netdem::SolverANNPW, netdem::SolverBooleanPW, netdem::SolverGJKPW, netdem::SolverSDFPW, netdem::SolverSpherePlane, and netdem::SolverSphereTriangle.

◆ Detect() [2/2]

virtual bool netdem::CollisionSolverPW::Detect ( ContactPW *const cnt)
inlinevirtual

Detect the details of the collision and store them in a ContactPW.

Parameters
cntA pointer to a ContactPW object where details of the collision will be stored.
Returns
true if a collision has been detected and details have been stored in cnt, false otherwise.

◆ Init()

virtual void netdem::CollisionSolverPW::Init ( Particle *const p,
Wall *const w )
inlinevirtual

Initialize the particle and wall involved in the collision.

Parameters
pThe particle involved in the collision.
wThe wall involved in the collision.

Reimplemented in netdem::SolverANNPPlane, netdem::SolverANNPW, netdem::SolverBooleanPW, netdem::SolverGJKPW, netdem::SolverSDFPW, netdem::SolverSpherePlane, and netdem::SolverSphereTriangle.

◆ InitBasicGeoms()

void CollisionSolverPW::InitBasicGeoms ( CollisionGeometries *const cnt_geoms,
double timestep )
protected

Initialize the basic geometries associated with the collision surface.

Parameters
cnt_geomsA pointer to the CollisionGeometries object where contact geometry information will be stored.
timestepThe timestep length used in the simulation.

◆ ResolveInit()

virtual void netdem::CollisionSolverPW::ResolveInit ( ContactPW *const cnt,
double timestep )
pure virtual

Prepare for resolving the collision by initializing the ContactPW object.

Parameters
cntA pointer to a ContactPW object storing details of the collision.
timestepThe timestep length used in the simulation.

Implemented in netdem::SolverANNPPlane, netdem::SolverANNPW, netdem::SolverBooleanPW, netdem::SolverGJKPW, netdem::SolverSDFPW, netdem::SolverSpherePlane, and netdem::SolverSphereTriangle.

◆ ResolveUpdate()

virtual void netdem::CollisionSolverPW::ResolveUpdate ( ContactPW *const cnt,
double timestep )
pure virtual

Update the particle and wall involved in the collision based on the current state of the simulation.

Parameters
cntA pointer to a ContactPW object storing details of the collision.
timestepThe timestep length used in the simulation.

Implemented in netdem::SolverANNPPlane, netdem::SolverANNPW, netdem::SolverBooleanPW, netdem::SolverGJKPW, netdem::SolverSDFPW, netdem::SolverSpherePlane, and netdem::SolverSphereTriangle.

◆ UpdateBasicGeoms()

void CollisionSolverPW::UpdateBasicGeoms ( CollisionGeometries *const cnt_geoms,
double timestep,
Vec3d const & dir_n_old )
protected

Update the basic geometries associated with the collision surface.

Parameters
cnt_geomsA pointer to the CollisionGeometries object where contact geometry information will be stored.
timestepThe timestep length used in the simulation.
dir_n_oldThe old normal direction of the contact surface.

Member Data Documentation

◆ particle

Particle* netdem::CollisionSolverPW::particle {nullptr}

A pointer to the particle involved in the collision.

◆ wall

Wall* netdem::CollisionSolverPW::wall {nullptr}

A pointer to the wall involved in the collision.


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