Line data Source code
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 "SetComponentRealValueControl.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", SetComponentRealValueControl); 14 : 15 : InputParameters 16 210 : SetComponentRealValueControl::validParams() 17 : { 18 210 : InputParameters params = THMControl::validParams(); 19 420 : params.addRequiredParam<std::string>("component", "The name of the component to be controlled."); 20 420 : params.addRequiredParam<std::string>( 21 : "parameter", "The name of the parameter in the component to be controlled."); 22 420 : params.addRequiredParam<std::string>("value", 23 : "The name of control data to be set in the component."); 24 210 : params.addClassDescription("Control to set a floating point (Real) value of a component " 25 : "parameter with control data boolean"); 26 210 : return params; 27 0 : } 28 : 29 104 : SetComponentRealValueControl::SetComponentRealValueControl(const InputParameters & parameters) 30 : : THMControl(parameters), 31 104 : _component_name(getParam<std::string>("component")), 32 208 : _param_name(getParam<std::string>("parameter")), 33 208 : _ctrl_param_name("component", _component_name, _param_name), 34 208 : _value(getControlData<Real>("value")) 35 : { 36 104 : } 37 : 38 : void 39 1376 : SetComponentRealValueControl::execute() 40 : { 41 1376 : setControllableValueByName<Real>(_ctrl_param_name, _value); 42 1376 : }