https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GetPostprocessorChainControl.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
13
16{
18 params.addRequiredParam<PostprocessorName>("postprocessor", "Post-processor name");
19 params.addParam<bool>(
20 "name_data_same_as_postprocessor",
21 false,
22 "If true, name the new control data to be the same as the post-processor name; otherwise "
23 "name as '<control>:value', where '<control>' is the name of this control object.");
24 params.addClassDescription("Copies a post-processor value into a ChainControlData.");
25 return params;
26}
27
29 : ChainControl(parameters),
30 _value(getParam<bool>("name_data_same_as_postprocessor")
31 ? declareChainControlData<Real>(getParam<PostprocessorName>("postprocessor"), false)
32 : declareChainControlData<Real>("value")),
33 _pp_value(getPostprocessorValue("postprocessor"))
34{
35}
36
37void
registerMooseObject("MooseApp", GetPostprocessorChainControl)
Control that additionally provides the capability to produce/consume data values, to allow control op...
static InputParameters validParams()
Copies a post-processor value into a ChainControlData.
const Real & _pp_value
Post-processor value.
GetPostprocessorChainControl(const InputParameters &parameters)
virtual void execute() override
Execute the control.
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.