www.mooseframework.org
AddKernelAction.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "AddKernelAction.h"
16 #include "FEProblem.h"
17 
18 template <>
21 {
23 }
24 
26 
27 void
29 {
30  if (_current_task == "add_kernel")
31  _problem->addKernel(_type, _name, _moose_object_pars);
32  else
33  {
34  if (getAllTasks().find("add_aux_bc") != getAllTasks().end())
35  mooseWarning("The [AuxBCs] block is deprecated, all AuxKernels including both block and "
36  "boundary restricted should be added within the [AuxKernels] block");
37 
38  _problem->addAuxKernel(_type, _name, _moose_object_pars);
39  }
40 }
virtual void act() override
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string _name
The name of the action.
Definition: Action.h:92
AddKernelAction(InputParameters params)
const std::set< std::string > & getAllTasks() const
Definition: Action.h:68
const std::string & _current_task
The current action (even though we have seperate instances for each action)
Definition: Action.h:125
InputParameters validParams< MooseObjectAction >()
std::string _type
The Object type that is being created.
InputParameters _moose_object_pars
The parameters for the object to be created.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:131
InputParameters validParams< AddKernelAction >()
void mooseWarning(Args &&...args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:194