www.mooseframework.org
VectorNeumannBC.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 "VectorNeumannBC.h"
16 
17 template <>
20 {
22  params.addParam<RealVectorValue>(
23  "vector_value", RealVectorValue(), "vector this BC should act in");
24  params.addClassDescription("Imposes the integrated boundary condition "
25  "$\\frac{\\partial u}{\\partial n}=\\vec{V}\\cdot\\hat{n}$, "
26  "where $\\vec{V}$ is a user-defined, constant vector.");
27  return params;
28 }
29 
31  : IntegratedBC(parameters), _value(getParam<RealVectorValue>("vector_value"))
32 {
33 }
34 
35 Real
37 {
38  return -_test[_i][_qp] * (_value * _normals[_qp]);
39 }
const VariableTestValue & _test
test function values (in QPs)
Definition: IntegratedBC.h:105
InputParameters validParams< VectorNeumannBC >()
InputParameters validParams< IntegratedBC >()
Definition: IntegratedBC.C:28
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
const MooseArray< Point > & _normals
normals at quadrature points
Definition: IntegratedBC.h:80
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpResidual() override
VectorNeumannBC(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
const RealVectorValue & _value
Vector to dot with the normal.
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...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
unsigned int _i
i-th, j-th index for enumerating test and shape functions
Definition: IntegratedBC.h:93