Add API for deprecating coupled variables #15497
Labels
C: Framework
P: normal
A defect affecting operation with a low possibility of significantly affects.
T: task
An enhancement to the software.
Reason
We have
addParam/addDeprecatedParam
, so it would be nice to haveaddCoupledVar/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 likegetVarHelper
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 theClass::validParams
block that we have to remove.Impact
Make it convenient for users to deprecate coupled variables
The text was updated successfully, but these errors were encountered: