https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ScalingControl.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "ScalingControl.h"
11
12registerMooseObject("ThermalHydraulicsTestApp", ScalingControl);
13
16{
18 params.addRequiredParam<Real>("scale", "Scaling factor");
19 params.addRequiredParam<Real>("initial", "Initial value");
20 params.addClassDescription("Control that multiplies old value by a scalar. Used for testing time "
21 "dependent control values.");
22 return params;
23}
24
26 : THMControl(parameters),
27 _scale(getParam<Real>("scale")),
28 _initial(getParam<Real>("initial")),
29 _value(declareComponentControlData<Real>("value")),
30 _value_old(getComponentControlDataOld<Real>("value"))
31{
33}
34
35void
registerMooseObject("ThermalHydraulicsTestApp", ScalingControl)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Control that multiplies old value by a scalar.
const Real & _scale
Scaling factor.
static InputParameters validParams()
Real & _value
Current value control.
const Real & _initial
Initial value.
ScalingControl(const InputParameters &parameters)
virtual void execute() override
const Real & _value_old
Old value of the control.
static InputParameters validParams()
Definition THMControl.C:13