# LinearCombinationPostprocessor

## Description

This post-processor computes a linear combination between an arbitrary number of post-processors : (1) where is the combination coefficient for , and is an additional value to add to the sum.

## Example Syntax

The following example demonstrates how this post-processor is used:

# Tests the LinearCombinationPostprocessor post-processor, which computes
# a linear combination of an arbitrary number of post-processor values.

[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]

[Problem]
solve = false
[]

[Executioner]
[]

[Postprocessors]
[./pp1]
# number of elements, equal to 2
type = NumElems
[../]
[./pp2]
# number of nodes, equal to 3
type = NumNodes
[../]

# post-processor value being tested; value should be the following:
#   value = c1 * pp1 + c2 * pp2 + b
#         = 2  * 2   + -1 * 3   + 5 = 6
[./linear_combination]
type = LinearCombinationPostprocessor
pp_names = 'pp1 pp2'
pp_coefs = '2   -1'
b = 5
[../]
[]

[Outputs]
show = linear_combination
csv = true
[]

(test/tests/postprocessors/linear_combination/linear_combination.i)

## Input Parameters

• pp_coefsList of linear combination coefficients for each post-processor

C++ Type:std::vector

Options:

Description:List of linear combination coefficients for each post-processor

• pp_namesList of post-processors

C++ Type:std::vector

Options:

Description:List of post-processors

### Required Parameters

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

Default:TIMESTEP_END

C++ Type:ExecFlagEnum

Options:NONE INITIAL LINEAR NONLINEAR TIMESTEP_END TIMESTEP_BEGIN FINAL CUSTOM

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.

Default:0

C++ Type:double

Options:

### Optional Parameters

• enableTrueSet the enabled status of the MooseObject.

Default:True

C++ Type:bool

Options:

Description:Set the enabled status of the MooseObject.

• use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Default:False

C++ Type:bool

Options:

Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

• outputsVector of output names were you would like to restrict the output of variables(s) associated with this object

C++ Type:std::vector

Options:

Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object

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

C++ Type:std::vector

Options:

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

• allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

Default:False

C++ Type:bool

Options:

Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

• force_preauxFalseForces the GeneralUserObject to be executed in PREAUX

Default:False

C++ Type:bool

Options:

Description:Forces the GeneralUserObject to be executed in PREAUX