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 : #include "THMPrintComponentLoopsAction.h" 11 : #include "THMProblem.h" 12 : 13 : registerMooseAction("ThermalHydraulicsApp", 14 : THMPrintComponentLoopsAction, 15 : "THM:print_component_loops"); 16 : 17 : InputParameters 18 148 : THMPrintComponentLoopsAction::validParams() 19 : { 20 148 : InputParameters params = Action::validParams(); 21 296 : params.addParam<bool>("print_component_loops", false, "Flag to print component loops"); 22 148 : params.addClassDescription("Prints the component loops"); 23 148 : return params; 24 0 : } 25 : 26 148 : THMPrintComponentLoopsAction::THMPrintComponentLoopsAction(const InputParameters & params) 27 148 : : Action(params) 28 : { 29 148 : } 30 : 31 : void 32 148 : THMPrintComponentLoopsAction::act() 33 : { 34 148 : THMProblem * thm_problem = dynamic_cast<THMProblem *>(_problem.get()); 35 408 : if (thm_problem && getParam<bool>("print_component_loops")) 36 16 : thm_problem->printComponentLoops(); 37 148 : }