www.mooseframework.org
PostprocessorDirichletBC.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 
16 
17 template <>
20 {
22  p.addRequiredParam<PostprocessorName>("postprocessor",
23  "The postprocessor to set the value to on the boundary.");
24  return p;
25 }
26 
28  : NodalBC(parameters), _postprocessor_value(getPostprocessorValue("postprocessor"))
29 {
30 }
31 
32 Real
34 {
35  return _u[_qp] - _postprocessor_value;
36 }
InputParameters validParams< PostprocessorDirichletBC >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpResidual() override
Base class for deriving any boundary condition that works at nodes.
Definition: NodalBC.h:38
InputParameters validParams< NodalBC >()
Definition: NodalBC.C:23
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
PostprocessorDirichletBC(const InputParameters &parameters)
const PostprocessorValue & _postprocessor_value
The value for this BC.
const VariableValue & _u
Value of the unknown variable this BC is acting on.
Definition: NodalBC.h:58
unsigned int _qp
Quadrature point index.
Definition: NodalBC.h:56