www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StickyBC Class Reference

Sticky-type boundary condition, where if the old variable value exceeds the bounds provided u is fixed (ala Dirichlet) to the old value. More...

#include <StickyBC.h>

Inheritance diagram for StickyBC:
[legend]

Public Member Functions

 StickyBC (const InputParameters &parameters)
 

Protected Member Functions

virtual bool shouldApply () override
 
virtual Real computeQpResidual () override
 

Protected Attributes

const VariableValue & _u_old
 
const Real _min_value
 The minimum bound. More...
 
const Real _max_value
 The maximum bound. More...
 

Detailed Description

Sticky-type boundary condition, where if the old variable value exceeds the bounds provided u is fixed (ala Dirichlet) to the old value.

Definition at line 30 of file StickyBC.h.

Constructor & Destructor Documentation

StickyBC::StickyBC ( const InputParameters &  parameters)

Definition at line 36 of file StickyBC.C.

37  : NodalBC(parameters),
38  _u_old(_var.nodalSlnOld()),
39  _min_value(getParam<Real>("min_value")),
40  _max_value(getParam<Real>("max_value"))
41 {
42  if (_min_value > _max_value)
43  mooseError("StickyBC: min_value must not be greater than max_value");
44 }
const VariableValue & _u_old
Definition: StickyBC.h:40
const Real _min_value
The minimum bound.
Definition: StickyBC.h:42
const Real _max_value
The maximum bound.
Definition: StickyBC.h:44

Member Function Documentation

Real StickyBC::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 54 of file StickyBC.C.

55 {
56  return _u[_qp] - _u_old[_qp];
57 }
const VariableValue & _u_old
Definition: StickyBC.h:40
bool StickyBC::shouldApply ( )
overrideprotectedvirtual

Definition at line 47 of file StickyBC.C.

48 {
49  const unsigned qp = 0; // this is a NodalBC: all qp = 0
50  return (_u_old[qp] <= _min_value || _u_old[qp] >= _max_value);
51 }
const VariableValue & _u_old
Definition: StickyBC.h:40
const Real _min_value
The minimum bound.
Definition: StickyBC.h:42
const Real _max_value
The maximum bound.
Definition: StickyBC.h:44

Member Data Documentation

const Real StickyBC::_max_value
protected

The maximum bound.

Definition at line 44 of file StickyBC.h.

Referenced by shouldApply(), and StickyBC().

const Real StickyBC::_min_value
protected

The minimum bound.

Definition at line 42 of file StickyBC.h.

Referenced by shouldApply(), and StickyBC().

const VariableValue& StickyBC::_u_old
protected

Definition at line 40 of file StickyBC.h.

Referenced by computeQpResidual(), and shouldApply().


The documentation for this class was generated from the following files: