www.mooseframework.org
WeakGradientBC.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 "WeakGradientBC.h"
11 
13 
16 {
18  params.addClassDescription(
19  "Computes a boundary residual contribution consistent with the Diffusion Kernel. "
20  "Does not impose a boundary condition; instead computes the boundary "
21  "contribution corresponding to the current value of grad(u) and accumulates "
22  "it in the residual vector.");
23  return params;
24 }
25 
26 WeakGradientBC::WeakGradientBC(const InputParameters & parameters) : IntegratedBC(parameters) {}
27 
28 Real
30 {
31  return (_grad_u[_qp] * _normals[_qp]) * _test[_i][_qp];
32 }
33 
34 Real
36 {
37  return (_grad_phi[_j][_qp] * _normals[_qp]) * _test[_i][_qp];
38 }
const VariableTestValue & _test
test function values (in QPs)
Definition: IntegratedBC.h:97
const MooseArray< Point > & _normals
normals at quadrature points
Definition: IntegratedBC.h:85
const VariableGradient & _grad_u
the gradient of the unknown variable this BC is acting on
Definition: IntegratedBC.h:106
static InputParameters validParams()
Definition: IntegratedBC.C:22
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _i
i-th, j-th index for enumerating test and shape functions
virtual Real computeQpResidual() override
Method for computing the residual at quadrature points.
registerMooseObject("MooseApp", WeakGradientBC)
unsigned int _qp
quadrature point index
const VariablePhiGradient & _grad_phi
gradients of shape functions (in QPs)
Definition: IntegratedBC.h:92
WeakGradientBC(const InputParameters &parameters)
static InputParameters validParams()
Base class for deriving any boundary condition of a integrated type.
Definition: IntegratedBC.h:18
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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...
virtual Real computeQpJacobian() override
Method for computing the diagonal Jacobian at quadrature points.
A FluxBC which is consistent with the boundary terms arising from the Diffusion Kernel.