20 params.
addClassDescription(
"Computes a moving average of the input control with a user-specified "
21 "number of points to average.");
23 params.
addRequiredParam<std::string>(
"input",
"Control data value to smooth.");
25 "The number of points to use in the moving average.");
32 _input(getChainControlData<Real>(
"input")),
33 _n_points(getParam<unsigned
int>(
"n_points")),
34 _output(declareChainControlData<Real>(
"value")),
35 _values(declareRestartableData<
std::vector<Real>>(
"values")),
36 _previous_time(declareRestartableData<Real>(
"previous_time"))
registerMooseObject("MooseApp", SmootherChainControl)
void ErrorVector unsigned int
Control that additionally provides the capability to produce/consume data values, to allow control op...
static InputParameters validParams()
Computes a moving average of the input control with a user-specified number of points to average.
virtual void execute() override
Execute the control.
SmootherChainControl(const InputParameters ¶meters)
const Real & _input
Input data.
static InputParameters validParams()
const unsigned int _n_points
The number of points to use in the moving average.
Real & _output
Output control value.
std::vector< Real > & _values
Vector to store values.
void executeInner()
Performs the main execution.
Real & _previous_time
Previous time for which value was cached.