Skip to content

Commit 8c0f787

Browse files
author
LasNikas
committed
implement suggestions
1 parent 13a9608 commit 8c0f787

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/schemes/boundary/open_boundary/system.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ function check_domain!(system, v, u, v_ode, u_ode, semi)
311311

312312
@assert length(crossed_boundary_particles)<=length(available_fluid_particles) "Not enough fluid buffer particles available"
313313

314+
# Convert open boundary particles in the fluid domain to fluid particles
314315
@threaded semi for i in eachindex(crossed_boundary_particles)
315316
particle = crossed_boundary_particles[i]
316317
particle_new = available_fluid_particles[i]
@@ -335,11 +336,11 @@ function check_domain!(system, v, u, v_ode, u_ode, semi)
335336
end
336337

337338
crossed_fluid_particles = findall(fluid_candidates)
338-
available_boundary_particles = findall(x -> x == false, system.buffer.active_particle)
339+
available_boundary_particles = findall(==(false), system.buffer.active_particle)
339340

340341
@assert length(crossed_fluid_particles)<=length(available_boundary_particles) "Not enough boundary buffer particles available"
341342

342-
# Check the fluid particles whether they're entering the boundary zone
343+
# Convert fluid particles in the open boundary zone to open boundary particles
343344
@threaded semi for i in eachindex(crossed_fluid_particles)
344345
particle = crossed_fluid_particles[i]
345346
particle_new = available_boundary_particles[i]

test/general/buffer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@test TrixiParticles.each_moving_particle(system_buffer) == 1:n_particles
2626

2727
# Activate a particle
28-
particle_id = findfirst(x -> x == false, system_buffer.buffer.active_particle)
28+
particle_id = findfirst(==(false), system_buffer.buffer.active_particle)
2929
system_buffer.buffer.active_particle[particle_id] = true
3030

3131
TrixiParticles.update_system_buffer!(system_buffer.buffer,

0 commit comments

Comments
 (0)