LCOV - code coverage report
Current view: top level - src/actions - AddKernelAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 11 13 84.6 %
Date: 2025-07-17 01:28:37 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 "AddKernelAction.h"
      11             : #include "FEProblem.h"
      12             : 
      13             : registerMooseAction("MooseApp", AddKernelAction, "add_kernel");
      14             : 
      15             : registerMooseAction("MooseApp", AddKernelAction, "add_aux_kernel");
      16             : 
      17             : InputParameters
      18      109795 : AddKernelAction::validParams()
      19             : {
      20      109795 :   InputParameters params = MooseObjectAction::validParams();
      21      109795 :   params.addClassDescription("Add a Kernel object to the simulation.");
      22      109795 :   return params;
      23           0 : }
      24             : 
      25      109204 : AddKernelAction::AddKernelAction(const InputParameters & params) : MooseObjectAction(params) {}
      26             : 
      27             : void
      28      106741 : AddKernelAction::act()
      29             : {
      30      106741 :   if (_current_task == "add_kernel")
      31       75743 :     _problem->addKernel(_type, _name, _moose_object_pars);
      32             :   else
      33             :   {
      34       30998 :     if (getAllTasks().find("add_aux_bc") != getAllTasks().end())
      35           0 :       mooseWarning("The [AuxBCs] block is deprecated, all AuxKernels including both block and "
      36             :                    "boundary restricted should be added within the [AuxKernels] block");
      37             : 
      38       30998 :     _problem->addAuxKernel(_type, _name, _moose_object_pars);
      39             :   }
      40      106377 : }

Generated by: LCOV version 1.14