www.mooseframework.org
XFEMCutElem.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef XFEMCUTELEM_H
9 #define XFEMCUTELEM_H
10 
11 #include <vector>
12 
13 #include "MooseTypes.h"
14 #include "XFEM.h"
15 
16 using namespace libMesh;
17 
18 namespace libMesh
19 {
20 class MeshBase;
21 class Elem;
22 class Node;
23 class QBase;
24 }
25 class EFANode;
26 class EFAElement;
27 
29 {
30 public:
31  XFEMCutElem(Elem * elem, unsigned int n_qpoints);
32  virtual ~XFEMCutElem();
33 
34 protected:
35  unsigned int _n_nodes;
36  unsigned int _n_qpoints;
37  std::vector<Node *> _nodes;
38  std::vector<Point> _qp_points;
39  std::vector<Real> _qp_weights;
43  std::vector<Real> _new_weights; // quadrature weights from moment fitting
44  virtual Point getNodeCoordinates(EFANode * node, MeshBase * displaced_mesh = NULL) const = 0;
45 
46 public:
47  void setQuadraturePointsAndWeights(const std::vector<Point> & qp_points,
48  const std::vector<Real> & qp_weights);
49  virtual void computePhysicalVolumeFraction() = 0;
50  Real getPhysicalVolumeFraction() const;
51  virtual void computeMomentFittingWeights() = 0;
52  Real getMomentFittingWeight(unsigned int i_qp) const;
53  virtual Point getCutPlaneOrigin(unsigned int plane_id,
54  MeshBase * displaced_mesh = NULL) const = 0;
55  virtual Point getCutPlaneNormal(unsigned int plane_id,
56  MeshBase * displaced_mesh = NULL) const = 0;
57  virtual void
58  getCrackTipOriginAndDirection(unsigned tip_id, Point & origin, Point & direction) const = 0;
59  virtual void getFragmentFaces(std::vector<std::vector<Point>> & frag_faces,
60  MeshBase * displaced_mesh = NULL) const = 0;
61  virtual const EFAElement * getEFAElement() const = 0;
62  virtual unsigned int numCutPlanes() const = 0;
63  void getWeightMultipliers(MooseArray<Real> & weights,
64  QBase * qrule,
65  Xfem::XFEM_QRULE xfem_qrule,
66  const MooseArray<Point> & q_points);
67  void computeXFEMWeights(QBase * qrule,
68  Xfem::XFEM_QRULE xfem_qrule,
69  const MooseArray<Point> & q_points);
70  bool isPointPhysical(const Point & p) const;
71  virtual void getIntersectionInfo(unsigned int plane_id,
72  Point & normal,
73  std::vector<Point> & intersectionPoints,
74  MeshBase * displaced_mesh = NULL) const = 0;
75 };
76 #endif
XFEM_QRULE
Definition: XFEM.h:36
unsigned int _n_qpoints
Definition: XFEMCutElem.h:36
std::vector< Point > _qp_points
Definition: XFEMCutElem.h:38
Real _physical_volfrac
Definition: XFEMCutElem.h:41
std::vector< Real > _qp_weights
Definition: XFEMCutElem.h:39
std::vector< Real > _new_weights
Definition: XFEMCutElem.h:43
bool _have_weights
Definition: XFEMCutElem.h:42
unsigned int _n_nodes
Definition: XFEMCutElem.h:35
std::vector< Node * > _nodes
Definition: XFEMCutElem.h:37
Real _elem_volume
Definition: XFEMCutElem.h:40