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 25 of file RichardsPPenalty.h.

Constructor & Destructor Documentation

◆ RichardsPPenalty()

RichardsPPenalty::RichardsPPenalty ( const InputParameters &  parameters)

Definition at line 38 of file RichardsPPenalty.C.

39  : Kernel(parameters),
40  _a(getParam<Real>("a")),
41  _lower(coupledValue("lower_var")),
42  _lower_var_num(coupled("lower_var"))
43 {
44 }
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

◆ computeQpJacobian()

Real RichardsPPenalty::computeQpJacobian ( )
protectedvirtual

Definition at line 56 of file RichardsPPenalty.C.

57 {
58  if (_u[_qp] < _lower[_qp])
59  return -_test[_i][_qp] * _a * _phi[_j][_qp];
60  ;
61 
62  return 0.0;
63 }
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.

◆ computeQpOffDiagJacobian()

Real RichardsPPenalty::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 66 of file RichardsPPenalty.C.

67 {
68  if (jvar == _lower_var_num && _u[_qp] < _lower[_qp])
69  return _test[_i][_qp] * _a * _phi[_j][_qp];
70 
71  return 0.0;
72 }
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)

◆ computeQpResidual()

Real RichardsPPenalty::computeQpResidual ( )
protectedvirtual

Definition at line 47 of file RichardsPPenalty.C.

48 {
49  if (_u[_qp] < _lower[_qp])
50  return _test[_i][_qp] * _a * (_lower[_qp] - _u[_qp]);
51 
52  return 0.0;
53 }
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

◆ _a

Real RichardsPPenalty::_a
private

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

Definition at line 37 of file RichardsPPenalty.h.

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

◆ _lower

const VariableValue& RichardsPPenalty::_lower
private

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

Definition at line 40 of file RichardsPPenalty.h.

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

◆ _lower_var_num

unsigned int RichardsPPenalty::_lower_var_num
private

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

Definition at line 43 of file RichardsPPenalty.h.

Referenced by computeQpOffDiagJacobian().


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