Skip to content

Fix edge cases with optical setup and runtime#2191

Merged
sethrj merged 3 commits intoceleritas-project:developfrom
sethrj:optical-physics-test
Jan 13, 2026
Merged

Fix edge cases with optical setup and runtime#2191
sethrj merged 3 commits intoceleritas-project:developfrom
sethrj:optical-physics-test

Conversation

@sethrj
Copy link
Member

@sethrj sethrj commented Jan 12, 2026

This adds a high-level coverage test for optical physics with surfaces, originally targeting #1928 , but using a test input that discovered two edge cases we didn't account for:

  • Total cross section can be exactly zero in vacuum
  • Not all optical materials have to be used in the geometry (we could turn this into a warning instead of a subtle informational message)

@sethrj sethrj requested a review from amandalund January 12, 2026 17:58
@sethrj sethrj added bug Something isn't working physics Particles, processes, and stepping algorithms labels Jan 12, 2026
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.27%. Comparing base (5336a7f) to head (9ed1cfa).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/celeritas/optical/MaterialParams.cc 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2191      +/-   ##
===========================================
+ Coverage    86.15%   86.27%   +0.11%     
===========================================
  Files         1287     1287              
  Lines        40709    40709              
  Branches     12994    12548     -446     
===========================================
+ Hits         35074    35122      +48     
+ Misses        4624     4414     -210     
- Partials      1011     1173     +162     
Files with missing lines Coverage Δ
src/celeritas/optical/PhysicsStepUtils.hh 100.00% <100.00%> (ø)
src/celeritas/optical/MaterialParams.cc 90.74% <92.30%> (-0.49%) ⬇️

... and 126 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

Test summary

 5 757 files   9 242 suites   17m 50s ⏱️
 2 105 tests  2 076 ✅  29 💤 0 ❌
31 506 runs  31 374 ✅ 132 💤 0 ❌

Results for commit 9ed1cfa.

Copy link
Contributor

@amandalund amandalund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@sethrj sethrj merged commit b02826d into celeritas-project:develop Jan 13, 2026
42 checks passed
@sethrj sethrj deleted the optical-physics-test branch January 13, 2026 13:06
@sethrj
Copy link
Member Author

sethrj commented Jan 13, 2026

Shit, I didn't update with #2189 before merging.

sethrj added a commit to sethrj/celeritas that referenced this pull request Jan 13, 2026
* Add high-level optical surface integration test

* Allow optical materials to be unused by geometry volumes

* Allow zero cross section for vacuum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working physics Particles, processes, and stepping algorithms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants