LCOV - code coverage report
Current view: top level - src/actions - THMPrintComponentLoopsAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 13 14 92.9 %
Date: 2025-07-30 13:02:48 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 : }

Generated by: LCOV version 1.14