Project

General

Profile

Download (2.21 KB) Statistics
| Branch: | Tag: | Revision:
1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:52:32
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
(*
32
Original block name: inv_M_2x2
33
*)
34
node  inv_M_2x2(A_1 : real;
35
	A_2 : real;
36
	A_3 : real;
37
	A_4 : real;
38
	B_1 : real;
39
	B_2 : real;
40
	B_3 : real;
41
	B_4 : real;
42
	C_1 : real;
43
	C_2 : real;
44
	C_3 : real;
45
	C_4 : real;)
46
returns(Out2_1 : real;
47
	Out2_2 : real;
48
	Out2_3 : real;
49
	Out2_4 : real;);
50
var Divide1_1 : real;
51
	Divide1_2 : real;
52
	Divide1_3 : real;
53
	Divide1_4 : real;
54
	B_1_inv_11_092 : real;
55
	B_2_inv_11_092 : real;
56
	B_3_inv_11_092 : real;
57
	B_4_inv_11_092 : real;
58
	Divide1_11_092_matrix_mult_1_1 : real;
59
	Divide1_11_092_matrix_mult_1_2 : real;
60
	Divide1_11_092_matrix_mult_1_3 : real;
61
	Divide1_11_092_matrix_mult_1_4 : real;
62
	__time_step : real;
63
	__nb_step : int;
64
let
65
	(B_1_inv_11_092, B_2_inv_11_092, B_3_inv_11_092, B_4_inv_11_092) = _inv_M_2x2(B_1, B_2, B_3, B_4);
66
	Divide1_11_092_matrix_mult_1_1 = 0.0 + (A_1 * B_1_inv_11_092) + (A_3 * B_2_inv_11_092);
67
	Divide1_11_092_matrix_mult_1_3 = 0.0 + (A_1 * B_3_inv_11_092) + (A_3 * B_4_inv_11_092);
68
	Divide1_11_092_matrix_mult_1_2 = 0.0 + (A_2 * B_1_inv_11_092) + (A_4 * B_2_inv_11_092);
69
	Divide1_11_092_matrix_mult_1_4 = 0.0 + (A_2 * B_3_inv_11_092) + (A_4 * B_4_inv_11_092);
70
	Divide1_1 = 0.0 + (Divide1_11_092_matrix_mult_1_1 * C_1) + (Divide1_11_092_matrix_mult_1_3 * C_2);
71
	Divide1_3 = 0.0 + (Divide1_11_092_matrix_mult_1_1 * C_3) + (Divide1_11_092_matrix_mult_1_3 * C_4);
72
	Divide1_2 = 0.0 + (Divide1_11_092_matrix_mult_1_2 * C_1) + (Divide1_11_092_matrix_mult_1_4 * C_2);
73
	Divide1_4 = 0.0 + (Divide1_11_092_matrix_mult_1_2 * C_3) + (Divide1_11_092_matrix_mult_1_4 * C_4);
74
	Out2_1 = Divide1_1;
75
	Out2_2 = Divide1_2;
76
	Out2_3 = Divide1_3;
77
	Out2_4 = Divide1_4;
78
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
79
	__nb_step = (0 -> ((pre __nb_step) + 1));
80
tel
81

    
(1078-1078/1153)