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

#include <particle.hpp>

Inheritance diagram for netdem::Particle:
netdem::DeformableParticle

Public Member Functions

 Particle ()
 Default constructor for the Particle class.
 
 Particle (Shape *const shape)
 Constructor for the Particle class which specifies the shape of the particle.
 
virtual ParticleClone () const
 Creates a new instance of the Particle class that is a copy of the current instance.
 
virtual void Init ()
 Initializes the particle by setting default values for all properties.
 
virtual void SetShape (Shape *const shape)
 Sets the Shape object representing the particle's shape.
 
virtual void SetDensity (double dens)
 Sets the density of the particle.
 
virtual double GetDensity () const
 Gets the density of the particle.
 
virtual void SetMargin (double m)
 Sets the margin of the particle.
 
virtual double GetMargin () const
 Gets the margin of the particle.
 
virtual void SetForce (double fx, double fy, double fz)
 Sets the force acting on the particle.
 
virtual void SetMoment (double mx, double my, double mz)
 Sets the moment acting on the particle.
 
virtual void SetPosition (double pos_x, double pos_y, double pos_z)
 Sets the position of the particle.
 
virtual void SetRodrigues (double angle, double axis_x, double axis_y, double axis_z)
 Sets the orientation of the particle using a Rodrigues rotation vector.
 
virtual void SetQuaternion (double q_0, double q_1, double q_2, double q_3)
 Sets the orientation of the particle using a quaternion.
 
virtual void SetVelocity (double v_x, double v_y, double v_z)
 Sets the velocity of the particle.
 
virtual void SetSpin (double spin_x, double spin_y, double spin_z)
 Sets the angular velocity (spin) of the particle.
 
virtual Vec3d GetVelocity (Vec3d const &cnt_pos)
 Get the current velocity of the particle at the given position.
 
virtual void SetDynamicProperty (std::string const &key, double value)
 Set the value of a dynamic property identified by the given key.
 
virtual double GetDynamicProperty (std::string const &key)
 Get the value of a dynamic property identified by the given key.
 
virtual void AddForce (const Vec3d &force)
 Add a force to the particle.
 
virtual void AddMoment (const Vec3d &moment)
 Add a moment (torque) to the particle.
 
virtual void AddForceAtomic (const Vec3d &f)
 Add a force to the particle atomically.
 
virtual void AddMomentAtomic (const Vec3d &m)
 Add a moment (torque) to the particle atomically.
 
virtual void ClearForce ()
 Clear all forces applied to the particle.
 
virtual void ClearMoment ()
 Clear all moments applied to the particle.
 
virtual void ApplyContactForce (ContactPP const *cnt)
 Apply a contact force to the particle when it is in contact with another particle.
 
virtual void ApplyContactForce (ContactPW const *cnt)
 Apply a contact force to the particle when it is in contact with a wall.
 
virtual void UpdateContactForce ()
 Update the contact forces applied to the particle.
 
virtual void UpdateMotion (double timestep)
 Update the motion of the particle based on the applied forces and moments over a time step.
 
virtual void UpdateBoundFast ()
 Update the bounding box of the particle, which is useful for collision detection. Particle has a skin and if the movement of particle has not exceed this skin, the bounding box will not be updated.
 
virtual void UpdateBound ()
 Update the bounding box of the particle, which is useful for collision detection. The bounding box will be updated regardless of the particle movement.
 
void ClearLinkedCells ()
 Clear the linked cells of the particle.
 
void ClearLinkedDomains ()
 Clear the linked domains of the particle.
 
void ClearLinkedNeighs ()
 Clear the linked neighbors of the particle.
 
void BuildContactRefTable ()
 Build a look-up table for contacts between particles.
 
void ClearContactRefTable ()
 Clear the look-up table for contacts between particles.
 
void UpdateLinkedDomains (DomainManager *const dm)
 Update the linked domains of the particle based on the given domain manager.
 
void UpdateLinkedCells (CellManager *const cm)
 Update the linked cells of the particle based on the given cell manager.
 
