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

#include <XFEMEqualValueAtInterface.h>

Inheritance diagram for XFEMEqualValueAtInterface:
[legend]

Public Member Functions

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

Protected Member Functions

virtual void reinitConstraintQuadrature (const ElementPairInfo &element_pair_info) override
 
virtual Real computeQpResidual (Moose::DGResidualType type) override
 
virtual Real computeQpJacobian (Moose::DGJacobianType type) override
 

Protected Attributes

Real _alpha
 
Real _value
 Value at the interface. More...
 
std::shared_ptr< XFEM_xfem
 Pointer to the XFEM controller object. More...
 

Detailed Description

Definition at line 22 of file XFEMEqualValueAtInterface.h.

Constructor & Destructor Documentation

◆ XFEMEqualValueAtInterface()

XFEMEqualValueAtInterface::XFEMEqualValueAtInterface ( const InputParameters &  parameters)

Definition at line 31 of file XFEMEqualValueAtInterface.C.

32  : ElemElemConstraint(parameters), _alpha(getParam<Real>("alpha")), _value(getParam<Real>("value"))
33 {
34  _xfem = std::dynamic_pointer_cast<XFEM>(_fe_problem.getXFEM());
35  if (_xfem == nullptr)
36  mooseError("Problem casting to XFEM in XFEMEqualValueAtInterface");
37 
38  const UserObject * uo =
39  &(_fe_problem.getUserObjectBase(getParam<UserObjectName>("geometric_cut_userobject")));
40 
41  if (dynamic_cast<const GeometricCutUserObject *>(uo) == nullptr)
42  mooseError("UserObject casting to GeometricCutUserObject in XFEMEqualValueAtInterface");
43 
44  _interface_id = _xfem->getGeometricCutID(dynamic_cast<const GeometricCutUserObject *>(uo));
45 }
Real _value
Value at the interface.
This is the XFEM class.
Definition: XFEM.h:62
std::shared_ptr< XFEM > _xfem
Pointer to the XFEM controller object.

◆ ~XFEMEqualValueAtInterface()

XFEMEqualValueAtInterface::~XFEMEqualValueAtInterface ( )
virtual

Definition at line 47 of file XFEMEqualValueAtInterface.C.

47 {}

Member Function Documentation

◆ computeQpJacobian()

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

Definition at line 74 of file XFEMEqualValueAtInterface.C.

75 {
76  Real r = 0;
77 
78  switch (type)
79  {
80  case Moose::ElementElement:
81  r += _alpha * _phi[_j][_qp] * _test[_i][_qp];
82  break;
83 
84  case Moose::NeighborNeighbor:
85  r += _alpha * _phi_neighbor[_j][_qp] * _test_neighbor[_i][_qp];
86  break;
87 
88  default:
89  break;
90  }
91 
92  return r;
93 }

◆ computeQpResidual()

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

Definition at line 56 of file XFEMEqualValueAtInterface.C.

57 {
58  Real r = 0;
59 
60  switch (type)
61  {
62  case Moose::Element:
63  r += _alpha * (_u[_qp] - _value) * _test[_i][_qp];
64  break;
65 
66  case Moose::Neighbor:
67  r += _alpha * (_u_neighbor[_qp] - _value) * _test_neighbor[_i][_qp];
68  break;
69  }
70  return r;
71 }
Real _value
Value at the interface.

◆ reinitConstraintQuadrature()

void XFEMEqualValueAtInterface::reinitConstraintQuadrature ( const ElementPairInfo &  element_pair_info)
overrideprotectedvirtual

Definition at line 50 of file XFEMEqualValueAtInterface.C.

51 {
52  ElemElemConstraint::reinitConstraintQuadrature(element_pair_info);
53 }

Member Data Documentation

◆ _alpha

Real XFEMEqualValueAtInterface::_alpha
protected

Definition at line 36 of file XFEMEqualValueAtInterface.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _value

Real XFEMEqualValueAtInterface::_value
protected

Value at the interface.

Definition at line 39 of file XFEMEqualValueAtInterface.h.

Referenced by computeQpResidual().

◆ _xfem

std::shared_ptr<XFEM> XFEMEqualValueAtInterface::_xfem
protected

Pointer to the XFEM controller object.

Definition at line 42 of file XFEMEqualValueAtInterface.h.

Referenced by XFEMEqualValueAtInterface().


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