30 Moose::VarKindType::VAR_SOLVER,
31 Moose::VarFieldType::VAR_FIELD_ARRAY),
32 _var(*mooseVariable()),
33 _current_node(_var.node()),
34 _u(_var.nodalValue()),
49 "Size of local residual is not equal to the number of array variable components");
63 for (
const auto i : make_range(
_var.
count()))
80 const RealEigenMatrix cached_val =
87 for (
const auto i : make_range(
_var.
count()))
88 for (
const auto j : make_range(jvar.count()))
99 return RealEigenVector::Ones(
_var.
count());
const unsigned int _count
Number of components of the array variable.
ArrayNodalBC(const InputParameters ¶meters)
virtual void computeResidual() override
Compute this object's contribution to the residual.
virtual RealEigenMatrix computeQpOffDiagJacobian(MooseVariableFEBase &jvar)
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...
virtual void computeQpResidual(RealEigenVector &residual)=0
Compute this BC's contribution to the residual at the current quadrature point, to be filled in resid...
ArrayMooseVariable & _var
RealEigenVector _work_vector
Work vector for residual.
const Node *const & _current_node
current node being processed
static InputParameters validParams()
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
virtual RealEigenVector computeQpJacobian()
The user can override this function to compute the "on-diagonal" Jacobian contribution for this Vecto...
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object's contribution to off-diagonal blocks of the system Jacobian matrix.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
unsigned int number() const
Get variable number coming from libMesh.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
const dof_id_type & nodalDofIndex() const override
virtual bool isNodalDefined() const override
Is this variable defined at nodes.
This class provides an interface for common operations on field variables of both FE and FV types wit...
Interface for objects that need to get values of MooseVariables.
MooseVariableFE< RealEigenVector > * mooseVariable() const
Return the MooseVariableFE object that this interface acts on.
Base class for deriving any boundary condition that works at nodes.
static InputParameters validParams()
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.
FEProblemBase & _fe_problem
Reference to this kernel's FEProblemBase.
unsigned int number() const
Gets the number of this system.
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.
void setResidual(SystemBase &sys, const T &residual, MooseVariableFE< T > &var)
Set residual using the variables' insertion API.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...