Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / Simulink / src_many_files / inv2_2x3_inv3_3x4_inv4.LUSTREC.lus @ cd1faebc

History | View | Annotate | Download (13.4 KB)

1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:52:23
5
node  _inv_M_2x2(a11 : real;
6
	a21 : real;
7
	a12 : real;
8
	a22 : real;)
9
returns(ai11 : real;
10
	ai21 : real;
11
	ai12 : real;
12
	ai22 : real;);
13
var det : real;
14
	adj11 : real;
15
	adj12 : real;
16
	adj21 : real;
17
	adj22 : real;
18
let
19
	assert (det <> 0.0);
20
	det = ((a11 * a22) - (a12 * a21));
21
	adj11 = a22;
22
	adj12 = (- a12);
23
	adj21 = (- a21);
24
	adj22 = a11;
25
	ai11 = (adj11 / det);
26
	ai12 = (adj12 / det);
27
	ai21 = (adj21 / det);
28
	ai22 = (adj22 / det);
29
tel
30

    
31
node  _inv_M_3x3(a11 : real;
32
	a21 : real;
33
	a31 : real;
34
	a12 : real;
35
	a22 : real;
36
	a32 : real;
37
	a13 : real;
38
	a23 : real;
39
	a33 : real;)
40
returns(ai11 : real;
41
	ai21 : real;
42
	ai31 : real;
43
	ai12 : real;
44
	ai22 : real;
45
	ai32 : real;
46
	ai13 : real;
47
	ai23 : real;
48
	ai33 : real;);
49
var det : real;
50
	adj11 : real;
51
	adj12 : real;
52
	adj13 : real;
53
	adj21 : real;
54
	adj22 : real;
55
	adj23 : real;
56
	adj31 : real;
57
	adj32 : real;
58
	adj33 : real;
59
let
60
	assert (det <> 0.0);
61
	det = (((a11 * adj11) + (a12 * adj21)) + (a13 * adj31));
62
	adj11 = ((a22 * a33) - (a23 * a32));
63
	adj21 = ((a23 * a31) - (a21 * a33));
64
	adj31 = ((a21 * a32) - (a31 * a22));
65
	adj12 = ((a13 * a32) - (a33 * a12));
66
	adj22 = ((a11 * a33) - (a13 * a31));
67
	adj32 = ((a12 * a31) - (a32 * a11));
68
	adj13 = ((a12 * a23) - (a22 * a13));
69
	adj23 = ((a13 * a21) - (a23 * a11));
70
	adj33 = ((a11 * a22) - (a21 * a12));
71
	ai11 = (adj11 / det);
72
	ai12 = (adj12 / det);
73
	ai13 = (adj13 / det);
74
	ai21 = (adj21 / det);
75
	ai22 = (adj22 / det);
76
	ai23 = (adj23 / det);
77
	ai31 = (adj31 / det);
78
	ai32 = (adj32 / det);
79
	ai33 = (adj33 / det);
80
tel
81

    
82
node  _inv_M_4x4(a11 : real;
83
	a21 : real;
84
	a31 : real;
85
	a41 : real;
86
	a12 : real;
87
	a22 : real;
88
	a32 : real;
89
	a42 : real;
90
	a13 : real;
91
	a23 : real;
92
	a33 : real;
93
	a43 : real;
94
	a14 : real;
95
	a24 : real;
96
	a34 : real;
97
	a44 : real;)
98
returns(ai11 : real;
99
	ai21 : real;
100
	ai31 : real;
101
	ai41 : real;
102
	ai12 : real;
103
	ai22 : real;
104
	ai32 : real;
105
	ai42 : real;
106
	ai13 : real;
107
	ai23 : real;
108
	ai33 : real;
109
	ai43 : real;
110
	ai14 : real;
111
	ai24 : real;
112
	ai34 : real;
113
	ai44 : real;);
114
var det : real;
115
	adj11 : real;
116
	adj12 : real;
117
	adj13 : real;
118
	adj14 : real;
119
	adj21 : real;
120
	adj22 : real;
121
	adj23 : real;
122
	adj24 : real;
123
	adj31 : real;
124
	adj32 : real;
