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

A class used to evaluate the stress of particles in a DEM simulation. More...

#include <particle_stress_evaluator.hpp>

Inheritance diagram for netdem::ParticleStressEvaluator:
netdem::ParticleGroup netdem::Modifier

Public Member Functions

 ParticleStressEvaluator ()
 Default constructor for ParticleStressEvaluator class.
 
Mat3d GetStress (Particle *const p)
 Calculates the stress for a specific particle.
 
ModifierClone () const override
 Clones the current ParticleStressEvaluator instance.
 
void Execute () override
 Executes the ParticleStressEvaluator instance.
 
void Execute (const VecXT< Particle * > &p_list)
 Executes the ParticleStressEvaluator instance for a given list of particles.
 
void Update () override
 Updates the ParticleStressEvaluator instance.
 
- Public Member Functions inherited from netdem::ParticleGroup
 ParticleGroup ()
 Default constructor for ParticleGroup class.
 
VecXT< Particle * > const & GetParticles ()
 Get the particles.
 
void AddParticle (int id)
 Adds a particle to the group.
 
void RemoveParticle (int id)
 Removes a particle from the group.
 
void AddParticle (const VecXT< int > &ids)
 Adds multiple particles to the group.
 
void RemoveParticle (const VecXT< int > &ids)
 Removes multiple particles from the group.
 
void AddParticle (const std::initializer_list< int > &ids)
 Adds multiple particles to the group.
 
void RemoveParticle (const std::initializer_list< int > &ids)
 Removes multiple particles from the group.
 
void SetParticle (int id)
 Sets a particle to the group.
 
void SetParticle (const VecXT< int > &ids)
 Sets multiple particles to the group.
 
void SetParticle (const std::initializer_list< int > &ids)
 Sets multiple particles to the group.
 
void SetParticleFromScene ()
 Sets the particles to all the particles in the scene scene.
 
void Clear ()
 Clears all particles from the group.
 
- Public Member Functions inherited from netdem::Modifier
 Modifier ()
 Default constructor for Modifier class.
 
virtual void Init (Simulation *sim)
 Initializes the Modifier instance.
 
virtual void Enable ()
 Enables the Modifier instance.
 
virtual void Disable ()
 Disables the Modifier instance.
 
virtual ~Modifier ()
 Destructor for Modifier class.
 

Additional Inherited Members

- Public Attributes inherited from netdem::ParticleGroup
bool use_particles_in_scene {false}
 A flag indicating whether to group all particle in the scene.
 
- Public Attributes inherited from netdem::Modifier
std::string label {"default"}
 
DEMSolver::CyclePoint cycle_point {DEMSolver::CyclePoint::pre}
 
Simulationsim {nullptr}
 
Scenescene {nullptr}
 
bool update_with_scene {false}
 
bool enable_logging {true}
 
- Protected Attributes inherited from netdem::ParticleGroup
std::unordered_set< int > particle_id_list
 The list of particle IDs.
 
VecXT< Particle * > particle_list
 The list of particles.
 

Detailed Description

A class used to evaluate the stress of particles in a DEM simulation.

The ParticleStressEvaluator class calculates the stress of a specified set of particles, and stores this information in a list of Mat3d objects.

Constructor & Destructor Documentation

◆ ParticleStressEvaluator()

netdem::ParticleStressEvaluator::ParticleStressEvaluator ( )

Default constructor for ParticleStressEvaluator class.

Member Function Documentation

◆ Clone()

Modifier * netdem::ParticleStressEvaluator::Clone ( ) const
overridevirtual

Clones the current ParticleStressEvaluator instance.

Returns
A pointer to the cloned ParticleStressEvaluator instance.

Reimplemented from netdem::ParticleGroup.

◆ Execute() [1/2]

void netdem::ParticleStressEvaluator::Execute ( )
overridevirtual

Executes the ParticleStressEvaluator instance.

Calls Execute(particle_list) if use_particles_in_scene is true, otherwise calls Execute(particle_id_list).

Reimplemented from netdem::ParticleGroup.

◆ Execute() [2/2]

void netdem::ParticleStressEvaluator::Execute ( const VecXT< Particle * > & p_list)

Executes the ParticleStressEvaluator instance for a given list of particles.

Parameters
p_listThe list of particles to evaluate stress for.
gravity_coefThe gravitational coefficient.
Returns
The list of particle stress.

◆ GetStress()

Mat3d netdem::ParticleStressEvaluator::GetStress ( Particle *const p)

Calculates the stress for a specific particle.

Parameters
pPointer to the particle to calculate stress for.
Returns
A Mat3d struct containing the stress for the specified particle.

◆ Update()

void netdem::ParticleStressEvaluator::Update ( )
overridevirtual

Updates the ParticleStressEvaluator instance.

Clears the particle_stress_list and recalculates stress for all particles in the particle list.

Reimplemented from netdem::ParticleGroup.


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