www.mooseframework.org
ADKernelSUPG.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 
10 #include "ADKernelSUPG.h"
11 #include "MathUtils.h"
12 #include "Assembly.h"
13 
14 // libmesh includes
15 #include "libmesh/threads.h"
16 
17 template <typename T>
20 {
22  params.addParam<MaterialPropertyName>(
23  "tau_name", "tau", "The name of the stabilization parameter tau.");
24  params.addCoupledVar("velocity", "The velocity variable.");
25  params.addParam<MaterialPropertyName>("material_velocity",
26  "A material property describing the velocity");
27  return params;
28 }
29 
30 template <typename T>
32  : ADKernelStabilizedTempl<T>(parameters),
33  _tau(this->template getADMaterialProperty<Real>("tau_name")),
34  _velocity(
35  this->isParamValid("velocity")
36  ? this->adCoupledVectorValue("velocity")
37  : this->template getADMaterialProperty<RealVectorValue>("material_velocity").get())
38 {
39 }
40 
41 template <typename T>
44 {
45  return _velocity[_qp] * _tau[_qp];
46 }
47 
48 template class ADKernelSUPGTempl<Real>;
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1147
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
ADRealVectorValue computeQpStabilization() override
Definition: ADKernelSUPG.C:43
static InputParameters validParams()
Definition: ADKernelSUPG.C:19
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
ADKernelSUPGTempl(const InputParameters &parameters)
Definition: ADKernelSUPG.C:31