-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch default for foreach_point_neighbor #687
base: main
Are you sure you want to change the base?
Conversation
…les.jlOpen into change_defaults_of_nhs
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #687 +/- ##
==========================================
- Coverage 68.75% 68.71% -0.04%
==========================================
Files 93 93
Lines 5840 5840
==========================================
- Hits 4015 4013 -2
- Misses 1825 1827 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also remove points=eachparticle(system)
for the corrections and the boundary stuff, since it's the default now?
@@ -11,7 +11,11 @@ function interact!(dv, v_particle_system, u_particle_system, | |||
# Loop over all pairs of particles and neighbors within the kernel cutoff. | |||
foreach_point_neighbor(particle_system, neighbor_system, | |||
system_coords, neighbor_coords, | |||
neighborhood_search) do particle, neighbor, pos_diff, distance | |||
neighborhood_search; | |||
points=each_moving_particle(particle_system)) do particle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant. All particles are moving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be not the case I think if they are deactivated?
neighborhood_search) do particle, neighbor, | ||
pos_diff, distance | ||
neighborhood_search; | ||
points=each_moving_particle(system)) do particle, neighbor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
@@ -103,7 +103,9 @@ function calc_normal_akinci!(system, neighbor_system::FluidSystem, | |||
|
|||
foreach_point_neighbor(system, neighbor_system, | |||
system_coords, neighbor_system_coords, | |||
neighborhood_search) do particle, neighbor, pos_diff, distance | |||
neighborhood_search; | |||
points=each_moving_particle(system)) do particle, neighbor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? What about fixed boundary particles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends but in this model it is assumed that the boundary particles don't belong to the same species.
@@ -176,7 +176,9 @@ function update!(density_diffusion::DensityDiffusionAntuono, neighborhood_search | |||
set_zero!(normalized_density_gradient) | |||
|
|||
foreach_point_neighbor(system, system, system_coords, system_coords, | |||
neighborhood_search) do particle, neighbor, pos_diff, distance | |||
neighborhood_search; | |||
points=each_moving_particle(system)) do particle, neighbor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
@@ -22,7 +22,11 @@ function interact!(dv, v_particle_system, u_particle_system, | |||
# Loop over all pairs of particles and neighbors within the kernel cutoff. | |||
foreach_point_neighbor(particle_system, neighbor_system, | |||
system_coords, neighbor_system_coords, | |||
neighborhood_search) do particle, neighbor, pos_diff, distance | |||
neighborhood_search; | |||
points=each_moving_particle(particle_system)) do particle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
…les.jlOpen into change_defaults_of_nhs
Using each_moving_particle as default leads to hard to debug issues especially in multi system simulations.