Skip to content

(Dale et al. 2007) like inverse ray tracing method for HII regions and cleanup#814

Merged
Yrisch merged 43 commits into
danieljprice:mainfrom
Yrisch:HII_simpleraytracing
May 17, 2026
Merged

(Dale et al. 2007) like inverse ray tracing method for HII regions and cleanup#814
Yrisch merged 43 commits into
danieljprice:mainfrom
Yrisch:HII_simpleraytracing

Conversation

@Yrisch
Copy link
Copy Markdown
Collaborator

@Yrisch Yrisch commented May 16, 2026

Description:
I implemented the inverse ray-tracing method to compute the Strömgren volume of a massive star (in Jim Dale's series of papers). It has been hanging on a branch for a few months now. I had to do some cleanup for my PhD, and I think it is finally ready to merge. This new method is not a replacement for the old one. Both can be chosen by changing the iH2R variable.

-First, there is a major rework of the arrays used for the method. I removed the isionised array, which was unnecessary, and used eos_vars instead.
-The ray tracing method has been added in h2region.f90 and is now accessible with iH2R=2. The ray tracer is very similar to the one used in utils_raytracer.f90. It might be helpful to abstract the methods in this one to use it for this purpose. Probably a big work though...
-Every call of HII_feedback routine has been relocated in derivs just before cons2prim, where it should have been since the beginning.

  • A unit test is now set by default to check both methods on a 40 Msun star and a homogeneous cloud following Bisbas et al. 2015
  • A basic setup has been added to test the methods in real conditions

I had a massive merge conflict since my branch was quite old... I did my best to resolve it without breaking anything. I'm hoping the tests will find my mistakes if I made any.

Components modified:

  • Setup (src/setup)
  • Main code (src/main)
  • Moddump utilities (src/utils/moddump)
  • Analysis utilities (src/utils/analysis)
  • Test suite (src/tests)
  • Documentation (docs/)
  • Build/CI (build/ or github actions)

Type of change:

  • Bug fix
  • Physics improvements
  • Better initial conditions
  • Performance improvements
  • Documentation update
  • Better testing
  • Code cleanup / refactor
  • Other (please describe)

Testing:
See above

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? yes

Yrisch and others added 30 commits October 15, 2024 10:03
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 refactors the HII region feedback module, introducing an inverse ray tracing algorithm and updating the equation of state to manage ionization states through temperature and molecular weight thresholds. The changes also include integration with the derivative calculation step and new test setups. Review feedback identifies several critical issues, including a compilation error due to a missing OpenMP shared variable, a bug in smoothing length assignment, and a race condition in parallel source updates. Further improvements are needed regarding the neighbor cache size, the physical accuracy of boundary interpolation, and the initialization of the overlap array.

Comment thread src/main/H2regions.f90 Outdated
Comment thread src/main/H2regions.f90
Comment thread src/main/H2regions.f90 Outdated
Comment thread src/main/H2regions.f90
Comment thread src/main/H2regions.f90 Outdated
Comment thread src/main/H2regions.f90
Comment thread src/main/H2regions.f90
@Yrisch Yrisch merged commit 8494ae6 into danieljprice:main May 17, 2026
269 checks passed
@Yrisch Yrisch deleted the HII_simpleraytracing branch May 17, 2026 18:57
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.

1 participant