19 params.
addRequiredParam<std::vector<PostprocessorName>>(
"pp_names",
"List of post-processors");
21 "pp_coefs",
"List of linear combination coefficients for each post-processor");
22 params.
addParam<
Real>(
"b", 0,
"Additional value to add to sum");
24 "Computes a linear combination between an arbitrary number of post-processors");
30 _n_pp(coupledPostprocessors(
"pp_names")),
31 _pp_coefs(getParam<
std::vector<
Real>>(
"pp_coefs")),
32 _b_value(getParam<
Real>(
"b"))
35 mooseError(
"The list parameters 'pp_names' and 'pp_coefs' must have the same length");
38 for (
unsigned int i = 0; i <
_n_pp; i++)
56 for (
unsigned int i = 0; i <
_n_pp; i++)
59 return linear_combination;
std::vector< const PostprocessorValue * > _pp_values
List of post-processor values.
Computes a linear combination between an arbitrary number of post-processors.
const unsigned int _n_pp
Number of post-processors in linear combination.
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
const Real _b_value
Additional value to add to sum.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
const PostprocessorValue & getPostprocessorValue(const std::string ¶m_name, const unsigned int index=0) const
doco-normal-methods-begin Retrieve the value of a Postprocessor or one of it's old or older values ...
static InputParameters validParams()
static InputParameters validParams()
virtual void execute() override
Execute method.
Real PostprocessorValue
various MOOSE typedefs
const std::vector< Real > & _pp_coefs
List of linear combination coefficients for each post-processor value.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("MooseApp", LinearCombinationPostprocessor)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
LinearCombinationPostprocessor(const InputParameters ¶meters)