GCC Code Coverage Report


Directory: ./
File: Geometry/geometricEdges.hpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 15 15 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // ______ ______ _ _ _____ ______
2 // | ____| ____| | (_)/ ____| | ____|
3 // | |__ | |__ | | _| (___ ___| |__
4 // | __| | __| | | | |\___ \ / __| __|
5 // | | | |____| |____| |____) | (__| |____
6 // |_| |______|______|_|_____/ \___|______|
7 // Finite Elements for Life Sciences and Engineering
8 //
9 // License: LGL2.1 License
10 // FELiScE default license: LICENSE in root folder
11 //
12 // Main authors: J.Castelneau & J.Foulon
13 //
14
15 #ifndef GEOMETRICEDGES_HPP
16 #define GEOMETRICEDGES_HPP
17
18 // System includes
19 #include <vector>
20
21 // External includes
22
23 // Project includes
24 #include "Core/felisce.hpp"
25 #include "FiniteElement/refElement.hpp"
26
27 namespace felisce {
28
29 ////////////////
30 // EDGE CLASS //
31 ////////////////
32 /*!
33 \class Edge
34 \authors J.Castelneau & J.Foulon
35
36 \brief Class implementing a geometric edge
37
38 An edge is defined by
39 - the global number of the 1st vertex
40 - the global number of the 2nd vertex
41 - a list of faces neighbours
42 - a list of volumes neighbours
43 - a pointer on next edge with same 1st vertex
44
45 */
46 class NeighVolumesOfEdges;
47 class NeighFacesOfEdges;
48
49 class Edge {
50 typedef std::shared_ptr<NeighFacesOfEdges> shar_ptrFace;
51 typedef std::shared_ptr<NeighVolumesOfEdges> shar_ptrVol;
52 private:
53 Edge *m_ptrNext;
54 felInt m_idBeg; // really useful?? vm
55 felInt m_idEnd;
56 felInt m_id;
57 // This id (m_idOnlySupporting) is rarely used.
58 // It is important when using a refElem that has a different number of dof
59 // on different edges.
60 // This id is std::set by a function in listEdges.
61 felInt m_idOnlySupporting;
62 std::vector < shar_ptrFace > m_listNeighFacesOfEdges;
63 std::vector < shar_ptrVol > m_listNeighVolumesOfEdges;
64
65 public:
66
67 // Constructor / Destructor
68 // ========================
69 2446 Edge(): m_ptrNext(nullptr), m_idBeg(0), m_idEnd(0),m_id(0){}
70 Edge(const felInt & idBeg, const felInt & idEnd, const felInt & idEdge);
71
72 // getter
73 // ======
74 inline const felInt & idBeg() const {
75 return m_idBeg;
76 }
77 inline const felInt & idEnd() const {
78 return m_idEnd;
79 }
80 inline const std::vector < shar_ptrFace > & listNeighFacesOfEdges() const {
81 return m_listNeighFacesOfEdges;
82 }
83 inline const std::vector < shar_ptrVol > & listNeighVolumesOfEdges() const {
84 return m_listNeighVolumesOfEdges;
85 }
86 inline const felInt & idOnlySupporting() const {
87 return m_idOnlySupporting;
88 }
89
90 // setter
91 // ======
92 15994914 inline Edge* & ptrNext() {
93 15994914 return m_ptrNext;
94 }
95 5 inline felInt & idBeg() {
96 5 return m_idBeg;
97 }
98 23969569 inline felInt & idEnd() {
99 23969569 return m_idEnd;
100 }
101 7734669 inline felInt & id() {
102 7734669 return m_id;
103 }
104 1988039 inline std::vector < shar_ptrFace > & listNeighFacesOfEdges() {
105 1988039 return m_listNeighFacesOfEdges;
106 }
107 273600 inline std::vector < shar_ptrVol > & listNeighVolumesOfEdges() {
108 273600 return m_listNeighVolumesOfEdges;
109 }
110 10728 inline felInt & idOnlySupporting() {
111 10728 return m_idOnlySupporting;
112 }
113 int numOfDofSupported(const RefElement& refEle) const;
114
115 // print an edge
116 // =============
117 void print( std::ostream& outstr = std::cout, int verbose = 0, bool printNextEdge = false) const;
118 };
119
120 }
121
122 #endif
123