[newchem-cpp] transcribe calc_temp_cloudy_g#380
Merged
brittonsmith merged 10 commits intoSep 12, 2025
Merged
Conversation
The main goal is to construct an instance of `InternalGrUnits` that will be passed into `calc_temp_cloudy_g`, once it is transcribed. `local_calculate_cooling_time` and `local_solve_chemistry` similarly pass instances of `InternalGrUnits` into functions that have already been transcribed from Fortran. When I added `#include "internal_units.h"`, I decided to also replace 2 existing include directives with `#include "grackle.h"` - this is a convention I have been moving us towards (it lets us avoid multiple copies of some function declarations and we will be moving the replaced headers in future releases) - I removed all the declarations now made redundant by "grackle.h"
I essentially started to use ``grackle_index_helper`` & ``idx_range``: - I localized declarations of variables that are provided by these types - I made the loop bounds over ``i`` start to use idx_range.i_start and idx_range.i_stop
I altered the spatial indexing so that it is 0-indexed
…2024transcribe/calc_temp_cloudy_g I needed to introduce the bugfix from PR grackle-project#367.
This was referenced Aug 20, 2025
brittonsmith
approved these changes
Sep 12, 2025
brittonsmith
left a comment
Contributor
There was a problem hiding this comment.
Reviewing this commit by commit was helpful!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR was originally proposed as brittonsmith#34
This should not be reviewed until after #379 is merged
This PR transcribes
calc_temp_cloudy_gfrom Fortran to C++. At this point the procedure is becoming pretty standardized. It might be easier to review commit-by-commit