https://mooseframework.inl.gov
ChainControl.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 "ChainControl.h"
11 #include "MooseApp.h"
12 
15 {
17  params.registerBase("ChainControl");
18  return params;
19 }
20 
21 ChainControl::ChainControl(const InputParameters & parameters) : Control(parameters) {}
22 
23 void
24 ChainControl::addChainControlDataDependency(const std::string & data_name)
25 {
26  if (std::find(_control_data_depends_on.begin(), _control_data_depends_on.end(), data_name) ==
28  _control_data_depends_on.push_back(data_name);
29 }
30 
31 std::string
32 ChainControl::fullControlDataName(const std::string & data_name, bool apply_object_prefix) const
33 {
34  return (apply_object_prefix ? name() + ":" : "") + data_name;
35 }
36 
39 {
41 }
std::string fullControlDataName(const std::string &data_name, bool apply_object_prefix=true) const
Gets the full control data name, including object name prefix (if any)
Definition: ChainControl.C:32
static InputParameters validParams()
Class constructor.
Definition: Control.C:16
ChainControlDataSystem & getChainControlDataSystem()
Retrieve the chain control data system from the MooseApp.
Definition: ChainControl.C:38
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
ChainControl(const InputParameters &parameters)
Definition: ChainControl.C:21
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
static InputParameters validParams()
Definition: ChainControl.C:14
std::vector< std::string > _control_data_depends_on
List of chain control data that this control depends upon.
Definition: ChainControl.h:111
Base class for Control objects.
Definition: Control.h:33
System that manages ChainControls.
void addChainControlDataDependency(const std::string &data_name)
Adds a chain control data dependency into the list.
Definition: ChainControl.C:24
ChainControlDataSystem & getChainControlDataSystem()
Gets the system that manages the ChainControls.
Definition: MooseApp.h:868