https://mooseframework.inl.gov
ADMatHeatSource.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 "ADMatHeatSource.h"
11 
12 registerMooseObject("HeatTransferApp", ADMatHeatSource);
13 
16 {
18  params.addParam<Real>("scalar", 1.0, "Scalar multiplied by the body force term");
19  params.addParam<MaterialPropertyName>(
20  "material_property", 1.0, "Material property describing the body force");
21  params.addClassDescription("Force term in thermal transport to represent a heat source");
22  return params;
23 }
24 
26  : ADKernel(parameters),
27  _scalar(getParam<Real>("scalar")),
28  _material_property(getADMaterialProperty<Real>("material_property"))
29 {
30 }
31 
32 ADReal
34 {
35  return -_scalar * _material_property[_qp] * _test[_i][_qp];
36 }
const Real _scalar
virtual ADReal computeQpResidual()
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ADMatHeatSource(const InputParameters &parameters)
const ADMaterialProperty< Real > & _material_property
const ADTemplateVariableTestValue< T > & _test
DualNumber< Real, DNDerivativeType, true > ADReal
unsigned int _i
static InputParameters validParams()
registerMooseObject("HeatTransferApp", ADMatHeatSource)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
unsigned int _qp