16#include "metaphysicl/raw_type.h"
32 Moose::VarKindType::VAR_SOLVER,
33 Moose::VarFieldType::VAR_FIELD_STANDARD),
34 _var(*mooseVariable()),
35 _u(_var.adDofValues())
49 std::array<Real, 1>{{res}},
50 std::array<dof_id_type, 1>{{dof_idx}},
64 std::array<ADReal, 1>{{res}},
65 std::array<dof_id_type, 1>{{dof_idx}},
An interface for accessing Moose::Functors for systems that care about automatic differentiation,...
static InputParameters validParams()
virtual ADReal computeQpResidual()=0
The user can override this function to compute the residual at a node.
MooseVariable & _var
variable this works on
ADNodalKernel(const InputParameters ¶meters)
void computeOffDiagJacobian(unsigned int jvar) override final
This method simply routes to computeJacobian whenever jvar == _var.number() since global AD computes ...
static InputParameters validParams()
Class constructor.
void computeResidual() override
Compute the residual at the current node.
void computeJacobian() override
Compute the Jacobian at one node.
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...
const dof_id_type & nodalDofIndex() const override
virtual bool isNodalDefined() const override
Is this variable defined at nodes.
Interface for objects that need to get values of MooseVariables.
MooseVariableFE< Real > * mooseVariable() const
Return the MooseVariableFE object that this interface acts on.
Base class for creating new types of nodal kernels.
unsigned int _qp
Quadrature point index.
static InputParameters validParams()
Class constructor.
Assembly & _assembly
Reference to this Kernel's assembly object.
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 addResiduals(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals corresponding to the provided dof indices.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...