NetDEM v1.0
|
A class used to evaluate the stress of particles in a DEM simulation. More...
#include <particle_stress_evaluator.hpp>
Public Member Functions | |
ParticleStressEvaluator () | |
Default constructor for ParticleStressEvaluator class. | |
Mat3d | GetStress (Particle *const p) |
Calculates the stress for a specific particle. | |
Modifier * | Clone () 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} |
Simulation * | sim {nullptr} |
Scene * | scene {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. | |
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.
netdem::ParticleStressEvaluator::ParticleStressEvaluator | ( | ) |
Default constructor for ParticleStressEvaluator class.
|
overridevirtual |
Clones the current ParticleStressEvaluator instance.
Reimplemented from netdem::ParticleGroup.
|
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.
Executes the ParticleStressEvaluator instance for a given list of particles.
p_list | The list of particles to evaluate stress for. |
gravity_coef | The gravitational coefficient. |
Calculates the stress for a specific particle.
p | Pointer to the particle to calculate stress for. |
|
overridevirtual |
Updates the ParticleStressEvaluator instance.
Clears the particle_stress_list and recalculates stress for all particles in the particle list.
Reimplemented from netdem::ParticleGroup.