www.mooseframework.org
PostprocessorDirichletBC.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 
11 
13 
14 // Used by MOOSEDocs: syntax/Postprocessors/index.md
17 {
19  params.addClassDescription(
20  "Dirichlet boundary condition with value prescribed by a Postprocessor value.");
21  params.addRequiredParam<PostprocessorName>(
22  "postprocessor", "The postprocessor to set the value to on the boundary.");
23  return params;
24 }
25 
27  : NodalBC(parameters), _postprocessor_value(getPostprocessorValue("postprocessor"))
28 {
29 }
30 
31 Real
33 {
34  return _u[_qp] - _postprocessor_value;
35 }
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:20
static InputParameters validParams()
const unsigned int _qp
Pseudo-"quadrature point" index (Always zero for the current node)
Definition: NodalBC.h:44
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)
Boundary condition of a Dirichlet type.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const PostprocessorValue & _postprocessor_value
The value for this BC.
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...
static InputParameters validParams()
Definition: NodalBC.C:18
const VariableValue & _u
Value of the unknown variable this BC is acting on.
Definition: NodalBC.h:47
registerMooseObject("MooseApp", PostprocessorDirichletBC)