LCOV - code coverage report
Current view: top level - src/actions - TriSubChannelBuildMeshAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose subchannel: #31405 (292dce) with base fef103 Lines: 19 20 95.0 %
Date: 2025-09-04 07:58:06 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 "TriSubChannelBuildMeshAction.h"
      11             : #include "SubChannelMesh.h"
      12             : 
      13             : registerMooseAction("SubChannelApp", TriSubChannelBuildMeshAction, "setup_mesh");
      14             : registerMooseAction("SubChannelApp", TriSubChannelBuildMeshAction, "set_mesh_base");
      15             : 
      16             : InputParameters
      17         184 : TriSubChannelBuildMeshAction::validParams()
      18             : {
      19         184 :   InputParameters params = Action::validParams();
      20         184 :   params.addClassDescription("Creates the infastructure necessary to build the subchannel mesh in "
      21             :                              "the triangular lattice arrangement");
      22         184 :   return params;
      23           0 : }
      24             : 
      25         184 : TriSubChannelBuildMeshAction::TriSubChannelBuildMeshAction(const InputParameters & params)
      26         184 :   : Action(params)
      27             : {
      28         184 : }
      29             : 
      30             : void
      31         368 : TriSubChannelBuildMeshAction::act()
      32             : {
      33         368 :   if (_current_task == "setup_mesh")
      34             :   {
      35             :     {
      36         184 :       const std::string class_name = "TriSubChannelMesh";
      37         184 :       InputParameters params = _factory.getValidParams(class_name);
      38         184 :       _mesh = _factory.create<SubChannelMesh>(class_name, "subchannel:mesh", params);
      39         184 :     }
      40         184 :     _mesh->buildMesh();
      41             :   }
      42         184 :   else if (_current_task == "set_mesh_base")
      43             :   {
      44         184 :     auto mesh_base = _app.getMeshGeneratorMesh();
      45         184 :     _mesh->setMeshBase(std::move(mesh_base));
      46         184 :   }
      47         368 : }

Generated by: LCOV version 1.14