#include <XFEMCrackGrowthIncrement2DCut.h>
|
bool | IntersectSegmentWithCutLine (const Point &segment_point1, const Point &segment_point2, const std::pair< Point, Point > &cutting_line_points, const Real &cutting_line_fraction, Real &segment_intersection_fraction) |
|
Real | crossProduct2D (const Point &point_a, const Point &point_b) |
|
◆ XFEMCrackGrowthIncrement2DCut()
XFEMCrackGrowthIncrement2DCut::XFEMCrackGrowthIncrement2DCut |
( |
Real |
x0, |
|
|
Real |
y0, |
|
|
Real |
x1, |
|
|
Real |
y1, |
|
|
Real |
t0, |
|
|
Real |
t1 |
|
) |
| |
◆ crossProduct2D()
Real XFEMCrackGrowthIncrement2DCut::crossProduct2D |
( |
const Point & |
point_a, |
|
|
const Point & |
point_b |
|
) |
| |
|
protected |
◆ cutCompletionFraction()
Real XFEMCrackGrowthIncrement2DCut::cutCompletionFraction |
( |
Real |
time | ) |
|
◆ cutElementByCrackGrowthIncrement()
bool XFEMCrackGrowthIncrement2DCut::cutElementByCrackGrowthIncrement |
( |
const Elem * |
elem, |
|
|
std::vector< CutEdgeForCrackGrowthIncr > & |
cut_edges, |
|
|
Real |
time |
|
) |
| |
|
virtual |
Definition at line 38 of file XFEMCrackGrowthIncrement2DCut.C.
41 bool cut_elem =
false;
47 unsigned int n_sides = elem->n_sides();
49 for (
unsigned int i = 0; i < n_sides; ++i)
53 std::unique_ptr<const Elem> curr_side = elem->side_ptr(i);
54 if (curr_side->type() != EDGE2)
55 mooseError(
"In cutElementByGeometry element side must be EDGE2, but type is: ",
56 libMesh::Utility::enum_to_string(curr_side->type()),
57 " base element type is: ",
58 libMesh::Utility::enum_to_string(elem->type()));
60 const Node * node1 = curr_side->node_ptr(0);
61 const Node * node2 = curr_side->node_ptr(1);
62 Real seg_int_frac = 0.0;
68 mycut.
_id1 = node1->id();
69 mycut.
_id2 = node2->id();
72 cut_edges.push_back(mycut);
Referenced by XFEM::markCutEdgesByState().
◆ IntersectSegmentWithCutLine()
bool XFEMCrackGrowthIncrement2DCut::IntersectSegmentWithCutLine |
( |
const Point & |
segment_point1, |
|
|
const Point & |
segment_point2, |
|
|
const std::pair< Point, Point > & |
cutting_line_points, |
|
|
const Real & |
cutting_line_fraction, |
|
|
Real & |
segment_intersection_fraction |
|
) |
| |
|
protected |
Definition at line 80 of file XFEMCrackGrowthIncrement2DCut.C.
92 bool cut_segment =
false;
93 Point seg_dir = segment_point2 - segment_point1;
94 Point cut_dir = cutting_line_points.second - cutting_line_points.first;
95 Point cut_start_to_seg_start = segment_point1 - cutting_line_points.first;
99 if (std::abs(cut_dir_cross_seg_dir) >
Xfem::tol)
102 Real cut_int_frac =
crossProduct2D(cut_start_to_seg_start, seg_dir) / cut_dir_cross_seg_dir;
104 if (cut_int_frac >= 0.0 && cut_int_frac <= cutting_line_fraction)
107 Real int_frac =
crossProduct2D(cut_start_to_seg_start, cut_dir) / cut_dir_cross_seg_dir;
108 if (int_frac >= 0.0 &&
112 segment_intersection_fraction = int_frac;
Referenced by cutElementByCrackGrowthIncrement().
◆ _cut_line_endpoints
const std::pair<Point, Point> XFEMCrackGrowthIncrement2DCut::_cut_line_endpoints |
|
private |
◆ _time_range
const std::pair<Real, Real> XFEMCrackGrowthIncrement2DCut::_time_range |
|
protected |
The documentation for this class was generated from the following files:
bool IntersectSegmentWithCutLine(const Point &segment_point1, const Point &segment_point2, const std::pair< Point, Point > &cutting_line_points, const Real &cutting_line_fraction, Real &segment_intersection_fraction)