https://mooseframework.inl.gov
CoupledForceLM.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 "CoupledForceLM.h"
11 
12 registerMooseObject("ScalarTransportApp", CoupledForceLM);
13 
16 {
17  auto params = LMKernel::validParams();
18  params.addRequiredCoupledVar("v", "The coupled variable which provides the force");
19  params.addParam<Real>(
20  "coef", 1.0, "Coefficent ($\\sigma$) multiplier for the coupled force term.");
21  params.addClassDescription(
22  "Adds a coupled force term to a Lagrange multiplier constrained primal equation");
23  return params;
24 }
25 
27  : LMKernel(parameters),
28  _v_var(coupled("v")),
29  _v(adCoupledValue("v")),
30  _coef(getParam<Real>("coef"))
31 {
32 }
33 
34 ADReal
36 {
37  return -_coef * _v[_qp];
38 }
registerMooseObject("ScalarTransportApp", CoupledForceLM)
static InputParameters validParams()
Base class for use when adding Pressure-Stabilized Petrov-Galerkin type stabilization (e...
Definition: LMKernel.h:19
CoupledForceLM(const InputParameters &parameters)
const Real _coef
An optional coefficient multiplying the coupled force.
DualNumber< Real, DNDerivativeType, true > ADReal
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADVariableValue & _v
The current quadrature point values of the coupled variable.
Adds a coupled force term to a Lagrange multiplier constrained primal equation.
ADReal precomputeQpResidual() override
static InputParameters validParams()
Definition: LMKernel.C:20
unsigned int _qp