Skip to content

Fill ib_markers halo cells in post_process - #2011

Draft
sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:fix-ib-markers-halo
Draft

sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:fix-ib-markers-halo

Conversation

@sbryngelson

@sbryngelson sbryngelson commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Fixes #2010

post_process writes ib_markers including its ghost layers, but reads only the interior, so the ghosts were 0. The viz silo assembler let those zeros overwrite the neighbor rank's real cells, showing 2 fluid planes inside the body before each internal rank boundary.

Add s_exchange_ib_markers_halo, which copies the markers into a real scalar_field and fills the MPI-boundary ghosts with the existing s_mpi_sendrecv_variables_buffers, then returns the ghost-inclusive array that s_save_data writes. No new exchange code. Physical-boundary ghosts are left as before.

Verified on test A2036630 (2D IBM rectangle, 50x40, CPU+MPI, silo output at step 1), solid cells per x column for columns 15-34:

run columns 15-22 columns 23-24 columns 25-34
1 rank 16 16 16
2 ranks, master 16 0 16
2 ranks, this PR 16 16 16

The 2-rank output with this PR is identical to the 1-rank output. ./mfc.sh test --no-mpi --no-gpu -j 24 --only IBM passes (61 passed, 0 failed), and ./mfc.sh precheck passes. Only post_process output changes; simulation results are unaffected. The 3D multi-rank case from the issue was not re-run.


Acknowledgement

  • I confirm this PR meets the above expectations and reflects my own understanding and real-world context.

The silo ib_markers field includes the ghost layers, but post_process
reads only the interior, so the ghosts were 0 and overwrote the
neighbor rank's real cells when the files were assembled. Fill them
with the existing MPI buffer exchange.
@github-actions

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/post_process/m_start_up.fpp 808 +16
Directory Lines Diff
post_process 3515 +16
total 47442 +16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

post_process writes unfilled ghost cells of ib_markers on multi-rank runs

1 participant