https://mooseframework.inl.gov
RealComponentParameterValuePostprocessor.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 "ControllableParameter.h"
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.");
23  params.addClassDescription(
24  "Postprocessor for reading a Real (floating point) value from the control logic system.");
25  return params;
26 }
27 
29  const InputParameters & parameters)
30  : GeneralPostprocessor(parameters),
31  _fe_problem(*getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")),
32  _input_parameter_warehouse(_app.getInputParameterWarehouse()),
33  _component_name(getParam<std::string>("component")),
34  _param_name(getParam<std::string>("parameter")),
35  _ctrl_param_name("component/" + _component_name + "/" + _param_name)
36 {
37  std::vector<Real> values =
39  if (values.size() == 0)
40  paramError("component",
41  "Either component '",
43  "' does not exist or parameter '",
45  "' does not exist in that component.");
46 }
47 
48 void
50 {
51 }
52 
53 void
55 {
56  std::vector<Real> values =
58 
59  _value = values[0];
60 }
61 
62 Real
64 {
65  return _value;
66 }
registerMooseObject("ThermalHydraulicsApp", RealComponentParameterValuePostprocessor)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
void paramError(const std::string &param, Args... args) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
RealComponentParameterValuePostprocessor(const InputParameters &parameters)
std::vector< T > getControllableParameterValues(const MooseObjectParameterName &input) const