24 params.
addClassDescription(
"Demonstrates the multiple ways that scalar values can be introduced " 25 "into kernels, e.g. (controllable) constants, functions, and " 26 "postprocessors. Implements the weak form $(\\psi_i, -f)$.");
27 params.
addParam<
Real>(
"value", 1.0,
"Coefficient to multiply by the body force term");
28 params.
addParam<FunctionName>(
"function",
"1",
"A function that describes the body force");
30 "postprocessor", 1,
"A postprocessor whose value is multiplied by the body force");
38 _scale(this->template getParam<
Real>(
"value")),
39 _function(getFunction(
"function")),
40 _postprocessor(getPostprocessorValue(
"postprocessor")),
41 _generic_q_point(this->_use_displaced_mesh ? &this->_assembly.template genericQPoints<is_ad>()
51 return -_test[_i][_qp] * _scale * _postprocessor *
52 _function.value(_t, (*_generic_q_point)[_qp]);
54 return -_test[_i][_qp] * _scale * _postprocessor * _function.value(_t, _q_point[_qp]);
BodyForceTempl(const InputParameters ¶meters)
registerMooseObject("MooseApp", BodyForce)
static InputParameters validParams()
static InputParameters validParams()
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
typename Moose::GenericType< Real, is_ad > GenericReal
This kernel implements a generic functional body force term: $ - c f $.