void UpdateLinkedNeighs (Domain *const domain)
 Update the linked neighbors of the particle based on the given domain.
 
VecXT< ContactPP * > GetContactPPs ()
 Get a vector of pointers to all contact points between particles.
 
VecXT< ContactPW * > GetContactPWs ()
 Get a vector of pointers to all contact points between particles and walls.
 
VecXT< std::pair< Domain *, int > > const & GetLinkedDomains ()
 Gets a vector of pointers to the domains that may be potentially overlapped this wall.
 
VecXT< std::pair< Cell *, int > > const & GetLinkedCells ()
 Gets a vector of pointers to the cells that may be potentially overlapped this wall.
 
VecXT< NeighPofP > const & GetLinkedParticles ()
 Gets a vector of pointers to the particles that may be potentially overlapped this wall.
 
VecXT< NeighWofP > const & GetLinkedWalls ()
 Gets a vector of pointers to the walls that may be potentially overlapped this wall.
 
NeighPofP *const GetLinkedParticle (int lookup_id)
 Gets the neigh obj by look-up id.
 
NeighWofP *const GetLinkedWall (int lookup_id)
 Gets the neigh obj by look-up id.
 
virtual void UpdateSTLModel ()
 Update the geometry of the particle's STL model.
 
virtual STLModel GetSTLModel (int num_nodes=200)
 Get a copy of the particle's STL model as an object of type STLModel.
 
virtual STLModelGetSTLModelInternal ()
 Get a copy of the particle's STL model as an object of type STLModel.
 
virtual void SaveAsVTK (std::string const &filename)
 Save the particle's current state to a VTK file with the given filename.
 
virtual void Print () const
 Print information about the particle to the console.
 
virtual ~Particle ()
 Destroy the particle object and free any resources it might be holding.
 
NeighPofPLinkToParticle (Particle *const q)
 Create a new neighbor tuple between this particle and the given particle q, and return the newly created tuple.
 
NeighWofPLinkToWall (Wall *const w)
 Create a new neighbor tuple between this particle and the given wall w, and return the newly created tuple.
 
int LinkToCell (Cell *const cell)
 Create a link between this particle and the given cell and return the look up id.
 
int LinkToDomain (Domain *const domain)
 Create a link between this particle and the given domain and return the look up id.
 
int FindLinkedParticle (Particle *const q)
 Find the index of the neighbor tuple belonging to this particle that is linked to the given particle q.
 
int FindLinkedWall (Wall *const w)
 Find the index of the neighbor tuple belonging to this particle that is linked to the given wall w.
 

Public Attributes

int id {0}
 The ID of the particle.
 
Shapeshape {nullptr}
 The shape of the particle.
 
Vec3d bound_min {0, 0, 0}
 The minimum bounds of the particle's shape.
 
Vec3d bound_max {0, 0, 0}
 The maximum bounds of the particle's shape.
 
double margin {0}
 The margin of the particle's shape.
 
Vec3d bound_disp {0, 0, 0}
 The displacement of the particle's bounds for the linked list.
 
int material_type {0}
 The material type of the particle.
 
double mass {0.0}
 The mass of the particle.
 
Vec3d moi_principal {0, 0, 0}
 The principal moment of inertia of the particle.
 
double damp_viscous {0}
 The viscous damping coefficient of the particle.
 
double damp_numerical {0}
 The numerical damping coefficient of the particle.
 
Vec3d pos {0, 0, 0}
 The position of the particle.
 
Vec4d quaternion {1, 0, 0, 0}
 The quaternion of the particle.
 
Vec3d vel {0, 0, 0}
 The velocity of the particle.
 
Vec3d spin {0, 0, 0}
 The spin of the particle.
 
Vec3d vel_m0p5 {0, 0, 0}
 The square root velocity of the particle for half-step integration.
 
Vec3d spin_principal {0, 0, 0}
 The principal spin axis of the particle.
 
