https://mooseframework.inl.gov
ADKernelValue.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 "ADKernel.h"
13 
14 template <typename>
16 
19 
20 template <typename T>
21 class ADKernelValueTempl : public ADKernelTempl<T>
22 {
23 public:
25 
27 
28  // See KernelBase base for documentation of these overridden methods
29  virtual void computeResidual() override;
30 
31 protected:
32  void computeResidualsForJacobian() override;
33 
37  virtual typename OutputTools<typename Moose::ADType<T>::type>::OutputValue
39 
40  virtual ADReal computeQpResidual() override final;
41 
44  {
45  mooseError("precomputeQpJacobian should not be called for AD methods");
46  }
47 
76 };
static InputParameters validParams()
Definition: ADKernelValue.C:20
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:46
virtual OutputTools< typename Moose::ADType< T >::type >::OutputValue precomputeQpResidual()=0
Called before forming the residual for an element.
ADKernelValueTempl(const InputParameters &parameters)
Definition: ADKernelValue.C:26
virtual ADReal computeQpResidual() override final
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: ADKernelValue.C:94
virtual void computeResidual() override
Compute this object&#39;s contribution to the residual.
Definition: ADKernelValue.C:33
void computeResidualsForJacobian() override
compute the _residuals member for filling the Jacobian.
Definition: ADKernelValue.C:67
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real precomputeQpJacobian()
Unused method to enable downstream generic object creation.
Definition: ADKernelValue.h:43
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.