https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
12registerMooseObject("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
31Real
33{
34 // Since the definition in DirichletBCBase is _u[qp] - computeQpValue() and
35 // we want - _value only.
36 return _u[_qp] + _value;
37}
registerMooseObject("StochasticToolsTestApp", DirichletBCModifier)
static InputParameters validParams()
Boundary condition of a Dirichlet type.
virtual Real computeQpValue() override
static InputParameters validParams()
DirichletBCModifier(const InputParameters &parameters)
const Real & _value
The value for this BC.
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
const VariableValue & _u
const unsigned int _qp