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
7b737faf
Commit
7b737faf
authored
Mar 25, 2019
by
Jonathan Lambrechts
Browse files
no n^2 for _fc
parent
44fa73d6
Pipeline
#5197
passed with stage
in 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/scontact.py
View file @
7b737faf
...
...
@@ -168,6 +168,8 @@ class ParticleProblem :
return
np
.
array
([],
np
.
int32
)
def
previousContactForces
(
self
):
if
self
.
_fc
is
None
:
self
.
_fc
=
np
.
zeros_like
(
self
.
velocity
())
return
(
self
.
_fc
)
def
set_boundary_velocity
(
self
,
tag
,
v
)
:
...
...
@@ -352,7 +354,6 @@ class ParticleProblem :
tag -- particle tag
"""
self
.
_lib
.
particleProblemAddParticle
(
self
.
_p
,
self
.
_coord_type
(
*
x
),
c_double
(
r
),
c_double
(
m
),
tag
.
encode
())
self
.
_fc
=
np
.
zeros_like
(
self
.
velocity
())
def
set_use_queue
(
self
,
use_queue
=
1
):
"""Enables the use of the queue if 1 and disables it if 0."""
...
...
Write
Preview
Markdown
is supported
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