Skip to content

Commit

Permalink
Fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
amandalund committed Nov 29, 2024
1 parent 2b83e6a commit 6e61bc5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/celeritas/neutron/interactor/detail/CascadeCollider.hh
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ CELER_FUNCTION auto CascadeCollider::operator()(Engine& rng) -> FinalState
{
// Find cos\theta from tabulated angular data for a given CDF
Grid costheta_grid(cdf_grid.y, shared_.reals);
auto calc = TwodGridCalculator(cdf_grid, shared_.reals)(kin_energy_);
auto calc_cdf = [&calc, &costheta_grid](size_type i) {
return calc(costheta_grid[i]);
};
cos_theta = InverseCdfFinder(costheta_grid, calc_cdf)(cdf);
auto calc_cdf
= TwodGridCalculator(cdf_grid, shared_.reals)(kin_energy_);
cos_theta = InverseCdfFinder(Grid(cdf_grid.y, shared_.reals),
[&calc_cdf, &costheta_grid](size_type i) {
return calc_cdf(costheta_grid[i]);
})(cdf);
}
else
{
Expand Down

0 comments on commit 6e61bc5

Please sign in to comment.