NetDEM v1.0
|
A class that represents a collision solver using artificial neural networks. More...
#include <solver_ann_pp.hpp>
Public Member Functions | |
SolverANNPP () | |
Default constructor for the SolverANNPP class. | |
SolverANNPP (Particle *const p1, Particle *const p2) | |
Constructor for the SolverANNPP class. | |
CollisionSolverPP * | Clone () const override |
Creates a copy of the SolverANNPP 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 p1, Particle *const p2) override |
Initializes the collision solver with particles. | |
bool | Detect () override |
Detects collisions between the particles. | |
void | ResolveInit (ContactPP *const cnt, double timestep) override |
Resolves the collision at initialization time. | |
void | ResolveUpdate (ContactPP *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::CollisionSolverPP | |
CollisionSolverPP () | |
CollisionSolverPP (Particle *const p1, Particle *const p2) | |
virtual bool | Detect (ContactPP *const cnt) |
virtual | ~CollisionSolverPP () |
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::CollisionSolverPP | |
Particle * | particle_1 {nullptr} |
Particle * | particle_2 {nullptr} |
Additional Inherited Members | |
Protected Member Functions inherited from netdem::CollisionSolverPP | |
void | InitBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep) |
void | UpdateBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep, Vec3d const &dir_n_old) |
Update the basic contact geometries associated with a collision. | |
A class that represents a collision solver using artificial neural networks.
concrete geometric solver for sphere and sphere contacts.
The SolverANNPP
class is a specific implementation of a collision solver 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::SolverANNPP::SolverANNPP | ( | ) |
Default constructor for the SolverANNPP
class.
This function constructs a new SolverANNPP
object with default values.
Constructor for the SolverANNPP
class.
This function constructs a new SolverANNPP
object with the provided particles.
p1 | The first particle. |
p2 | The second particle. |
|
overridevirtual |
Creates a copy of the SolverANNPP
object.
This function creates a copy of the SolverANNPP
object.
SolverANNPP
object. Implements netdem::CollisionSolverPP.
|
overridevirtual |
Detects collisions between the particles.
This function detects collisions between the particles using the neural network classification model.
Implements netdem::CollisionSolverPP.
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 a position and quaternion representing the particles' orientations.
pos | The position of the particles relative to each other. |
quat | The quaternion representing the particles' orientations relative to each other. |
Initializes the collision solver with particles.
This function initializes the collision solver with the provided particles.
p1 | The first particle. |
p2 | The second particle. |
Reimplemented from netdem::CollisionSolverPP.
void netdem::SolverANNPP::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 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::CollisionSolverPP.
void netdem::SolverANNPP::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 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::SolverANNPP::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 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::SolverANNPP::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 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 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::CollisionSolverPP.
void netdem::SolverANNPP::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 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::SolverANNPP::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 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::SolverANNPP::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 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::SolverANNPP::classifier |
The neural network model used for classification.
netdem::RegressionNet netdem::SolverANNPP::regressor |
The neural network model used for regression.