139 double GetPotential(
double dist,
double node_area,
double size_eq,
142 static double KiToKn(
double ki,
double size_eq,
double size_ratio);
144 static double KiFromKn(
double kn,
double size_eq,
double size_ratio);
146 static double KiToEstar(
double ki,
double size_eq,
double size_ratio);
148 static double KiFromEstar(
double Estar,
double size_eq,
double size_ratio);
151 bool solve_1to2{
false}, solve_2to1{
false};
153 double bound_sphere_radius_1, bound_sphere_radius_2;
156 Vec3d pos_1, dpos_12, dpos_12_ref;
157 Vec4d quat_1, dquat_12;
160 Vec3d pos_2, dpos_21, dpos_21_ref;
161 Vec4d quat_2, dquat_21;
163 Shape *shape_1{
nullptr}, *shape_2{
nullptr};
A class representing the geometries associated with a collision.
Definition collision_geometries.hpp:15
An abstract base class for particle-particle collision solvers.
Definition collision_solver_pp.hpp:18
Definition particle.hpp:26
Signed distance field-based contact solver.
Definition solver_sdf_pp.hpp:19
void ResolveUpdate(ContactPP *const cnt, double timestep) override
Updates the contact resolution for a contact point.
Definition solver_sdf_pp.cpp:191
int potential_type
Whether to solve both sides of the collision.
Definition solver_sdf_pp.hpp:31
void ResolveUpdateP2ToP1(CollisionGeometries *const cnt_geoms, double timestep)
Updates the contact resolution from particle 2 to particle 1.
Definition solver_sdf_pp.cpp:336
static double KiToEstar(double ki, double size_eq, double size_ratio)
Definition solver_sdf_pp.cpp:544
void ResolveInitP2ToP1(CollisionGeometries *const cnt_geoms, double timestep)
Initializes the contact resolution from particle 2 to particle 1.
Definition solver_sdf_pp.cpp:284
static double KiFromKn(double kn, double size_eq, double size_ratio)
Definition solver_sdf_pp.cpp:538
CollisionSolverPP * Clone() const override
Creates a copy of the current collision solver.
Definition solver_sdf_pp.cpp:16
PotentialType
An enumeration of potential types used by the solver.
Definition solver_sdf_pp.hpp:28
@ linear
Definition solver_sdf_pp.hpp:28
@ hertz
Definition solver_sdf_pp.hpp:28
void ResolveInitP1ToP2(CollisionGeometries *const cnt_geoms, double timestep)
Initializes the contact resolution from particle 1 to particle 2.
Definition solver_sdf_pp.cpp:390
double GetPotential(double dist, double node_area, double size_eq, double size_ratio)
Calculates the potential energy of a contact point.
Definition solver_sdf_pp.cpp:498
bool use_equivalent_stiffness
Definition solver_sdf_pp.hpp:38
bool Detect() override
Detects collisions between particles.
Definition solver_sdf_pp.cpp:73
static double KiToKn(double ki, double size_eq, double size_ratio)
Definition solver_sdf_pp.cpp:532
static double KiFromEstar(double Estar, double size_eq, double size_ratio)
Definition solver_sdf_pp.cpp:553
bool solve_two_sides
Definition solver_sdf_pp.hpp:34
SolverSDFPP()
Default constructor for the SolverSDFPP class.
Definition solver_sdf_pp.cpp:10
void ResolveInit(ContactPP *const cnt, double timestep) override
Initializes the contact resolution for a contact point.
Definition solver_sdf_pp.cpp:163
void Init(Particle *const p1, Particle *const p2) override
Initializes the collision solver with two particles.
Definition solver_sdf_pp.cpp:18
double beta
Definition solver_sdf_pp.hpp:40
void ResolveUpdateP1ToP2(CollisionGeometries *const cnt_geoms, double timestep)
Updates the contact resolution from particle 1 to particle 2.
Definition solver_sdf_pp.cpp:443
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18
std::array< double, 4 > Vec4d
Definition utils_macros.hpp:19