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

#include <XFEMElementPairLocator.h>

Inheritance diagram for XFEMElementPairLocator:
[legend]

Public Member Functions

 XFEMElementPairLocator (MooseSharedPointer< XFEM > xfem, unsigned int interface_id, bool use_displaced_mesh=false)
 
virtual void reinit ()
 
virtual void update ()
 

Protected Attributes

MooseSharedPointer< XFEM_xfem
 
bool _use_displaced_mesh
 

Detailed Description

Definition at line 14 of file XFEMElementPairLocator.h.

Constructor & Destructor Documentation

XFEMElementPairLocator::XFEMElementPairLocator ( MooseSharedPointer< XFEM xfem,
unsigned int  interface_id,
bool  use_displaced_mesh = false 
)

Definition at line 10 of file XFEMElementPairLocator.C.

13  : ElementPairLocator(interface_id), _xfem(xfem), _use_displaced_mesh(use_displaced_mesh)
14 {
16  _elem_pairs = _xfem->getXFEMDisplacedCutElemPairs();
17  else
18  _elem_pairs = _xfem->getXFEMCutElemPairs();
19 }
MooseSharedPointer< XFEM > _xfem

Member Function Documentation

void XFEMElementPairLocator::reinit ( )
virtual

Definition at line 22 of file XFEMElementPairLocator.C.

Referenced by update().

23 {
24  // Does not support secondary cut yet.
25  if (_xfem->has_secondary_cut())
26  return;
27 
28  _element_pair_info.clear();
29 
30  for (std::list<std::pair<const Elem *, const Elem *>>::const_iterator it = _elem_pairs->begin();
31  it != _elem_pairs->end();
32  ++it)
33  {
34  const Elem * elem1 = it->first;
35  const Elem * elem2 = it->second;
36 
37  std::vector<Point> intersectionPoints1;
38  Point normal1;
39  std::vector<Point> q_points1;
40  std::vector<Real> weights1;
41 
42  unsigned int plane_id = 0; // Only support one cut plane for the time being
43 
44  _xfem->getXFEMIntersectionInfo(
45  elem1, plane_id, normal1, intersectionPoints1, _use_displaced_mesh);
46 
47  if (intersectionPoints1.size() == 2)
48  _xfem->getXFEMqRuleOnLine(intersectionPoints1, q_points1, weights1);
49  else if (intersectionPoints1.size() > 2)
50  _xfem->getXFEMqRuleOnSurface(intersectionPoints1, q_points1, weights1);
51 
53  {
54  ElementPairInfo new_elem_info(
55  elem1, elem2, q_points1, q_points1, weights1, weights1, normal1, -normal1);
56  _element_pair_info.insert(
57  std::pair<std::pair<const Elem *, const Elem *>, ElementPairInfo>(*it, new_elem_info));
58  }
59  else
60  {
61  std::vector<Point> intersectionPoints2;
62  Point normal2;
63  std::vector<Point> q_points2;
64  std::vector<Real> weights2;
65 
66  _xfem->getXFEMIntersectionInfo(
67  elem2, plane_id, normal2, intersectionPoints2, _use_displaced_mesh);
68 
69  if (intersectionPoints2.size() == 2)
70  _xfem->getXFEMqRuleOnLine(intersectionPoints2, q_points2, weights2);
71  else if (intersectionPoints2.size() > 2)
72  _xfem->getXFEMqRuleOnSurface(intersectionPoints2, q_points2, weights2);
73 
74  ElementPairInfo new_elem_info(
75  elem1, elem2, q_points1, q_points2, weights1, weights2, normal1, normal2);
76  _element_pair_info.insert(
77  std::pair<std::pair<const Elem *, const Elem *>, ElementPairInfo>(*it, new_elem_info));
78  }
79  }
80 }
MooseSharedPointer< XFEM > _xfem
void XFEMElementPairLocator::update ( )
virtual

Definition at line 83 of file XFEMElementPairLocator.C.

84 {
85  reinit();
86 }

Member Data Documentation

bool XFEMElementPairLocator::_use_displaced_mesh
protected

Definition at line 25 of file XFEMElementPairLocator.h.

Referenced by reinit(), and XFEMElementPairLocator().

MooseSharedPointer<XFEM> XFEMElementPairLocator::_xfem
protected

Definition at line 24 of file XFEMElementPairLocator.h.

Referenced by reinit(), and XFEMElementPairLocator().


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