https://mooseframework.inl.gov
DirichletBCModifier.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "DirichletBCModifier.h"
11 
12 registerMooseObject("StochasticToolsTestApp", DirichletBCModifier);
13 
16 {
18  params.addRequiredParam<Real>("value", "Value of the BC.");
19  params.declareControllable("value");
20  params.addClassDescription("Subtracts a constant value from the residual at the "
21  "boundary nodes. It can be used as a modifier for the "
22  "DirichletBC, but cannot be used alone.");
23  return params;
24 }
25 
27  : DirichletBCBase(parameters), _value(getParam<Real>("value"))
28 {
29 }
30 
31 Real
33 {
34  // Since the definition in DirichletBCBase is _u[qp] - computeQpValue() and
35  // we want - _value only.
36  return _u[_qp] + _value;
37 }
virtual Real computeQpValue() override
static InputParameters validParams()
registerMooseObject("StochasticToolsTestApp", DirichletBCModifier)
Boundary condition of a Dirichlet type.
const unsigned int _qp
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const VariableValue & _u
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
const Real & _value
The value for this BC.
DirichletBCModifier(const InputParameters &parameters)