13#include "libmesh/quadrature.h"
27 const unsigned int n_test =
_test.size();
31 for (
_i = 0;
_i < n_test;
_i++)
38 var->sys().solution().add_vector(
_local_re, var->dofIndices());
46 const unsigned int n_test =
_test.size();
51 for (
_i = 0;
_i < n_test;
_i++)
60 DenseVector<Number> diag(rows);
61 for (
unsigned int i = 0; i < rows; i++)
65 var->sys().solution().add_vector(diag, var->dofIndices());
82 auto phi_size = jvar.dofIndices().size();
84 for (
_j = 0;
_j < phi_size;
_j++)
std::vector< MooseVariableFEBase * > _save_in
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
const MooseArray< Real > & _coord
The scaling factor to convert from cartesian to another coordinate system (e.g rz,...
unsigned int _qp
The current quadrature point index.
bool _has_save_in
The aux variables to save the residual contributions to.
const MooseArray< Real > & _JxW
The current quadrature point weight value.
unsigned int _j
current index for the shape function
std::vector< MooseVariableFEBase * > _diag_save_in
unsigned int _i
current index for the test function
const QBase *const & _qrule
active quadrature rule
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
virtual RealGradient precomputeQpJacobian()
Called before forming the jacobian for an element.
static InputParameters validParams()
KernelGrad(const InputParameters ¶meters)
Factory constructor initializes all internal references needed for residual computation.
virtual void computeResidual() override
Compute this Kernel's contribution to the residual.
virtual RealGradient precomputeQpResidual()=0
Called before forming the residual for an element.
virtual void computeJacobian() override
Compute this Kernel's contribution to the diagonal Jacobian entries.
MooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
const VariablePhiValue & _phi
the current shape functions
virtual Real computeQpOffDiagJacobian(unsigned int)
For coupling standard variables.
const VariableTestValue & _test
the current test function
static InputParameters validParams()
const VariableTestGradient & _grad_test
gradient of the test function
unsigned int number() const
Get variable number coming from libMesh.
virtual const OutputTools< Real >::VariableValue & value()
The value of the variable this object is operating on.
Assembly & _assembly
Reference to this Kernel's assembly object.
const MooseVariableFieldBase & getVariable(unsigned int jvar_num) const
Retrieve the variable object from our system associated with jvar_num.
DenseMatrix< Number > _local_ke
Holds local Jacobian entries as they are accumulated by this Kernel.
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
Prepare data for computing element jacobian according to the active tags.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.