11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright (c) P.J.Gawthrop 1991, 1992, 1994, 1995, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1 1996/08/25 08:37:44 peter
## Initial revision
##
###############################################################
#Inform user
echo Creating $1_obs.r
|
>
>
>
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Copyright (c) P.J.Gawthrop 1991, 1992, 1994, 1995, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2 1996/08/25 08:38:14 peter
## Error handling added.
##
## Revision 1.1 1996/08/25 08:37:44 peter
## Initial revision
##
###############################################################
#Inform user
echo Creating $1_obs.r
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
Matrix MTTUU(MTTNuu,1);
FOR i := 1:MTTNu DO
MTTUU(i,1) := MTTU(i,1);
END;
IF MTTGPCNu>0 THEN
FOR i := 1:MTTNu DO
MTTUU(i+MTTNu,1) := MTTdU(i,1);
END;
MTTU := MTTU;
MTTdU := MTTdU;
MTTUU := MTTUU;
%Create the Y vector of output derivatives.
MTTNyy := (MTTGPCNy+1)*MTTNy;
Matrix MTTYY(MTTNyy,1);
FOR i := 1:MTTNy DO
|
>
|
|
>
|
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
Matrix MTTUU(MTTNuu,1);
FOR i := 1:MTTNu DO
MTTUU(i,1) := MTTU(i,1);
END;
IF MTTGPCNu>0 THEN
BEGIN
FOR i := 1:MTTNu DO
MTTUU(i+MTTNu,1) := MTTdU(i,1);
END;
END;
MTTU := MTTU;
% MTTdU := MTTdU; ---- removed temporarily, needs def file change?
MTTUU := MTTUU;
%Create the Y vector of output derivatives.
MTTNyy := (MTTGPCNy+1)*MTTNy;
Matrix MTTYY(MTTNyy,1);
FOR i := 1:MTTNy DO
|
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
write ";END;";
SHUT "$1_obs.r";
quit;
EOF
#Reduce writes errors to std output with ***** in front.
grep '\*\*\*\*\*' ode2obs_r.log >mtt_error
# Test for errors and print if any
err_length=$(wc -c <mtt_error)
if [ $err_length != "0" ]
then
echo MTT has failed with the following errors '...'
cat mtt_error
exit 1
else
exit 0
fi
|
|
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
|
166
167
168
169
170
171
172
173
174
175
|
write ";END;";
SHUT "$1_obs.r";
quit;
EOF
# Now invoke the standard error handling.
mtt_error_r ode2obs_r.log
|