Vec3d force {0, 0, 0}
 The force acting on the particle.
 
Vec3d moment {0, 0, 0}
 The moment acting on the particle.
 
MiniMap< std::string, double > dynamic_properties
 Map of dynamic properties of the particle.
 
bool enable_bound_aabb {false}
 Flag indicating whether bounding sphere should be used to approximate axis-aligned bounding box (AABB).
 
bool need_update_linked_list {true}
 Flag indicating whether linked-list algorithm should be used for broad-phase contact detection.
 
bool need_update_stl_model {false}
 Flag indicating whether STl model intersection-based contact detection and resolution is needed.
 

Protected Member Functions

void RemoveLinkedCell (int lookup_id)
 Reomve a linked cell by look-up id.
 
void RemoveLinkedDomain (int lookup_id)
 Reomve a linked domain by look-up id.
 
void RemoveLinkedParticle (int lookup_id)
 Reomve a linked neighbor by look-up id.
 
void RemoveLinkedWall (int lookup_id)
 Reomve a linked neighbor by look-up id.
 
void RemoveContactRefPP (int lookup_id)
 Reomve a p-p contact by look-up id.
 
void RemoveContactRefPW (int lookup_id)
 Reomve a p-w contact by look-up id.
 
NeighPofP *const GetLinkedContactRefPP (int lookup_id)
 Gets the neigh obj by look-up id.
 
NeighWofP *const GetLinkedContactRefPW (int lookup_id)
 Gets the neigh obj by look-up id.
 
NeighPofPBuildContactRefPP (Particle *const q, ContactPP *const cnt)
 Create a new contact lookup table entry for the given pair of particles q and cnt, and return the newly created entry.
 
NeighWofPBuildContactRefPW (Wall *const w, ContactPW *const cnt)
 Create a new contact lookup table entry for the given wall w and contact point cnt, and return the newly created entry.
 
int FindContactRefPP (Particle *const q)
 Find the index of the contact lookup table entry belonging to this particle that references the given particle q.
 
int FindContactRefPW (Wall *const w)
 Find the index of the contact lookup table entry belonging to this particle that references the given wall w.
 

Protected Attributes

double density {2650}
 The density of the particle. Please use SetDensity to change its value.
 
VecXT< std::pair< Cell *, int > > linked_cell_list
 List of linked cells used for broad-phase contact detection.
 
VecXT< NeighPofPlinked_particle_list
 List of linked particles used for narrow-phase contact detection with particles.
 
VecXT< NeighWofPlinked_wall_list
 List of linked walls used for narrow-phase contact detection with walls.
 
VecXT< NeighPofPcontact_pp_ref_table
 Lookup table used to reconstruct reference of contact history with particles.
 
VecXT< NeighWofPcontact_pw_ref_table
 Lookup table used to reconstruct reference of contact history with walls.
 
bool is_on_edge {false}
 Flag indicating whether particle is on domain edge.
 
bool need_send_out {false}
 Flag indicating whether data needs to be sent out to linked domains.
 
VecXT< std::pair< Domain *, int > > linked_domain_list
 List of linked domains that overlap with the particle.
 
STLModel stl_model
 STLModel object used for intersection-based contact detection and resolution.
 

Friends

class Wall
 
class Cell
 
class Domain
 
class MPIManager
 
class DEMSolver
 
class NeighPofP
 
class NeighWofP
 
class NeighPofW
 

Detailed Description

Constructor & Destructor Documentation

◆ Particle() [1/2]

Particle::Particle ( )

Default constructor for the Particle class.

◆ Particle() [2/2]

Particle::Particle ( Shape *const shape)

Constructor for the Particle class which specifies the shape of the particle.

Parameters
shapeA pointer to the Shape object representing the particle's shape.

◆ ~Particle()

Particle::~Particle ( )
virtual

Destroy the particle object and free any resources it might be holding.

Member Function Documentation

◆ AddForce()

void Particle::AddForce ( const Vec3d & force)
virtual

Add a force to the particle.

