19 params.addRequiredParam<UserObjectName>(
"interface_velocity",
20 "The name of userobject that computes the velocity.");
21 params.addClassDescription(
22 "Creates a UserObject for a moving line segment cut on 2D meshes for XFEM");
27 const InputParameters & parameters)
32 const std::vector<Point>
36 mooseError(
"getCrackFrontPoints() is not implemented for this object.");
42 const UserObject * uo =
43 &(_fe_problem.getUserObjectBase(getParam<UserObjectName>(
"interface_velocity")));
45 if (dynamic_cast<const XFEMMovingInterfaceVelocityBase *>(uo) ==
nullptr)
46 mooseError(
"UserObject casting to XFEMMovingInterfaceVelocityBase in "
47 "MovingLineSegmentCutSetUserObject");
57 std::vector<Real> cut_data_copy =
_cut_data;
59 const int line_cut_data_len = 6;
61 if (
_cut_data.size() % line_cut_data_len != 0)
62 mooseError(
"Length of MovingLineSegmentCutSetUserObject cut_data must be a multiple of 6.");
64 unsigned int num_cuts =
_cut_data.size() / line_cut_data_len;
70 cut_data_copy[(i - 1) * line_cut_data_len + 0] +=
72 cut_data_copy[(i - 1) * line_cut_data_len + 2] +=
78 for (
unsigned int i = 0; i < num_cuts; ++i)
80 Real x0 = cut_data_copy[i * line_cut_data_len + 0];
81 Real y0 = cut_data_copy[i * line_cut_data_len + 1];
82 Real x1 = cut_data_copy[i * line_cut_data_len + 2];
83 Real y1 = cut_data_copy[i * line_cut_data_len + 3];
93 const int line_cut_data_len = 6;
99 _cut_data[(i - 1) * line_cut_data_len + 0] +=
101 _cut_data[(i - 1) * line_cut_data_len + 2] +=