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

#include <XFEMPressure.h>

Inheritance diagram for XFEMPressure:
[legend]

Public Member Functions

 XFEMPressure (const InputParameters &parameters)
 
virtual void addPoints ()
 
virtual Real computeQpResidual ()
 

Protected Attributes

const int _component
 
const Real _factor
 
Function *const _function
 
std::map< unsigned int, MooseSharedPointer< ElementPairLocator > > * _element_pair_locators
 
std::map< const Elem *, std::map< unsigned int, Point > > _elem_qp_normal
 
std::map< const Elem *, std::map< unsigned int, Real > > _elem_qp_JxW
 

Detailed Description

Definition at line 15 of file XFEMPressure.h.

Constructor & Destructor Documentation

XFEMPressure::XFEMPressure ( const InputParameters &  parameters)

Definition at line 24 of file XFEMPressure.C.

25  : DiracKernel(parameters),
26  _component(getParam<unsigned int>("component")),
27  _factor(getParam<Real>("factor")),
28  _function(isParamValid("function") ? &getFunction("function") : NULL)
29 {
30  GeometricSearchData & geo_search_data = _subproblem.geomSearchData();
31  _element_pair_locators = &geo_search_data._element_pair_locators;
32 }
const int _component
Definition: XFEMPressure.h:24
std::map< unsigned int, MooseSharedPointer< ElementPairLocator > > * _element_pair_locators
Definition: XFEMPressure.h:28
const Real _factor
Definition: XFEMPressure.h:25
Function *const _function
Definition: XFEMPressure.h:26

Member Function Documentation

void XFEMPressure::addPoints ( )
virtual

Definition at line 35 of file XFEMPressure.C.

36 {
37  _elem_qp_normal.clear();
38  _elem_qp_JxW.clear();
39 
40  for (std::map<unsigned int, MooseSharedPointer<ElementPairLocator>>::iterator it_epl =
41  _element_pair_locators->begin();
42  it_epl != _element_pair_locators->end();
43  ++it_epl)
44  {
45  ElementPairLocator & elem_pair_loc = *it_epl->second;
46  // go over pair elements
47  const std::list<std::pair<const Elem *, const Elem *>> & elem_pairs =
48  elem_pair_loc.getElemPairs();
49  for (std::list<std::pair<const Elem *, const Elem *>>::const_iterator it_ep =
50  elem_pairs.begin();
51  it_ep != elem_pairs.end();
52  ++it_ep)
53  {
54  const Elem * elem1 = it_ep->first;
55  const Elem * elem2 = it_ep->second;
56  const ElementPairInfo & info = elem_pair_loc.getElemPairInfo(*it_ep);
57 
58  for (unsigned int i = 0; i < info._elem1_constraint_q_point.size(); ++i)
59  {
60  _elem_qp_normal[elem1][i] = -info._elem1_normal;
61  _elem_qp_normal[elem2][i] = -info._elem2_normal;
62  _elem_qp_JxW[elem1][i] = info._elem1_constraint_JxW[i];
63  _elem_qp_JxW[elem2][i] = info._elem2_constraint_JxW[i];
64  addPoint(elem1, info._elem1_constraint_q_point[i]);
65  addPoint(elem2, info._elem2_constraint_q_point[i]);
66  }
67  }
68  }
69 }
std::map< const Elem *, std::map< unsigned int, Point > > _elem_qp_normal
Definition: XFEMPressure.h:29
std::map< const Elem *, std::map< unsigned int, Real > > _elem_qp_JxW
Definition: XFEMPressure.h:30
std::map< unsigned int, MooseSharedPointer< ElementPairLocator > > * _element_pair_locators
Definition: XFEMPressure.h:28
Real XFEMPressure::computeQpResidual ( )
virtual

Definition at line 72 of file XFEMPressure.C.

73 {
74  Real factor = _factor;
75 
76  if (_function)
77  factor *= _function->value(_t, _current_point);
78 
79  Point normal = _elem_qp_normal[_current_elem][_qp];
80  Real JxW = _elem_qp_JxW[_current_elem][_qp];
81 
82  return -factor * JxW * (normal(_component) * _test[_i][_qp]);
83 }
std::map< const Elem *, std::map< unsigned int, Point > > _elem_qp_normal
Definition: XFEMPressure.h:29
const int _component
Definition: XFEMPressure.h:24
std::map< const Elem *, std::map< unsigned int, Real > > _elem_qp_JxW
Definition: XFEMPressure.h:30
const Real _factor
Definition: XFEMPressure.h:25
Function *const _function
Definition: XFEMPressure.h:26

Member Data Documentation

const int XFEMPressure::_component
protected

Definition at line 24 of file XFEMPressure.h.

Referenced by computeQpResidual().

std::map<const Elem *, std::map<unsigned int, Real> > XFEMPressure::_elem_qp_JxW
protected

Definition at line 30 of file XFEMPressure.h.

Referenced by addPoints(), and computeQpResidual().

std::map<const Elem *, std::map<unsigned int, Point> > XFEMPressure::_elem_qp_normal
protected

Definition at line 29 of file XFEMPressure.h.

Referenced by addPoints(), and computeQpResidual().

std::map<unsigned int, MooseSharedPointer<ElementPairLocator> >* XFEMPressure::_element_pair_locators
protected

Definition at line 28 of file XFEMPressure.h.

Referenced by addPoints(), and XFEMPressure().

const Real XFEMPressure::_factor
protected

Definition at line 25 of file XFEMPressure.h.

Referenced by computeQpResidual().

Function* const XFEMPressure::_function
protected

Definition at line 26 of file XFEMPressure.h.

Referenced by computeQpResidual().


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