Parameters
forceThe force to add.

◆ AddForceAtomic()

void Particle::AddForceAtomic ( const Vec3d & f)
virtual

Add a force to the particle atomically.

Parameters
fThe force to add.

◆ AddMoment()

void Particle::AddMoment ( const Vec3d & moment)
virtual

Add a moment (torque) to the particle.

Parameters
momentThe moment (torque) to add.

◆ AddMomentAtomic()

void Particle::AddMomentAtomic ( const Vec3d & m)
virtual

Add a moment (torque) to the particle atomically.

Parameters
mThe moment (torque) to add.

◆ ApplyContactForce() [1/2]

void Particle::ApplyContactForce ( ContactPP const * cnt)
virtual

Apply a contact force to the particle when it is in contact with another particle.

Parameters
cntA pointer to the ContactPP object representing the contact.

Reimplemented in netdem::DeformableParticle.

◆ ApplyContactForce() [2/2]

void Particle::ApplyContactForce ( ContactPW const * cnt)
virtual

Apply a contact force to the particle when it is in contact with a wall.

Parameters
cntA pointer to the ContactPW object representing the contact.

Reimplemented in netdem::DeformableParticle.

◆ BuildContactRefPP()

NeighPofP * Particle::BuildContactRefPP ( Particle *const q,
ContactPP *const cnt )
protected

Create a new contact lookup table entry for the given pair of particles q and cnt, and return the newly created entry.

Parameters
qA pointer to one of the particles in the contact pair.
cntA pointer to the contact point between the two particles.
Returns
A pointer to the newly created contact lookup table entry belonging to this particle.

◆ BuildContactRefPW()

NeighWofP * Particle::BuildContactRefPW ( Wall *const w,
ContactPW *const cnt )
protected

Create a new contact lookup table entry for the given wall w and contact point cnt, and return the newly created entry.

Parameters
wA pointer to the wall in contact with the particle.
cntA pointer to the contact point between the particle and the wall.
Returns
A pointer to the newly created contact lookup table entry belonging to this particle.

◆ BuildContactRefTable()

void Particle::BuildContactRefTable ( )

Build a look-up table for contacts between particles.

◆ ClearContactRefTable()

void Particle::ClearContactRefTable ( )

Clear the look-up table for contacts between particles.

◆ ClearForce()

◆ ClearLinkedCells()

void Particle::ClearLinkedCells ( )

Clear the linked cells of the particle.

◆ ClearLinkedDomains()

void Particle::ClearLinkedDomains ( )

Clear the linked domains of the particle.

◆ ClearLinkedNeighs()

void Particle::ClearLinkedNeighs ( )

Clear the linked neighbors of the particle.

◆ ClearMoment()

◆ Clone()

Particle * Particle::Clone ( ) const
virtual

Creates a new instance of the Particle class that is a copy of the current instance.

Returns
A pointer to the new instance of the Particle class.

Reimplemented in netdem::DeformableParticle.

◆ FindContactRefPP()

int Particle::FindContactRefPP ( Particle *const q)
protected

Find the index of the contact lookup table entry belonging to this particle that references the given particle q.

Parameters
qA pointer to one of the particles in the contact pair.
Returns
The index of the contact lookup table entry belonging to this particle that references the given particle q, or -1 if the entry is not found.

◆ FindContactRefPW()

int Particle::FindContactRefPW ( Wall *const w)
protected

Find the index of the contact lookup table entry belonging to this particle that references the given wall w.

Parameters
wA pointer to the wall in contact with the particle.
Returns
The index of the contact lookup table entry belonging to this particle that references the given wall w, or -1 if the entry is not found.

◆ FindLinkedParticle()

int Particle::FindLinkedParticle ( Particle *const q)

Find the index of the neighbor tuple belonging to this particle that is linked to the given particle q.

Parameters
qA pointer to the neighboring particle whose link is being searched.
Returns
The index of the neighbor tuple belonging to this particle that is linked to the given particle q, or -1 if the tuple is not found.

