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

Better domain errors, atmosphere density in ID, and velocity limiting in atmosphere. #6429

Merged
merged 5 commits into from
Jan 15, 2025

Conversation

nilsdeppe
Copy link
Member

Proposed changes

Various changes that make BNS simulations more robust. More will be added in future PRs as I write tests for the code.

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

@nilsdeppe nilsdeppe requested a review from kidder January 4, 2025 21:13
- Turn some ASSERTs into ERRORs because these can be triggered from the input
  file!
- Clarify an error message about the cube with values. Not having values in an
  error makes it more difficult to fix.
This allows us to start the code in a more consistent state since atmosphere
treatments are generally applied _after_ a time step.
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 any changes

r_squared_(momentum_density_squared /
square(rest_mass_density_times_lorentz_factor)),
r_(std::sqrt(r_squared_)),
r_(std::sqrt(momentum_density_squared /
Copy link
Member

Choose a reason for hiding this comment

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

why sqrt a square?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, it shouldn't be needed, but might help with robustness against negative evolved vars, so I would prefer to keep it to match the previous algorithm...

ASSERT(orientations_of_all_blocks.size() == corners_of_all_blocks.size(),
"Each block must have an OrientationMap relative to an edifice.");
if (orientations_of_all_blocks.size() != corners_of_all_blocks.size()) {
ERROR("Each block must have an OrientationMap relative to an edifice.");
Copy link
Member

Choose a reason for hiding this comment

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

what is an edifice?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have no idea, sorry. You'll have to ask the original author, which looks like is Marcie based on the git log.

@nilsdeppe nilsdeppe merged commit 25821bd into sxs-collaboration:develop Jan 15, 2025
21 of 24 checks passed
@nilsdeppe nilsdeppe deleted the bns_improvements_5 branch January 15, 2025 18:23
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