https://mooseframework.inl.gov
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"
14 
19 {
20 public:
26 
28 
35  void computeResidual() override;
36 
43  void computeJacobian() override;
44 
49  void computeOffDiagJacobian(unsigned int jvar) override final;
50 
51 protected:
55  virtual ADReal computeQpResidual() = 0;
56 
59 };
const ADVariableValue & _u
Value of the unknown variable this is acting on.
Definition: ADNodalKernel.h:58
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:47
An interface for accessing Moose::Functors for systems that care about automatic differentiation, e.g.
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 ...
Definition: ADNodalKernel.C:69
Base class for creating nodal kernels with AD-computed Jacobians.
Definition: ADNodalKernel.h:18
static InputParameters validParams()
Class constructor.
Definition: ADNodalKernel.C:19
forward declarations
Base class for creating new types of nodal kernels.
const InputParameters & parameters() const
Get the parameters of the object.
ADNodalKernel(const InputParameters &parameters)
Definition: ADNodalKernel.C:26
void computeJacobian() override
Compute the Jacobian at one node.
Definition: ADNodalKernel.C:54
void computeResidual() override
Compute the residual at the current node.
Definition: ADNodalKernel.C:39