https://mooseframework.inl.gov
Loading...
Searching...
No Matches
DivDivField.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://www.mooseframework.org
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 "DivDivField.h"
11#include "Assembly.h"
12
14
17{
20 "The grad-div operator optionally scaled by a constant scalar coefficient."
21 "Weak form: $(\\nabla \\cdot \\vec{\\psi_i}, k \\nabla \\cdot \\vec{u})$.");
22 params.addParam<Real>("coeff", 1.0, "The constant coefficient");
23 return params;
24}
25
27 : VectorKernel(parameters),
28 _div_test(_var.divPhi()),
29 _div_phi(_assembly.divPhi(_var)),
30 _div_u(_is_implicit ? _var.divSln() : _var.divSlnOld()),
31 _coeff(getParam<Real>("coeff"))
32{
33}
34
35Real
40
41Real
registerMooseObject("MooseApp", DivDivField)
Weak form contribution corresponding to -grad(k*div(u))
Definition DivDivField.h:18
DivDivField(const InputParameters &parameters)
Definition DivDivField.C:26
Real _coeff
scalar coefficient
Definition DivDivField.h:38
static InputParameters validParams()
Definition DivDivField.C:16
const VectorVariableDivergence & _div_u
div of the variable
Definition DivDivField.h:35
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
Definition DivDivField.C:42
const VectorVariableTestDivergence & _div_test
div of the test function
Definition DivDivField.h:29
virtual Real computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
Definition DivDivField.C:36
const VectorVariablePhiDivergence & _div_phi
div of the shape function
Definition DivDivField.h:32
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
unsigned int _qp
The current quadrature point index.
Definition KernelBase.h:43
unsigned int _j
current index for the shape function
Definition KernelBase.h:61
unsigned int _i
current index for the test function
Definition KernelBase.h:58
static InputParameters validParams()