LinearCombinationFunction

Returns the linear combination of the functions

Example input syntax

In this input file, we show how a LinearCombinationFunction may be used to combine a variety of different functions, then compare the results to a manually computed linear combination.

[Functions]
  [./xtimes]
    type = ParsedFunction
    value = 1.1*x
  [../]

  [./twoxplus1]
    type = ParsedFunction
    value = 2*x+1
  [../]

  [./xsquared]
    type = ParsedFunction
    value = (x-2)*x
  [../]

  [./tover2]
    type = ParsedFunction
    value = 0.5*t
  [../]

  [./the_linear_combo]
    type = LinearCombinationFunction
    functions = 'xtimes twoxplus1 xsquared tover2'
    w = '3 -1.2 0.4 3'
  [../]

  [./should_be_answer]
    type = ParsedFunction
    value = 3*1.1*x-1.2*(2*x+1)+0.4*(x-2)*x+3*0.5*t
  [../]
[]
(../../../SoftwareDownloads/moose/test/tests/functions/linear_combination_function/lcf1.i)

Input Parameters

  • functionsThis function will return Sum_over_i(w_i * functions_i)

    C++ Type:std::vector<FunctionName>

    Controllable:No

    Description:This function will return Sum_over_i(w_i * functions_i)

  • wThis function will return Sum_over_i(w_i * functions_i)

    C++ Type:std::vector<double>

    Controllable:No

    Description:This function will return Sum_over_i(w_i * functions_i)

Required Parameters

  • execute_onLINEARThe 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.

    Default:LINEAR

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS

    Controllable:No

    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.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

Advanced Parameters