|
NetDEM v1.0
|
A class used to evaluate the energy of particles in a DEM simulation. More...
#include <particle_energy_evaluator.hpp>
Public Member Functions | |
| ParticleEnergyEvaluator () | |
| Default constructor for ParticleEnergyEvaluator class. | |
| ParticleEnergy | GetEnergy () |
| Calculates the energy for all particles in the particle list. | |
| ParticleEnergy | GetEnergy (Particle *const p) |
| Calculates the energy for a specific particle. | |
| Modifier * | Clone () const override |
| Clones the current ParticleEnergyEvaluator instance. | |
| void | Execute () override |
| Executes the ParticleEnergyEvaluator instance. | |
| void | Update () override |
| Updates the ParticleEnergyEvaluator 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. | |
| Modifier * | Clone () const override |
| Clones the current ParticleGroup instance. | |
| void | Execute () override |
| Executes the ParticleGroup instance. | |
| void | Update () override |
| Updates the ParticleGroup instance. | |
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. | |
Static Public Member Functions | |
| static VecXT< ParticleEnergy > | Execute (const VecXT< Particle * > &p_list, Vec3d gravity_coef) |
| Executes the ParticleEnergyEvaluator instance for a given list of particles. | |
Public Attributes | |
| VecXT< ParticleEnergy > | particle_energy_list |
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} |
Additional Inherited Members | |
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 energy of particles in a DEM simulation.
The ParticleEnergyEvaluator class calculates the energy of a specified set of particles, and stores this information in a list of ParticleEnergy structs.
| netdem::ParticleEnergyEvaluator::ParticleEnergyEvaluator | ( | ) |
Default constructor for ParticleEnergyEvaluator class.
|
overridevirtual |
Clones the current ParticleEnergyEvaluator instance.
Reimplemented from netdem::Modifier.
|
overridevirtual |
Executes the ParticleEnergyEvaluator instance.
Calls Execute(particle_list) if use_particles_in_scene is true, otherwise calls Execute(particle_id_list).
Reimplemented from netdem::Modifier.
|
static |
Executes the ParticleEnergyEvaluator instance for a given list of particles.
| p_list | The list of particles to evaluate energy for. |
| gravity_coef | The gravitational coefficient. |
| ParticleEnergy netdem::ParticleEnergyEvaluator::GetEnergy | ( | ) |
Calculates the energy for all particles in the particle list.
| ParticleEnergy netdem::ParticleEnergyEvaluator::GetEnergy | ( | Particle *const | p | ) |
Calculates the energy for a specific particle.
| p | Pointer to the particle to calculate energy for. |
|
overridevirtual |
Updates the ParticleEnergyEvaluator instance.
Clears the particle_energy_list and recalculates energy for all particles in the particle list.
Reimplemented from netdem::Modifier.
| VecXT<ParticleEnergy> netdem::ParticleEnergyEvaluator::particle_energy_list |