Commit f5ae26b2 authored by Matthieu Constant's avatar Matthieu Constant
Browse files

fix inject aapt order

parent 75ca181c
Pipeline #3894 passed with stage
in 57 seconds
......@@ -103,15 +103,14 @@ fluid.export_vtk(outputdir,0,0)
ii = 0
tic = time.clock()
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
while t < tEnd :
#Adaptation of the mesh. Args are minimal mesh radius, maximal mesh radius and number of elements
if (ii%25==0 and ii != 0):
fluid.adapt_mesh(8e-2,3e-3,10000)
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
else :
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
#Fluid solver
fluid.implicit_euler(dt)
if (ii%25==0 and ii != 0):
fluid.adapt_mesh(8e-2,3e-3,10000)
forces = fluid.compute_node_force(dt)
#Computation of the new velocities
vn = p.velocity() + forces * dt / p.mass()
......@@ -123,6 +122,7 @@ while t < tEnd :
for i in range(nsub) :
p.iterate(dt/nsub, forces)
t += dt
fluid.set_particles(p.mass(), p.volume(), p.position(), p.velocity())
#Output files writting
if ii %outf == 0 :
ioutput = int(ii/outf) + 1
......
Markdown is supported
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