NetDEM v1.0
Loading...
Searching...
No Matches
netdem::SolverANNPPlane Class Reference

A class that represents a collision solver between a particle and a plane using artificial neural networks. More...

#include <solver_ann_pplane.hpp>

Inheritance diagram for netdem::SolverANNPPlane:
netdem::CollisionSolverPW

Public Member Functions

 SolverANNPPlane ()
 Default constructor for the SolverANNPPlane class.
 
 SolverANNPPlane (Particle *const p, Wall *const w)
 Constructor for the SolverANNPPlane class.
 
CollisionSolverPWClone () const override
 
void Init (std::string const &classifier_file, std::string const &regressor_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, Vec3dGetPotential (double dist, Vec3d const &nn)
 Calculates the potential energy and contact position for the collision.
 
std::tuple< double, Vec3d, Vec3dEvaluateContactForces ()
 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
Particleparticle {nullptr}
 
Wallwall {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)
 

Detailed Description

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.

Examples
90_random_packing_trimesh.cpp, 91_triaixal_comp.cpp, 92_angle_of_repose.cpp, and 96_random_packing_ellipsoid.cpp.

Constructor & Destructor Documentation

◆ SolverANNPPlane() [1/2]

netdem::SolverANNPPlane::SolverANNPPlane ( )

Default constructor for the SolverANNPPlane class.

This function constructs a new SolverANNPPlane object with default values.

◆ SolverANNPPlane() [2/2]

netdem::SolverANNPPlane::SolverANNPPlane ( Particle *const p,
Wall *const w )

Constructor for the SolverANNPPlane class.

This function constructs a new SolverANNPPlane object with the provided particle and wall.

Parameters
pThe particle.
wThe wall.

Member Function Documentation

◆ Clone()

CollisionSolverPW * netdem::SolverANNPPlane::Clone ( ) const
overridevirtual

Clone this collision solver.

Implements netdem::CollisionSolverPW.

◆ Detect()

bool netdem::SolverANNPPlane::Detect ( )
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.

Returns
Whether or not a collision was detected.

Implements netdem::CollisionSolverPW.

◆ EvaluateContactForces()

tuple< double, Vec3d, Vec3d > netdem::SolverANNPPlane::EvaluateContactForces ( )

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.

Returns
A tuple containing the force, moment, and position vectors.

◆ GetPotential()

tuple< double, Vec3d > netdem::SolverANNPPlane::GetPotential ( double dist,
Vec3d const & nn )

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.

Parameters
distThe distance between the particle and the wall.
nnThe normal vector of the wall.
Returns
A tuple containing the potential energy and contact position.

◆ Init() [1/2]

void netdem::SolverANNPPlane::Init ( Particle *const p,
Wall *const w )
overridevirtual

Initializes the collision solver with a particle and a wall.

This function initializes the collision solver with the provided particle and wall.

Parameters
pThe particle.
wThe wall.

Reimplemented from netdem::CollisionSolverPW.

◆ Init() [2/2]

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.

Parameters
classifier_fileThe name of the file containing the classification model data.
regressor_fileThe name of the file containing the regression model data.
Examples
90_random_packing_trimesh.cpp, 91_triaixal_comp.cpp, 92_angle_of_repose.cpp, and 96_random_packing_ellipsoid.cpp.

◆ ResolveInit()

void netdem::SolverANNPPlane::ResolveInit ( ContactPW *const cnt,
double timestep )
overridevirtual

Prepare for resolving the collision by initializing the ContactPW object.

Parameters
cntA pointer to a ContactPW object storing details of the collision.
timestepThe timestep length used in the simulation.

Implements netdem::CollisionSolverPW.

◆ ResolveInit_LinearSpring()

void netdem::SolverANNPPlane::ResolveInit_LinearSpring ( CollisionGeometries *const cnt_geoms,
double timestep )

◆ ResolveInit_PotentialBased()

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.

Parameters
cnt_geomsThe collision geometries used to resolve the collision.
timestepThe timestep used for the simulation.

◆ ResolveInit_VolumeBased()

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.

Parameters
cnt_geomsThe collision geometries used to resolve the collision.
timestepThe timestep used for the simulation.

◆ ResolveUpdate()

void netdem::SolverANNPPlane::ResolveUpdate ( ContactPW *const cnt,
double timestep )
overridevirtual

Update the particle and wall involved in the collision based on the current state of the simulation.

Parameters
cntA pointer to a ContactPW object storing details of the collision.
timestepThe timestep length used in the simulation.

Implements netdem::CollisionSolverPW.

◆ ResolveUpdate_LinearSpring()

void netdem::SolverANNPPlane::ResolveUpdate_LinearSpring ( CollisionGeometries *const cnt_geoms,
double timestep )

◆ ResolveUpdate_PotentialBased()

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.

Parameters
cnt_geomsThe collision geometries used to resolve the collision.
timestepThe timestep used for the simulation.

◆ ResolveUpdate_VolumeBased()

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.

Parameters
cnt_geomsThe collision geometries used to resolve the collision.
timestepThe timestep used for the simulation.

Member Data Documentation

◆ classifier

netdem::GeneralNet netdem::SolverANNPPlane::classifier

The neural network model used for classification.

◆ regressor

netdem::RegressionNet netdem::SolverANNPPlane::regressor

The neural network model used for regression.


The documentation for this class was generated from the following files: