www.mooseframework.org
GeometricCut3DUserObject.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 GEOMETRICCUT3DUSEROBJECT_H
9 #define GEOMETRICCUT3DUSEROBJECT_H
10 
11 #include "GeometricCutUserObject.h"
12 
13 using namespace libMesh;
14 
16 {
17 public:
18  GeometricCut3DUserObject(const InputParameters & parameters);
19 
20  virtual void initialize() override{};
21  virtual void execute() override{};
22  virtual void finalize() override{};
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  Point _center;
43  Point _normal;
44 
45  virtual bool intersectWithEdge(const Point & p1, const Point & p2, Point & pint) const;
46 
47  virtual bool isInsideCutPlane(Point p) const = 0;
48 
49  bool isInsideEdge(const Point & p1, const Point & p2, const Point & p) const;
50 
51  Real getRelativePosition(const Point & p1, const Point & p2, const Point & p) const;
52 };
53 
54 #endif // GEOMETRICCUT3DUSEROBJECT_H
virtual void finalize() override
virtual void execute() override
virtual void initialize() override