Repository navigation
IB markers: index each save by the save count under CFL time stepping - #1961
Closed
sbryngelson wants to merge 1 commit into
Closed
sbryngelson wants to merge 1 commit into
sbryngelson wants to merge 1 commit into
Conversation
Under cfl_dt the caller passes the save count and t_step_save is left at its default, so t_step/t_step_save collapsed saves 1-99 onto one slot in lustre_ib.dat. Share one f_save_index between writer and post_process reader.
Lines of Code
|
sbryngelson
force-pushed
the
fix-ib-markers-cfl
branch
from
October 10, 2026 16:27
d2f1cbe to
82e7652
Compare
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With CFL-based time stepping (
cfl_adap_dtorcfl_const_dt) andparallel_io = T(shared file, notfile_per_process), post_process shows the wrong immersed-boundary markers for moving IBs: every save in a block of 100 shows the markers of that block's last save.The simulation writes each save's
ib_markersintorestart_data/lustre_ib.datat an offset set by the save number, computed astime_step/t_step_save, and post_process reads it back the same way. Under CFL stepping the caller already passes the save count (save_count = int(mytime/t_save)), andt_step_savekeeps its default of −100. Sok/(-100)is 0 for saves 1–99, −1 for 100–199, and so on: saves overwrite one slot. Fixed-dt runs are unaffected.Change
f_save_index(t_step, cfl_mode, t_step_save)inm_helper_basicreturnst_stepunder CFL stepping, elset_step/t_step_save. The writer (s_write_parallel_ib_data) and the reader (s_read_ib_data_files) both use it, so the two cannot drift apart.Verification
A 2D moving cylinder, 100×100,
cfl_adap_dt = T, 8 saves,parallel_io = T, 2 ranks. For each save, the centroid of the post_processib_markersfield was compared with the IB centre inrestart_data/ib_state_<save>.dat.Found while rendering a 201-save shock–particle-curtain run with 38 moving reacting particles, where markers at save 40 sat 0.5 mm from the particles.
./mfc.sh test -o IBM: 61 passed. No regression test is added: the suite has no pattern for checking post_process output against IB state.The bug was found and verified as described above.
Acknowledgement
Consolidated into #1960. The source changes are retained as separate commits, and this original description is reproduced in full there. Original discussion remains available here.