Small fixes to callbacks#1101
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1101 +/- ##
==========================================
- Coverage 89.92% 89.91% -0.02%
==========================================
Files 132 132
Lines 10434 10440 +6
==========================================
+ Hits 9383 9387 +4
- Misses 1051 1053 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refines callback behavior around density reinitialization / steady-state detection / solution saving, and fixes an initial-condition wrapping bug in the fluid pipeline.
Changes:
- Add density-calculator-based dispatch for
reinit_density!inWeaklyCompressibleSPHSystem. - Fix
InitialCondition(sol, ...)to wrap the velocity state withwrap_v(notwrap_u). - Unify/adjust callback implementations: steady-state check scheduling, preset-time saving initialization, and mark density reinit as modifying the integrator state.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/schemes/fluid/weakly_compressible_sph/system.jl |
Dispatch reinit_density! based on density_calculator (Continuity vs Summation). |
src/general/initial_condition.jl |
Correctly wrap the velocity ODE state via wrap_v. |
src/callbacks/steady_state_reached.jl |
Consolidate affect! and move discrete-callback triggering to interval-based condition. |
src/callbacks/solution_saving.jl |
Add save_positions and initialize to the preset-time saving callback path. |
src/callbacks/density_reinit.jl |
Clarify dt semantics in docs and notify the integrator that u was modified after density reinit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR
include_wall_velocity == trueandcut_off_bnd == false,SummationDensityis in the simulation.