13 #include "libmesh/quadrature.h" 28 const unsigned int n_test =
_test.size();
32 for (
_i = 0;
_i < n_test;
_i++)
40 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
42 var->sys().solution().add_vector(
_local_re, var->dofIndices());
51 const unsigned int n_test =
_test.size();
56 for (
_i = 0;
_i < n_test;
_i++)
66 for (
unsigned int i = 0; i < rows; i++)
69 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
71 var->sys().solution().add_vector(diag, var->dofIndices());
87 auto phi_size = jvar.dofIndices().size();
89 for (
_j = 0;
_j < phi_size;
_j++)
100 mooseError(
"Override precomputeQpResidual() in your KernelValue derived class!");
static InputParameters validParams()
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
MooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
std::vector< MooseVariableFEBase * > _save_in
const MooseArray< Real > & _JxW
The current quadrature point weight value.
unsigned int number() const
Get variable number coming from libMesh.
virtual Real computeQpOffDiagJacobian(unsigned int)
For coupling standard variables.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
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.
unsigned int size() const
The number of elements that can currently be stored in the array.
const VariableTestValue & _test
the current test function
KernelValue(const InputParameters ¶meters)
Factory constructor initializes all internal references needed for residual computation.
std::vector< MooseVariableFEBase * > _diag_save_in
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
virtual const OutputTools< Real >::VariableValue & value()
The value of the variable this object is operating on.
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
virtual void computeJacobian() override
Compute this Kernel's contribution to the diagonal Jacobian entries.
virtual Real precomputeQpJacobian()
Called before forming the jacobian for an element.
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 void computeResidual() override
Compute this Kernel's contribution to the residual.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Real computeQpResidual() final
Compute this Kernel's contribution to the residual at the current quadrature point.
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
Prepare data for computing element jacobian according to the active tags.
virtual Real precomputeQpResidual()=0
Called before forming the residual for an element.
const VariablePhiValue & _phi
the current shape functions
static InputParameters validParams()
unsigned int _qp
The current quadrature point index.