Tests for radiative cooling approximation icooling=9#782
Tests for radiative cooling approximation icooling=9#782danieljprice merged 102 commits intodanieljprice:masterfrom
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
|
/gemini review |
There was a problem hiding this comment.
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. |
|
the test failure looks like an accounting issue, since I cannot see a failure, just looks like ntests has been incremented but not npass (should be incremented by calling update_test_scores) ? |
|
Hi @danieljprice, the files are small, <30kb. I did commit them already but happy to move them if need be. |
…able, change some r8 to default real, don't write icooling==9 variables to initial dump file.
|
Hi @danieljprice, we're down to just a couple of errors now. As far as I can tell, these aren't related to things I've changed, so I'm not sure what's going on. |
|
Hi @alisonkyoung1,
|
|
however the SETUP=starcluster test failure is real. The test here is that phantomsetup should run with default options (pressing enter to any questions) and successfully produce a .in file. Phantom itself must also be able to run for one timestep including with DEBUG=yes to check for uninitialised variables. So should be able to reproduce this with: |
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