https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BoolComponentParameterValuePostprocessor.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
13
15
18{
20 params.addRequiredParam<std::string>("component", "The name of the component to be controlled.");
21 params.addRequiredParam<std::string>(
22 "parameter", "The name of the parameter in the component to be controlled.");
24 "Postprocessor for reading a boolean value from the control logic system.");
25 return params;
26}
27
29 const InputParameters & parameters)
30 : GeneralPostprocessor(parameters),
31 _input_parameter_warehouse(_app.getInputParameterWarehouse()),
32 _component_name(getParam<std::string>("component")),
33 _param_name(getParam<std::string>("parameter")),
34 _ctrl_param_name("component/" + _component_name + "/" + _param_name)
35{
36 std::vector<bool> values =
38 if (values.size() == 0)
39 paramError("component",
40 "Either component '",
42 "' does not exist or parameter '",
44 "' does not exist in that component.");
45}
46
47void
51
52void
60
61Real
registerMooseObject("ThermalHydraulicsApp", BoolComponentParameterValuePostprocessor)
std::array< Real, 2 > values
Postprocessor for reading a boolean value from the control logic system.
const std::string & _component_name
The name of the component we read the value from.
const std::string & _param_name
The name of boolean parameter.
MooseObjectParameterName _ctrl_param_name
The name of the control parameter in MOOSE.
bool _value
The value of the boolean parameter in component '_component_name'.
BoolComponentParameterValuePostprocessor(const InputParameters &parameters)
static InputParameters validParams()
std::vector< T > getControllableParameterValues(const MooseObjectParameterName &input) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void paramError(const std::string &param, Args... args) const