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

#include <XFEMSingleVariableConstraint.h>

Inheritance diagram for XFEMSingleVariableConstraint:
[legend]

Public Member Functions

 XFEMSingleVariableConstraint (const InputParameters &parameters)
 
virtual ~XFEMSingleVariableConstraint ()
 

Protected Member Functions

virtual void reinitConstraintQuadrature (const ElementPairInfo &element_pair_info)
 Set information needed for constraint integration. More...
 
virtual Real computeQpResidual (Moose::DGResidualType type)
 Compute the residual for one of the constraint quadrature points. More...
 
virtual Real computeQpJacobian (Moose::DGJacobianType type)
 Compute the Jacobian for one of the constraint quadrature points. More...
 

Protected Attributes

Point _interface_normal
 Vector normal to the internal interface. More...
 
Real _alpha
 Stabilization parameter in Nitsche's formulation. More...
 
Real _jump
 Vector normal to the internal interface. More...
 
Real _jump_flux
 Vector normal to the internal interface. More...
 

Detailed Description

Definition at line 21 of file XFEMSingleVariableConstraint.h.

Constructor & Destructor Documentation

XFEMSingleVariableConstraint::XFEMSingleVariableConstraint ( const InputParameters &  parameters)

Definition at line 28 of file XFEMSingleVariableConstraint.C.

29  : ElemElemConstraint(parameters),
30  _alpha(getParam<Real>("alpha")),
31  _jump(getParam<Real>("jump")),
32  _jump_flux(getParam<Real>("jump_flux"))
33 {
34 }
Real _alpha
Stabilization parameter in Nitsche&#39;s formulation.
Real _jump
Vector normal to the internal interface.
Real _jump_flux
Vector normal to the internal interface.
XFEMSingleVariableConstraint::~XFEMSingleVariableConstraint ( )
virtual

Definition at line 36 of file XFEMSingleVariableConstraint.C.

36 {}

Member Function Documentation

Real XFEMSingleVariableConstraint::computeQpJacobian ( Moose::DGJacobianType  type)
protectedvirtual

Compute the Jacobian for one of the constraint quadrature points.

Definition at line 76 of file XFEMSingleVariableConstraint.C.

77 {
78  Real r = 0;
79 
80  switch (type)
81  {
82  case Moose::ElementElement:
83  r += -0.5 * _grad_phi[_j][_qp] * _interface_normal * _test[_i][_qp] -
84  _phi[_j][_qp] * 0.5 * _grad_test[_i][_qp] * _interface_normal;
85  r += _alpha * _phi[_j][_qp] * _test[_i][_qp];
86  break;
87 
88  case Moose::ElementNeighbor:
89  r += -0.5 * _grad_phi_neighbor[_j][_qp] * _interface_normal * _test[_i][_qp] +
90  _phi_neighbor[_j][_qp] * 0.5 * _grad_test[_i][_qp] * _interface_normal;
91  r -= _alpha * _phi_neighbor[_j][_qp] * _test[_i][_qp];
92  break;
93 
94  case Moose::NeighborElement:
95  r += 0.5 * _grad_phi[_j][_qp] * _interface_normal * _test_neighbor[_i][_qp] -
96  _phi[_j][_qp] * 0.5 * _grad_test_neighbor[_i][_qp] * _interface_normal;
97  r -= _alpha * _phi[_j][_qp] * _test_neighbor[_i][_qp];
98  break;
99 
100  case Moose::NeighborNeighbor:
101  r += 0.5 * _grad_phi_neighbor[_j][_qp] * _interface_normal * _test_neighbor[_i][_qp] +
102  _phi_neighbor[_j][_qp] * 0.5 * _grad_test_neighbor[_i][_qp] * _interface_normal;
103  r += _alpha * _phi_neighbor[_j][_qp] * _test_neighbor[_i][_qp];
104  break;
105  }
106 
107  return r;
108 }
Real _alpha
Stabilization parameter in Nitsche&#39;s formulation.
Point _interface_normal
Vector normal to the internal interface.
Real XFEMSingleVariableConstraint::computeQpResidual ( Moose::DGResidualType  type)
protectedvirtual

Compute the residual for one of the constraint quadrature points.

Definition at line 46 of file XFEMSingleVariableConstraint.C.

47 {
48  Real r = 0;
49 
50  switch (type)
51  {
52  case Moose::Element:
53  r -= (0.5 * _grad_u[_qp] * _interface_normal +
54  0.5 * _grad_u_neighbor[_qp] * _interface_normal) *
55  _test[_i][_qp];
56  r -= (_u[_qp] - _u_neighbor[_qp]) * 0.5 * _grad_test[_i][_qp] * _interface_normal;
57  r +=
58  0.5 * _grad_test[_i][_qp] * _interface_normal * _jump + 0.5 * _test[_i][_qp] * _jump_flux;
59  r += _alpha * (_u[_qp] - _u_neighbor[_qp] - _jump) * _test[_i][_qp];
60  break;
61 
62  case Moose::Neighbor:
63  r += (0.5 * _grad_u[_qp] * _interface_normal +
64  0.5 * _grad_u_neighbor[_qp] * _interface_normal) *
65  _test_neighbor[_i][_qp];
66  r -= (_u[_qp] - _u_neighbor[_qp]) * 0.5 * _grad_test_neighbor[_i][_qp] * _interface_normal;
67  r += 0.5 * _grad_test_neighbor[_i][_qp] * _interface_normal * _jump +
68  0.5 * _test_neighbor[_i][_qp] * _jump_flux;
69  r -= _alpha * (_u[_qp] - _u_neighbor[_qp] - _jump) * _test_neighbor[_i][_qp];
70  break;
71  }
72  return r;
73 }
Real _alpha
Stabilization parameter in Nitsche&#39;s formulation.
Real _jump
Vector normal to the internal interface.
Real _jump_flux
Vector normal to the internal interface.
Point _interface_normal
Vector normal to the internal interface.
void XFEMSingleVariableConstraint::reinitConstraintQuadrature ( const ElementPairInfo &  element_pair_info)
protectedvirtual

Set information needed for constraint integration.

Definition at line 39 of file XFEMSingleVariableConstraint.C.

40 {
41  _interface_normal = element_pair_info._elem1_normal;
42  ElemElemConstraint::reinitConstraintQuadrature(element_pair_info);
43 }
Point _interface_normal
Vector normal to the internal interface.

Member Data Documentation

Real XFEMSingleVariableConstraint::_alpha
protected

Stabilization parameter in Nitsche's formulation.

Definition at line 47 of file XFEMSingleVariableConstraint.h.

Referenced by computeQpJacobian(), and computeQpResidual().

Point XFEMSingleVariableConstraint::_interface_normal
protected

Vector normal to the internal interface.

Definition at line 44 of file XFEMSingleVariableConstraint.h.

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

Real XFEMSingleVariableConstraint::_jump
protected

Vector normal to the internal interface.

Definition at line 50 of file XFEMSingleVariableConstraint.h.

Referenced by computeQpResidual().

Real XFEMSingleVariableConstraint::_jump_flux
protected

Vector normal to the internal interface.

Definition at line 53 of file XFEMSingleVariableConstraint.h.

Referenced by computeQpResidual().


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