Commit c1f51bdb authored by Nathan Coppin's avatar Nathan Coppin
Browse files

close

parent 9c743918
Pipeline #9327 failed with stages
in 2 minutes and 24 seconds
......@@ -1034,7 +1034,7 @@ static int contact_solve(ParticleProblem *p, Contact *c, double dt, double tol)
double *v0, *v1;
contact_get_velocity_pointers(c, p, &v0, &v1);
contact_get_local_velocity(c, p, v0, v1, v); // v[0] < 0 if particles get closer
v[0] = fmax(c->p[0]*wdet/wtt-c->D/dt, 0.); // for the normal component, the free velocity that has to be canceled
v[0] = -fmax(c->p[0]*wnn-c->D/dt, 0.); // for the normal component, the free velocity that has to be canceled
double pstick[2] = {
-(+wtt*v[0]-wnt*v[1])/wdet,
......@@ -1052,10 +1052,10 @@ static int contact_solve(ParticleProblem *p, Contact *c, double dt, double tol)
}
}
else {
/*if (v[0]>0) {
if (v[0]>0) {
c->p[0] = 0;
c->p[1] = 0;
}*/
}
if (pstick[1]+c->mu*pstick[0] < 0) {
c->p[0] = -v[0]/(wnn-c->mu*wnt);
c->p[1] = -c->mu*c->p[0];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment