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 "AddScalarKernelAction.h" 11 : #include "FEProblem.h" 12 : 13 : registerMooseAction("MooseApp", AddScalarKernelAction, "add_scalar_kernel"); 14 : 15 : registerMooseAction("MooseApp", AddScalarKernelAction, "add_aux_scalar_kernel"); 16 : 17 : InputParameters 18 2340 : AddScalarKernelAction::validParams() 19 : { 20 2340 : InputParameters params = MooseObjectAction::validParams(); 21 2340 : params.addClassDescription("Add a AuxScalarKernel object to the simulation."); 22 2340 : return params; 23 0 : } 24 : 25 1934 : AddScalarKernelAction::AddScalarKernelAction(const InputParameters & params) 26 1934 : : MooseObjectAction(params) 27 : { 28 1934 : } 29 : 30 : void 31 1902 : AddScalarKernelAction::act() 32 : { 33 1902 : if (_current_task == "add_scalar_kernel") 34 1420 : _problem->addScalarKernel(_type, _name, _moose_object_pars); 35 : else 36 482 : _problem->addAuxScalarKernel(_type, _name, _moose_object_pars); 37 1890 : }