https://mooseframework.inl.gov
ADAdvection.C
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 #include "ADAdvection.h"
11 
12 registerMooseObject("NavierStokesTestApp", ADAdvection);
13 
16 {
18  params.addRequiredParam<MaterialPropertyName>("velocity", "Velocity vector");
19  return params;
20 }
21 
23  : ADKernel(parameters), _velocity(getADMaterialProperty<RealVectorValue>("velocity"))
24 {
25 }
26 
27 ADReal
29 {
30  return _test[_i][_qp] * _velocity[_qp] * _grad_u[_qp];
31 }
const ADMaterialProperty< RealVectorValue > & _velocity
Definition: ADAdvection.h:24
const ADTemplateVariableTestValue< T > & _test
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition: ADAdvection.C:15
registerMooseObject("NavierStokesTestApp", ADAdvection)
unsigned int _i
static InputParameters validParams()
const ADTemplateVariableGradient< T > & _grad_u
ADAdvection(const InputParameters &parameters)
Definition: ADAdvection.C:22
unsigned int _qp
virtual ADReal computeQpResidual() override
Definition: ADAdvection.C:28