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");
33 _node_ids(getParam<
std::vector<dof_id_type>>(
"nodes")),
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.");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
void prepareOffDiagScalar()
Interface for objects that needs coupling capabilities.
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
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.
unsigned int number() const
Get variable number coming from libMesh.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
static InputParameters validParams()
virtual void computeOffDiagJacobianScalar(unsigned int jvar) override
Computes jacobian block with respect to a scalar variable.
NodalScalarKernel(const InputParameters ¶meters)
std::vector< dof_id_type > _node_ids
List of node IDs.
virtual void reinit() override
Reinitialization method called before each call to computeResidual()
std::vector< BoundaryName > _boundary_names
List of node boundary names.
THREAD_ID _tid
The thread ID for this kernel.
MooseMesh & _mesh
Reference to this Kernel's mesh object.
Assembly & _assembly
Reference to this Kernel's assembly object.
SubProblem & _subproblem
Reference to this kernel's SubProblem.
MooseVariableScalar & _var
Scalar variable.
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
static InputParameters validParams()
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid)=0