Fix interpolation and small fixes to callbacks#1101
Fix interpolation and small fixes to callbacks#1101efaulhaber wants to merge 3 commits intotrixi-framework:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1101 +/- ##
===========================================
- Coverage 89.51% 67.25% -22.27%
===========================================
Files 126 126
Lines 9614 9601 -13
===========================================
- Hits 8606 6457 -2149
- Misses 1008 3144 +2136
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.
| of integration time. This callback does not add extra time | ||
| steps / `tstops`; instead, reinitialization is triggered at | ||
| the first solver step after each `dt` interval has elapsed. | ||
| - `reinit_initial_solution`: Reinitialize the initial solution (default=false) |
| if length(save_times) > 0 | ||
| return PresetTimeCallback(save_times, solution_callback) | ||
| return PresetTimeCallback(save_times, solution_callback, | ||
| save_positions=(false, false), | ||
| initialize=(initialize_save_cb!)) | ||
| elseif dt > 0 |
This PR
include_wall_velocity == trueandcut_off_bnd == false,SummationDensityis in the simulation.