www.mooseframework.org
EFAFace.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 <vector>
13 
14 class EFANode;
15 class EFAEdge;
16 class EFAFaceNode;
17 class EFAFragment2D;
18 
19 class EFAFace
20 {
21 public:
22  EFAFace(unsigned int n_nodes, unsigned int num_interior_face_nodes = 0);
23  EFAFace(const EFAFace & other_face);
24  EFAFace(const EFAFragment2D * frag);
25 
26  ~EFAFace();
27 
28 private:
29  unsigned int _num_nodes;
30  std::vector<EFANode *> _nodes;
31  unsigned int _num_edges;
32  std::vector<EFAEdge *> _edges;
33  std::vector<EFAFaceNode *> _interior_nodes;
34  std::vector<EFANode *> _face_interior_nodes;
35 
36 public:
37  unsigned int numNodes() const;
38  void setNode(unsigned int node_id, EFANode * node);
39  EFANode * getNode(unsigned int node_id) const;
40  void switchNode(EFANode * new_node, EFANode * old_node);
41  bool getMasterInfo(EFANode * node,
42  std::vector<EFANode *> & master_nodes,
43  std::vector<double> & master_weights) const;
44  bool getEdgeNodeParametricCoords(EFANode * node, std::vector<double> & xi_2d) const;
45  bool getFaceNodeParametricCoords(EFANode * node, std::vector<double> & xi_2d) const;
46  unsigned int numInteriorNodes() const;
47  void createNodes();
48 
49  unsigned int numEdges() const;
50  EFAEdge * getEdge(unsigned int edge_id) const;
51  void setEdge(unsigned int edge_id, EFAEdge * new_edge);
52  void createEdges();
53  void combineTwoEdges(unsigned int edge_id1, unsigned int edge_id2);
54  void sortEdges();
55  void reverseEdges();
56  bool isTriOrQuad() const;
57 
58  EFANode * getInteriorFaceNode(unsigned int i) const { return _face_interior_nodes[i]; };
59  void setInteriorFaceNode(unsigned int i, EFANode * node);
60  bool equivalent(const EFAFace * other_face) const;
61  bool containsNode(const EFANode * node) const;
62  bool containsFace(const EFAFace * other_face) const;
63  bool ownsEdge(const EFAEdge * other_edge) const;
64  void removeEmbeddedNode(EFANode * emb_node);
65  std::vector<EFAFace *> split() const;
66  EFAFace * combineWithFace(const EFAFace * other_face) const;
67  void resetEdgeIntersection(const EFAFace * ref_face);
68 
69  unsigned int getNumCuts() const;
70  bool hasIntersection() const;
71  void copyIntersection(const EFAFace & from_face);
72  bool isAdjacent(const EFAFace * other_face) const;
73  unsigned int adjacentCommonEdge(const EFAFace * other_face) const;
74  bool hasSameOrientation(const EFAFace * other_face) const;
75  EFAFaceNode * getInteriorNode(unsigned int index) const;
76 
77 private:
78  void mapParametricCoordsFrom1DTo2D(unsigned int edge_id,
79  double xi_1d,
80  std::vector<double> & xi_2d) const;
81 };
82 
EFAFace::getEdge
EFAEdge * getEdge(unsigned int edge_id) const
Definition: EFAFace.C:260
EFAFace::containsFace
bool containsFace(const EFAFace *other_face) const
Definition: EFAFace.C:417
EFAFace::_num_nodes
unsigned int _num_nodes
Definition: EFAFace.h:29
EFAFace::hasIntersection
bool hasIntersection() const
Definition: EFAFace.C:609
EFAFace::setInteriorFaceNode
void setInteriorFaceNode(unsigned int i, EFANode *node)
Definition: EFAFace.C:81
EFAFace::createNodes
void createNodes()
Definition: EFAFace.C:242
EFAFace::getNode
EFANode * getNode(unsigned int node_id) const
Definition: EFAFace.C:99
EFAFace::copyIntersection
void copyIntersection(const EFAFace &from_face)
Definition: EFAFace.C:618
EFAFace::getMasterInfo
bool getMasterInfo(EFANode *node, std::vector< EFANode * > &master_nodes, std::vector< double > &master_weights) const
Definition: EFAFace.C:132
EFAFace::sortEdges
void sortEdges()
Definition: EFAFace.C:329
EFAFaceNode
Definition: EFAFaceNode.h:14
EFAFace::isTriOrQuad
bool isTriOrQuad() const
Definition: EFAFace.C:358
EFAFragment2D
Definition: EFAFragment2D.h:20
EFAFace::_interior_nodes
std::vector< EFAFaceNode * > _interior_nodes
Definition: EFAFace.h:33
EFAFace::createEdges
void createEdges()
Definition: EFAFace.C:272
EFAFace::setNode
void setNode(unsigned int node_id, EFANode *node)
Definition: EFAFace.C:93
EFAFace::getEdgeNodeParametricCoords
bool getEdgeNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
Definition: EFAFace.C:183
EFAFace::containsNode
bool containsNode(const EFANode *node) const
Definition: EFAFace.C:391
EFAFace::mapParametricCoordsFrom1DTo2D
void mapParametricCoordsFrom1DTo2D(unsigned int edge_id, double xi_1d, std::vector< double > &xi_2d) const
Definition: EFAFace.C:690
EFAFace::hasSameOrientation
bool hasSameOrientation(const EFAFace *other_face) const
Definition: EFAFace.C:658
EFAFace::switchNode
void switchNode(EFANode *new_node, EFANode *old_node)
Definition: EFAFace.C:105
EFAFace::getFaceNodeParametricCoords
bool getFaceNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
Definition: EFAFace.C:210
EFAFace::ownsEdge
bool ownsEdge(const EFAEdge *other_edge) const
Definition: EFAFace.C:432
EFAFace::resetEdgeIntersection
void resetEdgeIntersection(const EFAFace *ref_face)
Definition: EFAFace.C:554
EFAFace::getNumCuts
unsigned int getNumCuts() const
Definition: EFAFace.C:597
EFAFace::numInteriorNodes
unsigned int numInteriorNodes() const
Definition: EFAFace.C:236
EFAFace::_edges
std::vector< EFAEdge * > _edges
Definition: EFAFace.h:32
EFAFace
Definition: EFAFace.h:19
EFAFace::_num_edges
unsigned int _num_edges
Definition: EFAFace.h:31
EFAFace::reverseEdges
void reverseEdges()
Definition: EFAFace.C:349
EFAEdge
Definition: EFAEdge.h:16
EFANode
Definition: EFANode.h:14
EFAFace::isAdjacent
bool isAdjacent(const EFAFace *other_face) const
Definition: EFAFace.C:629
EFAFace::EFAFace
EFAFace(unsigned int n_nodes, unsigned int num_interior_face_nodes=0)
Definition: EFAFace.C:19
EFAFace::combineTwoEdges
void combineTwoEdges(unsigned int edge_id1, unsigned int edge_id2)
Definition: EFAFace.C:288
EFAFace::_face_interior_nodes
std::vector< EFANode * > _face_interior_nodes
Definition: EFAFace.h:34
EFAFace::getInteriorFaceNode
EFANode * getInteriorFaceNode(unsigned int i) const
Definition: EFAFace.h:58
EFAFace::~EFAFace
~EFAFace()
Definition: EFAFace.C:60
EFAFace::numNodes
unsigned int numNodes() const
Definition: EFAFace.C:87
EFAFace::setEdge
void setEdge(unsigned int edge_id, EFAEdge *new_edge)
Definition: EFAFace.C:266
EFAFace::split
std::vector< EFAFace * > split() const
Definition: EFAFace.C:465
EFAFace::_nodes
std::vector< EFANode * > _nodes
Definition: EFAFace.h:30
EFAFace::combineWithFace
EFAFace * combineWithFace(const EFAFace *other_face) const
Definition: EFAFace.C:490
EFAFace::numEdges
unsigned int numEdges() const
Definition: EFAFace.C:254
EFAFace::equivalent
bool equivalent(const EFAFace *other_face) const
Definition: EFAFace.C:367
EFAFace::getInteriorNode
EFAFaceNode * getInteriorNode(unsigned int index) const
Definition: EFAFace.C:684
EFAFace::removeEmbeddedNode
void removeEmbeddedNode(EFANode *emb_node)
Definition: EFAFace.C:441
EFAFace::adjacentCommonEdge
unsigned int adjacentCommonEdge(const EFAFace *other_face) const
Definition: EFAFace.C:644