diff --git a/framework/doc/content/source/outputs/formatters/JsonInputFileFormatter.md b/framework/doc/content/source/outputs/formatters/JsonInputFileFormatter.md index 35e8c6d0ab7e..4a7d117888d2 100644 --- a/framework/doc/content/source/outputs/formatters/JsonInputFileFormatter.md +++ b/framework/doc/content/source/outputs/formatters/JsonInputFileFormatter.md @@ -19,37 +19,52 @@ This is output for every hierarchical level in the syntax. [Functions] [./*] - active = '__all__ ' # "If specified only the blocks named will be visited and made active" - # Group: "" - inactive = (no_default) # "If specified blocks matching these identifiers will be skipped." - # Group: "" - isObjectAction = 1 # "Indicates that this is a MooseObjectAction." - # Group: "" - type = (required) # "A string representing the Moose Object that will be built by this Action" - # Group: "" + active = '__all__ ' # "If specified only the blocks named will be visited and made active" + # Unit: "" + # Group: "" + control_tags = (no_default) # "Adds user-defined labels for accessing object parameters via control + # logic." + # Unit: "" + # Group: "Advanced" + inactive = (no_default) # "If specified blocks matching these identifiers will be skipped." + # Unit: "" + # Group: "" + type = (required) # "A string representing the Moose Object that will be built by this Action" + # Unit: "" + # Group: "" [./] - [./] + [./] # "Function created by parsing a string" - control_tags = (no_default) # "Adds user-defined labels for accessing object parameters via - # control logic." - # Group: "Advanced" - enable = 1 # "Set the enabled status of the MooseObject." - # Group: "Advanced" - execute_on = LINEAR # "The list of flag(s) indicating when this object should be executed, - # the available options include NONE, INITIAL, LINEAR, NONLINEAR, - # TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS." - # Group: "" - type = ADParsedFunction # "" - # Group: "" - vals = (no_default) # "Constant numeric values, postprocessor names, or function names - # for vars." - # Group: "" - value = (required) # "The user defined function." - # Group: "" - vars = (no_default) # "Variables (excluding t,x,y,z) that are bound to the values provided - # by the corresponding items in the vals vector." - # Group: "" + control_tags = (no_default) # "Adds user-defined labels for accessing object parameters via control + # logic." + # Unit: "" + # Group: "Advanced" + enable = 1 # "Set the enabled status of the MooseObject." + # Unit: "" + # Group: "Advanced" + expression = (required) # "The user defined function." + # Unit: "" + # Group: "" + symbol_names = (no_default) # "Symbols (excluding t,x,y,z) that are bound to the values provided + # by the corresponding items in the vals vector." + # Unit: "" + # Group: "" + symbol_values = (no_default) # "Constant numeric values, postprocessor names, function names, + # and scalar variables corresponding to the symbols in symbol_names." + # Unit: "" + # Group: "" + type = ParsedFunction # "" + # Unit: "" + # Group: "" + vals = (no_default) # "Constant numeric values, postprocessor names, function names, + # and scalar variables for vars." + # Unit: "" + # Group: "" + vars = (no_default) # "Variables (excluding t,x,y,z) that are bound to the values provided + # by the corresponding items in the vals vector." + # Unit: "" + # Group: "" [../] ``` diff --git a/framework/doc/content/source/outputs/formatters/SONDefinitionFormatter.md b/framework/doc/content/source/outputs/formatters/SONDefinitionFormatter.md index 0edbbad5aefd..ec3715a4a629 100644 --- a/framework/doc/content/source/outputs/formatters/SONDefinitionFormatter.md +++ b/framework/doc/content/source/outputs/formatters/SONDefinitionFormatter.md @@ -15,156 +15,112 @@ We can see that each parameter is listed with additional meta data for how it ma set in the input file. ``` - 'ADParsedFunction_type'{ + 'ParsedFunction_type'{ InputTmpl=MooseBlock - InputName="ADParsedFunction" + InputName="ParsedFunction" InputType=type_sub InputDefault="insert_name_here" Description="Function created by parsing a string" - MinOccurs=0 - MaxOccurs=NoLimit decl{ - MinOccurs=0 MaxOccurs=1 - ValType=String } 'active'{ InputTmpl=MooseParam InputType=key_array InputName="active" Description="If specified only the blocks named will be visited and made active" - MinOccurs=0 MaxOccurs=1 'value'{ - MinOccurs=0 - MaxOccurs=NoLimit - ValType=String InputDefault="__all__" } - } % end parameter active + } 'control_tags'{ InputTmpl=MooseParam InputType=key_array InputName="control_tags" Description="Adds user-defined labels for accessing object parameters via control logic." - MinOccurs=0 MaxOccurs=1 'value'{ - MinOccurs=0 - MaxOccurs=NoLimit - ValType=String } - } % end parameter control_tags + } 'enable'{ InputTmpl=MooseParam InputType=key_value InputName="enable" Description="Set the enabled status of the MooseObject." - MinOccurs=0 MaxOccurs=1 'value'{ MinOccurs=1 MaxOccurs=1 - ValType=String ValEnums=[ true false 1 0 on off ] InputDefault="1" } - } % end parameter enable - 'execute_on'{ + } + ChildAtLeastOne=[ "../../GlobalParams/expression/value" "expression" ] + 'expression'{ InputTmpl=MooseParam InputType=key_array - InputName="execute_on" - Description="The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS." - MinOccurs=0 + InputName="expression" + Description="The user defined function." MaxOccurs=1 'value'{ - MinOccurs=0 - MaxOccurs=NoLimit - ValType=String - ValEnums=[ "NONE" "INITIAL" "LINEAR" "NONLINEAR" "TIMESTEP_END" "TIMESTEP_BEGIN" "FINAL" "CUSTOM" "ALWAYS" ] - InputDefault="LINEAR" } - } % end parameter execute_on + } 'inactive'{ InputTmpl=MooseParam InputType=key_array InputName="inactive" Description="If specified blocks matching these identifiers will be skipped." - MinOccurs=0 MaxOccurs=1 'value'{ - MinOccurs=0 - MaxOccurs=NoLimit - ValType=String } - } % end parameter inactive - 'isObjectAction'{ + } + 'symbol_names'{ InputTmpl=MooseParam - InputType=key_value - InputName="isObjectAction" - Description="Indicates that this is a MooseObjectAction." - MinOccurs=0 + InputType=key_array + InputName="symbol_names" + Description="Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector." + MaxOccurs=1 + 'value'{ + } + } + 'symbol_values'{ + InputTmpl=MooseParam + InputType=key_array + InputName="symbol_values" + Description="Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names." MaxOccurs=1 'value'{ - MinOccurs=1 - MaxOccurs=1 - ValType=String - ValEnums=[ true false 1 0 on off ] - InputDefault="1" } - } % end parameter isObjectAction + } 'type'{ InputTmpl=MooseParam InputType=key_value InputName="type" - MinOccurs=0 MaxOccurs=1 'value'{ MinOccurs=1 MaxOccurs=1 - ValType=String - InputDefault="ADParsedFunction" + InputDefault="ParsedFunction" } - } % end parameter type + } 'vals'{ InputTmpl=MooseParam InputType=key_array InputName="vals" - Description="Constant numeric values, postprocessor names, or function names for vars." - MinOccurs=0 - MaxOccurs=1 - 'value'{ - MinOccurs=0 - MaxOccurs=NoLimit - ValType=String - } - } % end parameter vals - ChildAtLeastOne=[ "../../GlobalParams/value/value" "value" ] - 'value'{ - InputTmpl=MooseParam - InputType=key_array - InputName="value" - Description="The user defined function." - MinOccurs=0 + Description="Constant numeric values, postprocessor names, function names, and scalar variables for vars." MaxOccurs=1 'value'{ - MinOccurs=0 - MaxOccurs=NoLimit - ValType=String } - } % end parameter value + } 'vars'{ InputTmpl=MooseParam InputType=key_array InputName="vars" Description="Variables (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector." - MinOccurs=0 MaxOccurs=1 'value'{ - MinOccurs=0 - MaxOccurs=NoLimit - ValType=String } - } % end parameter vars - } % end block ADParsedFunction_type + } + } % end block ParsedFunction_type ``` diff --git a/framework/doc/content/source/outputs/formatters/YAMLFormatter.md b/framework/doc/content/source/outputs/formatters/YAMLFormatter.md index 2129ba7c17e0..d3fd04ffa81e 100644 --- a/framework/doc/content/source/outputs/formatters/YAMLFormatter.md +++ b/framework/doc/content/source/outputs/formatters/YAMLFormatter.md @@ -14,15 +14,16 @@ block and the [MooseParsedFunction.md]. We can see metadata about each parameter C++ type, their default, or their description. ``` -- name: /Functions/ADParsedFunction +- name: /Functions/ParsedFunction description: | parameters: - name: control_tags required: No default: !!str - cpp_type: std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > + cpp_type: std::vector, std::allocator >, std::allocator, std::allocator > > > group_name: 'Advanced' + doc_unit: description: | Adds user-defined labels for accessing object parameters via control logic. - name: enable @@ -30,41 +31,55 @@ C++ type, their default, or their description. default: !!str 1 cpp_type: bool group_name: 'Advanced' + doc_unit: description: | Set the enabled status of the MooseObject. - - name: execute_on + - name: expression + required: Yes + default: !!str + cpp_type: FunctionExpression + group_name: + doc_unit: + description: | + The user defined function. + - name: symbol_names required: No - default: !!str LINEAR - cpp_type: ExecFlagEnum + default: !!str + cpp_type: std::vector, std::allocator >, std::allocator, std::allocator > > > group_name: + doc_unit: description: | - The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS. + Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector. + - name: symbol_values + required: No + default: !!str + cpp_type: std::vector, std::allocator >, std::allocator, std::allocator > > > + group_name: + doc_unit: + description: | + Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names. - name: type required: No - default: !!str ADParsedFunction - cpp_type: std::__1::basic_string, std::__1::allocator > + default: !!str ParsedFunction + cpp_type: std::__cxx11::basic_string, std::allocator > group_name: + doc_unit: description: | - name: vals required: No default: !!str - cpp_type: std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > - group_name: - description: | - Constant numeric values, postprocessor names, or function names for vars. - - name: value - required: Yes - default: !!str - cpp_type: FunctionExpression + cpp_type: std::vector, std::allocator >, std::allocator, std::allocator > > > group_name: + doc_unit: description: | - The user defined function. + Constant numeric values, postprocessor names, function names, and scalar variables for vars. - name: vars required: No default: !!str - cpp_type: std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > + cpp_type: std::vector, std::allocator >, std::allocator, std::allocator > > > group_name: + doc_unit: description: | Variables (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector. subblocks: diff --git a/framework/src/functions/MooseParsedFunction.C b/framework/src/functions/MooseParsedFunction.C index d0536a5505ee..c7c733e17f11 100644 --- a/framework/src/functions/MooseParsedFunction.C +++ b/framework/src/functions/MooseParsedFunction.C @@ -16,21 +16,15 @@ #include "FEProblemBase.h" registerMooseObjectAliased("MooseApp", MooseParsedFunction, "ParsedFunction"); -registerMooseObjectRenamed("MooseApp", ADParsedFunction, "02/03/2024 00:00", MooseParsedFunction); InputParameters MooseParsedFunction::validParams() { InputParameters params = Function::validParams(); params += MooseParsedFunctionBase::validParams(); - params.addDeprecatedCustomTypeParam( - "value", "FunctionExpression", "The user defined function.", "Use 'expression' instead."); - // TODO Make required once deprecation is handled, see #19119 - params.addCustomTypeParam( + params.addRequiredCustomTypeParam( "expression", "FunctionExpression", "The user defined function."); - params.addClassDescription("Function created by parsing a string"); - return params; } @@ -71,26 +65,17 @@ MooseParsedFunction::vectorValue(Real /*t*/, const Point & /*p*/) const void MooseParsedFunction::initialSetup() { + // Check for non-scalar variables. for (const auto i : index_range(_vars)) - { - // Check for non-scalar variables. - // First, see if the var is actually assigned to a proper scalar value - if (_pfb_feproblem.hasVariable(_vars[i]) && _pfb_feproblem.hasVariable(_vals[i])) - { - // Then see if the var has the same name as a function or postprocessor - if (!_pfb_feproblem.hasFunction(_vars[i]) && - !_pfb_feproblem.hasPostprocessorValueByName(_vars[i])) - mooseError( - "The only variables supported by ParsedFunction are scalar variables, and var '" + - _vars[i] + "' is not scalar."); - } - } + if (_pfb_feproblem.hasVariable(_vals[i]) && !_pfb_feproblem.hasScalarVariable(_vals[i]) && + !_pfb_feproblem.hasFunction(_vals[i]) && + !_pfb_feproblem.hasPostprocessorValueByName(_vals[i])) + mooseError("The only variables supported by ParsedFunction are scalar variables, and var '" + + _vals[i] + "' is not scalar."); if (!_function_ptr) { - THREAD_ID tid = 0; - if (this->isParamValid("_tid")) - tid = this->template getParam("_tid"); + THREAD_ID tid = this->isParamValid("_tid") ? this->template getParam("_tid") : 0; _function_ptr = std::make_unique(_pfb_feproblem, _value, _vars, _vals, tid); diff --git a/modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i b/modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i index 358c0b07855d..4abf5e30c160 100644 --- a/modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i +++ b/modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i @@ -51,7 +51,7 @@ [Functions] [volumetric_heat_func] type = ParsedFunction - value = q + expression = q vars = 'q' vals = 'heat_source_pp' [] diff --git a/modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i b/modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i index bced5ce08292..2cb0beebba86 100644 --- a/modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i +++ b/modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i @@ -31,11 +31,11 @@ refine = 1 [Functions] [horizontal_movement] type = ParsedFunction - value = 'if(t<0.5,${vx}*t-${offset},${vx}-${offset})' + expression = 'if(t<0.5,${vx}*t-${offset},${vx}-${offset})' [] [vertical_movement] type = ParsedFunction - value = 'if(t<0.5,${offset},${vy}*(t-0.5)+${offset})' + expression = 'if(t<0.5,${offset},${vy}*(t-0.5)+${offset})' [] [] diff --git a/modules/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/step04_mms.md b/modules/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/step04_mms.md index 94219da99e94..7b89b7622955 100644 --- a/modules/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/step04_mms.md +++ b/modules/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/step04_mms.md @@ -207,13 +207,13 @@ Executing this script, assuming a name of `spatial_function.py` results in the f $ python spatial_function.py [mms_force] type = ParsedFunction - value = 'cp*rho*sin(x*pi)*sin(5*y*pi) + 26*pi^2*k*t*sin(x*pi)*sin(5*y*pi) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' + expression = 'cp*rho*sin(x*pi)*sin(5*y*pi) + 26*pi^2*k*t*sin(x*pi)*sin(5*y*pi) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' vars = 'hours rho shortwave k cp kappa' vals = '1.0 1.0 1.0 1.0 1.0 1.0' [] [mms_exact] type = ParsedFunction - value = 't*sin(x*pi)*sin(5*y*pi)' + expression = 't*sin(x*pi)*sin(5*y*pi)' [] Obviously, when adding to the input file the "vals" must be updated to the correct values for the @@ -294,13 +294,13 @@ Executing this script, assuming a name of `temporal_function.py` results in the $ python temporal_function.py [mms_force] type = ParsedFunction - value = '-3.08641975308642e-5*x*y*cp*rho*exp(-3.08641975308642e-5*t) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' + expression = '-3.08641975308642e-5*x*y*cp*rho*exp(-3.08641975308642e-5*t) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' vars = 'kappa rho shortwave cp hours' vals = '1.0 1.0 1.0 1.0 1.0' [] [mms_exact] type = ParsedFunction - value = 'x*y*exp(-3.08641975308642e-5*t)' + expression = 'x*y*exp(-3.08641975308642e-5*t)' [] A third input file, `~/projects/problems/verification/2d_mms_temporal.i` is created. The content diff --git a/modules/doc/content/newsletter/2018/2018_10.md b/modules/doc/content/newsletter/2018/2018_10.md index cac4d8dad5d8..7007c81a8993 100644 --- a/modules/doc/content/newsletter/2018/2018_10.md +++ b/modules/doc/content/newsletter/2018/2018_10.md @@ -22,11 +22,11 @@ a scalar value or a `Postprocessor` value. An example syntax follows: ``` [./a_fn] type = ParsedFunction - value = sin(x) + expression = sin(x) [../] [./parsed_fn] type = ParsedFunction - value = '4*sqrt(a)' + expression = '4*sqrt(a)' vars = 'a' vals = 'a_fn' [../] diff --git a/modules/geochemistry/test/tests/kinetics/bio_arsenate1.i b/modules/geochemistry/test/tests/kinetics/bio_arsenate1.i index 48439eb6d52b..56a4f1c3f9d0 100644 --- a/modules/geochemistry/test/tests/kinetics/bio_arsenate1.i +++ b/modules/geochemistry/test/tests/kinetics/bio_arsenate1.i @@ -87,7 +87,7 @@ type = ParsedFunction vars = 'dt reaction_rate_times_dt' vals = 'dt reaction_rate_times_dt' - value = 'reaction_rate_times_dt / dt' + expression = 'reaction_rate_times_dt / dt' [] [] [Postprocessors] diff --git a/modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i b/modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i index d5d60c739026..dd655ea788c9 100644 --- a/modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i +++ b/modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i @@ -196,13 +196,13 @@ diff_coeff = 0.1 [] [rho_bc] type = ParsedFunction - value = '-diff_coeff*3.48788261470924*sin(x)' + expression = '-diff_coeff*3.48788261470924*sin(x)' vars = 'diff_coeff' vals = '${diff_coeff}' [] [minus_rho_bc] type = ParsedFunction - value = 'diff_coeff*3.48788261470924*sin(x)' + expression = 'diff_coeff*3.48788261470924*sin(x)' vars = 'diff_coeff' vals = '${diff_coeff}' [] @@ -216,13 +216,13 @@ diff_coeff = 0.1 [] [rho_u_bc] type = ParsedFunction - value = '-diff_coeff*3.48788261470924*1.1*sin(1.1*x)' + expression = '-diff_coeff*3.48788261470924*1.1*sin(1.1*x)' vars = 'diff_coeff' vals = '${diff_coeff}' [] [minus_rho_u_bc] type = ParsedFunction - value = 'diff_coeff*3.48788261470924*1.1*sin(1.1*x)' + expression = 'diff_coeff*3.48788261470924*1.1*sin(1.1*x)' vars = 'diff_coeff' vals = '${diff_coeff}' [] @@ -236,13 +236,13 @@ diff_coeff = 0.1 [] [rho_et_bc] type = ParsedFunction - value = '-diff_coeff*26.7439413073546*1.2*sin(1.2*x)' + expression = '-diff_coeff*26.7439413073546*1.2*sin(1.2*x)' vars = 'diff_coeff' vals = '${diff_coeff}' [] [minus_rho_et_bc] type = ParsedFunction - value = 'diff_coeff*26.7439413073546*1.2*sin(1.2*x)' + expression = 'diff_coeff*26.7439413073546*1.2*sin(1.2*x)' vars = 'diff_coeff' vals = '${diff_coeff}' [] diff --git a/modules/navier_stokes/test/tests/finite_volume/materials/mixture_material/mixture.i b/modules/navier_stokes/test/tests/finite_volume/materials/mixture_material/mixture.i index 736bdf9d8a80..33449bd2458d 100644 --- a/modules/navier_stokes/test/tests/finite_volume/materials/mixture_material/mixture.i +++ b/modules/navier_stokes/test/tests/finite_volume/materials/mixture_material/mixture.i @@ -68,19 +68,19 @@ [Functions] [cp_solid] - type = ADParsedFunction + type = ParsedFunction expression = '1 - x' [] [cp_liquid] - type = ADParsedFunction + type = ParsedFunction expression = 'x' [] [k_solid] - type = ADParsedFunction + type = ParsedFunction expression = '2 - 3*x' [] [k_liquid] - type = ADParsedFunction + type = ParsedFunction expression = '3*x' [] [] diff --git a/modules/optimization/examples/simpleTransient/forward.i b/modules/optimization/examples/simpleTransient/forward.i index a89219b02c77..25b77857d102 100644 --- a/modules/optimization/examples/simpleTransient/forward.i +++ b/modules/optimization/examples/simpleTransient/forward.i @@ -61,7 +61,7 @@ [Functions] [exact] type = ParsedFunction - value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' + expression = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' [] [source] type = NearestReporterCoordinatesFunction diff --git a/modules/optimization/examples/simpleTransient/forward_and_adjoint.i b/modules/optimization/examples/simpleTransient/forward_and_adjoint.i index a67f229995ea..25aefe68024d 100644 --- a/modules/optimization/examples/simpleTransient/forward_and_adjoint.i +++ b/modules/optimization/examples/simpleTransient/forward_and_adjoint.i @@ -61,7 +61,7 @@ [Functions] [exact] type = ParsedFunction - value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' + expression = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' [] [source] type = NearestReporterCoordinatesFunction diff --git a/modules/optimization/examples/simpleTransient/forward_mesh.i b/modules/optimization/examples/simpleTransient/forward_mesh.i index b8132fa73b55..2b7dc72ee8f6 100644 --- a/modules/optimization/examples/simpleTransient/forward_mesh.i +++ b/modules/optimization/examples/simpleTransient/forward_mesh.i @@ -52,7 +52,7 @@ [Functions] [exact] type = ParsedFunction - value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' + expression = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' [] [source] type = ParameterMeshFunction diff --git a/modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i b/modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i index d29f155e4ea0..9f0025ec66e3 100644 --- a/modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i +++ b/modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i @@ -71,7 +71,7 @@ [Functions] [exact] type = ParsedFunction - value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' + expression = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi' [] [source] type = NearestReporterCoordinatesFunction diff --git a/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_1d.i b/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_1d.i index 1b744c1320ab..ec10bd9d3f43 100644 --- a/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_1d.i +++ b/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_1d.i @@ -25,7 +25,7 @@ [Functions] [params_fun] type = ParsedFunction - value = '0.5 + x + y + x*y' + expression = '0.5 + x + y + x*y' [] [] diff --git a/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_2d.i b/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_2d.i index f9f29068bfad..268c0353cbd6 100644 --- a/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_2d.i +++ b/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_2d.i @@ -26,7 +26,7 @@ [Functions] [params_fun] type = ParsedFunction - value = '0.5 + x + y + x*y' + expression = '0.5 + x + y + x*y' [] [] diff --git a/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_3d.i b/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_3d.i index 119e569804a3..a73f65b87bcf 100644 --- a/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_3d.i +++ b/modules/optimization/test/tests/functions/param_mesh_closest/create_mesh_3d.i @@ -28,7 +28,7 @@ [Functions] [params_fun] type = ParsedFunction - value = '0.5 + x + y + x*y' + expression = '0.5 + x + y + x*y' [] [] diff --git a/modules/optimization/test/tests/functions/parameter_mesh/create_mesh.i b/modules/optimization/test/tests/functions/parameter_mesh/create_mesh.i index d09e33e977fb..77c23ed3bb7d 100644 --- a/modules/optimization/test/tests/functions/parameter_mesh/create_mesh.i +++ b/modules/optimization/test/tests/functions/parameter_mesh/create_mesh.i @@ -20,7 +20,7 @@ [Functions] [params_fun] type = ParsedFunction - value = 'x*(x-1)*y*(y-1)' + expression = 'x*(x-1)*y*(y-1)' [] [] diff --git a/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_dg.i b/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_dg.i index c19ab66a7dab..b9ccdfc41d98 100644 --- a/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_dg.i +++ b/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_dg.i @@ -22,7 +22,7 @@ [Functions] [params_fun] type = ParsedFunction - value = 'x*(x-1)*y*(y-1)' + expression = 'x*(x-1)*y*(y-1)' [] [] diff --git a/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_second.i b/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_second.i index 5db99a627f5a..5d365feeabfd 100644 --- a/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_second.i +++ b/modules/optimization/test/tests/functions/parameter_mesh/create_mesh_second.i @@ -23,7 +23,7 @@ [Functions] [params_fun] type = ParsedFunction - value = 'x*(x-1)*y*(y-1)' + expression = 'x*(x-1)*y*(y-1)' [] [] diff --git a/modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i b/modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i index 4f484d1e781b..6d874b87604a 100644 --- a/modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i +++ b/modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i @@ -136,7 +136,7 @@ [Functions] [thermo_conduct] type = ParsedFunction - value = alpha + expression = alpha vars = 'alpha' vals = 'p1' [] diff --git a/modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i b/modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i index 357e56ffb0d1..f0411790b14d 100644 --- a/modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i +++ b/modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i @@ -47,16 +47,16 @@ [Functions] [ic_func_etaa0] - type = ADParsedFunction - value = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))' + type = ParsedFunction + expression = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))' [] [ic_func_etab0] - type = ADParsedFunction - value = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))' + type = ParsedFunction + expression = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))' [] [ic_func_w] - type = ADParsedFunction - value = 0 + type = ParsedFunction + expression = 0 [] [] diff --git a/modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i b/modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i index 38d889b88ff1..c27076e13cb7 100644 --- a/modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i +++ b/modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i @@ -58,16 +58,16 @@ [Functions] [ic_func_etaa0] - type = ADParsedFunction - value = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))' + type = ParsedFunction + expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))' [] [ic_func_etab0] - type = ADParsedFunction - value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))' + type = ParsedFunction + expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))' [] [ic_func_etab1] - type = ADParsedFunction - value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))' + type = ParsedFunction + expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))' [] [] diff --git a/modules/richards/src/actions/Q2PAction.C b/modules/richards/src/actions/Q2PAction.C index 8fe12b34dc9e..234847dd98a0 100644 --- a/modules/richards/src/actions/Q2PAction.C +++ b/modules/richards/src/actions/Q2PAction.C @@ -242,7 +242,7 @@ Q2PAction::act() // user wants total masses, so need to build Functions to do this InputParameters params = _factory.getValidParams("ParsedFunction"); - params.set("value") = "a*b"; + params.set("expression") = "a*b"; std::vector vars; vars.push_back("a"); diff --git a/modules/solid_mechanics/doc/content/modules/solid_mechanics/tutorials/introduction/step02.md b/modules/solid_mechanics/doc/content/modules/solid_mechanics/tutorials/introduction/step02.md index 9049af9cb321..de53f7c026cc 100644 --- a/modules/solid_mechanics/doc/content/modules/solid_mechanics/tutorials/introduction/step02.md +++ b/modules/solid_mechanics/doc/content/modules/solid_mechanics/tutorials/introduction/step02.md @@ -44,7 +44,7 @@ pressure action could have instead been written as [Functions] [applied_pressure_function] type = ParsedFunction - value = 1e7*t + expression = 1e7*t [] [] diff --git a/modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i b/modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i index 9808a3d069b0..764dfc35ee20 100644 --- a/modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i +++ b/modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i @@ -138,11 +138,11 @@ [] [dispy] type = ParsedFunction - value = 0.1*t*t*sin(10*t) + expression = 0.1*t*t*sin(10*t) [] [dispz] type = ParsedFunction - value = 0.1*t*t*sin(20*t) + expression = 0.1*t*t*sin(20*t) [] [] diff --git a/modules/solid_mechanics/test/tests/recompute_radial_return/affine_plasticity.i b/modules/solid_mechanics/test/tests/recompute_radial_return/affine_plasticity.i index 34696ba452dd..0542baa07fc5 100644 --- a/modules/solid_mechanics/test/tests/recompute_radial_return/affine_plasticity.i +++ b/modules/solid_mechanics/test/tests/recompute_radial_return/affine_plasticity.i @@ -95,10 +95,10 @@ # 189.409039923814000, 0.170423791206825, -0.003242011311945, 1.711645501845780E-05 - exact values symbol_names = 'timeAtYield stressAtYield expFac a b c d' symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 189.409039923814000 0.170423791206825 -0.003242011311945 1.711645501845780E-05' - value = '1e6* - if(t<=timeAtYield, -474*t, - if(t<=1, stressAtYield, - (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a + expression = '1e6* + if(t<=timeAtYield, -474*t, + if(t<=1, stressAtYield, + (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a [../] [./stress_yy] type = ParsedFunction @@ -108,10 +108,10 @@ # -76.867432297315000, -1.442488120272900, 0.001315697947301, 1.711645501845780E-05 - exact values symbol_names = 'timeAtYield stressAtYield expFac a b c d' symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 -76.867432297315000 -1.442488120272900 0.001315697947301 1.711645501845780E-05' - value = '1e6* - if(t<=timeAtYield, -474*t, - if(t<=1, stressAtYield, - (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a + expression = '1e6* + if(t<=timeAtYield, -474*t, + if(t<=1, stressAtYield, + (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a [../] [./stress_zz] type = ParsedFunction @@ -121,10 +121,10 @@ # -112.541607626499000, 1.272064329066080, 0.001926313364644, 1.711645501845780E-05 - exact values symbol_names = 'timeAtYield stressAtYield expFac a b c d' symbol_values = '0.20097635952803425 190.52558883257645 12.332921390339125 -112.541607626499000 1.272064329066080 0.001926313364644 1.711645501845780E-05' - value = '1e6* - if(t<=timeAtYield, 948*t, - if(t<=1, stressAtYield, - (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a + expression = '1e6* + if(t<=timeAtYield, 948*t, + if(t<=1, stressAtYield, + (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a [../] [] diff --git a/modules/solid_mechanics/test/tests/recompute_radial_return/cp_affine_plasticity.i b/modules/solid_mechanics/test/tests/recompute_radial_return/cp_affine_plasticity.i index 3d1e91be1b20..8dc2cc550714 100644 --- a/modules/solid_mechanics/test/tests/recompute_radial_return/cp_affine_plasticity.i +++ b/modules/solid_mechanics/test/tests/recompute_radial_return/cp_affine_plasticity.i @@ -95,10 +95,10 @@ # 189.409039923814000, 0.170423791206825, -0.003242011311945, 1.711645501845780E-05 - exact values symbol_names = 'timeAtYield stressAtYield expFac a b c d' symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 189.409039923814000 0.170423791206825 -0.003242011311945 1.711645501845780E-05' - value = '1e6* - if(t<=timeAtYield, -474*t, - if(t<=1, stressAtYield, - (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a + expression = '1e6* + if(t<=timeAtYield, -474*t, + if(t<=1, stressAtYield, + (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a [] [stress_yy] type = ParsedFunction @@ -108,10 +108,10 @@ # -76.867432297315000, -1.442488120272900, 0.001315697947301, 1.711645501845780E-05 - exact values symbol_names = 'timeAtYield stressAtYield expFac a b c d' symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 -76.867432297315000 -1.442488120272900 0.001315697947301 1.711645501845780E-05' - value = '1e6* - if(t<=timeAtYield, -474*t, - if(t<=1, stressAtYield, - (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a + expression = '1e6* + if(t<=timeAtYield, -474*t, + if(t<=1, stressAtYield, + (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a [] [stress_zz] type = ParsedFunction @@ -121,10 +121,10 @@ # -112.541607626499000, 1.272064329066080, 0.001926313364644, 1.711645501845780E-05 - exact values symbol_names = 'timeAtYield stressAtYield expFac a b c d' symbol_values = '0.20097635952803425 190.52558883257645 12.332921390339125 -112.541607626499000 1.272064329066080 0.001926313364644 1.711645501845780E-05' - value = '1e6* - if(t<=timeAtYield, 948*t, - if(t<=1, stressAtYield, - (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a + expression = '1e6* + if(t<=timeAtYield, 948*t, + if(t<=1, stressAtYield, + (a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a [] [] diff --git a/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i b/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i index 382db74bbf40..449a5774ffa9 100644 --- a/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i +++ b/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i @@ -45,17 +45,17 @@ [Functions] [top_pull] type = ParsedFunction - value = t/100 + expression = t/100 [] # Forced evolution of temperature [temperature_load] type = ParsedFunction - value = '273 + 10*t' + expression = '273 + 10*t' [] # Factor to multiply the elasticity tensor in MOOSE [elasticity_prefactor] type = ParsedFunction - value = '273/(273 + 10*t)' + expression = '273/(273 + 10*t)' [] [] diff --git a/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i b/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i index 8b8647fba078..a4c1df5e4c45 100644 --- a/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i +++ b/modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i @@ -45,17 +45,17 @@ [Functions] [top_pull] type = ParsedFunction - value = t/100 + expression = t/100 [] # Forced evolution of temperature [temperature_load] type = ParsedFunction - value = '273' + expression = '273' [] # Factor to multiply the elasticity tensor in MOOSE [elasticity_prefactor] type = ParsedFunction - value = '1' + expression = '1' [] [] diff --git a/modules/solid_properties/unit/include/ThermalFunctionSolidPropertiesTest.h b/modules/solid_properties/unit/include/ThermalFunctionSolidPropertiesTest.h index 2b9960ab7bec..5540e15fdd4f 100644 --- a/modules/solid_properties/unit/include/ThermalFunctionSolidPropertiesTest.h +++ b/modules/solid_properties/unit/include/ThermalFunctionSolidPropertiesTest.h @@ -25,7 +25,7 @@ class ThermalFunctionSolidPropertiesTest : public MooseObjectUnitTest void buildObjects() { InputParameters rho_pars = _factory.getValidParams("ParsedFunction"); - rho_pars.set("value") = "100.0+t"; + rho_pars.set("expression") = "100.0+t"; _fe_problem->addFunction("ParsedFunction", "rho", rho_pars); Function & rho = _fe_problem->getFunction("rho"); rho.initialSetup(); @@ -38,7 +38,7 @@ class ThermalFunctionSolidPropertiesTest : public MooseObjectUnitTest cp.initialSetup(); InputParameters k_pars = _factory.getValidParams("ParsedFunction"); - k_pars.set("value") = "12.1+1.e-6*t*t*t+2.0e-4*t*t-0.5*t"; + k_pars.set("expression") = "12.1+1.e-6*t*t*t+2.0e-4*t*t-0.5*t"; _fe_problem->addFunction("ParsedFunction", "k", k_pars); Function & k = _fe_problem->getFunction("k"); k.initialSetup(); diff --git a/modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i b/modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i index efe75dd26665..2dad8e5f504f 100644 --- a/modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i +++ b/modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i @@ -52,11 +52,11 @@ air_effective_k = 0.5 # W/(m K) [Functions] [temp_env] type = ParsedFunction - value = '15.0*sin(t/86400.0*pi) + 273.0' + expression = '15.0*sin(t/86400.0*pi) + 273.0' [] [design_function] type = ParsedFunction - value = '297' + expression = '297' [] [reward_function] type = ScaledAbsDifferenceDRLRewardFunction diff --git a/modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i b/modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i index 91078ad96580..e4621ac75239 100644 --- a/modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i +++ b/modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i @@ -45,7 +45,7 @@ [Functions] [temp_env] type = ParsedFunction - value = '15.0*sin(t/86400.0 *pi) + 273.0' + expression = '15.0*sin(t/86400.0 *pi) + 273.0' [] [] diff --git a/modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i b/modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i index b12000a6e4e8..e9696bb89834 100644 --- a/modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i +++ b/modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i @@ -39,7 +39,7 @@ [Functions] [design_function] type = ParsedFunction - value = 't/3600*297' + expression = 't/3600*297' [] [reward_function] type = ScaledAbsDifferenceDRLRewardFunction diff --git a/modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i b/modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i index 17c4f6a43e45..3ca818ca2666 100644 --- a/modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i +++ b/modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i @@ -20,7 +20,7 @@ [] [fun] type = ParsedFunction - value = 'a*1000000 + b*10000 + c*100 + d' + expression = 'a*1000000 + b*10000 + c*100 + d' vars = 'a b c d' vals = 'afun bfun cfun dfun' [] diff --git a/modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i b/modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i index 2c9114ba4062..0352b4cea3a1 100644 --- a/modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i +++ b/modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i @@ -45,11 +45,11 @@ [Functions] [temp_env] type = ParsedFunction - value = '15.0*sin(t/86400.0 *pi) + 273.0' + expression = '15.0*sin(t/86400.0 *pi) + 273.0' [] [design_function] type = ParsedFunction - value = '297' + expression = '297' [] [reward_function] type = ScaledAbsDifferenceDRLRewardFunction diff --git a/modules/subchannel/test/tests/SCMQuadPower/test_with_pins.i b/modules/subchannel/test/tests/SCMQuadPower/test_with_pins.i index 50fe4a55414e..0b60d67ae775 100644 --- a/modules/subchannel/test/tests/SCMQuadPower/test_with_pins.i +++ b/modules/subchannel/test/tests/SCMQuadPower/test_with_pins.i @@ -35,7 +35,7 @@ length = 0.5 [Functions] [axial_heat_rate] type = ParsedFunction - value = '(pi/2)*sin(pi*z/L)' + expression = '(pi/2)*sin(pi*z/L)' vars = 'L' vals = '${length}' [] diff --git a/modules/subchannel/test/tests/SCMTriPower/test.i b/modules/subchannel/test/tests/SCMTriPower/test.i index ca1776e68d13..69527faa320a 100644 --- a/modules/subchannel/test/tests/SCMTriPower/test.i +++ b/modules/subchannel/test/tests/SCMTriPower/test.i @@ -52,7 +52,7 @@ num_cells = 40 [Functions] [axial_heat_rate] type = ParsedFunction - value = '(pi/2)*sin(pi*z/L)' + expression = '(pi/2)*sin(pi*z/L)' vars = 'L' vals = '${length}' [] diff --git a/modules/subchannel/test/tests/SCMTriPower/test_with_pins.i b/modules/subchannel/test/tests/SCMTriPower/test_with_pins.i index 155d8befedcf..8dc0f0b6ef42 100644 --- a/modules/subchannel/test/tests/SCMTriPower/test_with_pins.i +++ b/modules/subchannel/test/tests/SCMTriPower/test_with_pins.i @@ -82,7 +82,7 @@ num_cells = 40 [Functions] [axial_heat_rate] type = ParsedFunction - value = '(pi/2)*sin(pi*z/L)' + expression = '(pi/2)*sin(pi*z/L)' vars = 'L' vals = '${length}' [] diff --git a/modules/subchannel/validation/EBR-II/XX09_SCM_SS17.i b/modules/subchannel/validation/EBR-II/XX09_SCM_SS17.i index 12f0ab47af51..fbf3181707c7 100644 --- a/modules/subchannel/validation/EBR-II/XX09_SCM_SS17.i +++ b/modules/subchannel/validation/EBR-II/XX09_SCM_SS17.i @@ -63,7 +63,7 @@ unheated_length_exit = '${fparse 26.9*scale_factor}' [Functions] [axial_heat_rate] type = ParsedFunction - value = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' + expression = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' vars = 'L alpha' vals = '${heated_length} 1.8012' [] diff --git a/modules/subchannel/validation/EBR-II/XX09_SCM_SS17_corrected.i b/modules/subchannel/validation/EBR-II/XX09_SCM_SS17_corrected.i index 6c7f496a043c..033de7c06880 100644 --- a/modules/subchannel/validation/EBR-II/XX09_SCM_SS17_corrected.i +++ b/modules/subchannel/validation/EBR-II/XX09_SCM_SS17_corrected.i @@ -63,7 +63,7 @@ unheated_length_exit = '${fparse 26.9*scale_factor}' [Functions] [axial_heat_rate] type = ParsedFunction - value = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' + expression = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' vars = 'L alpha' vals = '${heated_length} 1.8012' [] diff --git a/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R.i b/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R.i index 969df32926c5..5906a5d87104 100644 --- a/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R.i +++ b/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R.i @@ -63,7 +63,7 @@ unheated_length_exit = '${fparse 26.9*scale_factor}' [Functions] [axial_heat_rate] type = ParsedFunction - value = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' + expression = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' vars = 'L alpha' vals = '${heated_length} 1.8012' [] diff --git a/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R_corrected.i b/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R_corrected.i index 19538bb9f288..d454fa129eb9 100644 --- a/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R_corrected.i +++ b/modules/subchannel/validation/EBR-II/XX09_SCM_SS45R_corrected.i @@ -63,7 +63,7 @@ unheated_length_exit = '${fparse 26.9*scale_factor}' [Functions] [axial_heat_rate] type = ParsedFunction - value = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' + expression = '(pi/2)*sin(pi*z/L)*exp(-alpha*z)/(1.0/alpha*(1.0 - exp(-alpha*L)))*L' vars = 'L alpha' vals = '${heated_length} 1.8012' [] diff --git a/modules/subchannel/verification/enthalpy_mixing_verification/two_channel.i b/modules/subchannel/verification/enthalpy_mixing_verification/two_channel.i index 999f9d043cec..0d46a42f964f 100644 --- a/modules/subchannel/verification/enthalpy_mixing_verification/two_channel.i +++ b/modules/subchannel/verification/enthalpy_mixing_verification/two_channel.i @@ -19,7 +19,7 @@ P_out = 155e+5 # Pa [Functions] [T_fn] type = ParsedFunction - value = if(x>0.0,483.10,473.10) + expression = if(x>0.0,483.10,473.10) [] [] diff --git a/modules/subchannel/verification/friction_model_verification/two_channel2.i b/modules/subchannel/verification/friction_model_verification/two_channel2.i index 35c592ce4cce..3ab014d3c1e9 100644 --- a/modules/subchannel/verification/friction_model_verification/two_channel2.i +++ b/modules/subchannel/verification/friction_model_verification/two_channel2.i @@ -20,7 +20,7 @@ P_out = 155e+5 # Pa [Functions] [S_fn] type = ParsedFunction - value = if(x>0.0,0.002,0.001) + expression = if(x>0.0,0.002,0.001) [] [] diff --git a/modules/thermal_hydraulics/unit/include/CircularAreaHydraulicDiameterFunctionTest.h b/modules/thermal_hydraulics/unit/include/CircularAreaHydraulicDiameterFunctionTest.h index d7093b1c321d..8af06e5d2d17 100644 --- a/modules/thermal_hydraulics/unit/include/CircularAreaHydraulicDiameterFunctionTest.h +++ b/modules/thermal_hydraulics/unit/include/CircularAreaHydraulicDiameterFunctionTest.h @@ -29,7 +29,7 @@ class CircularAreaHydraulicDiameterFunctionTest : public MooseObjectUnitTest { const std::string class_name = "ParsedFunction"; InputParameters params = _factory.getValidParams(class_name); - params.set("value") = "1 + x"; + params.set("expression") = "1 + x"; _fe_problem->addFunction(class_name, A_name, params); } diff --git a/python/doc/content/python/mms.md b/python/doc/content/python/mms.md index f2285d4bb0c8..93231969ce15 100644 --- a/python/doc/content/python/mms.md +++ b/python/doc/content/python/mms.md @@ -71,11 +71,11 @@ exact solution. The complete output for this function is given below. 8*pi^2*sin(2*x*pi)*sin(2*y*pi) [force] type = ParsedFunction - value = '8*pi^2*sin(2*x*pi)*sin(2*y*pi)' + expression = '8*pi^2*sin(2*x*pi)*sin(2*y*pi)' [] [exact] type = ParsedFunction - value = 'sin(2*x*pi)*sin(2*y*pi)' + expression = 'sin(2*x*pi)*sin(2*y*pi)' [] ``` @@ -180,11 +180,11 @@ file for the temporal problem is shown in [mms_temporal]. 3*x*y*t^2 [force] type = ParsedFunction - value = '3*x*y*t^2' + expression = '3*x*y*t^2' [] [exact] type = ParsedFunction - value = 'x*y*t^3' + expression = 'x*y*t^3' [] ``` diff --git a/python/moosesyntax/test/test_get_moose_syntax_tree.py b/python/moosesyntax/test/test_get_moose_syntax_tree.py index ae56c030ea50..095c3af9d90a 100755 --- a/python/moosesyntax/test/test_get_moose_syntax_tree.py +++ b/python/moosesyntax/test/test_get_moose_syntax_tree.py @@ -63,7 +63,7 @@ def testNodes(self): self.assertTrue(node.source.endswith('framework/src/functions/MooseParsedFunction.C')) self.assertTrue(node.header.endswith('framework/include/functions/MooseParsedFunction.h')) self.assertIsInstance(node.parameters, dict) - self.assertIn('value', node.parameters) + self.assertIn('expression', node.parameters) # ActionNode node = moosetree.find(root, lambda n: n.fullpath() == '/Outputs/CommonOutputAction') diff --git a/test/tests/auxkernels/functor_elemental_gradient/functor_gradient.i b/test/tests/auxkernels/functor_elemental_gradient/functor_gradient.i index 8ab0ad48e7c4..54ee221ae965 100644 --- a/test/tests/auxkernels/functor_elemental_gradient/functor_gradient.i +++ b/test/tests/auxkernels/functor_elemental_gradient/functor_gradient.i @@ -40,7 +40,7 @@ [Functions] [parsed_function] type = ParsedFunction - value = 'sin(x)-cos(y/2)' + expression = 'sin(x)-cos(y/2)' [] [parsed_grad_function] type = ParsedVectorFunction @@ -49,7 +49,7 @@ [] [parsed_gradx_function] type = ParsedFunction - value = 'cos(x)' + expression = 'cos(x)' [] [] diff --git a/test/tests/controls/libtorch_nn_control/read_control.i b/test/tests/controls/libtorch_nn_control/read_control.i index bd771df29a7e..5c8aff04a390 100644 --- a/test/tests/controls/libtorch_nn_control/read_control.i +++ b/test/tests/controls/libtorch_nn_control/read_control.i @@ -6,7 +6,7 @@ cp = 1.0 [Functions] [src_func] type = ParsedFunction - value = "sin(${pi}/${period}*t)" + expression = "sin(${pi}/${period}*t)" [] [] diff --git a/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i b/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i index db6cf00c958a..aeb9ea86a81e 100644 --- a/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i +++ b/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i @@ -13,32 +13,32 @@ [Functions] [exact_fn] type = ParsedFunction - value = 'x*x+y*y' + expression = 'x*x+y*y' [] [ffn] type = ParsedFunction - value = -4 + expression = -4 [] [bottom_bc_fn] type = ParsedFunction - value = -2*y + expression = -2*y [] [right_bc_fn] type = ParsedFunction - value = 2*x + expression = 2*x [] [top_bc_fn] type = ParsedFunction - value = 2*y + expression = 2*y [] [left_bc_fn] type = ParsedFunction - value = -2*x + expression = -2*x [] [] diff --git a/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i b/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i index 38ec10b4106d..e17fd3a6963a 100644 --- a/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i +++ b/test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i @@ -13,32 +13,32 @@ [Functions] [exact_fn] type = ParsedFunction - value = 'x*x+y*y' + expression = 'x*x+y*y' [] [ffn] type = ParsedFunction - value = -4 + expression = -4 [] [bottom_bc_fn] type = ParsedFunction - value = -2*y + expression = -2*y [] [right_bc_fn] type = ParsedFunction - value = 2*x + expression = 2*x [] [top_bc_fn] type = ParsedFunction - value = 2*y + expression = 2*y [] [left_bc_fn] type = ParsedFunction - value = -2*x + expression = -2*x [] [] diff --git a/test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i b/test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i index a2840337a095..ac6f1da32f70 100644 --- a/test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i +++ b/test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i @@ -13,32 +13,32 @@ [Functions] [exact_fn] type = ParsedFunction - value = 'x*x+y*y' + expression = 'x*x+y*y' [] [ffn] type = ParsedFunction - value = -4 + expression = -4 [] [bottom_bc_fn] type = ParsedFunction - value = -2*y + expression = -2*y [] [right_bc_fn] type = ParsedFunction - value = 2*x + expression = 2*x [] [top_bc_fn] type = ParsedFunction - value = 2*y + expression = 2*y [] [left_bc_fn] type = ParsedFunction - value = -2*x + expression = -2*x [] [] diff --git a/test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i b/test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i index 16c982791abe..862b4df382a4 100644 --- a/test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i +++ b/test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i @@ -13,32 +13,32 @@ [Functions] [exact_fn] type = ParsedFunction - value = 'x*x+y*y' + expression = 'x*x+y*y' [] [ffn] type = ParsedFunction - value = -4 + expression = -4 [] [bottom_bc_fn] type = ParsedFunction - value = -2*y + expression = -2*y [] [right_bc_fn] type = ParsedFunction - value = 2*x + expression = 2*x [] [top_bc_fn] type = ParsedFunction - value = 2*y + expression = 2*y [] [left_bc_fn] type = ParsedFunction - value = -2*x + expression = -2*x [] [] diff --git a/test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i b/test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i index 24c48be6c302..fc0eab8e4162 100644 --- a/test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i +++ b/test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i @@ -13,32 +13,32 @@ [Functions] [exact_fn] type = ParsedFunction - value = 'x*x+y*y' + expression = 'x*x+y*y' [] [ffn] type = ParsedFunction - value = -4 + expression = -4 [] [bottom_bc_fn] type = ParsedFunction - value = -2*y + expression = -2*y [] [right_bc_fn] type = ParsedFunction - value = 2*x + expression = 2*x [] [top_bc_fn] type = ParsedFunction - value = 2*y + expression = 2*y [] [left_bc_fn] type = ParsedFunction - value = -2*x + expression = -2*x [] [] diff --git a/test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i b/test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i index 8be37ac9ba15..aa6edb68e8c9 100644 --- a/test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i +++ b/test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i @@ -13,32 +13,32 @@ [Functions] [exact_fn] type = ParsedFunction - value = 'x*x+y*y' + expression = 'x*x+y*y' [] [ffn] type = ParsedFunction - value = -4 + expression = -4 [] [bottom_bc_fn] type = ParsedFunction - value = -2*y + expression = -2*y [] [right_bc_fn] type = ParsedFunction - value = 2*x + expression = 2*x [] [top_bc_fn] type = ParsedFunction - value = 2*y + expression = 2*y [] [left_bc_fn] type = ParsedFunction - value = -2*x + expression = -2*x [] [] diff --git a/test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary_3d.i b/test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary_3d.i index 3a7baadf2dfe..04137e1233d1 100644 --- a/test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary_3d.i +++ b/test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary_3d.i @@ -56,7 +56,7 @@ [Functions] [moving_gauss] type = ParsedFunction - value = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)' + expression = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)' [] [] diff --git a/test/tests/misc/multiple-nl-systems/test-fv.i b/test/tests/misc/multiple-nl-systems/test-fv.i index d39ae3a31a61..2e3b63e40c8c 100644 --- a/test/tests/misc/multiple-nl-systems/test-fv.i +++ b/test/tests/misc/multiple-nl-systems/test-fv.i @@ -92,7 +92,7 @@ [Functions] [exact] type = ParsedFunction - value = '-1/6*x*x*x +7/6*x' + expression = '-1/6*x*x*x +7/6*x' [] [] diff --git a/tutorials/darcy_thermo_mech/doc/content/workshop/infrastructure/mms.md b/tutorials/darcy_thermo_mech/doc/content/workshop/infrastructure/mms.md index 102fedc6b397..c7852b0597fd 100644 --- a/tutorials/darcy_thermo_mech/doc/content/workshop/infrastructure/mms.md +++ b/tutorials/darcy_thermo_mech/doc/content/workshop/infrastructure/mms.md @@ -68,13 +68,13 @@ cd ~/projects/moose/examples/ex14_pps pi^2*a^2*sin(x*pi*a) [force] type = ParsedFunction - value = 'pi^2*a^2*sin(x*pi*a)' + expression = 'pi^2*a^2*sin(x*pi*a)' vars = 'a' vals = '1.0' [] [exact] type = ParsedFunction - value = 'sin(x*pi*a)' + expression = 'sin(x*pi*a)' vars = 'a' vals = '1.0' [] diff --git a/tutorials/tutorial03_verification/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/presentation/tutorial03_mms.md b/tutorials/tutorial03_verification/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/presentation/tutorial03_mms.md index ce1869d67457..d7b34e6643c1 100644 --- a/tutorials/tutorial03_verification/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/presentation/tutorial03_mms.md +++ b/tutorials/tutorial03_verification/doc/content/getting_started/examples_and_tutorials/tutorial03_verification/presentation/tutorial03_mms.md @@ -220,13 +220,13 @@ Executing this script, assuming a name of `spatial_function.py` results in the f $ python spatial_function.py [mms_force] type = ParsedFunction - value = 'cp*rho*sin(x*pi)*sin(5*y*pi) + 26*pi^2*k*t*sin(x*pi)*sin(5*y*pi) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' + expression = 'cp*rho*sin(x*pi)*sin(5*y*pi) + 26*pi^2*k*t*sin(x*pi)*sin(5*y*pi) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' vars = 'hours rho shortwave k cp kappa' vals = '1.0 1.0 1.0 1.0 1.0 1.0' [] [mms_exact] type = ParsedFunction - value = 't*sin(x*pi)*sin(5*y*pi)' + expression = 't*sin(x*pi)*sin(5*y*pi)' [] !--- @@ -328,13 +328,13 @@ Executing this script, assuming a name of `temporal_function.py` results in the $ python temporal_function.py [mms_force] type = ParsedFunction - value = '-3.08641975308642e-5*x*y*cp*rho*exp(-3.08641975308642e-5*t) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' + expression = '-3.08641975308642e-5*x*y*cp*rho*exp(-3.08641975308642e-5*t) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)' vars = 'kappa rho shortwave cp hours' vals = '1.0 1.0 1.0 1.0 1.0' [] [mms_exact] type = ParsedFunction - value = 'x*y*exp(-3.08641975308642e-5*t)' + expression = 'x*y*exp(-3.08641975308642e-5*t)' [] !--- diff --git a/unit/src/ParsedFunctionTest.C b/unit/src/ParsedFunctionTest.C index b3da2d35e554..7adb1d04f89a 100644 --- a/unit/src/ParsedFunctionTest.C +++ b/unit/src/ParsedFunctionTest.C @@ -46,7 +46,7 @@ ParsedFunctionTest::buildFunction(InputParameters & params) TEST_F(ParsedFunctionTest, basicConstructor) { auto params = getParams(); - params.set("value") = std::string("x + 1.5*y + 2 * z + t/4"); + params.set("expression") = std::string("x + 1.5*y + 2 * z + t/4"); auto & f = buildFunction(params); Moose::Functor f_wrapped(f); f.initialSetup(); @@ -161,7 +161,7 @@ TEST_F(ParsedFunctionTest, advancedConstructor) one_var[0] = "q"; auto params = getParams(); - params.set("value") = "x + y + q"; + params.set("expression") = "x + y + q"; params.set>("vars") = one_var; params.set>("vals") = std::vector(1, "-1"); // Dummy value, will be overwritten in test below @@ -181,7 +181,7 @@ TEST_F(ParsedFunctionTest, advancedConstructor) three_vars[2] = "r"; auto params2 = getParams(); - params2.set("value") = "r*x + y/w + q"; + params2.set("expression") = "r*x + y/w + q"; params2.set>("vars") = three_vars; params2.set>("vals") = std::vector(3, "-1"); // Dummy values, will be overwritten in test below @@ -199,7 +199,7 @@ TEST_F(ParsedFunctionTest, advancedConstructor) one_val[0] = "2.5"; auto params3 = getParams(); - params3.set("value") = "q*x"; + params3.set("expression") = "q*x"; params3.set>("vars") = one_var; params3.set>("vals") = one_val; @@ -214,7 +214,7 @@ TEST_F(ParsedFunctionTest, advancedConstructor) three_vals[2] = "0"; auto params4 = getParams(); - params4.set("value") = "q*x + y/r + w"; + params4.set("expression") = "q*x + y/r + w"; params4.set>("vars") = three_vars; params4.set>("vals") = three_vals; @@ -236,7 +236,7 @@ TEST_F(ParsedFunctionTest, testVariables) one_var[0] = "q"; auto params = getParams(); - params.set("value") = "x + y + q"; + params.set("expression") = "x + y + q"; params.set>("vars") = one_var; params.set>("vals") = std::vector(1, "-1"); // Dummy value, will be overwritten in test below @@ -261,7 +261,7 @@ TEST_F(ParsedFunctionTest, testVariables) three_vars[2] = "r"; auto params2 = getParams(); - params2.set("value") = "r*x + y/w + q"; + params2.set("expression") = "r*x + y/w + q"; params2.set>("vars") = three_vars; params2.set>("vals") = std::vector(3, "-1"); // Dummy values, will be overwritten in test below @@ -290,14 +290,14 @@ TEST_F(ParsedFunctionTest, testConstants) // this functions tests that pi and e get correctly substituted // it also tests built in functions of the function parser auto params = getParams(); - params.set("value") = "log(e) + x"; + params.set("expression") = "log(e) + x"; auto & f = buildFunction(params); f.initialSetup(); EXPECT_NEAR(2, f.value(0, 1), 0.0000001); auto params2 = getParams(); - params2.set("value") = "sin(pi*x)"; + params2.set("expression") = "sin(pi*x)"; auto & f2 = buildFunction(params2); f2.initialSetup();