14#include "libmesh/string_to_enum.h"
17 Real x0, Real y0, Real x1, Real y1, Real t0, Real t1)
18 : _time_range(
std::make_pair(t0, t1)),
19 _cut_line_endpoints(
std::make_pair(
Point(x0, y0, 0.0),
Point(x1, y1, 0.0)))
39 const Elem * elem, std::vector<CutEdgeForCrackGrowthIncr> & cut_edges, Real time)
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: ",
57 " base element type is: ",
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;
73 cut_edges.push_back(mycut);
void mooseError(Args &&... args)
Real cutCompletionFraction(Real time)
const std::pair< Real, Real > _time_range
virtual bool cutElementByCrackGrowthIncrement(const Elem *elem, std::vector< CutEdgeForCrackGrowthIncr > &cut_edges, Real time)
const std::pair< Point, Point > _cut_line_endpoints
XFEMCrackGrowthIncrement2DCut(Real x0, Real y0, Real x1, Real y1, Real t0, Real t1)
virtual std::unique_ptr< Elem > side_ptr(unsigned int i)=0
virtual ElemType type() const=0
virtual unsigned int n_sides() const=0
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)
Determine whether a line segment is intersected by a cutting line, and compute the fraction along tha...
std::string enum_to_string(const T e)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _host_side_id