125
	adj33 : real;
126
	adj34 : real;
127
	adj41 : real;
128
	adj42 : real;
129
	adj43 : real;
130
	adj44 : real;
131
let
132
	assert (det <> 0.0);
133
	det = (((a11 * adj11) + (a21 * adj12)) + ((a31 * adj13) + (a41 * adj14)));
134
	adj11 = (( ( a22 * a33 * a44 ) + ( a23 * a34 * a42 ) + ( a24 * a32 * a43 ) ) - ( ( a24 * a33 * a42 ) + ( a23 * a32 * a44 ) + ( a22 * a34 * a43 ) ));
135
	adj12 = (( ( a14 * a33 * a42 ) + ( a13 * a32 * a44 ) + ( a12 * a34 * a43 ) ) - ( ( a12 * a33 * a44 ) + ( a13 * a34 * a42 ) + ( a14 * a32 * a43 ) ));
136
	adj13 = (( ( a12 * a23 * a44 ) + ( a13 * a24 * a42 ) + ( a14 * a22 * a43 ) ) - ( ( a14 * a23 * a42 ) + ( a13 * a22 * a44 ) + ( a12 * a24 * a43 ) ));
137
	adj14 = (( ( a14 * a23 * a32 ) + ( a13 * a22 * a34 ) + ( a12 * a24 * a33 ) ) - ( ( a12 * a23 * a34 ) + ( a13 * a24 * a32 ) + ( a14 * a22 * a33 ) ));
138
	adj21 = (( ( a24 * a33 * a41 ) + ( a23 * a31 * a44 ) + ( a21 * a34 * a43 ) ) - ( ( a21 * a33 * a44 ) + ( a23 * a34 * a41 ) + ( a24 * a31 * a43 ) ));
139
	adj22 = (( ( a11 * a33 * a44 ) + ( a13 * a34 * a41 ) + ( a14 * a31 * a43 ) ) - ( ( a14 * a33 * a41 ) + ( a13 * a31 * a44 ) + ( a11 * a34 * a43 ) ));
140
	adj23 = (( ( a14 * a23 * a41 ) + ( a13 * a21 * a44 ) + ( a11 * a24 * a43 ) ) - ( ( a11 * a23 * a44 ) + ( a13 * a24 * a41 ) + ( a14 * a21 * a43 ) ));
141
	adj24 = (( ( a11 * a23 * a34 ) + ( a13 * a24 * a31 ) + ( a14 * a21 * a33 ) ) - ( ( a14 * a23 * a31 ) + ( a13 * a21 * a34 ) + ( a11 * a24 * a33 ) ));
142
	adj31 = (( ( a21 * a32 * a44 ) + ( a22 * a34 * a41 ) + ( a24 * a31 * a42 ) ) - ( ( a24 * a32 * a41 ) + ( a22 * a31 * a44 ) + ( a21 * a34 * a42 ) ));
143
	adj32 = (( ( a14 * a32 * a41 ) + ( a12 * a31 * a44 ) + ( a11 * a34 * a42 ) ) - ( ( a11 * a32 * a44 ) + ( a12 * a34 * a41 ) + ( a14 * a31 * a42 ) ));
144
	adj33 = (( ( a11 * a22 * a44 ) + ( a12 * a24 * a41 ) + ( a14 * a21 * a42 ) ) - ( ( a14 * a22 * a41 ) + ( a12 * a21 * a44 ) + ( a11 * a24 * a42 ) ));
145
	adj34 = (( ( a14 * a22 * a31 ) + ( a12 * a21 * a34 ) + ( a11 * a24 * a32 ) ) - ( ( a11 * a22 * a34 ) + ( a12 * a24 * a31 ) + ( a14 * a21 * a32 ) ));
146
	adj41 = (( ( a23 * a32 * a41 ) + ( a22 * a31 * a43 ) + ( a21 * a33 * a42 ) ) - ( ( a21 * a32 * a43 ) + ( a22 * a33 * a41 ) + ( a23 * a31 * a42 ) ));
147
	adj42 = (( ( a11 * a32 * a43 ) + ( a12 * a33 * a41 ) + ( a13 * a31 * a42 ) ) - ( ( a13 * a32 * a41 ) + ( a12 * a31 * a43 ) + ( a11 * a33 * a42 ) ));
148
	adj43 = (( ( a13 * a22 * a41 ) + ( a12 * a21 * a43 ) + ( a11 * a23 * a42 ) ) - ( ( a11 * a22 * a43 ) + ( a12 * a23 * a41 ) + ( a13 * a21 * a42 ) ));
149
	adj44 = (( ( a11 * a22 * a33 ) + ( a12 * a23 * a31 ) + ( a13 * a21 * a32 ) ) - ( ( a13 * a22 * a31 ) + ( a12 * a21 * a33 ) + ( a11 * a23 * a32 ) ));
150
	ai11 = (adj11 / det);
151
	ai12 = (adj12 / det);
152
	ai13 = (adj13 / det);
153
	ai14 = (adj14 / det);
154
	ai21 = (adj21 / det);
155
	ai22 = (adj22 / det);
156
	ai23 = (adj23 / det);
157
	ai24 = (adj24 / det);
158
	ai31 = (adj31 / det);
159
	ai32 = (adj32 / det);
160
	ai33 = (adj33 / det);
161
	ai34 = (adj34 / det);
162
	ai41 = (adj41 / det);
163
	ai42 = (adj42 / det);
164
	ai43 = (adj43 / det);
165
	ai44 = (adj44 / det);
166
tel
167

    
168
(*
169
Original block name: inv2_2x3_inv3_3x4_inv4
170
*)
171
node  inv2_2x3_inv3_3x4_inv4(A_1 : real;
172
	A_2 : real;
173
	A_3 : real;
174
	A_4 : real;
175
	B_1 : real;
176
	B_2 : real;
177
	B_3 : real;
178
	B_4 : real;
179
	B_5 : real;
180
	B_6 : real;
181
	B1_1 : real;
182
	B1_2 : real;
183
	B1_3 : real;
184
	B1_4 : real;
185
	B1_5 : real;
186
	B1_6 : real;
187
	B1_7 : real;
188
	B1_8 : real;
189
	B1_9 : real;
190
	B2_1 : real;
191
	B2_2 : real;
192
	B2_3 : real;
193
	B2_4 : real;
194
	B2_5 : real;
195
	B2_6 : real;
196
	B2_7 : real;
197
	B2_8 : real;
198
	B2_9 : real;
199
	B2_10 : real;
200
	B2_11 : real;
201
	B2_12 : real;
202
	B3_1 : real;
203
	B3_2 : real;
204
	B3_3 : real;
205
	B3_4 : real;
206
	B3_5 : real;
207
	B3_6 : real;
208
	B3_7 : real;
209
	B3_8 : real;
210
	B3_9 : real;
211
	B3_10 : real;
212
	B3_11 : real;
213
	B3_12 : real;
214
	B3_13 : real;
215
	B3_14 : real;
216
	B3_15 : real;
217
	B3_16 : real;)
218
returns(Out2_1 : real;
219
	Out2_2 : real;
220
	Out2_3 : real;
221
	Out2_4 : real;
222
	Out2_5 : real;
223
	Out2_6 : real;
224
	Out2_7 : real;
225
	Out2_8 : real;);
226
var Divide1_1 : real;
227
	Divide1_2 : real;
228
	Divide1_3 : real;
229
	Divide1_4 : real;
230
	Divide1_5 : real;
231
	Divide1_6 : real;
232
	Divide1_7 : real;
233
	Divide1_8 : real;
234
	A_1_inv_13_173 : real;
235
	A_2_inv_13_173 : real;
236
	A_3_inv_13_173 : real;
237
	A_4_inv_13_173 : real;
238
	B1_1_inv_13_173 : real;
239
	B1_2_inv_13_173 : real;
240
	B1_3_inv_13_173 : real;
241
	B1_4_inv_13_173 : real;
242
	B1_5_inv_13_173 : real;
243
	B1_6_inv_13_173 : real;
244
	B1_7_inv_13_173 : real;
245
	B1_8_inv_13_173 : real;
246
	B1_9_inv_13_173 : real;
