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: S. Gilles |
13 |
|
|
// |
14 |
|
|
|
15 |
|
|
/*! |
16 |
|
|
\file ElasticityModel.hpp |
17 |
|
|
\authors S. Gilles |
18 |
|
|
\date 21/02/2013 |
19 |
|
|
\brief Model to manage elasticity problem. |
20 |
|
|
*/ |
21 |
|
|
|
22 |
|
|
#ifndef __FELISCE_ELASTICITY_MODEL_DYNAMIC_HPP__ |
23 |
|
|
# define __FELISCE_ELASTICITY_MODEL_DYNAMIC_HPP__ |
24 |
|
|
|
25 |
|
|
// System includes |
26 |
|
|
|
27 |
|
|
// External includes |
28 |
|
|
|
29 |
|
|
// Project includes |
30 |
|
|
#include "Model/model.hpp" |
31 |
|
|
#include "Core/felisceParam.hpp" |
32 |
|
|
|
33 |
|
|
namespace felisce |
34 |
|
|
{ |
35 |
|
|
///@name felisce Globals |
36 |
|
|
///@{ |
37 |
|
|
|
38 |
|
|
///@} |
39 |
|
|
///@name Type Definitions |
40 |
|
|
///@{ |
41 |
|
|
|
42 |
|
|
///@} |
43 |
|
|
///@name Enum's |
44 |
|
|
///@{ |
45 |
|
|
|
46 |
|
|
///@} |
47 |
|
|
///@name Functions |
48 |
|
|
///@{ |
49 |
|
|
|
50 |
|
|
///@} |
51 |
|
|
///@name felisce Classes |
52 |
|
|
///@{ |
53 |
|
|
class ElasticityModel |
54 |
|
|
: public Model |
55 |
|
|
{ |
56 |
|
|
public: |
57 |
|
|
///@name Type Definitions |
58 |
|
|
///@{ |
59 |
|
|
|
60 |
|
|
///@} |
61 |
|
|
///@name Life Cycle |
62 |
|
|
///@{ |
63 |
|
|
|
64 |
|
|
//!Construtor. |
65 |
|
|
ElasticityModel(); |
66 |
|
|
|
67 |
|
|
//!Destructor. |
68 |
|
|
~ElasticityModel() override; |
69 |
|
|
|
70 |
|
|
///@} |
71 |
|
|
///@name Operators |
72 |
|
|
///@{ |
73 |
|
|
|
74 |
|
|
///@} |
75 |
|
|
///@name Operations |
76 |
|
|
///@{ |
77 |
|
|
|
78 |
|
|
//! Solve the problem with the initial conditions. |
79 |
|
|
void SolveStaticProblem() override; |
80 |
|
|
|
81 |
|
|
/*! |
82 |
|
|
* \brief Solve the dynamic problem. |
83 |
|
|
* |
84 |
|
|
* A call to this method performs all the work, including initial call to solve the static problem. |
85 |
|
|
*/ |
86 |
|
|
void SolveDynamicProblem() override; |
87 |
|
|
|
88 |
|
|
//! Function to get size of the state std::vector. |
89 |
|
|
int getNstate() const override; |
90 |
|
|
|
91 |
|
|
//! Function to get state std::vector. |
92 |
|
|
void getState(double* & state) override; |
93 |
|
|
virtual void getState_swig(double* data, felInt numDof); |
94 |
|
|
|
95 |
|
|
//! Function to std::set state std::vector. |
96 |
|
|
void setState(double* & state) override; |
97 |
|
|
|
98 |
|
|
//! If some data related to the model must be read from data file |
99 |
|
36 |
void initializeDerivedModel() override {} |
100 |
|
|
|
101 |
|
|
///@} |
102 |
|
|
///@name Access |
103 |
|
|
///@{ |
104 |
|
|
|
105 |
|
|
///@} |
106 |
|
|
///@name Inquiry |
107 |
|
|
///@{ |
108 |
|
|
|
109 |
|
|
///@} |
110 |
|
|
///@name Input and output |
111 |
|
|
///@{ |
112 |
|
|
|
113 |
|
|
///@} |
114 |
|
|
///@name Friends |
115 |
|
|
///@{ |
116 |
|
|
|
117 |
|
|
///@} |
118 |
|
|
protected: |
119 |
|
|
///@name Protected Life Cycle |
120 |
|
|
///@{ |
121 |
|
|
|
122 |
|
|
///@} |
123 |
|
|
///@name Protected static Member Variables |
124 |
|
|
///@{ |
125 |
|
|
|
126 |
|
|
///@} |
127 |
|
|
///@name Protected member Variables |
128 |
|
|
///@{ |
129 |
|
|
|
130 |
|
|
///@} |
131 |
|
|
///@name Protected Operators |
132 |
|
|
///@{ |
133 |
|
|
|
134 |
|
|
///@} |
135 |
|
|
///@name Protected Operations |
136 |
|
|
///@{ |
137 |
|
|
|
138 |
|
|
///@} |
139 |
|
|
///@name Protected Operators |
140 |
|
|
///@{ |
141 |
|
|
|
142 |
|
|
///@} |
143 |
|
|
///@name Protected Operations |
144 |
|
|
///@{ |
145 |
|
|
|
146 |
|
|
///@} |
147 |
|
|
///@name Protected Access |
148 |
|
|
///@{ |
149 |
|
|
|
150 |
|
|
///@} |
151 |
|
|
///@name Protected Inquiry |
152 |
|
|
///@{ |
153 |
|
|
|
154 |
|
|
///@} |
155 |
|
|
///@name Protected LifeCycle |
156 |
|
|
///@{ |
157 |
|
|
|
158 |
|
|
///@} |
159 |
|
|
private: |
160 |
|
|
///@name Private Life Cycle |
161 |
|
|
///@{ |
162 |
|
|
|
163 |
|
|
///@} |
164 |
|
|
///@name Private Operators |
165 |
|
|
///@{ |
166 |
|
|
|
167 |
|
|
///@} |
168 |
|
|
///@name Private Operations |
169 |
|
|
///@{ |
170 |
|
|
|
171 |
|
|
//! Assemble once and for all matrices required in Newmark scheme. |
172 |
|
|
void AssembleNewmarkMatrices(); |
173 |
|
|
|
174 |
|
|
//! Update time. First matrix in LinearProblem::Matrix() is not cleared here, contrary to method in parent class. |
175 |
|
|
void updateTime(const FlagMatrixRHS flagMatrixRHS=FlagMatrixRHS::matrix_and_rhs) override; |
176 |
|
|
|
177 |
|
|
//! Manage time iteration. |
178 |
|
|
void forward() override; |
179 |
|
|
///@} |
180 |
|
|
///@name Private static Member Variables |
181 |
|
|
///@{ |
182 |
|
|
|
183 |
|
|
///@} |
184 |
|
|
///@name Private member Variables |
185 |
|
|
///@{ |
186 |
|
|
|
187 |
|
|
///@} |
188 |
|
|
///@name Private Operations |
189 |
|
|
///@{ |
190 |
|
|
|
191 |
|
|
///@} |
192 |
|
|
///@name Private static Member Variables |
193 |
|
|
///@{ |
194 |
|
|
|
195 |
|
|
///@} |
196 |
|
|
///@name Private member Variables |
197 |
|
|
///@{ |
198 |
|
|
|
199 |
|
|
///@} |
200 |
|
|
///@name Private Operators |
201 |
|
|
///@{ |
202 |
|
|
|
203 |
|
|
///@} |
204 |
|
|
///@name Private Operations |
205 |
|
|
///@{ |
206 |
|
|
|
207 |
|
|
///@} |
208 |
|
|
///@name Private Access |
209 |
|
|
///@{ |
210 |
|
|
|
211 |
|
|
///@} |
212 |
|
|
///@name Private Inquiry |
213 |
|
|
///@{ |
214 |
|
|
|
215 |
|
|
///@} |
216 |
|
|
///@name Private LifeCycle |
217 |
|
|
///@{ |
218 |
|
|
|
219 |
|
|
///@} |
220 |
|
|
}; |
221 |
|
|
|
222 |
|
|
///@} |
223 |
|
|
///@name Type Definitions |
224 |
|
|
///@{ |
225 |
|
|
|
226 |
|
|
///@} |
227 |
|
|
|
228 |
|
|
} // namespace felisce |
229 |
|
|
|
230 |
|
|
#endif // __FELISCE_ELASTICITY_MODEL_HPP__ |
231 |
|
|
|