◆ FindLinkedWall()

int Particle::FindLinkedWall ( Wall *const w)

Find the index of the neighbor tuple belonging to this particle that is linked to the given wall w.

Parameters
wA pointer to the neighboring wall whose link is being searched.
Returns
The index of the neighbor tuple belonging to this particle that is linked to the given wall w, or -1 if the tuple is not found.

◆ GetContactPPs()

VecXT< ContactPP * > Particle::GetContactPPs ( )

Get a vector of pointers to all contact points between particles.

Returns
A vector of pointers to all contact points between particles.

◆ GetContactPWs()

VecXT< ContactPW * > Particle::GetContactPWs ( )

Get a vector of pointers to all contact points between particles and walls.

Returns
A vector of pointers to all contact points between particles and walls.

◆ GetDensity()

double Particle::GetDensity ( ) const
virtual

Gets the density of the particle.

Returns
The density of the particle in kg/m^3.

◆ GetDynamicProperty()

double Particle::GetDynamicProperty ( std::string const & key)
virtual

Get the value of a dynamic property identified by the given key.

Parameters
keyThe key identifying the dynamic property.
Returns
The value of the dynamic property.

◆ GetLinkedCells()

VecXT< std::pair< Cell *, int > > const & Particle::GetLinkedCells ( )

Gets a vector of pointers to the cells that may be potentially overlapped this wall.

◆ GetLinkedContactRefPP()

NeighPofP *const Particle::GetLinkedContactRefPP ( int lookup_id)
protected

Gets the neigh obj by look-up id.

◆ GetLinkedContactRefPW()

NeighWofP *const Particle::GetLinkedContactRefPW ( int lookup_id)
protected

Gets the neigh obj by look-up id.

◆ GetLinkedDomains()

VecXT< std::pair< Domain *, int > > const & Particle::GetLinkedDomains ( )

Gets a vector of pointers to the domains that may be potentially overlapped this wall.

◆ GetLinkedParticle()

NeighPofP *const Particle::GetLinkedParticle ( int lookup_id)

Gets the neigh obj by look-up id.

◆ GetLinkedParticles()

VecXT< NeighPofP > const & Particle::GetLinkedParticles ( )

Gets a vector of pointers to the particles that may be potentially overlapped this wall.

◆ GetLinkedWall()

NeighWofP *const Particle::GetLinkedWall ( int lookup_id)

Gets the neigh obj by look-up id.

◆ GetLinkedWalls()

VecXT< NeighWofP > const & Particle::GetLinkedWalls ( )

Gets a vector of pointers to the walls that may be potentially overlapped this wall.

◆ GetMargin()

double Particle::GetMargin ( ) const
virtual

Gets the margin of the particle.

Returns
The margin of the particle.

◆ GetSTLModel()

STLModel Particle::GetSTLModel ( int num_nodes = 200)
virtual

Get a copy of the particle's STL model as an object of type STLModel.

Parameters
num_nodesThe number of nodoes to include in the returned model (default value is 200).
Returns
A copy of the particle's STL model.

◆ GetSTLModelInternal()

STLModel * Particle::GetSTLModelInternal ( )
virtual

Get a copy of the particle's STL model as an object of type STLModel.

Parameters
num_facetThe number of facets to include in the returned model (default value is 400).
Returns
A copy of the particle's STL model.

◆ GetVelocity()

Vec3d Particle::GetVelocity ( Vec3d const & cnt_pos)
virtual

Get the current velocity of the particle at the given position.

Parameters
cnt_posThe position at which to get the velocity.
Returns
The current velocity of the particle at the given position.

Reimplemented in netdem::DeformableParticle.

◆ Init()

void Particle::Init ( )
virtual

Initializes the particle by setting default values for all properties.

◆ LinkToCell()

int Particle::LinkToCell ( Cell *const cell)

Create a link between this particle and the given cell and return the look up id.

Parameters
cellA pointer to the cell to which a link is being created.
Returns
The look up id.

