https://mooseframework.inl.gov
Loading...
Searching...
No Matches
THMAddControlAction.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 "THMAddControlAction.h"
11#include "THMProblem.h"
12#include "FEProblem.h"
13#include "Factory.h"
14#include "Control.h"
15#include "THMControl.h"
16
17registerMooseAction("ThermalHydraulicsApp", THMAddControlAction, "THM:add_control_logic");
18
21{
23 params.addClassDescription("Adds Controls from the ControlLogic block.");
24 return params;
25}
26
31
32void
34{
35 THMProblem * thm_problem = dynamic_cast<THMProblem *>(_problem.get());
36 if (thm_problem)
37 {
38 _moose_object_pars.addPrivateParam<FEProblemBase *>("_fe_problem_base", _problem.get());
39 _moose_object_pars.addPrivateParam<THMProblem *>("_thm_problem", thm_problem);
40 std::shared_ptr<Control> control = _factory.create<Control>(_type, _name, _moose_object_pars);
41 _problem->getControlWarehouse().addObject(control);
42 }
43 else
45}
registerMooseAction("ThermalHydraulicsApp", THMAddControlAction, "THM:add_control_logic")
std::shared_ptr< FEProblemBase > & _problem
virtual void act() override
static InputParameters validParams()
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
void addPrivateParam(const std::string &name, const T &value)
void addClassDescription(const std::string &doc_string)
const std::string & _name
InputParameters _moose_object_pars
std::string _type
Factory & _factory
Action for adding THM control objects.
THMAddControlAction(const InputParameters &parameters)
Class constructor.
virtual void act() override
static InputParameters validParams()
Specialization of FEProblem to run with component subsystem.
Definition THMProblem.h:19