www.mooseframework.org
WeakGradientBC.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 "WeakGradientBC.h"
16 
17 template <>
20 {
22  params.addClassDescription(
23  "Computes a boundary residual contribution consistent with the Diffusion Kernel. "
24  "Does not impose a boundary condition; instead computes the boundary "
25  "contribution corresponding to the current value of grad(u) and accumulates "
26  "it in the residual vector.");
27  return params;
28 }
29 
30 WeakGradientBC::WeakGradientBC(const InputParameters & parameters) : IntegratedBC(parameters) {}
31 
32 Real
34 {
35  return (_grad_u[_qp] * _normals[_qp]) * _test[_i][_qp];
36 }
37 
38 Real
40 {
41  return (_grad_phi[_j][_qp] * _normals[_qp]) * _test[_i][_qp];
42 }
const VariableTestValue & _test
test function values (in QPs)
Definition: IntegratedBC.h:105
InputParameters validParams< IntegratedBC >()
Definition: IntegratedBC.C:28
const MooseArray< Point > & _normals
normals at quadrature points
Definition: IntegratedBC.h:80
const VariableGradient & _grad_u
the gradient of the unknown variable this BC is acting on
Definition: IntegratedBC.h:114
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpResidual() override
const VariablePhiGradient & _grad_phi
gradients of shape functions (in QPs)
Definition: IntegratedBC.h:100
InputParameters validParams< WeakGradientBC >()
WeakGradientBC(const InputParameters &parameters)
Base class for deriving any boundary condition of a integrated type.
Definition: IntegratedBC.h:33
unsigned int _qp
quadrature point index
Definition: IntegratedBC.h:83
unsigned int _j
Definition: IntegratedBC.h:93
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 _i
i-th, j-th index for enumerating test and shape functions
Definition: IntegratedBC.h:93
virtual Real computeQpJacobian() override