Skip to content

Conversation

@nilsvu
Copy link
Member

@nilsvu nilsvu commented Sep 20, 2024

Proposed changes

Used to find the surface of a star in volume data, then deform the domain to conform to the surface. This is needed for BNS initial data.

Upgrade instructions

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.

Further comments

@nilsvu
Copy link
Member Author

nilsvu commented Sep 20, 2024

@isaaclegred FYI

@nilsvu
Copy link
Member Author

nilsvu commented Sep 21, 2024

@nilsdeppe can you take this one? It's for BNS ID.

@nilsdeppe nilsdeppe self-requested a review September 22, 2024 15:21
Copy link
Member

@nilsdeppe nilsdeppe left a comment

Choose a reason for hiding this comment

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

LGTM, a few suggestions that you can squash immediately

"-l",
type=int,
required=True,
help="Max l-mode for the horizon search.",
Copy link
Member

Choose a reason for hiding this comment

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

Several occurrences of horizon -> surface

if np.all(filled):
break
if not np.all(filled):
raise ValueError("Unable to find the surface.")
Copy link
Member

Choose a reason for hiding this comment

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

Would there be any value in printing out any additional info? Or maybe a verbosity flag to allow printing more? E.g. did no rays succeed or only some not succeed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to this:

ValueError: Unable to find the surface where Field = 0.2 with center [0.0, 0.0, 0.0]. Missing values for 325 / 325 
radial rays. One of the missing rays goes through: [0.01771545 0.         0.09841831]

Comment on lines 182 to 186
if output_surfaces_file:
assert output_coeffs_subfile or output_coords_subfile, (
"Specify either 'output_coeffs_subfile' or 'output_coords_subfile'"
" or both."
)
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this check to the beginning of the function so that you can learn this info before we do a bunch of work trying to find the surface? I would be a bit annoyed if I had to wait to find a surface (I don't know how long it'll take) and then got this...

Used to find the surface of a star in volume data,
then deform the domain to conform to the surface.
@nilsvu
Copy link
Member Author

nilsvu commented Sep 23, 2024

Done! Thanks for your review!

@nilsdeppe nilsdeppe merged commit 776d80c into sxs-collaboration:develop Sep 24, 2024
@nilsvu nilsvu deleted the find_surface branch October 22, 2024 20:29
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