https://mooseframework.inl.gov
SetBoolValueControl.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 "SetBoolValueControl.h"
11 
12 registerMooseObject("ThermalHydraulicsApp", SetBoolValueControl);
13 
16 {
18  params.addRequiredParam<std::string>("parameter", "The input parameter(s) to control");
19  params.addRequiredParam<std::string>(
20  "value", "The name of control data to be set into the input parameter.");
21  params.addClassDescription("Control object that reads a boolean value computed by the control "
22  "logic system and sets it into a specified MOOSE object parameter(s)");
23  return params;
24 }
25 
27  : THMControl(parameters), _value(getControlData<bool>("value"))
28 {
29 }
30 
31 void
33 {
34  setControllableValue<bool>("parameter", _value);
35 }
const bool & _value
The value that is written into the MOOSE object&#39;s input parameter.
Control object that reads a boolean value computed by the control logic system and sets it into a spe...
registerMooseObject("ThermalHydraulicsApp", SetBoolValueControl)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition: THMControl.C:13
SetBoolValueControl(const InputParameters &parameters)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)