https://mooseframework.inl.gov
BodyForceLM.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 "BodyForceLM.h"
11 
12 #include "Function.h"
13 
14 registerMooseObject("ScalarTransportApp", BodyForceLM);
15 
18 {
19  auto params = LMKernel::validParams();
20  params.addParam<Real>("value", 1.0, "Coefficient to multiply by the body force term");
21  params.addParam<FunctionName>("function", "1", "A function that describes the body force");
22  params.addParam<PostprocessorName>(
23  "postprocessor", 1, "A postprocessor whose value is multiplied by the body force");
24  params.declareControllable("value");
25  params.addClassDescription(
26  "Imposes a body force onto a Lagrange multiplier constrained primal equation");
27  return params;
28 }
29 
31  : LMKernel(parameters),
32  _scale(getParam<Real>("value")),
33  _function(getFunction("function")),
34  _postprocessor(getPostprocessorValue("postprocessor"))
35 {
36 }
37 
38 ADReal
40 {
42 }
static InputParameters validParams()
Definition: BodyForceLM.C:17
BodyForceLM(const InputParameters &parameters)
Definition: BodyForceLM.C:30
ADReal precomputeQpResidual() override
Definition: BodyForceLM.C:39
Base class for use when adding Pressure-Stabilized Petrov-Galerkin type stabilization (e...
Definition: LMKernel.h:19
DualNumber< Real, DNDerivativeType, true > ADReal
const PostprocessorValue & _postprocessor
Optional Postprocessor value.
Definition: BodyForceLM.h:34
registerMooseObject("ScalarTransportApp", BodyForceLM)
const Real & _scale
Scale factor.
Definition: BodyForceLM.h:28
const Function & _function
Optional function value.
Definition: BodyForceLM.h:31
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Imposes a body force onto a Lagrange multiplier constrained primal equation.
Definition: BodyForceLM.h:17
virtual Real value(Real t, const Point &p) const
static InputParameters validParams()
Definition: LMKernel.C:20
const MooseArray< Point > & _q_point
unsigned int _qp