◆ LinkToDomain()

int Particle::LinkToDomain ( Domain *const domain)

Create a link between this particle and the given domain and return the look up id.

Parameters
cellA pointer to the domain to which a link is being created.
Returns
The look up id.

◆ LinkToParticle()

NeighPofP * Particle::LinkToParticle ( Particle *const q)

Create a new neighbor tuple between this particle and the given particle q, and return the newly created tuple.

Parameters
qA pointer to the neighboring particle to which a link is being created.
Returns
A pointer to the newly created neighbor tuple belonging to this particle.

◆ LinkToWall()

NeighWofP * Particle::LinkToWall ( Wall *const w)

Create a new neighbor tuple between this particle and the given wall w, and return the newly created tuple.

Parameters
wA pointer to the neighboring wall to which a link is being created.
Returns
A pointer to the newly created neighbor tuple belonging to this particle.

◆ Print()

void Particle::Print ( ) const
virtual

Print information about the particle to the console.

◆ RemoveContactRefPP()

void Particle::RemoveContactRefPP ( int lookup_id)
protected

Reomve a p-p contact by look-up id.

◆ RemoveContactRefPW()

void Particle::RemoveContactRefPW ( int lookup_id)
protected

Reomve a p-w contact by look-up id.

◆ RemoveLinkedCell()

void Particle::RemoveLinkedCell ( int lookup_id)
protected

Reomve a linked cell by look-up id.

◆ RemoveLinkedDomain()

void Particle::RemoveLinkedDomain ( int lookup_id)
protected

Reomve a linked domain by look-up id.

◆ RemoveLinkedParticle()

void Particle::RemoveLinkedParticle ( int lookup_id)
protected

Reomve a linked neighbor by look-up id.

◆ RemoveLinkedWall()

void Particle::RemoveLinkedWall ( int lookup_id)
protected

Reomve a linked neighbor by look-up id.

◆ SaveAsVTK()

void Particle::SaveAsVTK ( std::string const & filename)
virtual

Save the particle's current state to a VTK file with the given filename.

Parameters
filenameThe name of the VTK file to be saved.

Reimplemented in netdem::DeformableParticle.

◆ SetDensity()

void Particle::SetDensity ( double dens)
virtual

Sets the density of the particle.

Parameters
densThe density of the particle in kg/m^3.

Reimplemented in netdem::DeformableParticle.

Examples
92_nut_in_bolt.cpp.

◆ SetDynamicProperty()

void Particle::SetDynamicProperty ( std::string const & key,
double value )
virtual

Set the value of a dynamic property identified by the given key.

Parameters
keyThe key identifying the dynamic property.
valueThe new value of the dynamic property.

◆ SetForce()

void Particle::SetForce ( double fx,
double fy,
double fz )
virtual

Sets the force acting on the particle.

Parameters
fxThe x-component of the force vector.
fyThe y-component of the force vector.
fzThe z-component of the force vector.

◆ SetMargin()

void Particle::SetMargin ( double m)
virtual

Sets the margin of the particle.

Parameters
marginThe margin of the particle.

◆ SetMoment()

void Particle::SetMoment ( double mx,
double my,
double mz )
virtual

Sets the moment acting on the particle.

Parameters
mxThe x-component of the moment vector.
myThe y-component of the moment vector.
mzThe z-component of the moment vector.

◆ SetPosition()

void Particle::SetPosition ( double pos_x,
double pos_y,
double pos_z )
virtual

◆ SetQuaternion()

void Particle::SetQuaternion ( double q_0,
double q_1,
double q_2,
double q_3 )
virtual

Sets the orientation of the particle using a quaternion.

Parameters
q_0The scalar component of the quaternion.
q_1The x-component of the quaternion.
q_2The y-component of the quaternion.
q_3The z-component of the quaternion.

Reimplemented in netdem::DeformableParticle.

