NetDEM v1.0
Loading...
Searching...
No Matches
solver_sphere_plane.hpp
Go to the documentation of this file.
1#pragma once
2
5#include "particle.hpp"
6#include "shape.hpp"
7#include "shape_plane.hpp"
8#include "shape_sphere.hpp"
9#include "wall.hpp"
10
11namespace netdem {
12
20public:
25
32 SolverSpherePlane(Particle *const p, Wall *const w);
33
39 CollisionSolverPW *Clone() const override;
40
48 void Init(Particle *const p, Wall *const w) override;
49
55 bool Detect() override;
56
64 void ResolveInit(ContactPW *const cnt, double timestep) override;
65
73 void ResolveUpdate(ContactPW *const cnt, double timestep) override;
74
82 void ResolveInit(CollisionGeometries *const cnt_geoms, double timestep);
83
91 void ResolveUpdate(CollisionGeometries *const cnt_geoms, double timestep);
92
93private:
94 Vec3d dpos_12;
95
96 double radius_1, dist_pc_to_plane;
97 Vec3d dir_n, cnt_pos;
98
99 Plane *plane;
100};
101
102} // namespace netdem
A class representing the geometries associated with a collision.
Definition collision_geometries.hpp:15
An abstract class representing a collision solver for a particle and a wall.
Definition collision_solver_pw.hpp:20
A class representing a contact between a particle and a wall.
Definition contact_pw.hpp:22
Definition particle.hpp:26
A class for representing a plane with a center point and normal vector.
Definition shape_plane.hpp:22
A class used to solve collisions between a sphere and a plane.
Definition solver_sphere_plane.hpp:19
CollisionSolverPW * Clone() const override
Clones the current SolverSpherePlane instance.
Definition solver_sphere_plane.cpp:16
void ResolveUpdate(ContactPW *const cnt, double timestep) override
Updates the contact information object and resolves the collision based on the updated information an...
Definition solver_sphere_plane.cpp:50
void ResolveInit(ContactPW *const cnt, double timestep) override
Resolves the collision based on the initial contact information and timestep.
Definition solver_sphere_plane.cpp:42
void Init(Particle *const p, Wall *const w) override
Initializes the SolverSpherePlane instance with the given particles and walls.
Definition solver_sphere_plane.cpp:20
SolverSpherePlane()
Default constructor for SolverSpherePlane class.
Definition solver_sphere_plane.cpp:10
bool Detect() override
Detects if there is a collision between the particle and the wall.
Definition solver_sphere_plane.cpp:40
A class representing a wall object in a physics simulation.
Definition wall.hpp:32
Definition bond_entry.hpp:7
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18