From f6a3fb5375f4020de5f9429422d6d4f738a69958 Mon Sep 17 00:00:00 2001 From: Daniel Schwen Date: Wed, 7 Apr 2021 10:48:32 -0600 Subject: [PATCH] Deprecate numbered params (#193) --- src/materials/NEMLStress.C | 6 ++++-- test/tests/neml_simple/le_stress_variableOverwrite.i | 3 +-- test/tests/neml_simple/tests | 3 +-- test/tests/neml_stochasticSimple/le_stress_simple.i | 3 +-- test/tests/neml_stochasticSimple/stochastic_driver.i | 11 ++++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/materials/NEMLStress.C b/src/materials/NEMLStress.C index 560963bea..d719a359a 100644 --- a/src/materials/NEMLStress.C +++ b/src/materials/NEMLStress.C @@ -37,8 +37,10 @@ NEMLStress::validParams() for (size_t i = 0; i < _nvars_max; ++i) { auto istr = Moose::stringify(i); - params.addParam("neml_variable_value" + istr, - "NEML XML variable value for neml_variable_iname[" + istr + "]"); + params.addDeprecatedParam( + "neml_variable_value" + istr, + "NEML XML variable value for neml_variable_iname[" + istr + "]", + "Deprecated in favor of the 'neml_variable_value' vector of names parameter"); } return params; } diff --git a/test/tests/neml_simple/le_stress_variableOverwrite.i b/test/tests/neml_simple/le_stress_variableOverwrite.i index 4d84295b6..b7fc6b571 100644 --- a/test/tests/neml_simple/le_stress_variableOverwrite.i +++ b/test/tests/neml_simple/le_stress_variableOverwrite.i @@ -219,8 +219,7 @@ database = 'examples.xml' model = variable_example neml_variable_iname = 'PoissonsVar YoungsVar' - neml_variable_value1=100000 - neml_variable_value0=0.3 + neml_variable_value = '0.3 100000' [] [] diff --git a/test/tests/neml_simple/tests b/test/tests/neml_simple/tests index 7d2dac525..555bb7c3b 100644 --- a/test/tests/neml_simple/tests +++ b/test/tests/neml_simple/tests @@ -18,8 +18,7 @@ design = 'NEMLStress.md' requirement = 'BlackBear shall be capable of using the NEML library to compute the response of a linearly elastic material parsed from xml. - Parameters defined in the xml can be overwritten by up to five - variables in the input file.' + Parameters defined in the xml can be overwritten by variables in the input file.' [../] [./neml_linear_elastic_simpleMaterial] issues = '#78' diff --git a/test/tests/neml_stochasticSimple/le_stress_simple.i b/test/tests/neml_stochasticSimple/le_stress_simple.i index 64f939c33..9dfe07fa2 100644 --- a/test/tests/neml_stochasticSimple/le_stress_simple.i +++ b/test/tests/neml_stochasticSimple/le_stress_simple.i @@ -219,8 +219,7 @@ database = 'examples.xml' model = variable_example neml_variable_iname = 'YoungsVar PoissonsVar' - neml_variable_value0=100000 - neml_variable_value1=0.3 + neml_variable_value = '100000 0.3' [] [] diff --git a/test/tests/neml_stochasticSimple/stochastic_driver.i b/test/tests/neml_stochasticSimple/stochastic_driver.i index 80b6bd6c4..1dddb964d 100644 --- a/test/tests/neml_stochasticSimple/stochastic_driver.i +++ b/test/tests/neml_stochasticSimple/stochastic_driver.i @@ -72,11 +72,12 @@ [Controls] [cmdLine] - type=MultiAppCommandLineControl - multi_app=sub - sampler=neml_values - param_names='Materials/stress/neml_variable_value0 - Materials/stress/neml_variable_value1' + type = MultiAppCommandLineControl + multi_app = sub + sampler = neml_values + + param_names='Materials/stress/neml_variable_value[0,1]' + [] []