Examples
10_gen_dataset_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, 30_gen_dataset_ellipsoid.cpp, 31_test_dataset_ellipsoid.cpp, 36_test_ann_vs_geom_ellipsoid.cpp, and 37_test_ann_vs_geom_ellipsoid.cpp.

◆ SetRodrigues()

void Particle::SetRodrigues ( double angle,
double axis_x,
double axis_y,
double axis_z )
virtual

Sets the orientation of the particle using a Rodrigues rotation vector.

Parameters
angleThe magnitude of the rotation.
axis_xThe x-component of the rotation vector.
axis_yThe y-component of the rotation vector.
axis_zThe z-component of the rotation vector.

Reimplemented in netdem::DeformableParticle.

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, 11_contact_test_trimesh.cpp, and 17_test_ann_vs_geom_trimesh.cpp.

◆ SetShape()

void Particle::SetShape ( Shape *const shape)
virtual

Sets the Shape object representing the particle's shape.

Parameters
shapeA pointer to the Shape object representing the particle's shape.

Reimplemented in netdem::DeformableParticle.

Examples
81_voronoi_packing.cpp.

◆ SetSpin()

void Particle::SetSpin ( double spin_x,
double spin_y,
double spin_z )
virtual

Sets the angular velocity (spin) of the particle.

Parameters
spin_xThe x-component of the spin vector.
spin_yThe y-component of the spin vector.
spin_zThe z-component of the spin vector.

◆ SetVelocity()

void Particle::SetVelocity ( double v_x,
double v_y,
double v_z )
virtual

Sets the velocity of the particle.

Parameters
v_xThe x-component of the velocity vector.
v_yThe y-component of the velocity vector.
v_zThe z-component of the velocity vector.

Reimplemented in netdem::DeformableParticle.

Examples
03_friction_test_sphere.cpp, and 04_friction_test_trimesh.cpp.

◆ UpdateBound()

void Particle::UpdateBound ( )
virtual

Update the bounding box of the particle, which is useful for collision detection. The bounding box will be updated regardless of the particle movement.

Reimplemented in netdem::DeformableParticle.

◆ UpdateBoundFast()

void Particle::UpdateBoundFast ( )
virtual

Update the bounding box of the particle, which is useful for collision detection. Particle has a skin and if the movement of particle has not exceed this skin, the bounding box will not be updated.

Reimplemented in netdem::DeformableParticle.

◆ UpdateContactForce()

void Particle::UpdateContactForce ( )
virtual

Update the contact forces applied to the particle.

◆ UpdateLinkedCells()

void Particle::UpdateLinkedCells ( CellManager *const cm)

Update the linked cells of the particle based on the given cell manager.

Parameters
cmA pointer to the cell manager containing the cells to which the particle may belong.

◆ UpdateLinkedDomains()

void Particle::UpdateLinkedDomains ( DomainManager *const dm)

Update the linked domains of the particle based on the given domain manager.

Parameters
dmA pointer to the domain manager containing the domains to which the particle may belong.

◆ UpdateLinkedNeighs()

void Particle::UpdateLinkedNeighs ( Domain *const domain)

Update the linked neighbors of the particle based on the given domain.

Parameters
domainA pointer to the domain in which the particle resides.

◆ UpdateMotion()

void Particle::UpdateMotion ( double timestep)
virtual

Update the motion of the particle based on the applied forces and moments over a time step.

Parameters
timestepThe time step over which to update the motion.

Reimplemented in netdem::DeformableParticle.

Examples
03_friction_test_sphere.cpp, and 04_friction_test_trimesh.cpp.

◆ UpdateSTLModel()

void Particle::UpdateSTLModel ( )
virtual

Update the geometry of the particle's STL model.

Friends And Related Symbol Documentation

◆ Cell

friend class Cell
friend

◆ DEMSolver

friend class DEMSolver
friend

◆ Domain

friend class Domain
friend

◆ MPIManager

friend class MPIManager
friend

◆ NeighPofP

friend class NeighPofP
friend

◆ NeighPofW

friend class NeighPofW
friend

◆ NeighWofP

friend class NeighWofP
friend

