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 24 of file EqualGradientLagrangeMultiplier.h.

Constructor & Destructor Documentation

◆ EqualGradientLagrangeMultiplier()

EqualGradientLagrangeMultiplier::EqualGradientLagrangeMultiplier ( const InputParameters &  parameters)

Definition at line 34 of file EqualGradientLagrangeMultiplier.C.

35  : InterfaceKernel(parameters),
36  _component(getParam<unsigned int>("component")),
37  _grad_element_value(getVar("element_var", 0)->gradSln()),
38  _element_jvar(getVar("element_var", 0)->number()),
39  _neighbor_jvar(_neighbor_var.number()),
40  _jacobian_fill(getParam<Real>("jacobian_fill"))
41 {
42 }
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

◆ computeQpJacobian()

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

Definition at line 55 of file EqualGradientLagrangeMultiplier.C.

56 {
57  if (type == Moose::ElementNeighbor)
58  return -_grad_phi_neighbor[_j][_qp](_component) * _test[_i][_qp];
59 
60  if (type == Moose::ElementElement)
61  return -_jacobian_fill;
62 
63  return 0.0;
64 }
const unsigned int _component
x,y,z component of the gradient to constrain
const Real _jacobian_fill
compensate Jacobian fill term from NullKernel

◆ computeQpOffDiagJacobian()

Real EqualGradientLagrangeMultiplier::computeQpOffDiagJacobian ( Moose::DGJacobianType  type,
unsigned int  jvar 
)
overrideprotectedvirtual

Definition at line 67 of file EqualGradientLagrangeMultiplier.C.

69 {
70  if (type == Moose::ElementElement && jvar == _element_jvar)
71  return _grad_phi[_j][_qp](_component) * _test[_i][_qp];
72 
73  return 0.0;
74 }
const unsigned int _component
x,y,z component of the gradient to constrain

◆ computeQpResidual()

Real EqualGradientLagrangeMultiplier::computeQpResidual ( Moose::DGResidualType  type)
overrideprotectedvirtual

Definition at line 45 of file EqualGradientLagrangeMultiplier.C.

46 {
47  if (type == Moose::Element)
48  return (_grad_element_value[_qp](_component) - _grad_neighbor_value[_qp](_component)) *
49  _test[_i][_qp];
50 
51  return 0.0;
52 }
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

◆ _component

const unsigned int EqualGradientLagrangeMultiplier::_component
protected

x,y,z component of the gradient to constrain

Definition at line 35 of file EqualGradientLagrangeMultiplier.h.

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

◆ _element_jvar

unsigned int EqualGradientLagrangeMultiplier::_element_jvar
protected

Definition at line 39 of file EqualGradientLagrangeMultiplier.h.

Referenced by computeQpOffDiagJacobian().

◆ _grad_element_value

const VariableGradient& EqualGradientLagrangeMultiplier::_grad_element_value
protected

variable to control gradient on the master side of the interface

Definition at line 38 of file EqualGradientLagrangeMultiplier.h.

Referenced by computeQpResidual().

◆ _jacobian_fill

const Real EqualGradientLagrangeMultiplier::_jacobian_fill
protected

compensate Jacobian fill term from NullKernel

Definition at line 46 of file EqualGradientLagrangeMultiplier.h.

Referenced by computeQpJacobian().

◆ _neighbor_jvar

unsigned int EqualGradientLagrangeMultiplier::_neighbor_jvar
protected

variable to control gradient on the slave side of the interface

Definition at line 43 of file EqualGradientLagrangeMultiplier.h.


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