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

Lagrange multiplier "FaceKernel" that is used in conjunction with EqualGradientLagrangeInterface. More...

#include <EqualGradientLagrangeMultiplier.h>

Inheritance diagram for EqualGradientLagrangeMultiplier:
[legend]

Public Member Functions

 EqualGradientLagrangeMultiplier (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual (Moose::DGResidualType type) override
 
virtual Real computeQpJacobian (Moose::DGJacobianType type) override
 
virtual Real computeQpOffDiagJacobian (Moose::DGJacobianType type, unsigned int jvar) override
 

Protected Attributes

const unsigned int _component
 x,y,z component of the gradient to constrain More...
 
unsigned int _neighbor_jvar
 variable to control gradient on the slave side of the interface More...
 
const Real _jacobian_fill
 compensate Jacobian fill term from NullKernel More...
 
const VariableGradient & _grad_element_value
 variable to control gradient on the master side of the interface More...
 
unsigned int _element_jvar
 

Detailed Description

Lagrange multiplier "FaceKernel" that is used in conjunction with EqualGradientLagrangeInterface.

Definition at line 21 of file EqualGradientLagrangeMultiplier.h.

Constructor & Destructor Documentation

EqualGradientLagrangeMultiplier::EqualGradientLagrangeMultiplier ( const InputParameters &  parameters)

Definition at line 29 of file EqualGradientLagrangeMultiplier.C.

30  : InterfaceKernel(parameters),
31  _component(getParam<unsigned int>("component")),
32  _grad_element_value(getVar("element_var", 0)->gradSln()),
33  _element_jvar(getVar("element_var", 0)->number()),
34  _neighbor_jvar(_neighbor_var.number()),
35  _jacobian_fill(getParam<Real>("jacobian_fill"))
36 {
37 }
unsigned int _neighbor_jvar
variable to control gradient on the slave side of the interface
const unsigned int _component
x,y,z component of the gradient to constrain
const VariableGradient & _grad_element_value
variable to control gradient on the master side of the interface
const Real _jacobian_fill
compensate Jacobian fill term from NullKernel

Member Function Documentation

Real EqualGradientLagrangeMultiplier::computeQpJacobian ( Moose::DGJacobianType  type)
overrideprotectedvirtual

Definition at line 50 of file EqualGradientLagrangeMultiplier.C.

51 {
52  if (type == Moose::ElementNeighbor)
53  return -_grad_phi_neighbor[_j][_qp](_component) * _test[_i][_qp];
54 
55  if (type == Moose::ElementElement)
56  return -_jacobian_fill;
57 
58  return 0.0;
59 }
const unsigned int _component
x,y,z component of the gradient to constrain
const Real _jacobian_fill
compensate Jacobian fill term from NullKernel
Real EqualGradientLagrangeMultiplier::computeQpOffDiagJacobian ( Moose::DGJacobianType  type,
unsigned int  jvar 
)
overrideprotectedvirtual

Definition at line 62 of file EqualGradientLagrangeMultiplier.C.

64 {
65  if (type == Moose::ElementElement && jvar == _element_jvar)
66  return _grad_phi[_j][_qp](_component) * _test[_i][_qp];
67 
68  return 0.0;
69 }
const unsigned int _component
x,y,z component of the gradient to constrain
Real EqualGradientLagrangeMultiplier::computeQpResidual ( Moose::DGResidualType  type)
overrideprotectedvirtual

Definition at line 40 of file EqualGradientLagrangeMultiplier.C.

41 {
42  if (type == Moose::Element)
43  return (_grad_element_value[_qp](_component) - _grad_neighbor_value[_qp](_component)) *
44  _test[_i][_qp];
45 
46  return 0.0;
47 }
const unsigned int _component
x,y,z component of the gradient to constrain
const VariableGradient & _grad_element_value
variable to control gradient on the master side of the interface

Member Data Documentation

const unsigned int EqualGradientLagrangeMultiplier::_component
protected

x,y,z component of the gradient to constrain

Definition at line 32 of file EqualGradientLagrangeMultiplier.h.

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

unsigned int EqualGradientLagrangeMultiplier::_element_jvar
protected

Definition at line 36 of file EqualGradientLagrangeMultiplier.h.

Referenced by computeQpOffDiagJacobian().

const VariableGradient& EqualGradientLagrangeMultiplier::_grad_element_value
protected

variable to control gradient on the master side of the interface

Definition at line 35 of file EqualGradientLagrangeMultiplier.h.

Referenced by computeQpResidual().

const Real EqualGradientLagrangeMultiplier::_jacobian_fill
protected

compensate Jacobian fill term from NullKernel

Definition at line 43 of file EqualGradientLagrangeMultiplier.h.

Referenced by computeQpJacobian().

unsigned int EqualGradientLagrangeMultiplier::_neighbor_jvar
protected

variable to control gradient on the slave side of the interface

Definition at line 40 of file EqualGradientLagrangeMultiplier.h.


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