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

Add API for deprecating coupled variables #15497

Closed
lindsayad opened this issue Jun 25, 2020 · 0 comments
Closed

Add API for deprecating coupled variables #15497

lindsayad opened this issue Jun 25, 2020 · 0 comments
Assignees
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: task An enhancement to the software.

Comments

@lindsayad
Copy link
Member

Reason

We have addParam/addDeprecatedParam, so it would be nice to have addCoupledVar/addDeprecatedCoupledVar

Design

Since we're making a new API, we're not beholden to past design. The new API will take the deprecated variable name as well as the new, blessed name; then we will create a map from the new name to the deprecated name. Then user code can call things like coupledValue with only the new name, and behind the scenes in methods like getVarHelper we will query the new-to-deprecated map if we cannot find the variable by the new name. Then when we wish to remove the deprecated code, there are only the lines in the Class::validParams block that we have to remove.

Impact

Make it convenient for users to deprecate coupled variables

@lindsayad lindsayad added T: task An enhancement to the software. P: normal A defect affecting operation with a low possibility of significantly affects. labels Jun 25, 2020
@lindsayad lindsayad self-assigned this Jun 25, 2020
lindsayad added a commit to lindsayad/moose that referenced this issue Jun 25, 2020
lindsayad added a commit to lindsayad/moose that referenced this issue Jun 25, 2020
lindsayad added a commit to lindsayad/moose that referenced this issue Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: task An enhancement to the software.
Projects
None yet
Development

No branches or pull requests

2 participants