LCOV - code coverage report
Current view: top level - src/actions - THMSetupMeshAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 10 10 100.0 %
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 "THMSetupMeshAction.h"
      11             : #include "THMProblem.h"
      12             : 
      13             : registerMooseAction("ThermalHydraulicsApp", THMSetupMeshAction, "THM:setup_mesh");
      14             : registerMooseAction("ThermalHydraulicsApp", THMSetupMeshAction, "init_mesh");
      15             : 
      16             : InputParameters
      17        2929 : THMSetupMeshAction::validParams()
      18             : {
      19        2929 :   InputParameters params = Action::validParams();
      20        2929 :   return params;
      21             : }
      22             : 
      23        2929 : THMSetupMeshAction::THMSetupMeshAction(const InputParameters & params) : Action(params) {}
      24             : 
      25             : void
      26        5801 : THMSetupMeshAction::act()
      27             : {
      28        5801 :   if (_current_task == "THM:setup_mesh")
      29             :   {
      30        2876 :     THMProblem * thm_problem = dynamic_cast<THMProblem *>(_problem.get());
      31        2876 :     if (thm_problem)
      32        2106 :       thm_problem->setupMesh();
      33             :   }
      34             :   else if (_current_task == "init_mesh")
      35             :   {
      36             :     // Do not do anything; it is necessary to register an action to 'init_mesh'
      37             :     // to bypass CreateMeshSetupActionsForComponents; see the return condition
      38             :     // in its act() method.
      39             :   }
      40        5801 : }

Generated by: LCOV version 1.14