Skip to content

Commit 4c72f4e

Browse files
LasNikasLasNikas
andauthored
Fix advection velocity for packing (#835)
Co-authored-by: LasNikas <niklas.nehe@web.de>
1 parent 9c2711c commit 4c72f4e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/preprocessing/particle_packing/system.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ end
387387
v = wrap_v(v_ode, system, semi)
388388
@threaded semi for particle in each_moving_particle(system)
389389
for i in 1:ndims(system)
390-
system.initial_condition.velocity[i, particle] = v[i, particle]
390+
system.advection_velocity[i, particle] = v[i, particle]
391391

392392
# The particle velocity is set to zero at the beginning of each time step to
393393
# achieve a fully stationary state.
@@ -404,7 +404,7 @@ end
404404
# Add advection velocity.
405405
@inline function add_velocity!(du, v, particle, system::ParticlePackingSystem)
406406
for i in 1:ndims(system)
407-
du[i, particle] = system.initial_condition.velocity[i, particle]
407+
du[i, particle] = system.advection_velocity[i, particle]
408408
end
409409

410410
return du

0 commit comments

Comments
 (0)