Skip to content

Commit

Permalink
Deprecate numbered params (idaholab#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen authored and bwspenc committed Apr 14, 2021
1 parent 9325d3c commit f6a3fb5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 4 additions & 2 deletions src/materials/NEMLStress.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ NEMLStress::validParams()
for (size_t i = 0; i < _nvars_max; ++i)
{
auto istr = Moose::stringify(i);
params.addParam<Real>("neml_variable_value" + istr,
"NEML XML variable value for neml_variable_iname[" + istr + "]");
params.addDeprecatedParam<Real>(
"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;
}
Expand Down
3 changes: 1 addition & 2 deletions test/tests/neml_simple/le_stress_variableOverwrite.i
Original file line number Diff line number Diff line change
Expand Up @@ -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'
[]
[]

Expand Down
3 changes: 1 addition & 2 deletions test/tests/neml_simple/tests
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions test/tests/neml_stochasticSimple/le_stress_simple.i
Original file line number Diff line number Diff line change
Expand Up @@ -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'
[]
[]

Expand Down
11 changes: 6 additions & 5 deletions test/tests/neml_stochasticSimple/stochastic_driver.i
Original file line number Diff line number Diff line change
Expand Up @@ -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]'

[]
[]

Expand Down

0 comments on commit f6a3fb5

Please sign in to comment.