www.mooseframework.org
EFAEdge.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 EFAEDGE_H
9 #define EFAEDGE_H
10 
11 #include <vector>
12 
13 class EFANode;
14 
15 class EFAEdge
16 {
17 public:
18  EFAEdge(EFANode * node1, EFANode * node2);
19  EFAEdge(const EFAEdge & other_edge);
20 
21  ~EFAEdge();
22 
23 private:
26  EFANode * _edge_interior_node; // The interior edge node for quad8 and quad9 elements
27  std::vector<EFANode *> _embedded_nodes;
28  std::vector<double> _intersection_x;
29 
30 public:
31  bool equivalent(const EFAEdge & other) const;
32  bool isPartialOverlap(const EFAEdge & other) const;
33  bool containsEdge(const EFAEdge & other) const;
34  bool getNodeMasters(EFANode * node,
35  std::vector<EFANode *> & master_nodes,
36  std::vector<double> & master_weights) const;
37  // bool operator < (const EFAEdge & other) const;
38 
39  void addIntersection(double position, EFANode * embedded_node_tmp, EFANode * from_node);
40  void resetIntersection(double position, EFANode * embedded_node_tmp, EFANode * from_node);
41  void copyIntersection(const EFAEdge & other, unsigned int from_node_id);
42  EFANode * getNode(unsigned int index) const;
44  void setInteriorNode(EFANode * node) { _edge_interior_node = node; };
45  void reverseNodes();
46 
47  bool hasIntersection() const;
48  bool hasIntersectionAtPosition(double position, EFANode * from_node) const;
49  double getIntersection(unsigned int emb_id, EFANode * from_node) const;
50  double distanceFromNode1(EFANode * node) const;
51  bool isEmbeddedNode(const EFANode * node) const;
52  unsigned int getEmbeddedNodeIndex(EFANode * node) const;
53  unsigned int getEmbeddedNodeIndex(double position, EFANode * from_node) const;
54 
55  EFANode * getEmbeddedNode(unsigned int index) const;
56  unsigned int numEmbeddedNodes() const;
57  void consistencyCheck();
58  void switchNode(EFANode * new_node, EFANode * old_node);
59  bool containsNode(const EFANode * node) const;
60  void removeEmbeddedNodes();
61  void removeEmbeddedNode(EFANode * node);
62 };
63 
64 #endif
EFANode * getEmbeddedNode(unsigned int index) const
Definition: EFAEdge.C:328
void reverseNodes()
Definition: EFAEdge.C:188
bool containsEdge(const EFAEdge &other) const
Definition: EFAEdge.C:61
void switchNode(EFANode *new_node, EFANode *old_node)
Definition: EFAEdge.C:361
std::vector< double > _intersection_x
Definition: EFAEdge.h:28
void consistencyCheck()
Definition: EFAEdge.C:343
bool containsNode(const EFANode *node) const
Definition: EFAEdge.C:375
double distanceFromNode1(EFANode *node) const
Definition: EFAEdge.C:246
bool hasIntersectionAtPosition(double position, EFANode *from_node) const
Definition: EFAEdge.C:209
unsigned int numEmbeddedNodes() const
Definition: EFAEdge.C:337
bool getNodeMasters(EFANode *node, std::vector< EFANode * > &master_nodes, std::vector< double > &master_weights) const
Definition: EFAEdge.C:67
std::vector< EFANode * > _embedded_nodes
Definition: EFAEdge.h:27
EFANode * getInteriorNode() const
Definition: EFAEdge.h:43
EFAEdge(EFANode *node1, EFANode *node2)
Definition: EFAEdge.C:14
~EFAEdge()
Definition: EFAEdge.C:31
void resetIntersection(double position, EFANode *embedded_node_tmp, EFANode *from_node)
Definition: EFAEdge.C:140
EFANode * _edge_node1
Definition: EFAEdge.h:24
EFANode * _edge_interior_node
Definition: EFAEdge.h:26
void setInteriorNode(EFANode *node)
Definition: EFAEdge.h:44
void copyIntersection(const EFAEdge &other, unsigned int from_node_id)
Definition: EFAEdge.C:158
EFANode * getNode(unsigned int index) const
Definition: EFAEdge.C:177
bool isEmbeddedNode(const EFANode *node) const
Definition: EFAEdge.C:264
void removeEmbeddedNodes()
Definition: EFAEdge.C:381
bool hasIntersection() const
Definition: EFAEdge.C:196
EFANode * _edge_node2
Definition: EFAEdge.h:25
bool isPartialOverlap(const EFAEdge &other) const
Definition: EFAEdge.C:55
unsigned int getEmbeddedNodeIndex(EFANode *node) const
Definition: EFAEdge.C:279
bool equivalent(const EFAEdge &other) const
Definition: EFAEdge.C:36
double getIntersection(unsigned int emb_id, EFANode *from_node) const
Definition: EFAEdge.C:235
void addIntersection(double position, EFANode *embedded_node_tmp, EFANode *from_node)
Definition: EFAEdge.C:128
void removeEmbeddedNode(EFANode *node)
Definition: EFAEdge.C:388