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

Kernel = a*(lower - variable) for variable<lower, and zero otherwise This is an attempt to enforce variable>=lower. More...

#include <RichardsPPenalty.h>

Inheritance diagram for RichardsPPenalty:
[legend]

Public Member Functions

 RichardsPPenalty (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Private Attributes

Real _a
 Kernel = a*(_lower - variable) for variable<lower and zero otherwise. More...
 
const VariableValue & _lower
 Kernel = a*(_lower - variable) for variable<lower and zero otherwise. More...
 
unsigned int _lower_var_num
 moose variable number of the _lower variable (needed for OffDiagJacobian) More...
 

Detailed Description

Kernel = a*(lower - variable) for variable<lower, and zero otherwise This is an attempt to enforce variable>=lower.

Definition at line 23 of file RichardsPPenalty.h.

Constructor & Destructor Documentation

RichardsPPenalty::RichardsPPenalty ( const InputParameters &  parameters)

Definition at line 34 of file RichardsPPenalty.C.

35  : Kernel(parameters),
36  _a(getParam<Real>("a")),
37  _lower(coupledValue("lower_var")),
38  _lower_var_num(coupled("lower_var"))
39 {
40 }
Real _a
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
const VariableValue & _lower
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
unsigned int _lower_var_num
moose variable number of the _lower variable (needed for OffDiagJacobian)

Member Function Documentation

Real RichardsPPenalty::computeQpJacobian ( )
protectedvirtual

Definition at line 52 of file RichardsPPenalty.C.

53 {
54  if (_u[_qp] < _lower[_qp])
55  return -_test[_i][_qp] * _a * _phi[_j][_qp];
56  ;
57 
58  return 0.0;
59 }
Real _a
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
const VariableValue & _lower
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
Real RichardsPPenalty::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 62 of file RichardsPPenalty.C.

63 {
64  if (jvar == _lower_var_num && _u[_qp] < _lower[_qp])
65  return _test[_i][_qp] * _a * _phi[_j][_qp];
66 
67  return 0.0;
68 }
Real _a
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
const VariableValue & _lower
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
unsigned int _lower_var_num
moose variable number of the _lower variable (needed for OffDiagJacobian)
Real RichardsPPenalty::computeQpResidual ( )
protectedvirtual

Definition at line 43 of file RichardsPPenalty.C.

44 {
45  if (_u[_qp] < _lower[_qp])
46  return _test[_i][_qp] * _a * (_lower[_qp] - _u[_qp]);
47 
48  return 0.0;
49 }
Real _a
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
const VariableValue & _lower
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.

Member Data Documentation

Real RichardsPPenalty::_a
private

Kernel = a*(_lower - variable) for variable<lower and zero otherwise.

Definition at line 35 of file RichardsPPenalty.h.

Referenced by computeQpJacobian(), computeQpOffDiagJacobian(), and computeQpResidual().

const VariableValue& RichardsPPenalty::_lower
private

Kernel = a*(_lower - variable) for variable<lower and zero otherwise.

Definition at line 38 of file RichardsPPenalty.h.

Referenced by computeQpJacobian(), computeQpOffDiagJacobian(), and computeQpResidual().

unsigned int RichardsPPenalty::_lower_var_num
private

moose variable number of the _lower variable (needed for OffDiagJacobian)

Definition at line 41 of file RichardsPPenalty.h.

Referenced by computeQpOffDiagJacobian().


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