247
	B3_1_inv_13_173 : real;
248
	B3_2_inv_13_173 : real;
249
	B3_3_inv_13_173 : real;
250
	B3_4_inv_13_173 : real;
251
	B3_5_inv_13_173 : real;
252
	B3_6_inv_13_173 : real;
253
	B3_7_inv_13_173 : real;
254
	B3_8_inv_13_173 : real;
255
	B3_9_inv_13_173 : real;
256
	B3_10_inv_13_173 : real;
257
	B3_11_inv_13_173 : real;
258
	B3_12_inv_13_173 : real;
259
	B3_13_inv_13_173 : real;
260
	B3_14_inv_13_173 : real;
261
	B3_15_inv_13_173 : real;
262
	B3_16_inv_13_173 : real;
263
	Divide1_13_173_matrix_mult_1_1 : real;
264
	Divide1_13_173_matrix_mult_1_2 : real;
265
	Divide1_13_173_matrix_mult_1_3 : real;
266
	Divide1_13_173_matrix_mult_1_4 : real;
267
	Divide1_13_173_matrix_mult_1_5 : real;
268
	Divide1_13_173_matrix_mult_1_6 : real;
269
	Divide1_13_173_matrix_mult_2_1 : real;
270
	Divide1_13_173_matrix_mult_2_2 : real;
271
	Divide1_13_173_matrix_mult_2_3 : real;
272
	Divide1_13_173_matrix_mult_2_4 : real;
273
	Divide1_13_173_matrix_mult_2_5 : real;
274
	Divide1_13_173_matrix_mult_2_6 : real;
275
	Divide1_13_173_matrix_mult_3_1 : real;
276
	Divide1_13_173_matrix_mult_3_2 : real;
277
	Divide1_13_173_matrix_mult_3_3 : real;
278
	Divide1_13_173_matrix_mult_3_4 : real;
279
	Divide1_13_173_matrix_mult_3_5 : real;
280
	Divide1_13_173_matrix_mult_3_6 : real;
281
	Divide1_13_173_matrix_mult_3_7 : real;
282
	Divide1_13_173_matrix_mult_3_8 : real;
283
	__time_step : real;
284
	__nb_step : int;
285
let
286
	(A_1_inv_13_173, A_2_inv_13_173, A_3_inv_13_173, A_4_inv_13_173) = _inv_M_2x2(A_1, A_2, A_3, A_4);
287
	(B1_1_inv_13_173, B1_2_inv_13_173, B1_3_inv_13_173, B1_4_inv_13_173, B1_5_inv_13_173, B1_6_inv_13_173, B1_7_inv_13_173, B1_8_inv_13_173, B1_9_inv_13_173) = _inv_M_3x3(B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9);
288
	(B3_1_inv_13_173, B3_2_inv_13_173, B3_3_inv_13_173, B3_4_inv_13_173, B3_5_inv_13_173, B3_6_inv_13_173, B3_7_inv_13_173, B3_8_inv_13_173, B3_9_inv_13_173, B3_10_inv_13_173, B3_11_inv_13_173, B3_12_inv_13_173, B3_13_inv_13_173, B3_14_inv_13_173, B3_15_inv_13_173, B3_16_inv_13_173) = _inv_M_4x4(B3_1, B3_2, B3_3, B3_4, B3_5, B3_6, B3_7, B3_8, B3_9, B3_10, B3_11, B3_12, B3_13, B3_14, B3_15, B3_16);
289
	Divide1_13_173_matrix_mult_1_1 = 0.0 + (A_1_inv_13_173 * B_1) + (A_3_inv_13_173 * B_2);
290
	Divide1_13_173_matrix_mult_1_3 = 0.0 + (A_1_inv_13_173 * B_3) + (A_3_inv_13_173 * B_4);
291
	Divide1_13_173_matrix_mult_1_5 = 0.0 + (A_1_inv_13_173 * B_5) + (A_3_inv_13_173 * B_6);
292
	Divide1_13_173_matrix_mult_1_2 = 0.0 + (A_2_inv_13_173 * B_1) + (A_4_inv_13_173 * B_2);
