www.mooseframework.org
ADCoupledTimeDerivative.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
13 
16 {
17  auto params = ADKernelValue::validParams();
18  params.addClassDescription("Time derivative Kernel that acts on a coupled variable. Weak form: "
19  "$(\\psi_i, \\frac{\\partial v_h}{\\partial t})$.");
20  params.addRequiredCoupledVar("v", "Coupled variable");
21  return params;
22 }
23 
25  : ADKernelValue(parameters), _v_dot(adCoupledDot("v"))
26 {
27 }
28 
29 ADReal
31 {
32  return _v_dot[_qp];
33 }
static InputParameters validParams()
Definition: ADKernelValue.C:20
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const ADVariableValue & _v_dot
virtual ADReal precomputeQpResidual() override
Called before forming the residual for an element.
DualReal ADReal
Definition: ADRealForward.h:14
registerMooseObject("MooseApp", ADCoupledTimeDerivative)
ADCoupledTimeDerivative(const InputParameters &parameters)
static InputParameters validParams()
This calculates the time derivative for a coupled variable.
unsigned int _qp
The current quadrature point index.
Definition: KernelBase.h:42