LCOV - code coverage report
Current view: top level - src/actions - AddClosuresAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 12 13 92.3 %
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 "AddClosuresAction.h"
      11             : #include "THMProblem.h"
      12             : #include "ClosuresBase.h"
      13             : 
      14             : registerMooseAction("ThermalHydraulicsApp", AddClosuresAction, "THM:add_closures");
      15             : 
      16             : InputParameters
      17        2637 : AddClosuresAction::validParams()
      18             : {
      19        2637 :   InputParameters params = MooseObjectAction::validParams();
      20        2637 :   params.addClassDescription("Adds a Closures object.");
      21        2637 :   return params;
      22           0 : }
      23             : 
      24        2637 : AddClosuresAction::AddClosuresAction(const InputParameters & params) : MooseObjectAction(params) {}
      25             : 
      26             : void
      27        2628 : AddClosuresAction::act()
      28             : {
      29        2628 :   THMProblem * thm_problem = dynamic_cast<THMProblem *>(_problem.get());
      30        2628 :   if (thm_problem)
      31             :   {
      32        2628 :     _moose_object_pars.set<THMProblem *>("_thm_problem") = thm_problem;
      33        2628 :     _moose_object_pars.set<Logger *>("_logger") = &(thm_problem->log());
      34             : 
      35        2628 :     thm_problem->addClosures(_type, _name, _moose_object_pars);
      36             :   }
      37        2628 : }

Generated by: LCOV version 1.14