293
	Divide1_13_173_matrix_mult_1_4 = 0.0 + (A_2_inv_13_173 * B_3) + (A_4_inv_13_173 * B_4);
294
	Divide1_13_173_matrix_mult_1_6 = 0.0 + (A_2_inv_13_173 * B_5) + (A_4_inv_13_173 * B_6);
295
	Divide1_13_173_matrix_mult_2_1 = 0.0 + (Divide1_13_173_matrix_mult_1_1 * B1_1_inv_13_173) + (Divide1_13_173_matrix_mult_1_3 * B1_2_inv_13_173) + (Divide1_13_173_matrix_mult_1_5 * B1_3_inv_13_173);
296
	Divide1_13_173_matrix_mult_2_3 = 0.0 + (Divide1_13_173_matrix_mult_1_1 * B1_4_inv_13_173) + (Divide1_13_173_matrix_mult_1_3 * B1_5_inv_13_173) + (Divide1_13_173_matrix_mult_1_5 * B1_6_inv_13_173);
297
	Divide1_13_173_matrix_mult_2_5 = 0.0 + (Divide1_13_173_matrix_mult_1_1 * B1_7_inv_13_173) + (Divide1_13_173_matrix_mult_1_3 * B1_8_inv_13_173) + (Divide1_13_173_matrix_mult_1_5 * B1_9_inv_13_173);
298
	Divide1_13_173_matrix_mult_2_2 = 0.0 + (Divide1_13_173_matrix_mult_1_2 * B1_1_inv_13_173) + (Divide1_13_173_matrix_mult_1_4 * B1_2_inv_13_173) + (Divide1_13_173_matrix_mult_1_6 * B1_3_inv_13_173);
299
	Divide1_13_173_matrix_mult_2_4 = 0.0 + (Divide1_13_173_matrix_mult_1_2 * B1_4_inv_13_173) + (Divide1_13_173_matrix_mult_1_4 * B1_5_inv_13_173) + (Divide1_13_173_matrix_mult_1_6 * B1_6_inv_13_173);
300
	Divide1_13_173_matrix_mult_2_6 = 0.0 + (Divide1_13_173_matrix_mult_1_2 * B1_7_inv_13_173) + (Divide1_13_173_matrix_mult_1_4 * B1_8_inv_13_173) + (Divide1_13_173_matrix_mult_1_6 * B1_9_inv_13_173);
301
	Divide1_13_173_matrix_mult_3_1 = 0.0 + (Divide1_13_173_matrix_mult_2_1 * B2_1) + (Divide1_13_173_matrix_mult_2_3 * B2_2) + (Divide1_13_173_matrix_mult_2_5 * B2_3);
302
	Divide1_13_173_matrix_mult_3_3 = 0.0 + (Divide1_13_173_matrix_mult_2_1 * B2_4) + (Divide1_13_173_matrix_mult_2_3 * B2_5) + (Divide1_13_173_matrix_mult_2_5 * B2_6);
303
	Divide1_13_173_matrix_mult_3_5 = 0.0 + (Divide1_13_173_matrix_mult_2_1 * B2_7) + (Divide1_13_173_matrix_mult_2_3 * B2_8) + (Divide1_13_173_matrix_mult_2_5 * B2_9);
304
	Divide1_13_173_matrix_mult_3_7 = 0.0 + (Divide1_13_173_matrix_mult_2_1 * B2_10) + (Divide1_13_173_matrix_mult_2_3 * B2_11) + (Divide1_13_173_matrix_mult_2_5 * B2_12);
305
	Divide1_13_173_matrix_mult_3_2 = 0.0 + (Divide1_13_173_matrix_mult_2_2 * B2_1) + (Divide1_13_173_matrix_mult_2_4 * B2_2) + (Divide1_13_173_matrix_mult_2_6 * B2_3);
306
	Divide1_13_173_matrix_mult_3_4 = 0.0 + (Divide1_13_173_matrix_mult_2_2 * B2_4) + (Divide1_13_173_matrix_mult_2_4 * B2_5) + (Divide1_13_173_matrix_mult_2_6 * B2_6);
