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 V.Martin |
13 |
|
|
// |
14 |
|
|
|
15 |
|
|
#ifndef GEOMETRICFACES_HPP |
16 |
|
|
#define GEOMETRICFACES_HPP |
17 |
|
|
|
18 |
|
|
// System includes |
19 |
|
|
#include <vector> |
20 |
|
|
#include <list> |
21 |
|
|
#include <iostream> |
22 |
|
|
|
23 |
|
|
// External includes |
24 |
|
|
|
25 |
|
|
// Project includes |
26 |
|
|
#include "Core/felisce.hpp" |
27 |
|
|
|
28 |
|
|
namespace felisce { |
29 |
|
|
/*! |
30 |
|
|
\class Face |
31 |
|
|
\authors J.Castelneau & J.Foulon |
32 |
|
|
|
33 |
|
|
\brief Class implementing a geometric face |
34 |
|
|
|
35 |
|
|
A face is defined by |
36 |
|
|
- its vertices |
37 |
|
|
- a list of volumes neighbours |
38 |
|
|
- a pointer on next face with same 1st vertex |
39 |
|
|
|
40 |
|
|
*/ |
41 |
|
|
class NeighVolumesOfFaces; |
42 |
|
|
|
43 |
|
|
class Face { |
44 |
|
|
private: |
45 |
|
|
Face *m_ptrNext; |
46 |
|
|
std::vector <felInt> m_vecFace; |
47 |
|
|
felInt m_id; |
48 |
|
|
std::vector < NeighVolumesOfFaces* > m_listNeighVolumes; |
49 |
|
|
|
50 |
|
|
public: |
51 |
|
|
|
52 |
|
|
// Constructor |
53 |
|
193437 |
Face(): m_ptrNext(nullptr), m_id(0) {} // todo: remove it vm 2012/08 |
54 |
|
|
Face(const std::vector <felInt>& ptOfFace, const felInt & idFace); |
55 |
|
|
~Face(); |
56 |
|
|
void copyFace(Face& face); |
57 |
|
|
|
58 |
|
|
// getters |
59 |
|
|
//inline const Face* & ptrNext() const { return m_ptrNext; } |
60 |
|
✗ |
inline const std::vector <felInt> & vecFace() const { |
61 |
|
✗ |
return m_vecFace; |
62 |
|
|
} |
63 |
|
|
inline const felInt & id() const { |
64 |
|
|
return m_id; |
65 |
|
|
} |
66 |
|
|
inline const std::vector < NeighVolumesOfFaces* > & listNeighVolumes() const { |
67 |
|
|
return m_listNeighVolumes; |
68 |
|
|
} |
69 |
|
|
|
70 |
|
|
// setters |
71 |
|
28447831 |
inline Face*& ptrNext() { |
72 |
|
28447831 |
return m_ptrNext; // todo: remove it vm 2012/08 |
73 |
|
|
} |
74 |
|
57335985 |
inline std::vector <felInt> & vecFace() { |
75 |
|
57335985 |
return m_vecFace; // todo: remove it?? vm 2012/08 |
76 |
|
|
} |
77 |
|
387322 |
inline felInt & id() { |
78 |
|
387322 |
return m_id; // todo: remove it vm 2012/08 |
79 |
|
|
} |
80 |
|
3826224 |
inline std::vector < NeighVolumesOfFaces* > & listNeighVolumes() { |
81 |
|
3826224 |
return m_listNeighVolumes; |
82 |
|
|
} |
83 |
|
|
|
84 |
|
|
// print a face |
85 |
|
|
void print( std::ostream& outstr = std::cout, int verbose = 0, bool printNextFace = false ) const; |
86 |
|
|
|
87 |
|
|
}; |
88 |
|
|
} |
89 |
|
|
|
90 |
|
|
#endif |
91 |
|
|
|