NetDEM v1.0
|
A class that represents a collision solver between two particles using artificial neural networks. More...
#include <solver_ann_pw.hpp>
Public Member Functions | |
SolverANNPW () | |
Default constructor for the SolverANNPW class. | |
SolverANNPW (Particle *const p, Wall *const w) | |
Constructor for the SolverANNPW class. | |
CollisionSolverPW * | Clone () const override |
Creates a copy of the SolverANNPW object. | |
void | Init (std::string const &classifier_file, std::string const ®ressor_file) |
Initializes the collision solver with neural network models from disk. | |
void | Init (Particle *const p, Wall *const w) override |
Initializes the collision solver with two particles. | |
bool | Detect () override |
Detects collisions between the two particles. | |
void | ResolveInit (ContactPW *const cnt, double timestep) override |
Resolves the collision at initialization time. | |
void | ResolveUpdate (ContactPW *const cnt, double timestep) override |
Resolves the collision during update time. | |
void | ResolveInit_LinearSpring (CollisionGeometries *const cnt_geoms, double timestep) |
Resolves the collision using a linear spring model at initialization time. | |
void | ResolveUpdate_LinearSpring (CollisionGeometries *const cnt_geoms, double timestep) |
Resolves the collision using a linear spring model during update time. | |
void | ResolveInit_VolumeBased (CollisionGeometries *const cnt_geoms, double timestep) |
Resolves the collision using a volume-based method at initialization time. | |
void | ResolveUpdate_VolumeBased (CollisionGeometries *const cnt_geoms, double timestep) |
Resolves the collision using a volume-based method during update time. | |
void | ResolveInit_PotentialBased (CollisionGeometries *const cnt_geoms, double timestep) |
Resolves the collision using a potential-based method at initialization time. | |
void | ResolveUpdate_PotentialBased (CollisionGeometries *const cnt_geoms, double timestep) |
Resolves the collision using a potential-based method during update time. | |
std::tuple< double, Vec3d > | GetPotential (Vec3d const &pos, Vec4d const &quat) |
Calculates the potential energy and contact position for the collision. | |
std::tuple< Vec3d, Vec3d, Vec3d > | EvaluateContactForces () |
Evaluates the contact forces for the collision. | |
Public Member Functions inherited from netdem::CollisionSolverPW | |
CollisionSolverPW () | |
CollisionSolverPW (Particle *const p, Wall *const w) | |
virtual bool | Detect (ContactPW *const cnt) |
virtual | ~CollisionSolverPW () |
Public Attributes | |
netdem::GeneralNet | classifier |
The neural network model used for classification. | |
netdem::RegressionNet | regressor |
The neural network model used for regression. | |
Public Attributes inherited from netdem::CollisionSolverPW | |
Particle * | particle {nullptr} |
Wall * | wall {nullptr} |
Additional Inherited Members | |
Protected Member Functions inherited from netdem::CollisionSolverPW | |
void | InitBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep) |
void | UpdateBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep, Vec3d const &dir_n_old) |
A class that represents a collision solver between two particles using artificial neural networks.
concrete geometric solver for sphere and sphere contacts.
The SolverANNPW
class is a specific implementation of a collision solver between two particles using artificial neural networks. It provides functionality to detect and resolve collisions between two particles, as well as calculate potential energies and contact forces.
netdem::SolverANNPW::SolverANNPW | ( | ) |
Default constructor for the SolverANNPW
class.
This function constructs a new SolverANNPW
object with default values.
Constructor for the SolverANNPW
class.
This function constructs a new SolverANNPW
object with the provided particles.
p | The first particle. |
w | The second particle. |
|
overridevirtual |
Creates a copy of the SolverANNPW
object.
This function creates a copy of the SolverANNPW
object.
SolverANNPW
object. Implements netdem::CollisionSolverPW.
|
overridevirtual |
Detects collisions between the two particles.
This function detects collisions between the two particles using the neural network classification model.
Implements netdem::CollisionSolverPW.
Evaluates the contact forces for the collision.
This function evaluates the contact forces for the collision and returns them as a tuple containing the force, moment, and position vectors.
Calculates the potential energy and contact position for the collision.
This function calculates the potential energy and contact position for the collision given the positions and orientations of the two particles.
pos | The position of the first particle. |
quat | The orientation of the first particle. |
Initializes the collision solver with two particles.
This function initializes the collision solver with the provided particles.
p | The first particle. |
w | The second particle. |
Reimplemented from netdem::CollisionSolverPW.
void netdem::SolverANNPW::Init | ( | std::string const & | classifier_file, |
std::string const & | regressor_file ) |
Initializes the collision solver with neural network models from disk.
This function initializes the collision solver with neural network models loaded from disk.
classifier_file | The name of the file containing the classification model data. |
regressor_file | The name of the file containing the regression model data. |
|
overridevirtual |
Resolves the collision at initialization time.
This function resolves the collision between the two particles at initialization time using one of several methods.
cnt | The contact point representing the collision. |
timestep | The timestep used for the simulation. |
Implements netdem::CollisionSolverPW.
void netdem::SolverANNPW::ResolveInit_LinearSpring | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Resolves the collision using a linear spring model at initialization time.
This function resolves the collision between the two particles at initialization time using a linear spring model.
cnt_geoms | The collision geometries used to resolve the collision. |
timestep | The timestep used for the simulation. |
void netdem::SolverANNPW::ResolveInit_PotentialBased | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Resolves the collision using a potential-based method at initialization time.
This function resolves the collision between the two particles at initialization time using a potential-based method.
cnt_geoms | The collision geometries used to resolve the collision. |
timestep | The timestep used for the simulation. |
void netdem::SolverANNPW::ResolveInit_VolumeBased | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Resolves the collision using a volume-based method at initialization time.
This function resolves the collision between the two particles at initialization time using a volume-based method.
cnt_geoms | The collision geometries used to resolve the collision. |
timestep | The timestep used for the simulation. |
|
overridevirtual |
Resolves the collision during update time.
This function resolves the collision between the two particles during update time using one of several methods.
cnt | The contact point representing the collision. |
timestep | The timestep used for the simulation. |
Implements netdem::CollisionSolverPW.
void netdem::SolverANNPW::ResolveUpdate_LinearSpring | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Resolves the collision using a linear spring model during update time.
This function resolves the collision between the two particles during update time using a linear spring model.
cnt_geoms | The collision geometries used to resolve the collision. |
timestep | The timestep used for the simulation. |
void netdem::SolverANNPW::ResolveUpdate_PotentialBased | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Resolves the collision using a potential-based method during update time.
This function resolves the collision between the two particles during update time using a potential-based method.
cnt_geoms | The collision geometries used to resolve the collision. |
timestep | The timestep used for the simulation. |
void netdem::SolverANNPW::ResolveUpdate_VolumeBased | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Resolves the collision using a volume-based method during update time.
This function resolves the collision between the two particles during update time using a volume-based method.
cnt_geoms | The collision geometries used to resolve the collision. |
timestep | The timestep used for the simulation. |
netdem::GeneralNet netdem::SolverANNPW::classifier |
The neural network model used for classification.
netdem::RegressionNet netdem::SolverANNPW::regressor |
The neural network model used for regression.