LCOV - code coverage report
Current view: top level - src/actions - AddClosuresAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 12 13 92.3 %
Date: 2026-05-29 20:41:18 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        1387 : AddClosuresAction::validParams()
      18             : {
      19        1387 :   InputParameters params = MooseObjectAction::validParams();
      20        1387 :   params.addClassDescription("Adds a Closures object.");
      21        1387 :   return params;
      22           0 : }
      23             : 
      24        1387 : AddClosuresAction::AddClosuresAction(const InputParameters & params) : MooseObjectAction(params) {}
      25             : 
      26             : void
      27        1380 : AddClosuresAction::act()
      28             : {
      29        1380 :   THMProblem * thm_problem = dynamic_cast<THMProblem *>(_problem.get());
      30        1380 :   if (thm_problem)
      31             :   {
      32        1380 :     _moose_object_pars.set<THMProblem *>("_thm_problem") = thm_problem;
      33        1380 :     _moose_object_pars.set<Logger *>("_logger") = &(thm_problem->log());
      34             : 
      35        1380 :     thm_problem->addClosures(_type, _name, _moose_object_pars);
      36             :   }
      37        1380 : }

Generated by: LCOV version 1.14