https://mooseframework.inl.gov
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 
39 void
41 {
43 }
Limits a control value by a range.
Real & _limited_value
Control value after limiting.
registerMooseObject("MooseApp", LimitChainControl)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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...
auto max(const L &left, const R &right)
LimitChainControl(const InputParameters &parameters)
static InputParameters validParams()
Definition: ChainControl.C:14
const Real _min_value
Lower bound to apply to control data.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _max_value
Upper bound to apply to control data.
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...
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...
virtual void execute() override
Execute the control.
static InputParameters validParams()
auto min(const L &left, const R &right)
Control that additionally provides the capability to produce/consume data values, to allow control op...
Definition: ChainControl.h:21
const Real & _unlimited_value
Control value before limiting.