Xcos tests: recompilation at every call and context use
[scilab.git] / scilab / modules / scicos / tests / unit_tests / DDaskrN_RLC.dia.ref
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 // <-- ENGLISH IMPOSED -->
8 // <-- XCOS TEST -->
9 // Import diagram
10 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_RLC_test.zcos"));
11 // Redefining messagebox() to avoid popup
12 prot = funcprot();
13 funcprot(0);
14 function messagebox(msg, msg_title)
15  disp(msg);
16 endfunction
17 funcprot(prot);
18 for i=2:3
19     // Start by updating the clock block period (sampling)
20     Context.per = 5*10^-i;
21     Info = scicos_simulate(scs_m, list(), Context);
22     // Modify solver + run DDaskr + save results
23     scs_m.props.tol(6) = 101;     // Solver
24     scicos_simulate(scs_m, Info); // DDaskr
25     ddaskrval = res.values;       // Results
26     time = res.time;              // Time
27     // Modify solver + run IDA + save results
28     scs_m.props.tol(6) = 100;     // Solver
29     scicos_simulate(scs_m, Info); // IDA
30     idaval = res.values;          // Results
31     // Compare results
32     compa = abs(ddaskrval-idaval);
33     // Extract mean, standard deviation, maximum
34     mea = mean(compa);
35     [maxi, indexMaxi] = max(compa);
36     stdeviation = st_deviation(compa);
37     // Verifying closeness of the results
38     assert_checktrue(maxi <= 10^-(i+4));
39     assert_checktrue(mea <= 10^-(i+4));
40     assert_checktrue(stdeviation <= 10^-(i+4));
41 end
42 --------------------------------------------\
43  Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
44
45  Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
46  Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
47  
48 !Modelica blocks are reduced to a block with:             !
49 !                                                         !
50 !Number of differential states: 2                         !
51 !                                                         !
52 !Number of algebraic states: 1                            !
53 !                                                         !
54 !Number of discrete time states  : 0                      !
55 !                                                         !
56 !Number of zero-crossing surfaces: 0                      !
57 !                                                         !
58 !Number of modes  : 0                                     !
59 !                                                         !
60 !Number of inputs : 0                                     !
61 !                                                         !
62 !Number of outputs: 1                                     !
63 !                                                         !
64 !Input/output dependency:[T]                              !
65 !                                                         !
66 !Analytical Jacobian: enabled  (%Jacobian=%t)             !
67 !                                                         !
68 !Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
69 !                                                         !
70 !                                                         !
71 !                                                         !
72 !Generated files path: TMPDIR/         !
73 !                                                         !
74 !                                                         !
75    Generate a loader file
76    Generate a Makefile
77    ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
78    ilib_gen_Make: Copy DDaskr_RLC_test_im.c to TMPDIR
79    ilib_gen_Make: configure : Generate Makefile.
80    ilib_gen_Make: Modification of the Makefile in TMPDIR.
81    Running the Makefile
82    Generate a cleaner file
83 Shared archive loaded.
84 Link done.
85 Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
86
87 Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
88
89 --------------------------------------------\
90  Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
91
92  Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
93  Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
94  
95 !Modelica blocks are reduced to a block with:             !
96 !                                                         !
97 !Number of differential states: 2                         !
98 !                                                         !
99 !Number of algebraic states: 1                            !
100 !                                                         !
101 !Number of discrete time states  : 0                      !
102 !                                                         !
103 !Number of zero-crossing surfaces: 0                      !
104 !                                                         !
105 !Number of modes  : 0                                     !
106 !                                                         !
107 !Number of inputs : 0                                     !
108 !                                                         !
109 !Number of outputs: 1                                     !
110 !                                                         !
111 !Input/output dependency:[T]                              !
112 !                                                         !
113 !Analytical Jacobian: enabled  (%Jacobian=%t)             !
114 !                                                         !
115 !Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
116 !                                                         !
117 !                                                         !
118 !                                                         !
119 !Generated files path: TMPDIR/         !
120 !                                                         !
121 !                                                         !
122    Generate a loader file
123    Generate a Makefile
124    ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
125    ilib_gen_Make: Copy DDaskr_RLC_test_im.c to TMPDIR
126    ilib_gen_Make: configure : Generate Makefile.
127    ilib_gen_Make: Modification of the Makefile in TMPDIR.
128    Running the Makefile
129    Generate a cleaner file
130 Shared archive loaded.
131 Link done.
132 Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
133
134 Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
135