17 #include "libmesh/threads.h" 18 #include "libmesh/quadrature.h" 35 _var(*mooseVariable()),
37 _grad_test(_var.gradPhi()),
38 _phi(_assembly.phi(_var)),
39 _grad_phi(_assembly.gradPhi(_var)),
40 _u(_is_implicit ? _var.sln() : _var.slnOld()),
41 _grad_u(_is_implicit ? _var.gradSln() : _var.gradSlnOld())
61 var->sys().solution().add_vector(
_local_re, var->dofIndices());
79 for (
unsigned int i = 0; i < rows; i++)
83 var->sys().solution().add_vector(diag, var->dofIndices());
100 const auto phi_size = jvar.dofIndices().size();
104 for (
_j = 0;
_j < phi_size;
_j++)
119 for (
_j = 0;
_j < jv.order();
_j++)
const VectorVariableTestValue & _test
the current test function
virtual void computeResidual() override
Compute this VectorKernel's contribution to the residual.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
std::vector< MooseVariableFEBase * > _save_in
const MooseArray< Real > & _JxW
The current quadrature point weight value.
virtual void precalculateOffDiagJacobian(unsigned int)
unsigned int number() const
Get variable number coming from libMesh.
virtual void precalculateResidual()
virtual Real computeQpOffDiagJacobian(unsigned int)
This is the virtual that derived classes should override for computing an off-diagonal Jacobian compo...
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
virtual Real computeQpJacobian()
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
VectorKernel(const InputParameters ¶meters)
THREAD_ID _tid
The thread ID for this kernel.
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
DenseMatrix< Number > _local_ke
Holds local Jacobian entries as they are accumulated by 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.
MooseVariableFE< RealVectorValue > * mooseVariable() const
Return the MooseVariableFE object that this interface acts on.
virtual Real computeQpOffDiagJacobianScalar(unsigned int)
For coupling scalar variables.
This is the common base class for the three main kernel types implemented in MOOSE, Kernel, VectorKernel and ArrayKernel.
virtual void computeJacobian() override
Compute this VectorKernel's contribution to the diagonal Jacobian entries.
virtual void precalculateJacobian()
std::vector< MooseVariableFEBase * > _diag_save_in
VarKindType
Framework-wide stuff.
const QBase *const & _qrule
active quadrature rule
bool _has_save_in
The aux variables to save the residual contributions to.
unsigned int _i
current index for the test function
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
const MooseArray< Real > & _coord
The scaling factor to convert from cartesian to another coordinate system (e.g rz, spherical, etc.)
Assembly & _assembly
Reference to this Kernel's assembly object.
unsigned int _j
current index for the shape function
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a scalar variable with specified number.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
const VectorVariablePhiValue & _phi
the current shape functions
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
Interface for objects that need to get values of MooseVariables.
Class for scalar variables (they are different).
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
virtual Real computeQpResidual()=0
Compute this Kernel's contribution to the residual at the current quadrature point.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
static InputParameters validParams()
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
Prepare data for computing element jacobian according to the active tags.
virtual void computeOffDiagJacobianScalar(unsigned int jvar) override
Computes jacobian block with respect to a scalar variable.
const VectorMooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
unsigned int _qp
The current quadrature point index.