21 params.addParam<std::vector<AuxVariableName>>(
24 "The name of auxiliary variables to save this BC's residual contributions to. " 25 "Everything about that variable must match everything about this variable (the " 26 "type, what blocks it's on, etc.)");
27 params.addParam<std::vector<AuxVariableName>>(
30 "The name of auxiliary variables to save this BC's diagonal jacobian " 31 "contributions to. Everything about that variable must match everything " 32 "about this variable (the type, what blocks it's on, etc.)");
33 params.addParamNamesToGroup(
"diag_save_in save_in",
"Advanced");
44 _var(*mooseVariable()),
46 _save_in_strings(parameters.
get<
std::vector<AuxVariableName>>(
"save_in")),
47 _diag_save_in_strings(parameters.
get<
std::vector<AuxVariableName>>(
"diag_save_in"))
62 "saved-in auxiliary variable is incompatible with the object's nonlinear variable: ",
79 "saved-in auxiliary variable is incompatible with the object's nonlinear variable: ",
99 std::array<Real, 1>{{res}},
100 std::array<dof_id_type, 1>{{dof_idx}},
105 var->sys().solution().add(var->nodalDofIndex(), res);
122 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
124 var->sys().solution().add(var->nodalDofIndex(), cached_val);
std::vector< AuxVariableName > _save_in_strings
const libMesh::FEType & feType() const
Get the type of finite element object.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
std::string incompatVarMsg(MooseVariableFieldBase &var1, MooseVariableFieldBase &var2)
Builds and returns a string of the form:
unsigned int number() const
Get variable number coming from libMesh.
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...
void addResiduals(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals corresponding to the provided dof indices.
virtual void computeJacobian() override
Compute the Jacobian at one node.
THREAD_ID _tid
The thread ID for this kernel.
SystemBase & _sys
Reference to the EquationSystem object.
MooseVariableFE< Real > * mooseVariable() const
Return the MooseVariableFE object that this interface acts on.
MooseVariable & _var
variable this works on
std::vector< AuxVariableName > _diag_save_in_strings
SubProblem & _subproblem
Reference to this kernel's SubProblem.
VarKindType
Framework-wide stuff.
virtual void computeResidual() override
Compute the residual at the current node.
virtual Real computeQpJacobian()
The user can override this function to compute the "on-diagonal" Jacobian contribution.
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the variable reference for requested MooseVariable which may be in any system.
unsigned int number() const
Gets the number of this system.
Assembly & _assembly
Reference to this Kernel's assembly object.
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
bool _has_save_in
The aux variables to save the residual contributions to.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
static InputParameters validParams()
Class constructor.
Base class for creating new types of nodal kernels.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool isNodalDefined() const override
Is this variable defined at nodes.
const dof_id_type & nodalDofIndex() const override
virtual void addVariableToZeroOnResidual(std::string var_name)
Adds this variable to the list of variables to be zeroed during each residual evaluation.
Interface for objects that need to get values of MooseVariables.
virtual void addVariableToZeroOnJacobian(std::string var_name)
Adds this variable to the list of variables to be zeroed during each Jacobian evaluation.
std::vector< MooseVariableFEBase * > _save_in
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const Node *const & _current_node
current node being processed
std::vector< MooseVariableFEBase * > _diag_save_in
static InputParameters validParams()
Class constructor.
void addJacobianElement(Assembly &assembly, Real value, dof_id_type row_index, dof_id_type column_index, Real scaling_factor)
Add into a single Jacobian element.
SystemBase & sys()
Get the system this variable is part of.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Compute the off-diagonal Jacobian at one node.
const Elem & get(const ElemType type_in)
unsigned int _qp
Quadrature point index.
virtual Real computeQpResidual()=0
The user can override this function to compute the residual at a node.
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
NodalKernel(const InputParameters ¶meters)