Skip to content

Commit

Permalink
Refactoring collision.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
KeitaNakamura committed Aug 11, 2024
1 parent ecded91 commit c9982fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/literate/examples/collision.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ function main(transfer::Transfer = FLIP(1.0))

## Particles
particles = let
if @isdefined(RUN_TESTS) && RUN_TESTS #src
pts = generate_particles(ParticleProp, grid.x; alg=PoissonDiskSampling(StableRNG(1234))) #src
else #src
pts = generate_particles(ParticleProp, grid.x)
end #src
if @isdefined(RUN_TESTS) && RUN_TESTS #src
pts = generate_particles(ParticleProp, grid.x; alg=PoissonDiskSampling(StableRNG(1234))) #src
end #src
pts.V .= pts.V⁰ .= volume(grid.x) / length(pts)

lhs = findall(pts.x) do (x, y)
Expand Down

0 comments on commit c9982fd

Please sign in to comment.