Skip to content

Fix Periodic Errors Near IB Surface - #1922

Draft
danieljvickers wants to merge 4 commits into
MFlowCode:masterfrom
danieljvickers:debug-ib-periodic-errors
Draft

danieljvickers wants to merge 4 commits into
MFlowCode:masterfrom
danieljvickers:debug-ib-periodic-errors

Conversation

@danieljvickers

Copy link
Copy Markdown
Member

Contribution Policy

We get an error when we try to look for ghost points that are on the other side of processor boundaries. We had a check to prevent looking inside walls, but it also applied to periodic conditions that should be open. This fixes the issue. While I was in there, I grouped some ugly code into a single macro.

@danieljvickers
danieljvickers marked this pull request as ready for review September 26, 2026 23:51
@github-actions

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/simulation/m_ibm.fpp 1397 -11
Directory Lines Diff
simulation 28054 -11
total 46992 -11

@github-actions

Copy link
Copy Markdown

Claude Code Review

Head SHA: 97fc643

Files changed:

  • 1
  • src/simulation/m_ibm.fpp

Findings:

  • src/simulation/m_ibm.fpp: In the new #:for loop, the domain-boundary flags are written to ghost_points_in(local_idx)%DB(${ID}$), but every other field for this same local_idx in this block (e.g. ghost_points(local_idx)%z_periodicity, ghost_points(local_idx)%slip in the unchanged lines immediately above) is written to ghost_points, not ghost_points_in. If ghost_points_in is a distinct array (rather than a typo for ghost_points), the %DB component of ghost_points(local_idx) is left unset/uninitialized by this code path, silently breaking the domain-boundary logic used elsewhere for ghost-point boundary treatment.

@danieljvickers
danieljvickers marked this pull request as draft September 28, 2026 01:48

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.

1 participant