17 #include "libmesh/libmesh_common.h" 18 #include "libmesh/quadrature.h" 37 _var(this->mooseVariableField()),
38 _phi(_assembly.phi(_var)),
41 _grad_u(_var.adGradSln())
108 const std::vector<unsigned int> * multiplicities =
110 unsigned int local_qp = 0;
111 Real multiplicity = 1.0;
119 multiplicity = (*multiplicities)[local_qp++];
const QBase *const & _qrule
Quadrature rule.
void computeFullJacobian()
Computes the full Jacobian for the current element.
void computeADResiduals()
Computes the AD residuals for the current element.
virtual void computeResidual() override
Compute this object's contribution to the residual.
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals and derivatives for the Jacobian, corresponding to the provided d...
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job...
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
unsigned int number() const
Get variable number coming from libMesh.
std::vector< ADReal > _ad_residuals
AD residuals for the current element.
static InputParameters validParams()
virtual void precalculateResidual()
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
An interface for accessing Moose::Functors for systems that care about automatic differentiation, e.g.
virtual ADReal computeQpResidual()=0
Computes the residual contribution at the current quadrature point.
void addJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided residual derivatives into the Jacobian for the provided dof indices.
MultiPointMap & getPoints()
Returns a writeable reference to the _points container.
static InputParameters validParams()
virtual void computeResidualAndJacobian() override
Compute this object's contribution to the residual and Jacobian simultaneously.
SubProblem & _subproblem
Reference to this kernel's SubProblem.
bool isActiveAtPoint(const Elem *elem, const Point &p)
Whether or not this DiracKernel has something to distribute at this Point.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes the off-diagonal Jacobian for variable jvar.
VarKindType
Framework-wide stuff.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
const MooseArray< Point > & _physical_point
Physical points.
DiracKernelInfo _local_dirac_kernel_info
Place for storing Point/Elem information only for this DiracKernel.
ADDiracKernel(const InputParameters ¶meters)
const Elem *const & _current_elem
Assembly & _assembly
Reference to this Kernel's assembly object.
static InputParameters validParams()
const ADTemplateVariableTestValue< Real > & _test
Values of test functions at QPs.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
const Elem * _last_jacobian_elem
The element corresponding to previous Jacobian calculation.
void statefulPropertiesAllowed(bool)
Derived classes can declare whether or not they work with stateful material properties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseVariableField< Real > & _var
Variable this kernel acts on.
unsigned int _qp
Quadrature point index.
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.
MooseVariableField< Real > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const bool _drop_duplicate_points
drop duplicate points or consider them in residual and Jacobian
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
unsigned int _i
i-th, j-th index for enumerating shape and test functions
auto index_range(const T &sizable)
DiracKernelBase is the base class for all DiracKernel type classes.
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
Point _current_point
The current point.