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

Tweaks to Universe::find_cell #2662

Merged
merged 4 commits into from
Aug 24, 2023

Conversation

pshriwise
Copy link
Contributor

Description

Small PR here with tweakt to the Universe::find_cell method to pull some variables out of the for loop and take advantage of a chcne to use the recently-added Particle::lowest_cord method.

This is just a refactor, so no new tests have been added.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format on any C++ source files (if applicable)

@gridley
Copy link
Contributor

gridley commented Aug 22, 2023

Nice -- do you think this would be a good place to replace p.coord(p.n_coord() - 1) in other areas as well? It appears many other times.

@pshriwise
Copy link
Contributor Author

pshriwise commented Aug 22, 2023

As good as any! Just made those changes 👍🏻

Copy link
Contributor

@gridley gridley left a comment

Choose a reason for hiding this comment

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

Beautiful changes!

@paulromano paulromano merged commit 06d6437 into openmc-dev:develop Aug 24, 2023
stchaker pushed a commit to stchaker/openmc that referenced this pull request Oct 25, 2023
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.

3 participants