-
Notifications
You must be signed in to change notification settings - Fork 321
Tests for radiative cooling approximation icooling=9 #782
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
base: master
Are you sure you want to change the base?
Conversation
…re to save dudt_radiative, Warning- these changes make break reads for production runs: fix this
…t with writedump routine
… and use epicyclic frequency in calculation of Q.
… one) to analysis_disc_stresses
Summary of ChangesHello @alisonkyoung1, 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 significantly enhances the testing infrastructure for the radiative cooling approximation ( Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces tests for a new radiative cooling approximation, including a new test file, a GitHub workflow, and associated data files. It also includes a performance improvement in the table search logic within eos_stamatellos.f90 by replacing a linear search with a binary search. However, there are several issues that need to be addressed. The AUTHORS file contains merge conflicts that must be resolved. There are also critical bugs in src/setup/set_disc.f90 related to physical formula implementations. Additionally, the new test script check_masunaga_vs_maxvals.f90 has some inconsistencies that reduce its clarity and correctness. I've provided detailed comments and suggestions for these issues.
|
Running ./phantomsetup crashes and fails to write a dump for >10^6 particles. |
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces tests for the radiative cooling approximation, including a new test for EOS table interpolation and a GitHub workflow for a collapsing sphere test. The changes also include performance improvements in the table search algorithm. My review focuses on improving code clarity, robustness, and maintainability. I've identified some duplicate entries in the AUTHORS file, potential issues in a new test script, and opportunities for code refinement in the updated modules, such as removing magic numbers and commented-out code.
|
I can't figure out why these tests are failing with a divide by zero error...? |
|
@danieljprice The files for running the radiative cooling approx test workflow are currently in /data/cooling/ |
|
Hi @alisonkyoung1 how big are the files required for cooling? If more than a few hundred kb then they can/should be hosted on Zenodo. Are they already committed to the git repo though? For the write_dump crash I think the issue is how the array is passed, it's better to use the syntax below where we send the whole array but give an argument for the index which should be written to the dump: Divide by zero error is probably an uninitialised variable bug? With DEBUG=yes we initialise all reals and ints to NaN and then flag floating point exceptions to check where a variable is used without being set. |
Description:
This introduces tests for icooling=9 and ieos=24. First there's the test test_eos_stam.f90 that checks the read and interpolation of the EOS/opacity table. Second, there's a new Github workflow to run a collapsing sphere test and compare the evolution to a reference result.
Additionally, there's an improved table search in eos_stamatellos.f90.
(Lots of files have changed because I ran the bots and the year updated to 2026.)
Components modified:
Type of change:
Testing:
Checked the results of the test.
Did you run the bots? yes
Did you update relevant documentation in the docs directory? no
Did you add comments such that the purpose of the code is understandable? yes
Is there a unit test that could be added for this feature/bug? n/a