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. Foulon |
13 |
|
|
// |
14 |
|
|
|
15 |
|
|
/*! |
16 |
|
|
\file variable.hpp |
17 |
|
|
\author J. Foulon |
18 |
|
|
\date 07/10/2010 |
19 |
|
|
\brief File where is define an physical Felisce's variable |
20 |
|
|
*/ |
21 |
|
|
|
22 |
|
|
#ifndef VARIABLE_H |
23 |
|
|
#define VARIABLE_H |
24 |
|
|
|
25 |
|
|
// System includes |
26 |
|
|
|
27 |
|
|
// External includes |
28 |
|
|
|
29 |
|
|
// Project includes |
30 |
|
|
#include "Core/felisce.hpp" |
31 |
|
|
#include "Core/felisceParam.hpp" |
32 |
|
|
#include "FiniteElement/quadratureRule.hpp" |
33 |
|
|
|
34 |
|
|
namespace felisce { |
35 |
|
|
|
36 |
|
|
class Variable { |
37 |
|
|
|
38 |
|
|
private: |
39 |
|
|
bool m_boolInitialize; |
40 |
|
|
/// name of the variable ( Velocity, Pressure, Temperature, potExtraCell, potTransMemb ...) |
41 |
|
|
std::string m_name; |
42 |
|
|
/// PhysicalVariable is an enum (velocity, pressure, etc.) defined in Core/felisce.hpp |
43 |
|
|
PhysicalVariable m_physicalVariable; |
44 |
|
|
/// number of components ( scalar, vectorial variable) |
45 |
|
|
std::size_t m_numComponent; |
46 |
|
|
/// id of the mesh associated to this variable |
47 |
|
|
std::size_t m_idMesh; |
48 |
|
|
/// type of element use with this variable (linear = 0, quadratic = 1 (P1/P2, Q1/Q2, ...) ) |
49 |
|
|
int m_finiteElementType; |
50 |
|
|
/// degree of exactness of the integration formula |
51 |
|
|
std::vector<DegreeOfExactness> m_degreeOfExactness = std::vector<DegreeOfExactness>(1); |
52 |
|
|
|
53 |
|
|
public: |
54 |
|
|
// Constructor |
55 |
|
|
//============ |
56 |
|
|
Variable(); |
57 |
|
|
|
58 |
|
|
/*! |
59 |
|
|
\brief Method initialize read data file and create variable number iVar. |
60 |
|
|
\param[in] iVar number of the variable |
61 |
|
|
*/ |
62 |
|
|
void initialize(const std::size_t iVar, std::size_t instanceIndex=0); |
63 |
|
|
|
64 |
|
|
// Printer |
65 |
|
|
//======== |
66 |
|
|
void print(int verbose = 0, std::ostream& outstr = std::cout) const; |
67 |
|
|
|
68 |
|
|
//Set functions |
69 |
|
|
//============= |
70 |
|
|
void setNumComponent(const std::size_t nComp); |
71 |
|
|
void setMeshId(const std::size_t meshId); |
72 |
|
|
|
73 |
|
|
// Access Functions |
74 |
|
|
//================= |
75 |
|
9417 |
inline std::string name() const { |
76 |
|
9417 |
return m_name; |
77 |
|
|
} |
78 |
|
|
|
79 |
|
1968004 |
inline const PhysicalVariable & physicalVariable() const { |
80 |
|
1968004 |
return m_physicalVariable; |
81 |
|
|
} |
82 |
|
|
|
83 |
|
3322913047 |
inline const std::size_t& numComponent() const { |
84 |
|
3322913047 |
return m_numComponent; |
85 |
|
|
} |
86 |
|
|
|
87 |
|
51055103 |
inline const std::size_t& idMesh() const { |
88 |
|
51055103 |
return m_idMesh; |
89 |
|
|
} |
90 |
|
|
|
91 |
|
25702998 |
inline const int& finiteElementType() const { |
92 |
|
25702998 |
return m_finiteElementType; |
93 |
|
|
} |
94 |
|
|
|
95 |
|
32043 |
inline const std::vector<DegreeOfExactness>& getDegreeOfExactness() const { |
96 |
|
32043 |
return m_degreeOfExactness; |
97 |
|
|
} |
98 |
|
|
|
99 |
|
65168 |
inline const DegreeOfExactness& degreeOfExactness(const std::size_t Index = 0) const { |
100 |
|
65168 |
return m_degreeOfExactness[Index]; |
101 |
|
|
} |
102 |
|
|
}; |
103 |
|
|
} |
104 |
|
|
|
105 |
|
|
#endif |
106 |
|
|
|