https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LimitChainControl.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 "LimitChainControl.h"
11
13
16{
18
19 params.addClassDescription("Limits a control value by a range.");
20
21 params.addRequiredParam<std::string>("control_data", "Control data to limit");
22 params.addParam<Real>(
23 "min_value", std::numeric_limits<Real>::lowest(), "Minimum value for the control data");
24 params.addParam<Real>(
25 "max_value", std::numeric_limits<Real>::max(), "Maximum value for the control data");
26
27 return params;
28}
29
31 : ChainControl(parameters),
32 _min_value(getParam<Real>("min_value")),
33 _max_value(getParam<Real>("max_value")),
34 _unlimited_value(getChainControlData<Real>("control_data")),
35 _limited_value(declareChainControlData<Real>("value"))
36{
37}
38
39void
registerMooseObject("MooseApp", LimitChainControl)
Control that additionally provides the capability to produce/consume data values, to allow control op...
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Limits a control value by a range.
const Real _min_value
Lower bound to apply to control data.
virtual void execute() override
Execute the control.
static InputParameters validParams()
LimitChainControl(const InputParameters &parameters)
const Real _max_value
Upper bound to apply to control data.
const Real & _unlimited_value
Control value before limiting.
Real & _limited_value
Control value after limiting.