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