307
	Divide1_13_173_matrix_mult_3_6 = 0.0 + (Divide1_13_173_matrix_mult_2_2 * B2_7) + (Divide1_13_173_matrix_mult_2_4 * B2_8) + (Divide1_13_173_matrix_mult_2_6 * B2_9);
308
	Divide1_13_173_matrix_mult_3_8 = 0.0 + (Divide1_13_173_matrix_mult_2_2 * B2_10) + (Divide1_13_173_matrix_mult_2_4 * B2_11) + (Divide1_13_173_matrix_mult_2_6 * B2_12);
309
	Divide1_1 = 0.0 + (Divide1_13_173_matrix_mult_3_1 * B3_1_inv_13_173) + (Divide1_13_173_matrix_mult_3_3 * B3_2_inv_13_173) + (Divide1_13_173_matrix_mult_3_5 * B3_3_inv_13_173) + (Divide1_13_173_matrix_mult_3_7 * B3_4_inv_13_173);
310
	Divide1_3 = 0.0 + (Divide1_13_173_matrix_mult_3_1 * B3_5_inv_13_173) + (Divide1_13_173_matrix_mult_3_3 * B3_6_inv_13_173) + (Divide1_13_173_matrix_mult_3_5 * B3_7_inv_13_173) + (Divide1_13_173_matrix_mult_3_7 * B3_8_inv_13_173);
311
	Divide1_5 = 0.0 + (Divide1_13_173_matrix_mult_3_1 * B3_9_inv_13_173) + (Divide1_13_173_matrix_mult_3_3 * B3_10_inv_13_173) + (Divide1_13_173_matrix_mult_3_5 * B3_11_inv_13_173) + (Divide1_13_173_matrix_mult_3_7 * B3_12_inv_13_173);
312
	Divide1_7 = 0.0 + (Divide1_13_173_matrix_mult_3_1 * B3_13_inv_13_173) + (Divide1_13_173_matrix_mult_3_3 * B3_14_inv_13_173) + (Divide1_13_173_matrix_mult_3_5 * B3_15_inv_13_173) + (Divide1_13_173_matrix_mult_3_7 * B3_16_inv_13_173);
313
	Divide1_2 = 0.0 + (Divide1_13_173_matrix_mult_3_2 * B3_1_inv_13_173) + (Divide1_13_173_matrix_mult_3_4 * B3_2_inv_13_173) + (Divide1_13_173_matrix_mult_3_6 * B3_3_inv_13_173) + (Divide1_13_173_matrix_mult_3_8 * B3_4_inv_13_173);
314
	Divide1_4 = 0.0 + (Divide1_13_173_matrix_mult_3_2 * B3_5_inv_13_173) + (Divide1_13_173_matrix_mult_3_4 * B3_6_inv_13_173) + (Divide1_13_173_matrix_mult_3_6 * B3_7_inv_13_173) + (Divide1_13_173_matrix_mult_3_8 * B3_8_inv_13_173);
315
	Divide1_6 = 0.0 + (Divide1_13_173_matrix_mult_3_2 * B3_9_inv_13_173) + (Divide1_13_173_matrix_mult_3_4 * B3_10_inv_13_173) + (Divide1_13_173_matrix_mult_3_6 * B3_11_inv_13_173) + (Divide1_13_173_matrix_mult_3_8 * B3_12_inv_13_173);
316
	Divide1_8 = 0.0 + (Divide1_13_173_matrix_mult_3_2 * B3_13_inv_13_173) + (Divide1_13_173_matrix_mult_3_4 * B3_14_inv_13_173) + (Divide1_13_173_matrix_mult_3_6 * B3_15_inv_13_173) + (Divide1_13_173_matrix_mult_3_8 * B3_16_inv_13_173);
317
	Out2_1 = Divide1_1;
318
	Out2_2 = Divide1_2;
319
	Out2_3 = Divide1_3;
320
	Out2_4 = Divide1_4;
321
	Out2_5 = Divide1_5;
322
	Out2_6 = Divide1_6;
323
	Out2_7 = Divide1_7;
324
	Out2_8 = Divide1_8;
325
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
326
	__nb_step = (0 -> ((pre __nb_step) + 1));
327
tel
328