NetDEM v1.0
|
A class that represents a collision solver between a particle and a plane using artificial neural networks. More...
#include <solver_ann_pplane.hpp>
Public Member Functions | |
SolverANNPPlane () | |
Default constructor for the SolverANNPPlane class. | |
SolverANNPPlane (Particle *const p, Wall *const w) | |
Constructor for the SolverANNPPlane class. | |
CollisionSolverPW * | Clone () const override |
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 a particle and a wall. | |
bool | Detect () override |
Detects collisions between the particle and the wall. | |
void | ResolveInit (ContactPW *const cnt, double timestep) override |
void | ResolveUpdate (ContactPW *const cnt, double timestep) override |
void | ResolveInit_LinearSpring (CollisionGeometries *const cnt_geoms, double timestep) |
void | ResolveUpdate_LinearSpring (CollisionGeometries *const cnt_geoms, double timestep) |
void | ResolveInit_VolumeBased (CollisionGeometries *const cnt_geoms, double timestep) |
Resolves the collision 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 (double dist, Vec3d const &nn) |
Calculates the potential energy and contact position for the collision. | |
std::tuple< double, 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 a particle and a plane using artificial neural networks.
concrete geometric solver for sphere and sphere contacts.
The SolverANNPPlane
class is a specific implementation of a collision solver between a particle and a plane using artificial neural networks. It provides functionality to detect and resolve collisions between a particle and a wall, as well as calculate potential energies and contact forces.
netdem::SolverANNPPlane::SolverANNPPlane | ( | ) |
Default constructor for the SolverANNPPlane
class.
This function constructs a new SolverANNPPlane
object with default values.
Constructor for the SolverANNPPlane
class.
This function constructs a new SolverANNPPlane
object with the provided particle and wall.
p | The particle. |
w | The wall. |
|
overridevirtual |
Clone this collision solver.
Implements netdem::CollisionSolverPW.
|
overridevirtual |
Detects collisions between the particle and the wall.
This function detects collisions between the particle and the wall 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 distance between the particle and the wall and the normal vector of the wall.
dist | The distance between the particle and the wall. |
nn | The normal vector of the wall. |
Initializes the collision solver with a particle and a wall.
This function initializes the collision solver with the provided particle and wall.
p | The particle. |
w | The wall. |
Reimplemented from netdem::CollisionSolverPW.
void netdem::SolverANNPPlane::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 |
Prepare for resolving the collision by initializing the ContactPW
object.
cnt | A pointer to a ContactPW object storing details of the collision. |
timestep | The timestep length used in the simulation. |
Implements netdem::CollisionSolverPW.
void netdem::SolverANNPPlane::ResolveInit_LinearSpring | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
void netdem::SolverANNPPlane::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 particle and the wall 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::SolverANNPPlane::ResolveInit_VolumeBased | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Resolves the collision at initialization time.
This function resolves the collision between the particle and the wall at initialization time using one geometries used to resolve the collision.
cnt_geoms | The collision geometries used to resolve the collision. |
timestep | The timestep used for the simulation. |
|
overridevirtual |
Update the particle and wall involved in the collision based on the current state of the simulation.
cnt | A pointer to a ContactPW object storing details of the collision. |
timestep | The timestep length used in the simulation. |
Implements netdem::CollisionSolverPW.
void netdem::SolverANNPPlane::ResolveUpdate_LinearSpring | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
void netdem::SolverANNPPlane::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 particle and the wall 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::SolverANNPPlane::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 particle and the wall 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::SolverANNPPlane::classifier |
The neural network model used for classification.
netdem::RegressionNet netdem::SolverANNPPlane::regressor |
The neural network model used for regression.