Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fluidparticles
MigFlow
Commits
fc809d47
Commit
fc809d47
authored
May 04, 2021
by
Jonathan Lambrechts
Browse files
wip
parent
b02feb06
Pipeline
#9333
failed with stages
in 2 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scontact/scontact.c
View file @
fc809d47
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment