6#include <unordered_map>
7#include <unordered_set>
44 void SetForce(
int id,
double fx,
double fy,
double fz);
54 void SetMoment(
int id,
double mx,
double my,
double mz);
84 void AddForce(
int id,
double fx,
double fy,
double fz);
94 void AddMoment(
int id,
double mx,
double my,
double mz);
161 std::unordered_map<int, VecNd<6>> id_force_map;
A class used to add external forces to particles in a DEM simulation. This is a pre-modifier,...
Definition external_force.hpp:16
void SetMoment(int id, double mx, double my, double mz)
Sets the moment for a specific particle by ID.
Definition external_force.cpp:25
Modifier * Clone() const override
Clones the current ExternalForce instance.
Definition external_force.cpp:125
void Clear()
Clears all applied forces and moments from particles.
Definition external_force.cpp:118
ExternalForce()
Default constructor for ExternalForce class.
Definition external_force.cpp:12
Vec3d GetForce(int id)
Gets the total force on a specific particle by ID.
Definition external_force.cpp:88
std::unordered_set< int > particle_id_list
The list of particle IDs.
Definition external_force.hpp:19
void Update() override
Updates the ExternalForce instance.
Definition external_force.cpp:186
void SetForce(int id, double fx, double fy, double fz)
Sets the force for a specific particle by ID.
Definition external_force.cpp:18
Vec3d GetMoment(int id)
Gets the total moment on a specific particle by ID.
Definition external_force.cpp:103
void AddMoment(int id, double mx, double my, double mz)
Adds to the moment for a specific particle by ID.
Definition external_force.cpp:60
VecXT< Vec3d > moment_list
Definition external_force.hpp:28
VecXT< Vec3d > force_list
The list of particle forces to apply.
Definition external_force.hpp:25
VecXT< Particle * > particle_list
The list of particles.
Definition external_force.hpp:22
void SyncToAllProcessors()
Synchronizes applied forces and moments across all processors in a distributed simulation.
Definition external_force.cpp:127
void Execute() override
Executes the ExternalForce instance.
Definition external_force.cpp:178
void AddForce(int id, double fx, double fy, double fz)
Adds to the force for a specific particle by ID.
Definition external_force.cpp:46
An interface class used to modify a DEM simulation.
Definition modifier.hpp:18
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18