Commit 00fb7c46 authored by Matthieu Constant's avatar Matthieu Constant
Browse files

python file to reload

parent 0a1e7f6a
Pipeline #4049 passed with stage
in 1 minute and 7 seconds
......@@ -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)
......
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