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.
Description
This patch relocates all of the string parameter parsing from
Old_Style_Parse_Param
toInit_Param_Struct_Members
. The relocated logic was converted to use the new-style of parameter parsing.Motivation
The primary motivation is so that we can make the shift to syntactic typing of parameters. I've explained what this is other PRs and this parsing logic conversion needs to be made sooner or later, so I won't go into much detail.
The main reason for this PR is that I think we should make the shift to syntactic typing sooner rather than later.
Once we fully adopt syntactic typing Cholla parameter files will be fully consistent with the TOML parameter file format (it will be a strict subset). This means we could eventually replace our custom parsing logic with logic from an existing toml parsing library (there are some nice header-only libraries that we could easily drop into cholla). Using a library introduces a number of benefits (e.g. we could support parameters that specify a list of values, which is extremely useful). There are also some other benefits, too.
Relocated Cosmology and Analysis Parameters
I took a lot of care to ensure that the parsing logic remains consistent.
wa
parameter which now defaults to a value of 0 if omitted (i.e. consistent with LCDM cosmology)skewersdir
parameter. Cholla will abort with an error if the user forgets this parameter in a simulation compiled with-DOUTPUT_SKEWERS