Line data Source code
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 : #pragma once 11 : 12 : #include "ActionComponent.h" 13 : #include "THMProblem.h" 14 : 15 : #define registerTHMActionComponentTasks(app_name, derived_name) \ 16 : registerMooseAction(app_name, derived_name, "THM:add_component"); \ 17 : registerMooseAction(app_name, derived_name, "THM:add_closures"); \ 18 : registerMooseAction(app_name, derived_name, "THM:add_control_logic") 19 : 20 : /** 21 : * Base class for ActionComponents that build THM components. 22 : */ 23 0 : class THMActionComponent : public ActionComponent 24 : { 25 : public: 26 : static InputParameters validParams(); 27 : THMActionComponent(const InputParameters & params); 28 : 29 : protected: 30 : virtual void actOnAdditionalTasks() override; 31 0 : virtual void addTHMComponents() {} 32 0 : virtual void addClosures() {} 33 0 : virtual void addControlLogic() {} 34 : 35 : /// Adds a THM component 36 : void addTHMComponent(const std::string & class_name, 37 : const std::string & obj_name, 38 : InputParameters & params); 39 : /// Adds a Closures object 40 : void addClosuresObject(const std::string & class_name, 41 : const std::string & obj_name, 42 : InputParameters & params); 43 : /// Adds a ControlLogic object 44 : void addControlLogicObject(const std::string & class_name, 45 : const std::string & obj_name, 46 : InputParameters & params); 47 : 48 : /// Gets the THM problem 49 : THMProblem & getTHMProblem(); 50 : };