https://mooseframework.inl.gov
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 
12 registerMooseObject("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 {
32  _value = _initial;
33 }
34 
35 void
37 {
39 }
const Real & _scale
Scaling factor.
static InputParameters validParams()
const Real & _value_old
Old value of the control.
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition: THMControl.C:13
Control that multiplies old value by a scalar.
virtual void execute() override
ScalingControl(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("ThermalHydraulicsTestApp", ScalingControl)
void addClassDescription(const std::string &doc_string)
const Real & _initial
Initial value.
Real & _value
Current value control.