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 : }