13#include "libmesh/quadrature.h"
28 const unsigned int n_test =
_test.size();
32 for (
_i = 0;
_i < n_test;
_i++)
40 var->sys().solution().add_vector(
_local_re, var->dofIndices());
48 const unsigned int n_test =
_test.size();
53 for (
_i = 0;
_i < n_test;
_i++)
62 DenseVector<Number> diag(rows);
63 for (
unsigned int i = 0; i < rows; i++)
67 var->sys().solution().add_vector(diag, var->dofIndices());
83 auto phi_size = jvar.dofIndices().size();
85 for (
_j = 0;
_j < phi_size;
_j++)
96 mooseError(
"Override precomputeQpResidual() in your KernelValue derived class!");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
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 Real computeQpResidual() final
Compute this Kernel's contribution to the residual at the current quadrature point.
static InputParameters validParams()
virtual void computeResidual() override
Compute this Kernel's contribution to the residual.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
KernelValue(const InputParameters ¶meters)
Factory constructor initializes all internal references needed for residual computation.
virtual void computeJacobian() override
Compute this Kernel's contribution to the diagonal Jacobian entries.
virtual Real precomputeQpResidual()=0
Called before forming the residual for an element.
virtual Real precomputeQpJacobian()
Called before forming the jacobian for an element.
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()
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.