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
00fb7c46
Commit
00fb7c46
authored
Aug 29, 2018
by
Matthieu Constant
Browse files
python file to reload
parent
0a1e7f6a
Pipeline
#4049
passed with stage
in 1 minute and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/marblesbag/fluid.py
View file @
00fb7c46
...
...
@@ -87,14 +87,14 @@ class fluid_problem :
def
implicit_euler
(
self
,
dt
)
:
return
lib
.
fluid_problem_implicit_euler
(
self
.
_fp
,
c_double
(
dt
))
def
set_particles
(
self
,
mass
,
volume
,
position
,
velocity
,
init
=
False
):
def
set_particles
(
self
,
mass
,
volume
,
position
,
velocity
,
reload
=
False
):
def
np2c
(
a
)
:
tmp
=
numpy
.
require
(
a
,
"float"
,
"C"
)
r
=
c_void_p
(
tmp
.
ctypes
.
data
)
r
.
tmp
=
tmp
return
r
self
.
n_particles
=
mass
.
shape
[
0
]
lib
.
fluid_problem_set_particles
(
self
.
_fp
,
c_int
(
mass
.
shape
[
0
]),
np2c
(
mass
),
np2c
(
volume
),
np2c
(
position
),
np2c
(
velocity
),
None
,
c_int
(
init
))
lib
.
fluid_problem_set_particles
(
self
.
_fp
,
c_int
(
mass
.
shape
[
0
]),
np2c
(
mass
),
np2c
(
volume
),
np2c
(
position
),
np2c
(
velocity
),
None
,
c_int
(
reload
))
def
_get_matrix
(
self
,
f_name
,
nrow
,
ncol
)
:
f
=
getattr
(
lib
,
"fluid_problem_"
+
f_name
)
...
...
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