(set_star) MAJOR cleanup of setup_star into neat subroutines with high level functions #297
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of PR:
cleanup of setup_star routine
Description:
Shifted most of the functionality done in setup_star.f90 into a new helper module called set_star.f90 which also replaced and incorporates set_stellar_core.f90. The aim is twofold:
Outputs from the relax-o-matic procedure are now useable as starting files, even if stopped half-way through the relaxation. For this we needed to put the setting of the thermal energy of the particles into a new set_star_thermalenergy routine. I kept going from there to clean up the entire routine.
in principle it should now be possible to more easily set up stars from other code modules (e.g. moddump or setup_tde.f90) with the full functionality of setup_star: namely being able to map and relax tabulated MESA stars
with a few tweaks one could now in principle setup and relax several stars in sequence before placing them in orbits
setup_star.f90 is now easier to read and maintain, basically just a shell handling the options read/write from the .setup file
Bug fixes / other changes:
Testing:
Did you run the bots? yes