www.mooseframework.org
EFAFragment3D.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "EFAFragment.h"
13 
14 #include <limits>
15 
16 class EFAEdge;
17 class EFAFace;
18 class EFAElement3D;
19 
20 class EFAFragment3D : public EFAFragment
21 {
22 public:
24  bool create_faces,
25  const EFAElement3D * from_host,
26  unsigned int frag_id = std::numeric_limits<unsigned int>::max());
28 
29 private:
31  std::vector<EFAFace *> _faces;
32  std::vector<std::vector<EFAFace *>> _faces_adjacent_to_faces;
33 
34 public:
35  // override pure virtual methods
36  virtual void switchNode(EFANode * new_node, EFANode * old_node);
37  virtual bool containsNode(EFANode * node) const;
38  virtual unsigned int getNumCuts() const;
39  virtual unsigned int getNumCutNodes() const;
40  virtual std::set<EFANode *> getAllNodes() const;
41  virtual bool isConnected(EFAFragment * other_fragment) const;
42  virtual bool isEdgeConnected(EFAFragment * other_fragment) const;
43  virtual void removeInvalidEmbeddedNodes(std::map<unsigned int, EFANode *> & EmbeddedNodes);
44 
45  // EFAfragment3D specific methods
46  void combine_tip_faces();
47  bool isFaceInterior(unsigned int face_id) const;
48  std::vector<unsigned int> get_interior_face_id() const;
49  bool isThirdInteriorFace(unsigned int face_id) const;
50  unsigned int numFaces() const;
51  EFAFace * getFace(unsigned int face_id) const;
52  unsigned int getFaceID(EFAFace * face) const;
53  void addFace(EFAFace * new_face);
54  std::set<EFANode *> getFaceNodes(unsigned int face_id) const;
55  EFAElement3D * getHostElement() const;
56  std::vector<EFAFragment3D *> split();
58  EFAFace * getAdjacentFace(unsigned int face_id, unsigned int edge_id) const;
59  void removeEmbeddedNode(EFANode * emb_node);
60  bool hasFaceWithOneCut() const;
61  void getNodeInfo(std::vector<std::vector<unsigned int>> & face_node_indices,
62  std::vector<EFANode *> & nodes) const;
63 
64 private:
65  EFAFragment3D * connectSubfaces(EFAFace * start_face,
66  unsigned int startOldFaceID,
67  std::vector<std::vector<EFAFace *>> & subfaces);
68  EFAEdge * loneEdgeOnFace(unsigned int face_id) const;
69  void combine_two_faces(unsigned int face_id1, unsigned int face_id2, const EFAFace * elem_face);
70 };
71 
EFAFragment3D::combine_tip_faces
void combine_tip_faces()
Definition: EFAFragment3D.C:200
EFAFragment3D::~EFAFragment3D
~EFAFragment3D()
Definition: EFAFragment3D.C:46
EFAFragment3D::containsNode
virtual bool containsNode(EFANode *node) const
Definition: EFAFragment3D.C:66
EFAFragment3D::loneEdgeOnFace
EFAEdge * loneEdgeOnFace(unsigned int face_id) const
Definition: EFAFragment3D.C:496
EFAFragment3D::numFaces
unsigned int numFaces() const
Definition: EFAFragment3D.C:271
EFAFragment3D::combine_two_faces
void combine_two_faces(unsigned int face_id1, unsigned int face_id2, const EFAFace *elem_face)
Definition: EFAFragment3D.C:506
EFAFragment3D::getFace
EFAFace * getFace(unsigned int face_id) const
Definition: EFAFragment3D.C:277
EFAFragment3D::removeEmbeddedNode
void removeEmbeddedNode(EFANode *emb_node)
Definition: EFAFragment3D.C:387
EFAFragment3D::split
std::vector< EFAFragment3D * > split()
Definition: EFAFragment3D.C:316
EFAFragment3D::addFace
void addFace(EFAFace *new_face)
Definition: EFAFragment3D.C:295
EFAFragment3D::isThirdInteriorFace
bool isThirdInteriorFace(unsigned int face_id) const
Definition: EFAFragment3D.C:253
EFAFragment3D::getNumCutNodes
virtual unsigned int getNumCutNodes() const
Definition: EFAFragment3D.C:91
EFAFragment3D::switchNode
virtual void switchNode(EFANode *new_node, EFANode *old_node)
Definition: EFAFragment3D.C:59
EFAFragment3D::findFacesAdjacentToFaces
void findFacesAdjacentToFaces()
Definition: EFAFragment3D.C:362
EFAFragment3D::isFaceInterior
bool isFaceInterior(unsigned int face_id) const
Definition: EFAFragment3D.C:220
EFAFragment3D::getFaceID
unsigned int getFaceID(EFAFace *face) const
Definition: EFAFragment3D.C:285
EFAFragment3D::getNodeInfo
void getNodeInfo(std::vector< std::vector< unsigned int >> &face_node_indices, std::vector< EFANode * > &nodes) const
Definition: EFAFragment3D.C:404
EFAFragment3D::connectSubfaces
EFAFragment3D * connectSubfaces(EFAFace *start_face, unsigned int startOldFaceID, std::vector< std::vector< EFAFace * >> &subfaces)
Definition: EFAFragment3D.C:428
EFAFragment3D::getNumCuts
virtual unsigned int getNumCuts() const
Definition: EFAFragment3D.C:81
EFAFragment3D::_faces_adjacent_to_faces
std::vector< std::vector< EFAFace * > > _faces_adjacent_to_faces
Definition: EFAFragment3D.h:32
EFAFragment.h
EFAFragment3D::getAdjacentFace
EFAFace * getAdjacentFace(unsigned int face_id, unsigned int edge_id) const
Definition: EFAFragment3D.C:381
EFAElement3D
Definition: EFAElement3D.h:20
EFAFragment3D::isEdgeConnected
virtual bool isEdgeConnected(EFAFragment *other_fragment) const
Definition: EFAFragment3D.C:131
EFAFragment3D::hasFaceWithOneCut
bool hasFaceWithOneCut() const
Definition: EFAFragment3D.C:394
EFAFragment3D::getHostElement
EFAElement3D * getHostElement() const
Definition: EFAFragment3D.C:310
EFAFragment3D::removeInvalidEmbeddedNodes
virtual void removeInvalidEmbeddedNodes(std::map< unsigned int, EFANode * > &EmbeddedNodes)
Definition: EFAFragment3D.C:148
EFAFragment3D::getFaceNodes
std::set< EFANode * > getFaceNodes(unsigned int face_id) const
Definition: EFAFragment3D.C:301
EFAFace
Definition: EFAFace.h:19
EFAFragment3D::EFAFragment3D
EFAFragment3D(EFAElement3D *host, bool create_faces, const EFAElement3D *from_host, unsigned int frag_id=std::numeric_limits< unsigned int >::max())
Definition: EFAFragment3D.C:20
EFAEdge
Definition: EFAEdge.h:16
EFANode
Definition: EFANode.h:14
EFAFragment3D::_faces
std::vector< EFAFace * > _faces
Definition: EFAFragment3D.h:31
EFAFragment3D::getAllNodes
virtual std::set< EFANode * > getAllNodes() const
Definition: EFAFragment3D.C:97
EFAFragment
Definition: EFAFragment.h:18
EFAFragment3D::isConnected
virtual bool isConnected(EFAFragment *other_fragment) const
Definition: EFAFragment3D.C:107
EFAFragment3D::_host_elem
EFAElement3D * _host_elem
Definition: EFAFragment3D.h:30
EFAFragment3D::get_interior_face_id
std::vector< unsigned int > get_interior_face_id() const
Definition: EFAFragment3D.C:241
EFAFragment3D
Definition: EFAFragment3D.h:20