[newchem-cpp] Refactor such that SpLUT is implemented with XMacros#353
Merged
brittonsmith merged 7 commits intoAug 13, 2025
Conversation
…ranscribe/Implement-SpLUT-with-XMacros
…ranscribe/Implement-SpLUT-with-XMacros
…ranscribe/Implement-SpLUT-with-XMacros
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#27
This PR must be reviewed after #333 is merged
Previously, the
SpLUTwas implemented as a manually maintained list of all possible primordial, metal and dust species.This PR consists of 4 commits:
SpLUTcorresponding to dust grains so that they are more consistent with the names tracked ingrackle_field_data. For the sake of consistency, I made the same modification to members ofOnlyGrainSpLUTSpLUT::SiO2Dis nowSpLUT::SiO2_dust(be aware, this is distinct from theSpLUT::SiO2entry)SpLUT::reforgis nowSpLUT::ref_org_dustSpLUT::volorgis nowSpLUT::vol_org_dustSpLUT::H20iceis nowSpLUT::H2O_ice_dust_dust(e.g.SpLUT::SiMis nowSpLUT::SiM_dust)grackle_field_data_fdatamembers.definto 2 files.[^1]field_data_evolved_species.defcontains all species fields that are evolved by grackle. In other words, these are the primordial species, dust species, and grain species (these all have corresponding entries withinSpLUTfield_data_misc_fdatamembers.defcontains all of the other fieldsSpLUTto actually make use of the XMacros fromfield_data_evolved_species.defsrc/clib/LUT.hpp