https://mooseframework.inl.gov
NodalKernelBase.C
Go to the documentation of this file.
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 "NodalKernelBase.h"
11 #include "Problem.h"
12 #include "SubProblem.h"
13 #include "SystemBase.h"
14 #include "MooseVariableFE.h"
15 #include "Assembly.h"
16 
19 {
23  params.addParam<bool>("use_displaced_mesh",
24  false,
25  "Whether or not this object should use the "
26  "displaced mesh for computation. Note that "
27  "in the case this is true but no "
28  "displacements are provided in the Mesh block "
29  "the undisplaced mesh will still be used.");
30  params.addParamNamesToGroup("use_displaced_mesh", "Advanced");
31  params.addParam<std::vector<AuxVariableName>>(
32  "save_in",
33  {},
34  "The name of auxiliary variables to save this BC's residual contributions to. "
35  "Everything about that variable must match everything about this variable (the "
36  "type, what blocks it's on, etc.)");
37  params.addParam<std::vector<AuxVariableName>>(
38  "diag_save_in",
39  {},
40  "The name of auxiliary variables to save this BC's diagonal jacobian "
41  "contributions to. Everything about that variable must match everything "
42  "about this variable (the type, what blocks it's on, etc.)");
43  params.registerBase("NodalKernel");
44  params.registerSystemAttributeName("NodalKernel");
45  params.addParamNamesToGroup("diag_save_in save_in", "Advanced");
46  return params;
47 }
48 
50  : ResidualObject(parameters, true),
51  BlockRestrictable(this),
52  BoundaryRestrictable(this, true), // true for applying to nodesets
56  true,
57  "variable",
60  _fe_problem(*getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")),
61  _var(*mooseVariable()),
62  _current_node(_var.node())
63 {
64 }
VarFieldType
Definition: MooseTypes.h:721
NodalKernelBase(const InputParameters &parameters)
void registerSystemAttributeName(const std::string &value)
This method is used to define the MOOSE system name that is used by the TheWarehouse object for stori...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
static InputParameters validParams()
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
static InputParameters validParams()
static InputParameters validParams()
static InputParameters validParams()
Class constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This is the common base class for objects that give residual contributions.
Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with t...
Interface for objects that need to get values of MooseVariables.
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...