Add print of SN explosion counts#1546
Conversation
Summary of ChangesHello @chongchonghe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the simulation's observability by integrating a new feature to track and report the number of supernova explosions per simulation step. This provides users with more detailed feedback on stellar evolution events, particularly when running in verbose mode, without altering the core physics or simulation behavior. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Code Review
This pull request correctly implements the feature to count and print the number of supernova explosions. The changes are well-structured, modifying function signatures to return the count alongside the maximum velocity, and correctly using GPU atomics and MPI reductions to aggregate the count. The new log output is a valuable addition for debugging and analysis. I have one minor suggestion to improve logging consistency.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@BenWibking @markkrumholz This is ready for review. |
### Description Refactored RandomBlast Problem: The testRandomBlast.cpp problem was significantly refactored to utilize the new particle system for SN feedback, removing the previous stochastic sampling method and integrating particle initialization from a file. Particle Generation Script: Added a new Python script (create_particles.py) to generate initial particle distributions for various types (CIC, Sink, Rad, StochasticStellarPop) with options for spatial sampling (uniform, Gaussian, Plummer) and physical parameters. Dependent on #1546 : Supernova (SN) Explosion Tracking: Modified the C++ particle physics core to accurately track and return the number of supernova explosions occurring within a simulation timestep, enhancing diagnostics and logging ### Checklist _Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an `x` inside the square brackets `[ ]` in the Markdown source below:_ - [x] I have added a description (see above). - [x] I have added a link to any related issues (if applicable; see above). - [x] I have read the [Contributing Guide](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md). - [x] I have added tests for any new physics that this PR adds to the code. - [x] *(For quokka-astro org members)* I have manually triggered the GPU tests with the magic comment `/azp run`. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
Print the number of stars that went SN explosion in each step (if >0) when
verbose = true.Also change the format of some print logs in the particle module to make them more consistent and avoid excessive logs.
Related issues
Are there any GitHub issues that are fixed by this pull request? Add a link to them here.
Checklist
Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an
xinside the square brackets[ ]in the Markdown source below:/azp run.