GCC Code Coverage Report


Directory: ./
File: Geometry/geometricEdges.cpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 8 23 34.8%
Branches: 1 14 7.1%

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:
13 //
14
15 // System includes
16
17 // External includes
18
19 // Project includes
20 #include "Geometry/geometricEdges.hpp"
21 #include "Geometry/neighFacesOfEdges.hpp"
22 #include "Geometry/neighVolumesOfEdges.hpp"
23
24 namespace felisce
25 {
26 ////////////////
27 // EDGE CLASS //
28 ////////////////
29
30 //----------------
31 187184 Edge::Edge(const felInt & anIdBeg, const felInt & anIdEnd, const felInt & idEdge) :
32 187184 m_ptrNext(nullptr), m_idBeg(anIdBeg), m_idEnd(anIdEnd),m_id(idEdge),m_idOnlySupporting(-1)
33 187184 {}
34
35 5544 int Edge::numOfDofSupported(const RefElement& refEle) const {
36 5544 int ndof(0);
37 // We check in volume neighbour how many dofs this edge has.
38 // It is useless to check all the neighbour since they have to compatible.
39
1/2
✓ Branch 1 taken 5544 times.
✗ Branch 2 not taken.
5544 if ( m_listNeighVolumesOfEdges.size()>0 )
40 5544 ndof=refEle.numDOFPerEdge(m_listNeighVolumesOfEdges[0]->idLocalEdge());
41 5544 return ndof;
42 }
43 //----------------
44 void Edge::print( std::ostream& outstr, int verbose, bool printNextEdge ) const {
45 outstr << m_idBeg << " " << m_idEnd << " " << m_id << "\t";
46 if (verbose <= 1) {
47 outstr << " numNeighFacesOfEdges = " << m_listNeighFacesOfEdges.size();
48 outstr << " numNeighVolumesOfEdges = " << m_listNeighVolumesOfEdges.size();
49 } else {
50 for (unsigned int ineigh = 0 ; ineigh < m_listNeighFacesOfEdges.size(); ineigh++) {
51 m_listNeighFacesOfEdges[ineigh]->print(outstr, verbose);
52 }
53 outstr << "++ || ";
54 for (unsigned int ineigh = 0 ; ineigh < m_listNeighVolumesOfEdges.size(); ineigh++) {
55 m_listNeighVolumesOfEdges[ineigh]->print(outstr, verbose);
56 }
57 }
58 outstr << std::endl;
59 if ( printNextEdge ) {
60 if (m_ptrNext == nullptr) {
61 if ( verbose > 30 ) outstr << "-> NULL " << std::endl;
62 } else {
63 m_ptrNext->print(outstr, verbose);
64 }
65 }
66 }
67 }
68