Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add computation of light crossing time of a cell. #6093

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

ffoucart
Copy link
Contributor

Proposed changes

Add function to approximate the minimum crossing time across a cell, when moving at the speed of light.
The exact use of that function in the MC code will depend on how we provide GZ information to the algorithm.

Upgrade instructions

NA

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Copy link
Member

@kidder kidder left a comment

Choose a reason for hiding this comment

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

you can squash the changes

sqrt(inv_spatial_metric.get(0, 0)[i]) * get(lapse)[i]);
for (size_t d = 1; d < 3; d++) {
const double dim_crossing_time =
dx_inertial[d] /
Copy link
Member

Choose a reason for hiding this comment

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

dx_inertial[d] -> gsl::at(dx_inertial, d)

This will do bounds checking in DEBUG builds

@kidder kidder enabled auto-merge June 17, 2024 20:31
@kidder kidder merged commit 0c27072 into sxs-collaboration:develop Jun 17, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants