22 params.
addParam<std::vector<dof_id_type>>(
"nodes", {},
"Supply nodes using node ids");
23 params.
addParam<std::vector<BoundaryName>>(
24 "boundary", {},
"The list of boundary IDs from the mesh where this nodal kernel applies");
34 _boundary_names(getParam<
std::vector<BoundaryName>>(
"boundary"))
38 for (
const auto & var : coupled_vars)
43 mooseError(
"Must provide either 'nodes' or 'boundary' parameter.");
46 mooseError(
"Both 'nodes' and 'boundary' parameters were specified. Use the 'boundary' " 52 std::vector<dof_id_type> nodelist;
57 for (
auto & node_id : nodelist)
63 mooseDeprecated(
"Using the 'nodes' parameter is deprecated. Please update your input file to " 64 "use the 'boundary' parameter.");
MooseMesh & _mesh
Reference to this Kernel's mesh object.
void mooseDeprecated(Args &&... args) const
unsigned int number() const
Get variable number coming from libMesh.
virtual void computeOffDiagJacobianScalar(unsigned int jvar) override
Computes jacobian block with respect to a scalar variable.
NodalScalarKernel(const InputParameters ¶meters)
static InputParameters validParams()
MooseVariableScalar & _var
Scalar variable.
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
THREAD_ID _tid
The thread ID for this kernel.
void prepareOffDiagScalar()
SubProblem & _subproblem
Reference to this kernel's SubProblem.
const std::vector< dof_id_type > & getNodeList(boundary_id_type nodeset_id) const
Return a writable reference to a vector of node IDs that belong to nodeset_id.
std::vector< BoundaryName > _boundary_names
List of node boundary names.
virtual void reinit() override
Reinitialization method called before each call to computeResidual()
Assembly & _assembly
Reference to this Kernel's assembly object.
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Interface for objects that needs coupling capabilities.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
std::vector< dof_id_type > _node_ids
List of node IDs.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
static InputParameters validParams()
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid)=0