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

InterfaceKernel to enforce a Lagrange-Multiplier based componentwise continuity of a variable gradient. More...

#include <EqualGradientLagrangeInterface.h>

Inheritance diagram for EqualGradientLagrangeInterface:
[legend]

Public Member Functions

 EqualGradientLagrangeInterface (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
 
const VariableValue & _lambda
 Lagrange multiplier. More...
 
const unsigned int _lambda_jvar
 

Detailed Description

InterfaceKernel to enforce a Lagrange-Multiplier based componentwise continuity of a variable gradient.

Definition at line 21 of file EqualGradientLagrangeInterface.h.

Constructor & Destructor Documentation

EqualGradientLagrangeInterface::EqualGradientLagrangeInterface ( const InputParameters &  parameters)

Definition at line 25 of file EqualGradientLagrangeInterface.C.

26  : InterfaceKernel(parameters),
27  _component(getParam<unsigned int>("component")),
28  _lambda(getVar("lambda", 0)->sln()),
29  _lambda_jvar(getVar("lambda", 0)->number())
30 {
31 }
const VariableValue & _lambda
Lagrange multiplier.

Member Function Documentation

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

Definition at line 48 of file EqualGradientLagrangeInterface.C.

49 {
50  return 0.0;
51 }
Real EqualGradientLagrangeInterface::computeQpOffDiagJacobian ( Moose::DGJacobianType  type,
unsigned int  jvar 
)
overrideprotectedvirtual

Definition at line 54 of file EqualGradientLagrangeInterface.C.

56 {
57  if (jvar != _lambda_jvar)
58  return 0.0;
59 
60  // lambda is only solved on the element side
61  switch (type)
62  {
63  case Moose::ElementElement:
64  return _phi[_j][_qp] * _grad_test[_i][_qp](_component);
65 
66  case Moose::NeighborElement:
67  return -_phi[_j][_qp] * _grad_test_neighbor[_i][_qp](_component);
68 
69  default:
70  return 0.0;
71  }
72 }
Real EqualGradientLagrangeInterface::computeQpResidual ( Moose::DGResidualType  type)
overrideprotectedvirtual

Definition at line 34 of file EqualGradientLagrangeInterface.C.

35 {
36  switch (type)
37  {
38  case Moose::Element:
39  return _lambda[_qp] * _grad_test[_i][_qp](_component);
40 
41  case Moose::Neighbor:
42  return -_lambda[_qp] * _grad_test_neighbor[_i][_qp](_component);
43  }
44 
45  mooseError("Internal error.");
46 }
const VariableValue & _lambda
Lagrange multiplier.

Member Data Documentation

const unsigned int EqualGradientLagrangeInterface::_component
protected

Definition at line 31 of file EqualGradientLagrangeInterface.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

const VariableValue& EqualGradientLagrangeInterface::_lambda
protected

Lagrange multiplier.

Definition at line 34 of file EqualGradientLagrangeInterface.h.

Referenced by computeQpResidual().

const unsigned int EqualGradientLagrangeInterface::_lambda_jvar
protected

Definition at line 36 of file EqualGradientLagrangeInterface.h.

Referenced by computeQpOffDiagJacobian().


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