◆ Wall

friend class Wall
friend

Member Data Documentation

◆ bound_disp

Vec3d netdem::Particle::bound_disp {0, 0, 0}

The displacement of the particle's bounds for the linked list.

◆ bound_max

Vec3d netdem::Particle::bound_max {0, 0, 0}

The maximum bounds of the particle's shape.

◆ bound_min

Vec3d netdem::Particle::bound_min {0, 0, 0}

The minimum bounds of the particle's shape.

◆ contact_pp_ref_table

VecXT<NeighPofP> netdem::Particle::contact_pp_ref_table
protected

Lookup table used to reconstruct reference of contact history with particles.

◆ contact_pw_ref_table

VecXT<NeighWofP> netdem::Particle::contact_pw_ref_table
protected

Lookup table used to reconstruct reference of contact history with walls.

◆ damp_numerical

double netdem::Particle::damp_numerical {0}

The numerical damping coefficient of the particle.

Examples
81_voronoi_packing.cpp.

◆ damp_viscous

double netdem::Particle::damp_viscous {0}

The viscous damping coefficient of the particle.

◆ density

double netdem::Particle::density {2650}
protected

The density of the particle. Please use SetDensity to change its value.

◆ dynamic_properties

MiniMap<std::string, double> netdem::Particle::dynamic_properties

Map of dynamic properties of the particle.

◆ enable_bound_aabb

bool netdem::Particle::enable_bound_aabb {false}

Flag indicating whether bounding sphere should be used to approximate axis-aligned bounding box (AABB).

◆ force

Vec3d netdem::Particle::force {0, 0, 0}

◆ id

int netdem::Particle::id {0}

The ID of the particle.

◆ is_on_edge

bool netdem::Particle::is_on_edge {false}
protected

Flag indicating whether particle is on domain edge.

◆ linked_cell_list

VecXT<std::pair<Cell *, int> > netdem::Particle::linked_cell_list
protected

List of linked cells used for broad-phase contact detection.

◆ linked_domain_list

VecXT<std::pair<Domain *, int> > netdem::Particle::linked_domain_list
protected

List of linked domains that overlap with the particle.

◆ linked_particle_list

VecXT<NeighPofP> netdem::Particle::linked_particle_list
protected

List of linked particles used for narrow-phase contact detection with particles.

◆ linked_wall_list

VecXT<NeighWofP> netdem::Particle::linked_wall_list
protected

List of linked walls used for narrow-phase contact detection with walls.

◆ margin

double netdem::Particle::margin {0}

The margin of the particle's shape.

◆ mass

double netdem::Particle::mass {0.0}

The mass of the particle.

◆ material_type

int netdem::Particle::material_type {0}

The material type of the particle.

◆ moi_principal

Vec3d netdem::Particle::moi_principal {0, 0, 0}

The principal moment of inertia of the particle.

◆ moment

Vec3d netdem::Particle::moment {0, 0, 0}

◆ need_send_out

bool netdem::Particle::need_send_out {false}
protected

Flag indicating whether data needs to be sent out to linked domains.

◆ need_update_linked_list

bool netdem::Particle::need_update_linked_list {true}

Flag indicating whether linked-list algorithm should be used for broad-phase contact detection.

◆ need_update_stl_model

bool netdem::Particle::need_update_stl_model {false}

◆ pos

◆ quaternion

◆ shape

◆ spin

Vec3d netdem::Particle::spin {0, 0, 0}

The spin of the particle.

◆ spin_principal

Vec3d netdem::Particle::spin_principal {0, 0, 0}

The principal spin axis of the particle.

◆ stl_model

STLModel netdem::Particle::stl_model
protected

STLModel object used for intersection-based contact detection and resolution.

◆ vel

Vec3d netdem::Particle::vel {0, 0, 0}

The velocity of the particle.

◆ vel_m0p5

Vec3d netdem::Particle::vel_m0p5 {0, 0, 0}

The square root velocity of the particle for half-step integration.


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