https://mooseframework.inl.gov
AddClosuresAction.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 "AddClosuresAction.h"
11 #include "THMProblem.h"
12 #include "ClosuresBase.h"
13 
14 registerMooseAction("ThermalHydraulicsApp", AddClosuresAction, "THM:add_closures");
15 
18 {
20  params.addClassDescription("Adds a Closures object.");
21  return params;
22 }
23 
25 
26 void
28 {
29  THMProblem * thm_problem = dynamic_cast<THMProblem *>(_problem.get());
30  if (thm_problem)
31  {
32  _moose_object_pars.set<THMProblem *>("_thm_problem") = thm_problem;
33  _moose_object_pars.set<Logger *>("_logger") = &(thm_problem->log());
34 
35  thm_problem->addClosures(_type, _name, _moose_object_pars);
36  }
37 }
Keeps the error and warning messages.
Definition: Logger.h:17
Specialization of FEProblem to run with component subsystem.
Definition: THMProblem.h:18
static InputParameters validParams()
T & set(const std::string &name, bool quiet_mode=false)
Adds a closures object.
virtual void addClosures(const std::string &type, const std::string &name, InputParameters params)
Add a closures object into this simulation.
Definition: Simulation.C:1009
virtual void act() override
static InputParameters validParams()
AddClosuresAction(const InputParameters &params)
Logger & log()
Definition: Simulation.h:338
const std::string _name
std::string _type
InputParameters _moose_object_pars
void addClassDescription(const std::string &doc_string)
std::shared_ptr< FEProblemBase > & _problem
registerMooseAction("ThermalHydraulicsApp", AddClosuresAction, "THM:add_closures")