Move parameter-value retrieval from EnzoPhysicsCosmology
from EnzoConfig
into constructor
#403
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.
Pull request summary
Followup from #399. Moved parameter-value retrieval for
EnzoPhysicsCosmology
fromEnzoConfig
into constructor (and helper functions).Detailed Description
This is part of the large migration of Parameter Parsing (that has been split into multiple parts to ease the entire process). The benefits of this migration are highlighted in the user-documentation on the website.
This PR touched slightly more files than other PRs of this general style. I needed to tweak a bunch of places that were directly accessing an
EnzoConfig
attribute calledphysics_cosmology
. Now those locations just check whetherenzo::cosmology()!=nullptr
, instead (this is equivalent, we're checking if we're using cosmology). While I was doing that, I realized that some locations included I removed unnecessary accesses toEnzoConfig
(most of these accesses became unnecessary because they no longerphysics_cosmology
, but a few were unnecessary before this change). All of these particular changes were concentrated into the first commit.The second commit is where I actually relocated the parameter-retrieval logic.