www.mooseframework.org
EFAFragment3D.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 EFAFRAGMENT3D_H
9 #define EFAFRAGMENT3D_H
10 
11 #include "EFAFragment.h"
12 
13 #include <limits>
14 
15 class EFAEdge;
16 class EFAFace;
17 class EFAElement3D;
18 
19 class EFAFragment3D : public EFAFragment
20 {
21 public:
23  bool create_faces,
24  const EFAElement3D * from_host,
25  unsigned int frag_id = std::numeric_limits<unsigned int>::max());
27 
28 private:
30  std::vector<EFAFace *> _faces;
31  std::vector<std::vector<EFAFace *>> _faces_adjacent_to_faces;
32 
33 public:
34  // override pure virtual methods
35  virtual void switchNode(EFANode * new_node, EFANode * old_node);
36  virtual bool containsNode(EFANode * node) const;
37  virtual unsigned int getNumCuts() const;
38  virtual unsigned int getNumCutNodes() const;
39  virtual std::set<EFANode *> getAllNodes() const;
40  virtual bool isConnected(EFAFragment * other_fragment) const;
41  virtual void removeInvalidEmbeddedNodes(std::map<unsigned int, EFANode *> & EmbeddedNodes);
42 
43  // EFAfragment3D specific methods
44  void combine_tip_faces();
45  bool isFaceInterior(unsigned int face_id) const;
46  std::vector<unsigned int> get_interior_face_id() const;
47  bool isThirdInteriorFace(unsigned int face_id) const;
48  unsigned int numFaces() const;
49  EFAFace * getFace(unsigned int face_id) const;
50  unsigned int getFaceID(EFAFace * face) const;
51  void addFace(EFAFace * new_face);
52  std::set<EFANode *> getFaceNodes(unsigned int face_id) const;
53  EFAElement3D * getHostElement() const;
54  std::vector<EFAFragment3D *> split();
56  EFAFace * getAdjacentFace(unsigned int face_id, unsigned int edge_id) const;
57  void removeEmbeddedNode(EFANode * emb_node);
58  bool hasFaceWithOneCut() const;
59  void getNodeInfo(std::vector<std::vector<unsigned int>> & face_node_indices,
60  std::vector<EFANode *> & nodes) const;
61 
62 private:
63  EFAFragment3D * connectSubfaces(EFAFace * start_face,
64  unsigned int startOldFaceID,
65  std::vector<std::vector<EFAFace *>> & subfaces);
66  EFAEdge * loneEdgeOnFace(unsigned int face_id) const;
67  void combine_two_faces(unsigned int face_id1, unsigned int face_id2, const EFAFace * elem_face);
68 };
69 
70 #endif
void getNodeInfo(std::vector< std::vector< unsigned int >> &face_node_indices, std::vector< EFANode * > &nodes) const
virtual bool containsNode(EFANode *node) const
Definition: EFAFragment3D.C:64
bool isFaceInterior(unsigned int face_id) const
void removeEmbeddedNode(EFANode *emb_node)
void findFacesAdjacentToFaces()
std::vector< unsigned int > get_interior_face_id() const
std::vector< EFAFragment3D * > split()
unsigned int getFaceID(EFAFace *face) const
void combine_tip_faces()
bool isThirdInteriorFace(unsigned int face_id) const
std::vector< std::vector< EFAFace * > > _faces_adjacent_to_faces
Definition: EFAFragment3D.h:31
EFAFragment3D(EFAElement3D *host, bool create_faces, const EFAElement3D *from_host, unsigned int frag_id=std::numeric_limits< unsigned int >::max())
Definition: EFAFragment3D.C:18
virtual unsigned int getNumCutNodes() const
Definition: EFAFragment3D.C:89
EFAEdge * loneEdgeOnFace(unsigned int face_id) const
EFAElement3D * _host_elem
Definition: EFAFragment3D.h:29
virtual unsigned int getNumCuts() const
Definition: EFAFragment3D.C:79
EFAFace * getFace(unsigned int face_id) const
EFAFace * getAdjacentFace(unsigned int face_id, unsigned int edge_id) const
virtual void removeInvalidEmbeddedNodes(std::map< unsigned int, EFANode * > &EmbeddedNodes)
EFAFragment3D * connectSubfaces(EFAFace *start_face, unsigned int startOldFaceID, std::vector< std::vector< EFAFace * >> &subfaces)
virtual std::set< EFANode * > getAllNodes() const
Definition: EFAFragment3D.C:95
virtual bool isConnected(EFAFragment *other_fragment) const
void addFace(EFAFace *new_face)
EFAElement3D * getHostElement() const
bool hasFaceWithOneCut() const
void combine_two_faces(unsigned int face_id1, unsigned int face_id2, const EFAFace *elem_face)
unsigned int numFaces() const
std::set< EFANode * > getFaceNodes(unsigned int face_id) const
virtual void switchNode(EFANode *new_node, EFANode *old_node)
Definition: EFAFragment3D.C:57
std::vector< EFAFace * > _faces
Definition: EFAFragment3D.h:30