https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
14registerMooseObject("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
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("ScalarTransportApp", BodyForceLM)
Imposes a body force onto a Lagrange multiplier constrained primal equation.
Definition BodyForceLM.h:18
const Function & _function
Optional function value.
Definition BodyForceLM.h:31
ADReal precomputeQpResidual() override
Definition BodyForceLM.C:39
const Real & _scale
Scale factor.
Definition BodyForceLM.h:28
static InputParameters validParams()
Definition BodyForceLM.C:17
const PostprocessorValue & _postprocessor
Optional Postprocessor value.
Definition BodyForceLM.h:34
BodyForceLM(const InputParameters &parameters)
Definition BodyForceLM.C:30
virtual Real value(Real t, const Point &p) const
unsigned int _qp
const MooseArray< Point > & _q_point
Base class for use when adding Pressure-Stabilized Petrov-Galerkin type stabilization (e....
Definition LMKernel.h:20
static InputParameters validParams()
Definition LMKernel.C:20