https://mooseframework.inl.gov
SetComponentRealValueControl.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 
11 #include "Function.h"
12 
13 registerMooseObject("ThermalHydraulicsApp", SetComponentRealValueControl);
14 
17 {
19  params.addRequiredParam<std::string>("component", "The name of the component to be controlled.");
20  params.addRequiredParam<std::string>(
21  "parameter", "The name of the parameter in the component to be controlled.");
22  params.addRequiredParam<std::string>("value",
23  "The name of control data to be set in the component.");
24  params.addClassDescription("Control to set a floating point (Real) value of a component "
25  "parameter with control data boolean");
26  return params;
27 }
28 
30  : THMControl(parameters),
31  _component_name(getParam<std::string>("component")),
32  _param_name(getParam<std::string>("parameter")),
33  _ctrl_param_name("component", _component_name, _param_name),
34  _value(getControlData<Real>("value"))
35 {
36 }
37 
38 void
40 {
41  setControllableValueByName<Real>(_ctrl_param_name, _value);
42 }
This block reads an input computed by the control logic system and sets a value in a specified compon...
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition: THMControl.C:13
SetComponentRealValueControl(const InputParameters &parameters)
registerMooseObject("ThermalHydraulicsApp", SetComponentRealValueControl)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real & _value
The value that is written into the component.
void addClassDescription(const std::string &doc_string)
MooseObjectParameterName _ctrl_param_name
Control parameter name used internally by MOOSE (the name is generated by THM)