Commit fc809d47 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

wip

parent b02feb06
Pipeline #9333 failed with stages
in 2 minutes and 20 seconds
......@@ -334,7 +334,8 @@ static int contact_init_disk_particle(Contact *c, ParticleProblem *p, size_t dis
}
c->type = PARTICLE_DISK;
double basis[DIMENSION][DIMENSION];
double D = contact_update_disk_particle(c, p, x, basis, c->r0, c->r1);
double r0[DIMENSION], r1[DIMENSION];
double D = contact_update_disk_particle(c, p, x, basis, r0, r1);
c->D0 = fmin(D, 0);
return D < alert;
}
......@@ -406,7 +407,8 @@ static int contact_init_segment_particle(Contact *c, ParticleProblem *p, size_t
}
c->type = PARTICLE_SEGMENT;
double basis[DIMENSION][DIMENSION];
double D = contact_update_segment_particle(c, p, x, basis, c->r0, c->r1);
double r0[DIMENSION],r1[DIMENSION];
double D = contact_update_segment_particle(c, p, x, basis, r0, r1);
c->D0 = fmin(D, 0);
return D < alert;
}
......@@ -795,6 +797,8 @@ void contact_tree_add_particle(ContactTree *tree, int id, const Contact *old_con
if ((cold = findContactSorted(c, old_contacts, iold))) {
for (int d = 0; d < DIMENSION; ++d) {
c->impulse[d] = cold->impulse[d];
c->r0[d] = cold->r0[d];
c->r1[d] = cold->r1[d];
}
contact_apply(c, p);
}
......@@ -845,6 +849,8 @@ static void contact_tree_gen_boundary_contact(ContactTree *tree, ContactType typ
if ((cold = findContactSorted(c, old_contacts, iold))) {
for (int d = 0; d < DIMENSION; ++d) {
c->impulse[d] = cold->impulse[d];
c->r0[d] = cold->r0[d];
c->r1[d] = cold->r1[d];
}
contact_apply(c, p);
}
......
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