[newchem-cpp] cleanup calc_tdust_3d_g#276
Merged
brittonsmith merged 13 commits intoJun 11, 2025
Merged
Conversation
this parallel clause is used when converting from comoving to proper
this parallel clause is used when converting from proper to comoving
Removed unused local variables from `calc_tdust_3d_g` that followed the naming scheme used in solve_rate_cool for tracking the mass density for the mass densities of various metal species used in dust chemistry. There was logic to convert between proper and comoving units for each of these variables, but they were not actually used for anything (which is a good thing since they were never initialized). These variable declarations were probably blindly copied from somewhere else and were never removed.
Removed unused local variables from `calc_tdust_3d_g` that followed the naming scheme used in solve_rate_cool for tracking the mass density for tracking the mass densities of various metal species used in metal chemistry. There was logic to convert between proper and comoving units for each of these variables, but they were not actually used for anything (which is a good thing since they were never initialized). These variable declarations were probably blindly copied from somewhere else and were never removed.
…arts of the code.
This was referenced Mar 20, 2025
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#20
While working on the PR now known as #275 (not required for this PR), I became aware that there were a bunch of extra unused arguments in
calc_tdust_3d_gand variables that were defined with typeR_PRECwhen they should be defined asreal*8.1This is EXTREMELY SIMPLE:
indixefromintegertointeger*8t1,t2,logtem,tdef,tgas,tdust,nh,gasgr,myisrffromR_PRECtoREAL*8solve_rate_cool_g. Insolve_rate_cool_g, these were arguments holding the metal species. But, incalc_tdust_3d_gthey were effectively just local variables and they were converted to and from proper units (but they are never used for anything). I deleted all of thisFootnotes
I became aware of these issues as I was trying to group together local variables into structs and searching through the codebase. At that point I became aware that a bunch of variables were declared, but unused in this file. This also made me aware of the typing mismatch. ↩