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

Constructor & Destructor Documentation

◆ EqualGradientLagrangeInterface()

EqualGradientLagrangeInterface::EqualGradientLagrangeInterface ( const InputParameters &  parameters)

Definition at line 30 of file EqualGradientLagrangeInterface.C.

31  : InterfaceKernel(parameters),
32  _component(getParam<unsigned int>("component")),
33  _lambda(getVar("lambda", 0)->sln()),
34  _lambda_jvar(getVar("lambda", 0)->number())
35 {
36 }
const VariableValue & _lambda
Lagrange multiplier.

Member Function Documentation

◆ computeQpJacobian()

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

Definition at line 53 of file EqualGradientLagrangeInterface.C.

54 {
55  return 0.0;
56 }

◆ computeQpOffDiagJacobian()

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

Definition at line 59 of file EqualGradientLagrangeInterface.C.

61 {
62  if (jvar != _lambda_jvar)
63  return 0.0;
64 
65  // lambda is only solved on the element side
66  switch (type)
67  {
68  case Moose::ElementElement:
69  return _phi[_j][_qp] * _grad_test[_i][_qp](_component);
70 
71  case Moose::NeighborElement:
72  return -_phi[_j][_qp] * _grad_test_neighbor[_i][_qp](_component);
73 
74  default:
75  return 0.0;
76  }
77 }

◆ computeQpResidual()

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

Definition at line 39 of file EqualGradientLagrangeInterface.C.

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

Member Data Documentation

◆ _component

const unsigned int EqualGradientLagrangeInterface::_component
protected

Definition at line 34 of file EqualGradientLagrangeInterface.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _lambda

const VariableValue& EqualGradientLagrangeInterface::_lambda
protected

Lagrange multiplier.

Definition at line 37 of file EqualGradientLagrangeInterface.h.

Referenced by computeQpResidual().

◆ _lambda_jvar

const unsigned int EqualGradientLagrangeInterface::_lambda_jvar
protected

Definition at line 39 of file EqualGradientLagrangeInterface.h.

Referenced by computeQpOffDiagJacobian().


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