11 #include "MooseVariable.h"
21 params.addParam<Real>(
23 std::numeric_limits<Real>::lowest(),
24 "If the old variable value <= min_value, the variable is fixed at its old value");
25 params.addParam<Real>(
27 std::numeric_limits<Real>::max(),
28 "If the old variable value >= max_value, the variable is fixed at its old value");
29 params.addClassDescription(
30 "Imposes the boundary condition $u = u_{old}$ if $u_{old}$ exceeds the bounds provided");
35 : NodalBC(parameters),
36 _u_old(_var.dofValuesOld()),
37 _min_value(getParam<Real>(
"min_value")),
38 _max_value(getParam<Real>(
"max_value"))
41 mooseError(
"StickyBC: min_value must not be greater than max_value");
47 const unsigned qp = 0;
54 return _u[_qp] -
_u_old[_qp];