16 #include "metaphysicl/raw_type.h" 29 if (
getParam<std::vector<AuxVariableName>>(
"save_in").size())
31 "ADNodalKernels do not support save_in. Please use the tagging system instead.");
32 if (
getParam<std::vector<AuxVariableName>>(
"diag_save_in").size())
35 "ADNodalKernels do not support diag_save_in. Please use the tagging system instead.");
47 std::array<Real, 1>{{res}},
48 std::array<dof_id_type, 1>{{dof_idx}},
62 std::array<ADReal, 1>{{res}},
63 std::array<dof_id_type, 1>{{dof_idx}},
unsigned int number() const
Get variable number coming from libMesh.
void addResiduals(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals corresponding to the provided dof indices.
static InputParameters validParams()
MooseVariable & _var
variable this works on
An interface for accessing Moose::Functors for systems that care about automatic differentiation, e.g.
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.
virtual ADReal computeQpResidual()=0
The user can override this function to compute the residual at a node.
void computeOffDiagJacobian(unsigned int jvar) override final
This method simply routes to computeJacobian whenever jvar == _var.number() since global AD computes ...
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Assembly & _assembly
Reference to this Kernel's assembly object.
static InputParameters validParams()
Class constructor.
static InputParameters validParams()
Class constructor.
Base class for creating new types of nodal kernels.
virtual bool isNodalDefined() const override
Is this variable defined at nodes.
const dof_id_type & nodalDofIndex() const override
ADNodalKernel(const InputParameters ¶meters)
void computeJacobian() override
Compute the Jacobian at one node.
unsigned int _qp
Quadrature point index.
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
void computeResidual() override
Compute the residual at the current node.