GCC Code Coverage Report


Directory: ./
File: FiniteElement/currentFiniteElementWithBd.hpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 6 8 75.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: JJ-F. Gerbeaun & V.Martin
13 //
14
15 #ifndef _CURRENT_FINITE_ELEMENT_WITH_BD_H
16 #define _CURRENT_FINITE_ELEMENT_WITH_BD_H
17
18 // System includes
19 #include <vector>
20
21 // External includes
22
23 // Project includes
24 #include "Core/felisce.hpp"
25 #include "currentFiniteElement.hpp"
26 #include "curvilinearFiniteElement.hpp"
27 #include "DegreeOfFreedom/dof.hpp"
28
29 namespace felisce {
30 /*!
31 \class CurrentFiniteElementWithBd
32 \authors J-F. Gerbeau and V. Martin
33 \brief Class implementing a finite element with its boundary faces
34 */
35 class CurrentFiniteElementWithBd:
36 public CurrentFiniteElement {
37 protected:
38
39 /// num of boundary elements
40 int m_numBdEle;
41
42 /// list of the point IDs on the boundary element
43 /// (m_pointBdEle[ibd][jptBd]: jth point ID of the ith boundary element)
44 std::vector< std::vector<int> > m_pointBdEle;
45
46 /// list of num of points on the boundary element
47 std::vector<int> m_numPointBdEle;
48
49 /// list of quadrature points on each boundary element of the reference element
50 /// (m_refQuadPointBdEle[ibd](jg): jth quad point of the ith boundary element)
51 std::vector<std::vector<Point>> m_refQuadPointBdEle;
52
53 /// list of num of quad points on the boundary element
54 std::vector<int> m_numQuadPointBdEle;
55
56 /// num total quad points : internal + boundary
57 int m_numQuadraturePointInternAndBd;
58
59 /// the list of boundary elements
60 CurvilinearFiniteElement** m_bdEle;
61
62 public:
63
64 /// constructors (vector of DegreeOfExactness)
65 CurrentFiniteElementWithBd(
66 const RefElement& refEle,
67 const GeoElement& geoEle,
68 const std::vector<DegreeOfExactness>& degOfExactness,
69 const DegreeOfExactness& degOfExactnessBd
70 );
71
72 /// constructors
73 CurrentFiniteElementWithBd(
74 const RefElement& refEle,const GeoElement& geoEle,
75 const DegreeOfExactness& degOfExactness,
76 const DegreeOfExactness& degOfExactnessBd
77 );
78
79 /// Destructor
80 ~CurrentFiniteElementWithBd() override;
81
82 /// what the use? REMOVE???
83 void mapBd(int iface,double& xref3d,double& yref3d,double& zref3d,double xref2d,double yref2d);
84
85
86 405472 inline std::vector<int> pointBdEle(int ibd) const {
87 405472 return m_pointBdEle[ibd];
88 }
89
90 4916888 inline int numBdEle() const {
91 4916888 return m_numBdEle;
92 }
93 inline int numPointBdEle(const std::size_t ibd) const {
94 return m_numPointBdEle[ibd];
95 }
96 const std::vector<Point>& refQuadPointBdEle(const std::size_t ibd) const {
97 return m_refQuadPointBdEle[ibd];
98 }
99 12873011 inline int numQuadPointBdEle(const std::size_t ibd) const {
100 12873011 return m_numQuadPointBdEle[ibd];
101 }
102 inline int numQuadraturePointInternAndBd() const {
103 return m_numQuadraturePointInternAndBd;
104 }
105
106 /// access to the boundary elements
107 const CurvilinearFiniteElement & bdEle( const std::size_t ibd ) const;
108 CurvilinearFiniteElement& bdEle( const std::size_t ibd );
109 CurvilinearFiniteElement* ptrBdEle(const std::size_t ibd) const;
110
111 /// minimal update: we just identify the id of a Bd element of the current element
112 void updateBd(); //TODO where is the implementation??
113
114 /// compute the arrays meas, weightDet, jacobian on all Bd elements of the current element
115 void updateBdMeas();
116 /// compute the arrays meas, weightDet, jacobian and quadPt ... TODO : complete the comment!
117 /// on all Bd elements of the current element
118 void updateBdMeasNormal();
119
120 /// compute the images of the quadrature points through the geometrical mapping ON ALL Quad points
121 /// (internal and on the boundary elements)
122 void computeCurrentQuadraturePointInternAndBd();
123
124 void printBd(int verbose,std::ostream& c=std::cout) const;
125
126 int Bd2Vol(const std::size_t iElBd, const std::size_t iElVol, const std::size_t dofBd, const std::size_t iCoor, const Dof& dof, const std::size_t idVar) const;
127 };
128 }
129
130 #endif
131