celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/
Other
65 stars 35 forks source link

Add optical absorption model with imported data #1440

Closed hhollenb closed 1 month ago

hhollenb commented 1 month ago

The base optical Model class with AbsorptionModel as an example case. ImportedModels is a list of ImportOpticalModels with a map for built-in model classes to their imported identifier, and can be built directly or from imported data with a ModelImporter (included in a later PR). ImportedModelAdapter can then be used by models to access their MFP tables.

MFP tables are built with detail::MfpBuilder which internally handles the grid IDs that a model builds. It should probably be refactored when we refactor the rest of the grid builders.

For testing I created a MockImportData class to handle a bunch of common mock data and functions that the model classes use. I find that it makes writing the tests easy and fairly consistent, but could probably use a good critique.

github-actions[bot] commented 1 month ago

Test summary

 3 345 files   5 161 suites   3m 56s :stopwatch:  1 548 tests  1 520 :white_check_mark: 28 :zzz: 0 :x: 17 138 runs  17 075 :white_check_mark: 63 :zzz: 0 :x:

Results for commit f5d3329f.

:recycle: This comment has been updated with latest results.

amandalund commented 1 month ago

Sorry for the delay @hhollenb --this looks great at first glance, I'll go over it in detail first thing tomorrow!

hhollenb commented 1 month ago

Ack sorry I clicked merge before I read you comment. I'll setup the Rayleigh scattering PR which will be mostly the same and can be used for some further review.

sethrj commented 1 month ago

I didn't even realize you had permissions to merge 🤔