Skip to content

Add UNSET directive to ParmParse#2

Draft
Copilot wants to merge 10 commits intodevelopmentfrom
copilot/add-unst-set-capability
Draft

Add UNSET directive to ParmParse#2
Copilot wants to merge 10 commits intodevelopmentfrom
copilot/add-unst-set-capability

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 31, 2026

Summary

Adds an UNSET directive to ParmParse that removes a previously-defined keyword from the parse table. This enables input files to conditionally suppress parameters — for example, an included file can cancel a key set by its parent.

amr.keyword = 5
UNSET = amr.keyword
# equivalent to never having set amr.keyword

Multiple keys can be removed in a single directive:

UNSET = key1 key2 key3

Additional background

Mirrors the design of the existing FILE directive. The new ParmParse::UnsetKeyword = "UNSET" static is exposed in the header for symmetry with FileKeyword. The directive is handled in addDefn() by erasing each listed key from the table; keys not present are silently ignored.

Tests added to Tests/ParmParse/inputs and Tests/ParmParse/main.cpp cover single-key unset, multi-key unset, and verifying that non-listed keys are unaffected.

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
  • include documentation in the code and/or rst files, if appropriate

Copilot AI changed the title [WIP] Add UNSET directive to parmparse for keyword removal Add UNSET directive to ParmParse Mar 31, 2026
Copilot AI requested a review from baperry2 March 31, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants