www.mooseframework.org
Diffusion.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "Diffusion.h"
16 
17 template <>
20 {
22  params.addClassDescription("The Laplacian operator ($-\\nabla \\cdot \\nabla u$), with the weak "
23  "form of $(\\nabla \\phi_i, \\nabla u_h)$.");
24  return params;
25 }
26 
27 Diffusion::Diffusion(const InputParameters & parameters) : Kernel(parameters) {}
28 
29 Real
31 {
32  return _grad_u[_qp] * _grad_test[_i][_qp];
33 }
34 
35 Real
37 {
38  return _grad_phi[_j][_qp] * _grad_test[_i][_qp];
39 }
InputParameters validParams< Diffusion >()
Definition: Diffusion.C:19
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.
Definition: Kernel.h:54
const VariablePhiGradient & _grad_phi
gradient of the shape function
Definition: KernelBase.h:161
const VariableTestGradient & _grad_test
gradient of the test function
Definition: KernelBase.h:155
virtual Real computeQpJacobian() override
Compute this Kernel&#39;s contribution to the Jacobian at the current quadrature point.
Definition: Diffusion.C:36
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: Diffusion.C:30
unsigned int _i
current index for the test function
Definition: KernelBase.h:146
unsigned int _j
current index for the shape function
Definition: KernelBase.h:149
InputParameters validParams< Kernel >()
Definition: Kernel.C:30
Diffusion(const InputParameters &parameters)
Definition: Diffusion.C:27
Definition: Kernel.h:25
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:131