www.mooseframework.org
GeometricCut2DUserObject.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 GEOMETRICCUT2DUSEROBJECT_H
9 #define GEOMETRICCUT2DUSEROBJECT_H
10 
11 #include "GeometricCutUserObject.h"
12 
13 // Forward declarations
15 
16 template <>
18 
20 {
21 public:
22  GeometricCut2DUserObject(const InputParameters & parameters);
23 
24  virtual bool active(Real time) const override;
25 
26  virtual bool cutElementByGeometry(const Elem * elem,
27  std::vector<CutEdge> & cut_edges,
28  std::vector<CutNode> & cut_nodes,
29  Real time) const override;
30  virtual bool cutElementByGeometry(const Elem * elem,
31  std::vector<CutFace> & cut_faces,
32  Real time) const override;
33 
34  virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_edges,
35  std::vector<CutEdge> & cut_edges,
36  Real time) const override;
37  virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_faces,
38  std::vector<CutFace> & cut_faces,
39  Real time) const override;
40 
41 protected:
42  std::vector<std::pair<Point, Point>> _cut_line_endpoints;
43 
44  bool IntersectSegmentWithCutLine(const Point & segment_point1,
45  const Point & segment_point2,
46  const std::pair<Point, Point> & cutting_line_points,
47  const Real & cutting_line_fraction,
48  Real & segment_intersection_fraction) const;
49 
50  Real crossProduct2D(const Point & point_a, const Point & point_b) const;
51 };
52 
53 #endif // GEOMETRICCUT2DUSEROBJECT_H
std::vector< std::pair< Point, Point > > _cut_line_endpoints
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 bool active(Real time) const override
GeometricCut2DUserObject(const InputParameters &parameters)
virtual bool cutFragmentByGeometry(std::vector< std::vector< Point >> &frag_edges, std::vector< CutEdge > &cut_edges, Real time) const override
InputParameters validParams< GeometricCut2DUserObject >()
virtual bool cutElementByGeometry(const Elem *elem, std::vector< CutEdge > &cut_edges, std::vector< CutNode > &cut_nodes, Real time) const override