www.mooseframework.org
GeometricCutUserObject.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 GEOMETRICCUTUSEROBJECT_H
9 #define GEOMETRICCUTUSEROBJECT_H
10 
11 // MOOSE includes
13 
14 #include "libmesh/libmesh_common.h"
15 #include "libmesh/libmesh.h" // libMesh::invalid_uint
16 #include "libmesh/elem.h"
17 
18 using namespace libMesh;
19 
20 struct CutEdge
21 {
22  unsigned int id1;
23  unsigned int id2;
24  Real distance;
25  unsigned int host_side_id;
26 };
27 
28 struct CutNode
29 {
30  unsigned int id;
31  unsigned int host_id;
32 };
33 
34 struct CutFace
35 {
36  unsigned int face_id;
37  std::vector<unsigned int> face_edge;
38  std::vector<Real> position;
39 };
40 
41 // Forward declarations
43 
44 template <>
45 InputParameters validParams<GeometricCutUserObject>();
46 
48 {
49 public:
54  GeometricCutUserObject(const InputParameters & parameters);
55 
56  virtual bool active(Real time) const = 0;
57 
58  virtual bool cutElementByGeometry(const Elem * elem,
59  std::vector<CutEdge> & cut_edges,
60  std::vector<CutNode> & cut_nodes,
61  Real time) const = 0;
62  virtual bool
63  cutElementByGeometry(const Elem * elem, std::vector<CutFace> & cut_faces, Real time) const = 0;
64 
65  virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_edges,
66  std::vector<CutEdge> & cut_edges,
67  Real time) const = 0;
68  virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_faces,
69  std::vector<CutFace> & cut_faces,
70  Real time) const = 0;
71 
72  Real cutFraction(unsigned int cut_num, Real time) const;
73 
74 protected:
75  std::vector<std::pair<Real, Real>> _cut_time_ranges;
76 };
77 
78 #endif // GEOMETRICCUTUSEROBJECT_H
unsigned int id2
unsigned int id1
InputParameters validParams< GeometricCutUserObject >()
std::vector< std::pair< Real, Real > > _cut_time_ranges
Base class for crack front points provider.
std::vector< Real > position
unsigned int face_id
std::vector< unsigned int > face_edge
unsigned int id
unsigned int host_side_id
unsigned int host_id