Skip to content

Fix virtual surface crossing#3934

Open
GuySten wants to merge 2 commits intoopenmc-dev:developfrom
GuySten:virt-surface-cross-fix
Open

Fix virtual surface crossing#3934
GuySten wants to merge 2 commits intoopenmc-dev:developfrom
GuySten:virt-surface-cross-fix

Conversation

@GuySten
Copy link
Copy Markdown
Contributor

@GuySten GuySten commented May 3, 2026

Description

Currently, when using complex cells openmc sometimes decide that a particle cross surface that is not on the boundary of the complex cell.

In the illustration below a particle in cell 2 cross a surface and still stays in cell 2 (a virtual crossing).

image

This PR fix that behavior by adding another check in complex cells that after the surface crossing the particle should be outside the cell.

Fixes #3924

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@GuySten GuySten requested a review from paulromano May 3, 2026 10:44
@GuySten GuySten added the Bugs label May 3, 2026
@GuySten GuySten force-pushed the virt-surface-cross-fix branch 4 times, most recently from 04f48e9 to e406ce9 Compare May 3, 2026 13:29
@GuySten GuySten force-pushed the virt-surface-cross-fix branch from e406ce9 to c0d1ce4 Compare May 3, 2026 14:48
@GuySten GuySten requested a review from pshriwise May 5, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in current calculation when surrounding with vacuum material

1 participant