www.mooseframework.org
XFEMCrackGrowthIncrement2DCut.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 XFEMCRACKGROWTHINCREMENT2DCUT_H
9 #define XFEMCRACKGROWTHINCREMENT2DCUT_H
10 
11 #include "libmesh/libmesh_common.h"
12 #include "libmesh/libmesh.h" // libMesh::invalid_uint
13 #include "libmesh/elem.h"
14 
15 using namespace libMesh;
16 
18 {
19  unsigned int id1;
20  unsigned int id2;
21  Real distance;
22  unsigned int host_side_id;
23 };
24 
26 {
27 public:
28  XFEMCrackGrowthIncrement2DCut(Real x0, Real y0, Real x1, Real y1, Real t0, Real t1);
29 
30  virtual bool cutElementByCrackGrowthIncrement(const Elem * elem,
31  std::vector<CutEdgeForCrackGrowthIncr> & cut_edges,
32  Real time);
33 
34  Real cutCompletionFraction(Real time);
35 
36 protected:
37  bool IntersectSegmentWithCutLine(const Point & segment_point1,
38  const Point & segment_point2,
39  const std::pair<Point, Point> & cutting_line_points,
40  const Real & cutting_line_fraction,
41  Real & segment_intersection_fraction);
42 
43  Real crossProduct2D(const Point & point_a, const Point & point_b);
44 
45  const std::pair<Real, Real> _time_range;
46 
47 private:
48  const std::pair<Point, Point> _cut_line_endpoints;
49 };
50 
51 #endif // XFEMCRACKGROWTHINCREMENT2DCUT_H
const std::pair< Point, Point > _cut_line_endpoints
const std::pair< Real, Real > _time_range