Skip to content

Commit 9fe6047

Browse files
committed
fix missing rename check
1 parent 155dbe9 commit 9fe6047

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

framework/src/utils/InputParameters.C

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,9 +801,10 @@ InputParameters::hasDefaultCoupledValue(const std::string & coupling_name) const
801801
void
802802
InputParameters::defaultCoupledValue(const std::string & coupling_name, Real value, unsigned int i)
803803
{
804-
_params[coupling_name]._coupled_default.resize(i + 1);
805-
_params[coupling_name]._coupled_default[i] = value;
806-
_params[coupling_name]._have_coupled_default = true;
804+
const auto actual_name = checkForRename(coupling_name);
805+
_params[actual_name]._coupled_default.resize(i + 1);
806+
_params[actual_name]._coupled_default[i] = value;
807+
_params[actual_name]._have_coupled_default = true;
807808
}
808809

809810
Real
@@ -1681,6 +1682,7 @@ InputParameters::renameCoupledVarInternal(const std::string & old_name,
16811682
"' but that coupled variable name doesn't exist in the parameters object.");
16821683

16831684
_coupled_vars.insert(new_name);
1685+
_new_to_deprecated_coupled_vars.emplace(new_name, old_name);
16841686
_coupled_vars.erase(coupled_vars_it);
16851687

16861688
renameParamInternal(old_name, new_name, docstring, removal_date);

test/tests/kernels/conservative_advection/tests

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
detail = 'by throwing a deprecation warning when no velocity is given when using AD,'
2323
cli_args = "Kernels/advection/velocity='1 0 0'"
2424
allow_deprecated = False
25-
expect_err = "'velocity' has been deprecated and will be removed on 12/31/2025. Please use 'velocity_variable ' instead."
25+
expect_err = "'velocity' has been deprecated and will be removed on 12/31/2025. Please use 'velocity_variable' instead."
2626
[]
2727
[ad_deprecated_velocity]
2828
type = RunException
2929
input = ad_no_upwinding_1D.i
3030
detail = 'by throwing a deprecation warning when velocity is given when using AD,'
3131
cli_args = "Kernels/advection/velocity=v Materials/v/type=ADGenericConstantVectorMaterial Materials/v/prop_names=v Materials/v/prop_values='1 0 0'"
3232
allow_deprecated = False
33-
expect_err = "The velocity parameter in ADConservativeAdvection will be removed on 12/31/2025. Use velocity_material or velocity_variable instead."
33+
expect_err = "'velocity' has been deprecated and will be removed on 12/31/2025. Please use 'velocity_material' instead."
3434
[]
3535
[]
3636

0 commit comments

Comments
 (0)