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

ParmParse::hasUnusedInputs & getUnusedInputs #1716

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

WeiqunZhang
Copy link
Member

Summary

Add functions to find if there are unused ParmParse parameters starting
with prefix.. If prefix is empty, all unused ParmParse parameters are
included.

For example,

if (amrex::ParmParse::hasUnusedInputs("algorithm") {
    amrex::Abort("There are unused algorithm.* runtime parameters");
}

auto const& used = amrex::ParmParse::getUnusedInputs("warpx");
for (auto const& u : used) {
    amrex::Print() << "Parameter " << u << " is unused.\n";
}

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • are described in the proposed changes to the AMReX documentation, if appropriate

Add functions to find if there are unused `ParmParse` parameters starting
with `prefix.`.  If `prefix` is empty, all unused `ParmParse` parameters are
included.
@WeiqunZhang WeiqunZhang requested review from atmyers and ax3l January 10, 2021 00:26
@atmyers atmyers merged commit cd56f54 into AMReX-Codes:development Jan 10, 2021
@WeiqunZhang WeiqunZhang deleted the pp_unused branch January 17, 2021 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants