Skip to content

Use robust geometry status for VecGeom to support VecGeom 2#2330

Draft
sethrj wants to merge 16 commits into
celeritas-project:developfrom
sethrj:vg-geo-status
Draft

Use robust geometry status for VecGeom to support VecGeom 2#2330
sethrj wants to merge 16 commits into
celeritas-project:developfrom
sethrj:vg-geo-status

Conversation

@sethrj

@sethrj sethrj commented Mar 22, 2026

Copy link
Copy Markdown
Member

CHAINED on #2328

This adds a boundary crossing status for VecGeom and eliminates the need for bumps, and I think allow most existing code to work . Current issues:

  • normal vectors don't work on some surfaces
  • the reduced BVH precision seems to introduce some differences in boundary crossings

@sethrj sethrj added enhancement New feature or request geometry Geometry-related features (geocel) labels Mar 22, 2026
@github-actions

github-actions Bot commented Mar 22, 2026

Copy link
Copy Markdown

Test summary

 5 086 files   8 291 suites   7m 35s ⏱️
 1 855 tests  1 843 ✅  10 💤 2 ❌
27 651 runs  27 495 ✅ 151 💤 5 ❌

For more details on these failures, see this check.

Results for commit 4015e61.

♻️ This comment has been updated with latest results.

sethrj added 14 commits April 2, 2026 18:11
Store GeoStatus and surface normal in VecgeomStateData alongside
position and direction. Update resize to initialize new fields.

In VecgeomTrackView, replace the temporary bool failed_ member with
a persistent GeoStatus stored in state, add geo_status() getter/setter,
update failed() to check for GeoStatus::error, and change normal() to
return a const reference to the cached state field.

Prompt: "It looks like `ninja test/geocel/vg_Vecgeom && ctest -R Vecgeom` shows all tests pass."
Assisted-by: GitHub Copilot (claude-sonnet-4-5)
This reverts commit d24436cb0bfca0c2ee1236ac9f48d2829167f288.
Store GeoStatus and surface normal in VecgeomStateData alongside
position and direction. Update resize to initialize new fields.

In VecgeomTrackView, replace the temporary bool failed_ member with
a persistent GeoStatus stored in state, add geo_status() getter/setter,
update failed() to check for GeoStatus::error, and change normal() to
return a const reference to the cached state field.

Prompt: "Now use your best guess from the earlier diff to add assertions and conditionals relating to the geo status. Again, for this changeset, do not build nor test."
Assisted-by: GitHub Copilot (claude-sonnet-4-5)
In move_to_boundary, replace the direction-as-placeholder normal with
the approach from PR celeritas-project#1926: use VecGeom's VUnplacedVolume::Normal() to
compute the surface normal in local coordinates, then transform back to
global via InverseTransformDirection. If the normal is invalid, log an
error and fall back to the direction of travel.

Prompt: "I still want to cache the value, but please apply the code from
Assisted-by: GitHub Copilot (claude-sonnet-4-5)
celeritas-project#1926 to replace the placeholder."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request geometry Geometry-related features (geocel)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant