www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LineSegmentCutUserObject Class Reference

#include <LineSegmentCutUserObject.h>

Inheritance diagram for LineSegmentCutUserObject:
[legend]

Public Member Functions

 LineSegmentCutUserObject (const InputParameters &parameters)
 
virtual const std::vector< Point > getCrackFrontPoints (unsigned int num_crack_front_points) const override
 get a set of points along a crack front from a XFEM GeometricCutUserObject More...
 
virtual bool cutElementByGeometry (const Elem *elem, std::vector< Xfem::CutEdge > &cut_edges, std::vector< Xfem::CutNode > &cut_nodes, Real time) const override
 Check to see whether a specified 2D element should be cut based on geometric conditions. More...
 
virtual bool cutElementByGeometry (const Elem *elem, std::vector< Xfem::CutFace > &cut_faces, Real time) const override
 Check to see whether a specified 3D element should be cut based on geometric conditions. More...
 
virtual bool cutFragmentByGeometry (std::vector< std::vector< Point >> &frag_edges, std::vector< Xfem::CutEdge > &cut_edges, Real time) const override
 Check to see whether a fragment of a 2D element should be cut based on geometric conditions. More...
 
virtual bool cutFragmentByGeometry (std::vector< std::vector< Point >> &frag_faces, std::vector< Xfem::CutFace > &cut_faces, Real time) const override
 Check to see whether a fragment of a 3D element should be cut based on geometric conditions. More...
 
virtual void initialize () override
 
virtual void execute () override
 
virtual void threadJoin (const UserObject &y) override
 
virtual void finalize () override
 
unsigned int getInterfaceID () const
 Get the interface ID for this cutting object. More...
 
void setInterfaceID (unsigned int interface_id)
 Set the interface ID for this cutting object. More...
 
bool shouldHealMesh () const
 Should the elements cut by this cutting object be healed in the current time step? More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

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) const
 
Real crossProduct2D (const Point &point_a, const Point &point_b) const
 
virtual Real cutFraction (unsigned int cut_num, Real time) const
 Find the fractional distance along a specified cut line for the current time that is currently active. More...
 
void serialize (std::string &serialized_buffer)
 Methods to pack/unpack the _marked_elems_2d and _marked_elems_3d data into a structure suitable for parallel communication. More...
 
void deserialize (std::vector< std::string > &serialized_buffers)
 

Protected Attributes

std::vector< Real > _cut_data
 
std::vector< std::pair< Point, Point > > _cut_line_endpoints
 
std::vector< std::pair< Real, Real > > _cut_time_ranges
 Vector of start/end times for each cut segment. More...
 
std::shared_ptr< XFEM_xfem
 Pointer to the XFEM controller object. More...
 
unsigned int _interface_id
 Associated interface id. More...
 
bool _heal_always
 Heal the mesh. More...
 
unsigned int _last_step_initialized
 Time step information needed to advance a 3D crack only at the real beginning of a time step. More...
 
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo2D > > _marked_elems_2d
 Containers with information about all 2D and 3D elements marked for cutting by this object. More...
 
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo3D > > _marked_elems_3d
 

Detailed Description

Definition at line 20 of file LineSegmentCutUserObject.h.

Constructor & Destructor Documentation

◆ LineSegmentCutUserObject()

LineSegmentCutUserObject::LineSegmentCutUserObject ( const InputParameters &  parameters)

Definition at line 33 of file LineSegmentCutUserObject.C.

34  : GeometricCut2DUserObject(parameters), _cut_data(getParam<std::vector<Real>>("cut_data"))
35 {
36  // Set up constant parameters
37  const int cut_data_len = 4;
38 
39  // Throw error if length of cut_data is incorrect
40  if (_cut_data.size() != cut_data_len)
41  mooseError("Length of LineSegmentCutUserObject cut_data must be 4");
42 
43  // Assign scale and translate parameters
44  std::pair<Real, Real> scale;
45  if (isParamValid("cut_scale"))
46  {
47  auto vec_scale = getParam<std::vector<Real>>("cut_scale");
48  scale = std::make_pair(vec_scale[0], vec_scale[1]);
49  }
50  else
51  {
52  scale = std::make_pair(1.0, 1.0);
53  }
54 
55  std::pair<Real, Real> trans;
56  if (isParamValid("cut_translate"))
57  {
58  auto vec_trans = getParam<std::vector<Real>>("cut_translate");
59  trans = std::make_pair(vec_trans[0], vec_trans[1]);
60  }
61  else
62  {
63  trans = std::make_pair(0.0, 0.0);
64  }
65 
66  // Assign translated and scaled cut_data to vars used to construct cuts
67  Real x0 = (_cut_data[0] + trans.first) * scale.first;
68  Real y0 = (_cut_data[1] + trans.second) * scale.second;
69  Real x1 = (_cut_data[2] + trans.first) * scale.first;
70  Real y1 = (_cut_data[3] + trans.second) * scale.second;
71 
72  _cut_line_endpoints.push_back(std::make_pair(Point(x0, y0, 0.0), Point(x1, y1, 0.0)));
73 
74  if (_cut_line_endpoints.size() != _cut_time_ranges.size())
75  mooseError("Number of start/end times must match number of cut line endpoint sets");
76 }

Member Function Documentation

◆ crossProduct2D()

Real GeometricCut2DUserObject::crossProduct2D ( const Point &  point_a,
const Point &  point_b 
) const
protectedinherited

Definition at line 196 of file GeometricCut2DUserObject.C.

197 {
198  return (point_a(0) * point_b(1) - point_b(0) * point_a(1));
199 }

Referenced by GeometricCut2DUserObject::IntersectSegmentWithCutLine().

◆ cutElementByGeometry() [1/2]

bool GeometricCut2DUserObject::cutElementByGeometry ( const Elem *  elem,
std::vector< Xfem::CutEdge > &  cut_edges,
std::vector< Xfem::CutNode > &  cut_nodes,
Real  time 
) const
overridevirtualinherited

Check to see whether a specified 2D element should be cut based on geometric conditions.

Parameters
elemPointer to the libMesh element to be considered for cutting
cut_edgesData structure filled with information about edges to be cut
cut_nodesData structure filled with information about nodes to be cut
timeCurrent simulation time
Returns
bool true if element is to be cut

Implements GeometricCutUserObject.

Definition at line 39 of file GeometricCut2DUserObject.C.

43 {
44  bool cut_elem = false;
45 
46  for (unsigned int cut = 0; cut < _cut_line_endpoints.size(); ++cut)
47  {
48  Real fraction = cutFraction(cut, time);
49 
50  if (fraction > 0.0)
51  {
52  unsigned int n_sides = elem->n_sides();
53 
54  for (unsigned int i = 0; i < n_sides; ++i)
55  {
56  // This returns the lowest-order type of side, which should always
57  // be an EDGE2 here because this class is for 2D only.
58  std::unique_ptr<const Elem> curr_side = elem->side_ptr(i);
59  if (curr_side->type() != EDGE2)
60  mooseError("In cutElementByGeometry element side must be EDGE2, but type is: ",
61  libMesh::Utility::enum_to_string(curr_side->type()),
62  " base element type is: ",
63  libMesh::Utility::enum_to_string(elem->type()));
64 
65  const Node * node1 = curr_side->node_ptr(0);
66  const Node * node2 = curr_side->node_ptr(1);
67  Real seg_int_frac = 0.0;
68 
70  *node1, *node2, _cut_line_endpoints[cut], fraction, seg_int_frac))
71  {
72  if (seg_int_frac > Xfem::tol && seg_int_frac < 1.0 - Xfem::tol)
73  {
74  cut_elem = true;
75  Xfem::CutEdge mycut;
76  mycut._id1 = node1->id();
77  mycut._id2 = node2->id();
78  mycut._distance = seg_int_frac;
79  mycut._host_side_id = i;
80  cut_edges.push_back(mycut);
81  }
82  else if (seg_int_frac < Xfem::tol)
83  {
84  cut_elem = true;
85  Xfem::CutNode mycut;
86  mycut._id = node1->id();
87  mycut._host_id = i;
88  cut_nodes.push_back(mycut);
89  }
90  }
91  }
92  }
93  }
94  return cut_elem;
95 }

◆ cutElementByGeometry() [2/2]

bool GeometricCut2DUserObject::cutElementByGeometry ( const Elem *  elem,
std::vector< Xfem::CutFace > &  cut_faces,
Real  time 
) const
overridevirtualinherited

Check to see whether a specified 3D element should be cut based on geometric conditions.

Parameters
elemPointer to the libMesh element to be considered for cutting
cut_facesData structure filled with information about edges to be cut
timeCurrent simulation time
Returns
bool true if element is to be cut

Implements GeometricCutUserObject.

Definition at line 98 of file GeometricCut2DUserObject.C.

101 {
102  mooseError("Invalid method: must use vector of element edges for 2D mesh cutting");
103  return false;
104 }

◆ cutFraction()

Real GeometricCut2DUserObject::cutFraction ( unsigned int  cut_num,
Real  time 
) const
protectedvirtualinherited

Find the fractional distance along a specified cut line for the current time that is currently active.

Used for time-based propagation along a line

Parameters
cut_numIndex of the cut being queried
timeCurrent simulation time
Returns
Current fractional distance

Reimplemented in MovingLineSegmentCutSetUserObject.

Definition at line 202 of file GeometricCut2DUserObject.C.

203 {
204  mooseAssert(_cut_time_ranges.size() > cut_num,
205  "cut_num is outside the bounds of _cut_time_ranges");
206 
207  Real fraction = 0.0;
208 
209  if (time >= _cut_time_ranges[cut_num].first)
210  {
211  if (time >= _cut_time_ranges[cut_num].second)
212  fraction = 1.0;
213  else
214  {
215  Real denominator = _cut_time_ranges[cut_num].second - _cut_time_ranges[cut_num].first;
216  if (MooseUtils::absoluteFuzzyEqual(denominator, 0.0))
217  mooseError("time_start_cut and time_end_cut cannot have the same value");
218  fraction = (time - _cut_time_ranges[cut_num].first) / denominator;
219  }
220  }
221  return fraction;
222 }

Referenced by GeometricCut2DUserObject::cutElementByGeometry(), and GeometricCut2DUserObject::cutFragmentByGeometry().

◆ cutFragmentByGeometry() [1/2]

bool GeometricCut2DUserObject::cutFragmentByGeometry ( std::vector< std::vector< Point >> &  frag_edges,
std::vector< Xfem::CutEdge > &  cut_edges,
Real  time 
) const
overridevirtualinherited

Check to see whether a fragment of a 2D element should be cut based on geometric conditions.

Parameters
frag_edgesData structure defining the current fragment to be considered
cut_edgesData structure filled with information about fragment edges to be cut
timeCurrent simulation time
Returns
bool true if fragment is to be cut

Implements GeometricCutUserObject.

Definition at line 107 of file GeometricCut2DUserObject.C.

110 {
111  bool cut_frag = false;
112 
113  for (unsigned int cut = 0; cut < _cut_line_endpoints.size(); ++cut)
114  {
115  Real fraction = cutFraction(cut, time);
116 
117  if (fraction > 0.0)
118  {
119  unsigned int n_sides = frag_edges.size();
120 
121  for (unsigned int i = 0; i < n_sides; ++i)
122  {
123  Real seg_int_frac = 0.0;
124 
125  if (IntersectSegmentWithCutLine(frag_edges[i][0],
126  frag_edges[i][1],
127  _cut_line_endpoints[cut],
128  fraction,
129  seg_int_frac))
130  {
131  cut_frag = true;
132  Xfem::CutEdge mycut;
133  mycut._id1 = i;
134  mycut._id2 = (i < (n_sides - 1) ? (i + 1) : 0);
135  mycut._distance = seg_int_frac;
136  mycut._host_side_id = i;
137  cut_edges.push_back(mycut);
138  }
139  }
140  }
141  }
142  return cut_frag;
143 }

◆ cutFragmentByGeometry() [2/2]

bool GeometricCut2DUserObject::cutFragmentByGeometry ( std::vector< std::vector< Point >> &  frag_faces,
std::vector< Xfem::CutFace > &  cut_faces,
Real  time 
) const
overridevirtualinherited

Check to see whether a fragment of a 3D element should be cut based on geometric conditions.

Parameters
frag_facesData structure defining the current fragment to be considered
cut_facesData structure filled with information about fragment faces to be cut
timeCurrent simulation time
Returns
bool true if fragment is to be cut

Implements GeometricCutUserObject.

Definition at line 146 of file GeometricCut2DUserObject.C.

149 {
150  mooseError("Invalid method: must use vector of element edges for 2D mesh cutting");
151  return false;
152 }

◆ deserialize()

void GeometricCutUserObject::deserialize ( std::vector< std::string > &  serialized_buffers)
protectedinherited

Definition at line 222 of file GeometricCutUserObject.C.

223 {
224  mooseAssert(serialized_buffers.size() == _app.n_processors(),
225  "Unexpected size of serialized_buffers: " << serialized_buffers.size());
226 
227  // The input string stream used for deserialization
228  std::istringstream iss;
229 
230  // Loop over all datastructures for all processors to perfrom the gather operation
231  for (unsigned int rank = 0; rank < serialized_buffers.size(); ++rank)
232  {
233  // skip the current processor (its data is already in the structures)
234  if (rank == processor_id())
235  continue;
236 
237  // populate the stream with a new buffer and reset stream state
238  iss.clear();
239  iss.str(serialized_buffers[rank]);
240 
241  // Load the communicated data into temporary structures
242  std::map<unsigned int, std::vector<Xfem::GeomMarkedElemInfo2D>> other_marked_elems_2d;
243  std::map<unsigned int, std::vector<Xfem::GeomMarkedElemInfo3D>> other_marked_elems_3d;
244  dataLoad(iss, other_marked_elems_2d, this);
245  dataLoad(iss, other_marked_elems_3d, this);
246 
247  // merge the data in with the current processor's data
248  _marked_elems_2d.insert(other_marked_elems_2d.begin(), other_marked_elems_2d.end());
249  _marked_elems_3d.insert(other_marked_elems_3d.begin(), other_marked_elems_3d.end());
250  }
251 }

Referenced by GeometricCutUserObject::finalize().

◆ execute()

void GeometricCutUserObject::execute ( )
overridevirtualinherited

Reimplemented in MovingLineSegmentCutSetUserObject.

Definition at line 67 of file GeometricCutUserObject.C.

68 {
69  if (_current_elem->dim() == 2)
70  {
71  std::vector<Xfem::CutEdge> elem_cut_edges;
72  std::vector<Xfem::CutNode> elem_cut_nodes;
73  std::vector<Xfem::CutEdge> frag_cut_edges;
74  std::vector<std::vector<Point>> frag_edges;
75 
76  EFAElement2D * EFAElem = _xfem->getEFAElem2D(_current_elem);
77 
78  // Don't cut again if elem has been already cut twice
79  if (!EFAElem->isFinalCut())
80  {
81  // get fragment edges
82  _xfem->getFragmentEdges(_current_elem, EFAElem, frag_edges);
83 
84  // mark cut edges for the element and its fragment
85  bool cut = cutElementByGeometry(_current_elem, elem_cut_edges, elem_cut_nodes, _t);
86  if (EFAElem->numFragments() > 0)
87  cut |= cutFragmentByGeometry(frag_edges, frag_cut_edges, _t);
88 
89  if (cut)
90  {
92  gmei2d._elem_cut_edges = elem_cut_edges;
93  gmei2d._elem_cut_nodes = elem_cut_nodes;
94  gmei2d._frag_cut_edges = frag_cut_edges;
95  gmei2d._frag_edges = frag_edges;
96  _marked_elems_2d[_current_elem->id()].push_back(gmei2d);
97  }
98  }
99  }
100  else if (_current_elem->dim() == 3)
101  {
102  std::vector<Xfem::CutFace> elem_cut_faces;
103  std::vector<Xfem::CutFace> frag_cut_faces;
104  std::vector<std::vector<Point>> frag_faces;
105 
106  EFAElement3D * EFAElem = _xfem->getEFAElem3D(_current_elem);
107 
108  // Don't cut again if elem has been already cut twice
109  if (!EFAElem->isFinalCut())
110  {
111  // get fragment edges
112  _xfem->getFragmentFaces(_current_elem, EFAElem, frag_faces);
113 
114  // mark cut faces for the element and its fragment
115  bool cut = cutElementByGeometry(_current_elem, elem_cut_faces, _t);
116  // TODO: This would be done for branching, which is not yet supported in 3D
117  // if (EFAElem->numFragments() > 0)
118  // cut |= cutFragmentByGeometry(frag_faces, frag_cut_faces, _t);
119 
120  if (cut)
121  {
123  gmei3d._elem_cut_faces = elem_cut_faces;
124  gmei3d._frag_cut_faces = frag_cut_faces;
125  gmei3d._frag_faces = frag_faces;
126  _marked_elems_3d[_current_elem->id()].push_back(gmei3d);
127  }
128  }
129  }
130 }

Referenced by MovingLineSegmentCutSetUserObject::execute().

◆ finalize()

void GeometricCutUserObject::finalize ( )
overridevirtualinherited

Reimplemented in MovingLineSegmentCutSetUserObject.

Definition at line 254 of file GeometricCutUserObject.C.

255 {
256  // for single processor runs we do not need to do anything here
257  if (_app.n_processors() > 1)
258  {
259  // create send buffer
260  std::string send_buffer;
261 
262  // create byte buffers for the streams received from all processors
263  std::vector<std::string> recv_buffers;
264 
265  // pack the complex datastructures into the string stream
266  serialize(send_buffer);
267 
268  // broadcast serialized data to and receive from all processors
269  _communicator.allgather(send_buffer, recv_buffers);
270 
271  // unpack the received data and merge it into the local data structures
272  deserialize(recv_buffers);
273  }
274 
275  for (const auto & it : _marked_elems_2d)
276  for (const auto & gmei : it.second)
277  _xfem->addGeomMarkedElem2D(it.first, gmei, _interface_id);
278 
279  for (const auto & it : _marked_elems_3d)
280  for (const auto & gmei : it.second)
281  _xfem->addGeomMarkedElem3D(it.first, gmei, _interface_id);
282 
283  _marked_elems_2d.clear();
284  _marked_elems_3d.clear();
285 }

Referenced by MovingLineSegmentCutSetUserObject::finalize().

◆ getCrackFrontPoints()

const std::vector< Point > LineSegmentCutUserObject::getCrackFrontPoints ( unsigned int  ) const
overridevirtual

get a set of points along a crack front from a XFEM GeometricCutUserObject

Returns
A vector which contains all crack front points

Implements CrackFrontPointsProvider.

Definition at line 79 of file LineSegmentCutUserObject.C.

80 {
81  mooseError("getCrackFrontPoints() is not implemented for this object.");
82 }

◆ getInterfaceID()

unsigned int GeometricCutUserObject::getInterfaceID ( ) const
inlineinherited

Get the interface ID for this cutting object.

Returns
the interface ID

Definition at line 172 of file GeometricCutUserObject.h.

172 { return _interface_id; };

◆ initialize()

void GeometricCutUserObject::initialize ( )
overridevirtualinherited

Reimplemented in MeshCut3DUserObject, and MovingLineSegmentCutSetUserObject.

Definition at line 60 of file GeometricCutUserObject.C.

61 {
62  _marked_elems_2d.clear();
63  _marked_elems_3d.clear();
64 }

◆ IntersectSegmentWithCutLine()

bool GeometricCut2DUserObject::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 
) const
protectedinherited

Definition at line 155 of file GeometricCut2DUserObject.C.

161 {
162  // Use the algorithm described here to determine whether a line segment is intersected
163  // by a cutting line, and to compute the fraction along that line where the intersection
164  // occurs:
165  // http://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect
166 
167  bool cut_segment = false;
168  Point seg_dir = segment_point2 - segment_point1;
169  Point cut_dir = cutting_line_points.second - cutting_line_points.first;
170  Point cut_start_to_seg_start = segment_point1 - cutting_line_points.first;
171 
172  Real cut_dir_cross_seg_dir = crossProduct2D(cut_dir, seg_dir);
173 
174  if (std::abs(cut_dir_cross_seg_dir) > Xfem::tol)
175  {
176  // Fraction of the distance along the cutting segment where it intersects the edge segment
177  Real cut_int_frac = crossProduct2D(cut_start_to_seg_start, seg_dir) / cut_dir_cross_seg_dir;
178 
179  if (cut_int_frac >= 0.0 && cut_int_frac <= cutting_line_fraction)
180  { // Cutting segment intersects the line of the edge segment, but the intersection point may
181  // be
182  // outside the segment
183  Real int_frac = crossProduct2D(cut_start_to_seg_start, cut_dir) / cut_dir_cross_seg_dir;
184  if (int_frac >= 0.0 &&
185  int_frac <= 1.0) // TODO: revisit end cases for intersections with corners
186  {
187  cut_segment = true;
188  segment_intersection_fraction = int_frac;
189  }
190  }
191  }
192  return cut_segment;
193 }

Referenced by GeometricCut2DUserObject::cutElementByGeometry(), and GeometricCut2DUserObject::cutFragmentByGeometry().

◆ serialize()

void GeometricCutUserObject::serialize ( std::string &  serialized_buffer)
protectedinherited

Methods to pack/unpack the _marked_elems_2d and _marked_elems_3d data into a structure suitable for parallel communication.

Definition at line 209 of file GeometricCutUserObject.C.

210 {
211  // stream for serializing the _marked_elems_2d and _marked_elems_3d data structures to a byte
212  // stream
213  std::ostringstream oss;
214  dataStore(oss, _marked_elems_2d, this);
215  dataStore(oss, _marked_elems_3d, this);
216 
217  // Populate the passed in string pointer with the string stream's buffer contents
218  serialized_buffer.assign(oss.str());
219 }

Referenced by GeometricCutUserObject::finalize().

◆ setInterfaceID()

void GeometricCutUserObject::setInterfaceID ( unsigned int  interface_id)
inlineinherited

Set the interface ID for this cutting object.

Parameters
theinterface ID

Definition at line 178 of file GeometricCutUserObject.h.

178 { _interface_id = interface_id; };

Referenced by XFEM::addGeometricCut().

◆ shouldHealMesh()

bool GeometricCutUserObject::shouldHealMesh ( ) const
inlineinherited

Should the elements cut by this cutting object be healed in the current time step?

Returns
true if the cut element should be healed

Definition at line 185 of file GeometricCutUserObject.h.

185 { return _heal_always; };

◆ threadJoin()

void GeometricCutUserObject::threadJoin ( const UserObject &  y)
overridevirtualinherited

Definition at line 133 of file GeometricCutUserObject.C.

134 {
135  const GeometricCutUserObject & gcuo = dynamic_cast<const GeometricCutUserObject &>(y);
136 
137  for (const auto & it : gcuo._marked_elems_2d)
138  {
139  mooseAssert(_marked_elems_2d.find(it.first) == _marked_elems_2d.end(),
140  "Element already inserted in map from a different thread");
141  _marked_elems_2d[it.first] = it.second;
142  }
143  for (const auto & it : gcuo._marked_elems_3d)
144  {
145  mooseAssert(_marked_elems_3d.find(it.first) == _marked_elems_3d.end(),
146  "Element already inserted in map from a different thread");
147  _marked_elems_3d[it.first] = it.second;
148  }
149 }

◆ validParams()

InputParameters CrackFrontPointsProvider::validParams ( )
staticinherited

Definition at line 15 of file CrackFrontPointsProvider.C.

16 {
17  InputParameters params = ElementUserObject::validParams();
18  params.addClassDescription("Base class for a class that can provide a set of points along a "
19  "crack front. The virtual functions must be overridden by a derived "
20  "class to provide this functionality.");
21  return params;
22 }

Member Data Documentation

◆ _cut_data

std::vector<Real> LineSegmentCutUserObject::_cut_data
protected

Definition at line 29 of file LineSegmentCutUserObject.h.

Referenced by LineSegmentCutUserObject().

◆ _cut_line_endpoints

std::vector<std::pair<Point, Point> > GeometricCut2DUserObject::_cut_line_endpoints
protectedinherited

◆ _cut_time_ranges

std::vector<std::pair<Real, Real> > GeometricCut2DUserObject::_cut_time_ranges
protectedinherited

◆ _heal_always

bool GeometricCutUserObject::_heal_always
protectedinherited

Heal the mesh.

Definition at line 195 of file GeometricCutUserObject.h.

◆ _interface_id

unsigned int GeometricCutUserObject::_interface_id
protectedinherited

Associated interface id.

Definition at line 192 of file GeometricCutUserObject.h.

Referenced by GeometricCutUserObject::finalize(), and GeometricCutUserObject::GeometricCutUserObject().

◆ _last_step_initialized

unsigned int GeometricCutUserObject::_last_step_initialized
protectedinherited

Time step information needed to advance a 3D crack only at the real beginning of a time step.

Definition at line 198 of file GeometricCutUserObject.h.

Referenced by MeshCut3DUserObject::initialize().

◆ _marked_elems_2d

std::map<unsigned int, std::vector<Xfem::GeomMarkedElemInfo2D> > GeometricCutUserObject::_marked_elems_2d
protectedinherited

◆ _marked_elems_3d

std::map<unsigned int, std::vector<Xfem::GeomMarkedElemInfo3D> > GeometricCutUserObject::_marked_elems_3d
protectedinherited

◆ _xfem

std::shared_ptr<XFEM> GeometricCutUserObject::_xfem
protectedinherited

The documentation for this class was generated from the following files:
GeometricCutUserObject::serialize
void serialize(std::string &serialized_buffer)
Methods to pack/unpack the _marked_elems_2d and _marked_elems_3d data into a structure suitable for p...
Definition: GeometricCutUserObject.C:209
Xfem::CutEdge::_id1
unsigned int _id1
ID of the first node on the edge.
Definition: GeometricCutUserObject.h:29
EFAElement2D::isFinalCut
virtual bool isFinalCut() const
Definition: EFAElement2D.C:791
Xfem::GeomMarkedElemInfo2D
Data structure describing geometrically described cut through 2D element.
Definition: GeometricCutUserObject.h:75
EFAElement3D::isFinalCut
virtual bool isFinalCut() const
Definition: EFAElement3D.C:838
GeometricCut2DUserObject::GeometricCut2DUserObject
GeometricCut2DUserObject(const InputParameters &parameters)
Definition: GeometricCut2DUserObject.C:31
Xfem::CutEdge::_distance
Real _distance
Fractional distance along the edge (from node 1 to 2) where the cut is located.
Definition: GeometricCutUserObject.h:33
GeometricCutUserObject::_xfem
std::shared_ptr< XFEM > _xfem
Pointer to the XFEM controller object.
Definition: GeometricCutUserObject.h:185
Xfem::CutNode::_host_id
unsigned int _host_id
Local ID of this node in the host element.
Definition: GeometricCutUserObject.h:60
GeometricCut2DUserObject::cutFraction
virtual Real cutFraction(unsigned int cut_num, Real time) const
Find the fractional distance along a specified cut line for the current time that is currently active...
Definition: GeometricCut2DUserObject.C:202
GeometricCut2DUserObject::_cut_time_ranges
std::vector< std::pair< Real, Real > > _cut_time_ranges
Vector of start/end times for each cut segment.
Definition: GeometricCut2DUserObject.h:61
GeometricCutUserObject::deserialize
void deserialize(std::vector< std::string > &serialized_buffers)
Definition: GeometricCutUserObject.C:222
Xfem::CutEdge::_id2
unsigned int _id2
ID of the second node on the edge.
Definition: GeometricCutUserObject.h:31
Xfem::GeomMarkedElemInfo2D::_elem_cut_edges
std::vector< CutEdge > _elem_cut_edges
Container for data about all cut edges in this element.
Definition: GeometricCutUserObject.h:78
Xfem::GeomMarkedElemInfo2D::_elem_cut_nodes
std::vector< CutNode > _elem_cut_nodes
Container for data about all cut nodes in this element.
Definition: GeometricCutUserObject.h:80
Xfem::CutEdge::_host_side_id
unsigned int _host_side_id
Local ID of this side in the host element.
Definition: GeometricCutUserObject.h:35
Xfem::GeomMarkedElemInfo2D::_frag_edges
std::vector< std::vector< Point > > _frag_edges
Container for data about all cut edges in cut fragments in this element.
Definition: GeometricCutUserObject.h:84
GeometricCutUserObject
Definition: GeometricCutUserObject.h:106
EFAElement3D
Definition: EFAElement3D.h:20
GeometricCut2DUserObject::crossProduct2D
Real crossProduct2D(const Point &point_a, const Point &point_b) const
Definition: GeometricCut2DUserObject.C:196
GeometricCutUserObject::_marked_elems_3d
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo3D > > _marked_elems_3d
Definition: GeometricCutUserObject.h:202
GeometricCutUserObject::cutFragmentByGeometry
virtual bool cutFragmentByGeometry(std::vector< std::vector< Point >> &frag_edges, std::vector< Xfem::CutEdge > &cut_edges, Real time) const =0
Check to see whether a fragment of a 2D element should be cut based on geometric conditions.
dataLoad
void dataLoad(std::istream &stream, Xfem::CutFace &cf, void *context)
Definition: GeometricCutUserObject.C:163
dataStore
void dataStore(std::ostream &stream, Xfem::CutFace &cf, void *context)
Definition: GeometricCutUserObject.C:154
Xfem::GeomMarkedElemInfo3D
Data structure describing geometrically described cut through 3D element.
Definition: GeometricCutUserObject.h:88
GeometricCut2DUserObject::IntersectSegmentWithCutLine
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) const
Definition: GeometricCut2DUserObject.C:155
Xfem::GeomMarkedElemInfo2D::_frag_cut_edges
std::vector< CutEdge > _frag_cut_edges
Container for data about all cut fragments in this element.
Definition: GeometricCutUserObject.h:82
Xfem::tol
static const double tol
Definition: XFEMFuncs.h:20
validParams
InputParameters validParams()
GeometricCutUserObject::_interface_id
unsigned int _interface_id
Associated interface id.
Definition: GeometricCutUserObject.h:192
Xfem::CutNode
Data structure defining a cut through a node.
Definition: GeometricCutUserObject.h:55
GeometricCutUserObject::_marked_elems_2d
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo2D > > _marked_elems_2d
Containers with information about all 2D and 3D elements marked for cutting by this object.
Definition: GeometricCutUserObject.h:201
GeometricCutUserObject::_heal_always
bool _heal_always
Heal the mesh.
Definition: GeometricCutUserObject.h:195
GeometricCutUserObject::cutElementByGeometry
virtual bool cutElementByGeometry(const Elem *elem, std::vector< Xfem::CutEdge > &cut_edges, std::vector< Xfem::CutNode > &cut_nodes, Real time) const =0
Check to see whether a specified 2D element should be cut based on geometric conditions.
GeometricCut2DUserObject::_cut_line_endpoints
std::vector< std::pair< Point, Point > > _cut_line_endpoints
Definition: GeometricCut2DUserObject.h:41
Xfem::CutNode::_id
unsigned int _id
ID of the cut node.
Definition: GeometricCutUserObject.h:58
Xfem::GeomMarkedElemInfo3D::_frag_faces
std::vector< std::vector< Point > > _frag_faces
Container for data about all cut faces in cut fragments in this element.
Definition: GeometricCutUserObject.h:95
Xfem::GeomMarkedElemInfo3D::_frag_cut_faces
std::vector< CutFace > _frag_cut_faces
Container for data about all faces this element's fragment.
Definition: GeometricCutUserObject.h:93
EFAElement2D::numFragments
virtual unsigned int numFragments() const
Definition: EFAElement2D.C:202
EFAElement2D
Definition: EFAElement2D.h:20
Xfem::GeomMarkedElemInfo3D::_elem_cut_faces
std::vector< CutFace > _elem_cut_faces
Container for data about all cut faces in this element.
Definition: GeometricCutUserObject.h:91
Xfem::CutEdge
Data structure defining a cut on an element edge.
Definition: GeometricCutUserObject.h:26
LineSegmentCutUserObject::_cut_data
std::vector< Real > _cut_data
Definition: LineSegmentCutUserObject.h:29