26 _save_in_strings(parameters.
get<
std::vector<AuxVariableName>>(
"save_in")),
27 _diag_save_in_strings(parameters.
get<
std::vector<AuxVariableName>>(
"diag_save_in"))
40 "saved-in auxiliary variable is incompatible with the object's nonlinear variable: ",
57 "saved-in auxiliary variable is incompatible with the object's nonlinear variable: ",
77 std::array<Real, 1>{{res}},
78 std::array<dof_id_type, 1>{{dof_idx}},
83 var->sys().solution().add(var->nodalDofIndex(), res);
100 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
102 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...
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
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.
MooseVariable & _var
variable this works on
THREAD_ID _tid
The thread ID for this kernel.
const MooseVariableFieldBase & getVariable(unsigned int jvar_num) const
Retrieve the variable object from our system associated with jvar_num.
SystemBase & _sys
Reference to the EquationSystem object.
std::vector< AuxVariableName > _diag_save_in_strings
SubProblem & _subproblem
Reference to this kernel's SubProblem.
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.
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
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.
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)