https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADNodalKernel.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "NodalKernelBase.h"
13#include "ADFunctorInterface.h"
15
20 public ADFunctorInterface,
21 public MooseVariableInterface<Real>
22{
23public:
29
31
38 void computeResidual() override;
39
46 void computeJacobian() override;
47
52 void computeOffDiagJacobian(unsigned int jvar) override final;
53
58 const MooseVariable & variable() const override { return _var; }
59
60protected:
65
68
71};
DualNumber< Real, DNDerivativeType, true > ADReal
An interface for accessing Moose::Functors for systems that care about automatic differentiation,...
Base class for creating nodal kernels with AD-computed Jacobians.
const ADVariableValue & _u
Value of the unknown variable this is acting on.
virtual ADReal computeQpResidual()=0
The user can override this function to compute the residual at a node.
const MooseVariable & variable() const override
Gets the variable this is active on.
MooseVariable & _var
variable this works on
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.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Interface for objects that need to get values of MooseVariables.
Base class for creating new types of nodal kernels.