Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRParmParse: Add default values to the ParmParse table #70

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

mirenradia
Copy link
Member

@mirenradia mirenradia commented Jul 17, 2024

When a GRParmParse::load() overload is called and a default value is used as the parameter is not present in the ParmParse table, this default value will now be added to the ParmParse table.

This behaviour is similar to AMReX's ParmParse::queryAdd() function (which we use to implement as it saves us some boilerplate code) except we continue to print out our default message.

It was necessary to change the type of the variable that is used to store the isPeriodic parameter (temporarily) to get this to work as there doesn't seem to be an overload of ParmParse::queryarr() for std::arrays of bools.

This is the first very small step to tackling #1.

@mirenradia mirenradia added the enhancement New feature or request label Jul 17, 2024
@mirenradia mirenradia self-assigned this Jul 17, 2024
The array of bools did not work with some of the ParmParse changes.
When a GRParmParse::load() overload is called and a default value is
used as the parameter is not present in the ParmParse table, this
default value will now be added to the ParmParse table.
@mirenradia mirenradia force-pushed the enhancement/default_param_pp_table branch from 8f607f3 to 1fad2da Compare July 18, 2024 15:34
@julianakwan julianakwan merged commit 16b212b into develop Jul 19, 2024
56 checks passed
@julianakwan julianakwan deleted the enhancement/default_param_pp_table branch July 19, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants