Go to the documentation of this file.
21 "functions",
"This function will return Sum_over_i(w_i * functions_i)");
23 "w",
"This function will return Sum_over_i(w_i * functions_i)");
32 const std::vector<FunctionName> & names = getParam<std::vector<FunctionName>>(
"functions");
33 const unsigned int len = names.size();
36 "LinearCombinationFunction: The number of functions must equal the number of w values");
39 for (
unsigned i = 0; i < len; ++i)
41 if (
name() == names[i])
42 mooseError(
"A LinearCombinationFunction must not reference itself");
45 mooseError(
"LinearCombinationFunction: The function ",
58 for (
unsigned i = 0; i <
_f.size(); ++i)
67 for (
unsigned i = 0; i <
_f.size(); ++i)
76 for (
unsigned i = 0; i <
_f.size(); ++i)
LinearCombinationFunction(const InputParameters ¶meters)
void mooseError(Args &&... args) const
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
std::vector< const Function * > _f
Interface for objects that need to use functions.
virtual Real value(Real t, const Point &pt) const override
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero,...
static InputParameters validParams()
VectorValue< Real > RealVectorValue
virtual RealVectorValue vectorValue(Real t, const Point &p) const override
Override this to evaluate the vector function at a point (t,x,y,z), by default this returns a zero ve...
registerMooseObject("MooseApp", LinearCombinationFunction)
Sum_over_i (w_i * functions_i)
virtual RealGradient gradient(Real t, const Point &p) const override
Function objects can optionally provide a gradient at a point.
defineLegacyParams(LinearCombinationFunction)
static InputParameters validParams()
Class constructor.
Base class for function objects.
virtual const std::string & name() const
Get the name of the object.