Skip to content

qbnd/qsim: carry source-medium matline across CSG sibling-pair faces#346

Draft
ggalgoczi wants to merge 1 commit into
mainfrom
qbnd-sibling-pair-matline
Draft

qbnd/qsim: carry source-medium matline across CSG sibling-pair faces#346
ggalgoczi wants to merge 1 commit into
mainfrom
qbnd-sibling-pair-matline

Conversation

@ggalgoczi
Copy link
Copy Markdown
Contributor

GBndLib does not enumerate boundary entries for CSG sibling pair faces (two daughters of one parent sharing a face), so OptiX can pick a boundary whose m1/m2 do not reference the photon's current medium -> absorption/scattering sampled in the wrong material1. Carry the photon's matline (seeded from the genstep at birth in CSGOptiX7.cu, updated each propagate_at_boundary) in sctx::current_matline and use it as m1 in qbnd::fill_state when valid. No-op for correctly-enumerated boundaries (carried == the boundary's own m1_line).

GBndLib does not enumerate boundary entries for CSG sibling-pair faces (two daughters of one parent sharing a face), so OptiX can pick a boundary whose m1/m2 do not reference the photon's current medium -> absorption/scattering sampled in the wrong material1. Carry the photon's matline (seeded from the genstep at birth in CSGOptiX7.cu, updated each propagate_at_boundary) in sctx::current_matline and use it as m1 in qbnd::fill_state when valid. No-op for correctly-enumerated boundaries (carried == the boundary's own m1_line).
@ggalgoczi ggalgoczi self-assigned this May 29, 2026
@ggalgoczi ggalgoczi added the enhancement New feature or request label May 29, 2026
@ggalgoczi ggalgoczi marked this pull request as draft May 29, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant