1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
3 ;;; "f2cl2.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
4 ;;; "f2cl3.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
5 ;;; "f2cl4.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
6 ;;; "f2cl5.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
7 ;;; "f2cl6.l,v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $"
8 ;;; "macros.l,v 1409c1352feb 2013/03/24 20:44:50 toy $")
10 ;;; Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode)
12 ;;; Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
13 ;;; (:coerce-assigns :as-needed) (:array-type ':array)
14 ;;; (:array-slicing t) (:declare-common nil)
15 ;;; (:float-format single-float))
17 (in-package "ODEPACK")
22 :element-type
'f2cl-lib
:integer4
23 :initial-contents
'(12 5)))
26 (declare (type (array f2cl-lib
:integer4
(2)) mord
)
27 (type (f2cl-lib:integer4
) mxstp0 mxhnl0
))
29 (f neq y t$ tout itol rtol atol itask istate iopt rwork lrw iwork liw
31 (declare (type (f2cl-lib:integer4
) ng jt liw lrw iopt istate itask itol
)
32 (type (double-float) tout t$
)
33 (type (array double-float
(*)) rwork atol rtol y
)
34 (type (array f2cl-lib
:integer4
(*)) jroot iwork neq
))
36 (symbol-macrolet ((ccmax
37 (aref (dls001-part-0 *dls001-common-block
*) 209))
38 (h (aref (dls001-part-0 *dls001-common-block
*) 211))
39 (hmin (aref (dls001-part-0 *dls001-common-block
*) 212))
40 (hmxi (aref (dls001-part-0 *dls001-common-block
*) 213))
41 (hu (aref (dls001-part-0 *dls001-common-block
*) 214))
42 (tn (aref (dls001-part-0 *dls001-common-block
*) 216))
44 (aref (dls001-part-0 *dls001-common-block
*) 217))
45 (init (aref (dls001-part-1 *dls001-common-block
*) 0))
46 (mxstep (aref (dls001-part-1 *dls001-common-block
*) 1))
47 (mxhnil (aref (dls001-part-1 *dls001-common-block
*) 2))
48 (nhnil (aref (dls001-part-1 *dls001-common-block
*) 3))
49 (nslast (aref (dls001-part-1 *dls001-common-block
*) 4))
50 (nyh (aref (dls001-part-1 *dls001-common-block
*) 5))
52 (aref (dls001-part-1 *dls001-common-block
*) 16))
53 (kflag (aref (dls001-part-1 *dls001-common-block
*) 17))
54 (l (aref (dls001-part-1 *dls001-common-block
*) 18))
55 (lyh (aref (dls001-part-1 *dls001-common-block
*) 19))
56 (lewt (aref (dls001-part-1 *dls001-common-block
*) 20))
57 (lacor (aref (dls001-part-1 *dls001-common-block
*) 21))
58 (lsavf (aref (dls001-part-1 *dls001-common-block
*) 22))
59 (lwm (aref (dls001-part-1 *dls001-common-block
*) 23))
60 (liwm (aref (dls001-part-1 *dls001-common-block
*) 24))
61 (meth (aref (dls001-part-1 *dls001-common-block
*) 25))
62 (miter (aref (dls001-part-1 *dls001-common-block
*) 26))
64 (aref (dls001-part-1 *dls001-common-block
*) 27))
66 (aref (dls001-part-1 *dls001-common-block
*) 28))
67 (msbp (aref (dls001-part-1 *dls001-common-block
*) 29))
68 (mxncf (aref (dls001-part-1 *dls001-common-block
*) 30))
69 (n (aref (dls001-part-1 *dls001-common-block
*) 31))
70 (nq (aref (dls001-part-1 *dls001-common-block
*) 32))
71 (nst (aref (dls001-part-1 *dls001-common-block
*) 33))
72 (nfe (aref (dls001-part-1 *dls001-common-block
*) 34))
73 (nje (aref (dls001-part-1 *dls001-common-block
*) 35))
74 (nqu (aref (dls001-part-1 *dls001-common-block
*) 36))
75 (tsw (aref (dlsa01-part-0 *dlsa01-common-block
*) 0))
76 (insufr (aref (dlsa01-part-1 *dlsa01-common-block
*) 0))
77 (insufi (aref (dlsa01-part-1 *dlsa01-common-block
*) 1))
78 (ixpr (aref (dlsa01-part-1 *dlsa01-common-block
*) 2))
79 (jtyp (aref (dlsa01-part-1 *dlsa01-common-block
*) 5))
80 (mused (aref (dlsa01-part-1 *dlsa01-common-block
*) 6))
81 (mxordn (aref (dlsa01-part-1 *dlsa01-common-block
*) 7))
82 (mxords (aref (dlsa01-part-1 *dlsa01-common-block
*) 8))
83 (t0 (aref (dlsr01-part-0 *dlsr01-common-block
*) 2))
84 (tlast (aref (dlsr01-part-0 *dlsr01-common-block
*) 3))
85 (toutc (aref (dlsr01-part-0 *dlsr01-common-block
*) 4))
86 (lg0 (aref (dlsr01-part-1 *dlsr01-common-block
*) 0))
87 (lg1 (aref (dlsr01-part-1 *dlsr01-common-block
*) 1))
88 (lgx (aref (dlsr01-part-1 *dlsr01-common-block
*) 2))
89 (irfnd (aref (dlsr01-part-1 *dlsr01-common-block
*) 5))
90 (itaskc (aref (dlsr01-part-1 *dlsr01-common-block
*) 6))
91 (ngc (aref (dlsr01-part-1 *dlsr01-common-block
*) 7))
92 (nge (aref (dlsr01-part-1 *dlsr01-common-block
*) 8)))
93 (f2cl-lib:with-multi-array-data
94 ((neq f2cl-lib
:integer4 neq-%data% neq-%offset%
)
95 (iwork f2cl-lib
:integer4 iwork-%data% iwork-%offset%
)
96 (jroot f2cl-lib
:integer4 jroot-%data% jroot-%offset%
)
97 (y double-float y-%data% y-%offset%
)
98 (rtol double-float rtol-%data% rtol-%offset%
)
99 (atol double-float atol-%data% atol-%offset%
)
100 (rwork double-float rwork-%data% rwork-%offset%
))
101 (prog ((mu 0) (ml 0) (lf0 0) (lenwm 0) (lenrw 0) (leniw 0) (kgo 0)
102 (imxer 0) (iflag 0) (i2 0) (i1 0) (i 0) (lenrwc 0) (leniwc 0)
103 (len2 0) (len1s 0) (len1n 0) (len1c 0) (len1 0) (lyhnew 0)
104 (lenyh 0) (irt 0) (irfp 0) (w0 0.0d0
) (sum 0.0d0
) (size 0.0d0
)
105 (tp 0.0d0
) (tolsf 0.0d0
) (tol 0.0d0
) (tnext 0.0d0
)
106 (tdist 0.0d0
) (tcrit 0.0d0
) (rtoli 0.0d0
) (rh 0.0d0
)
107 (hmx 0.0d0
) (hmax 0.0d0
) (h0 0.0d0
) (ewti 0.0d0
) (big 0.0d0
)
108 (ayi 0.0d0
) (atoli 0.0d0
) (ihit nil
)
111 :element-type
'character
112 :initial-element
#\
)))
113 (declare (type (string 60) msg
)
114 (type f2cl-lib
:logical ihit
)
115 (type (double-float) atoli ayi big ewti h0 hmax hmx rh
116 rtoli tcrit tdist tnext tol tolsf tp
118 (type (f2cl-lib:integer4
) irfp irt lenyh lyhnew len1 len1c
119 len1n len1s len2 leniwc lenrwc i
120 i1 i2 iflag imxer kgo leniw
121 lenrw lenwm lf0 ml mu
))
122 (if (or (< istate
1) (> istate
3)) (go label601
))
123 (if (or (< itask
1) (> itask
5)) (go label602
))
125 (if (= istate
1) (go label10
))
126 (if (= init
0) (go label603
))
127 (if (= istate
2) (go label200
))
131 (if (= tout t$
) (go end_label
))
133 (if (<= (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0)
135 (if (= istate
1) (go label25
))
136 (if (> (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) n
)
139 (setf n
(f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
))
140 (if (or (< itol
1) (> itol
4)) (go label606
))
141 (if (or (< iopt
0) (> iopt
1)) (go label607
))
142 (if (or (= jt
3) (< jt
1) (> jt
5)) (go label608
))
144 (if (<= jt
2) (go label30
))
145 (setf ml
(f2cl-lib:fref iwork-%data%
(1) ((1 liw
)) iwork-%offset%
))
146 (setf mu
(f2cl-lib:fref iwork-%data%
(2) ((1 liw
)) iwork-%offset%
))
147 (if (or (< ml
0) (>= ml n
)) (go label609
))
148 (if (or (< mu
0) (>= mu n
)) (go label610
))
150 (if (< ng
0) (go label630
))
151 (if (= istate
1) (go label35
))
152 (if (and (= irfnd
0) (/= ng ngc
)) (go label631
))
155 (if (= iopt
1) (go label40
))
161 (if (/= istate
1) (go label60
))
163 (setf mxordn
(f2cl-lib:fref mord
(1) ((1 2))))
164 (setf mxords
(f2cl-lib:fref mord
(2) ((1 2))))
168 (f2cl-lib:fref iwork-%data%
(5) ((1 liw
)) iwork-%offset%
))
169 (if (or (< ixpr
0) (> ixpr
1)) (go label611
))
171 (f2cl-lib:fref iwork-%data%
(6) ((1 liw
)) iwork-%offset%
))
172 (if (< mxstep
0) (go label612
))
173 (if (= mxstep
0) (setf mxstep mxstp0
))
175 (f2cl-lib:fref iwork-%data%
(7) ((1 liw
)) iwork-%offset%
))
176 (if (< mxhnil
0) (go label613
))
177 (if (= mxhnil
0) (setf mxhnil mxhnl0
))
178 (if (/= istate
1) (go label50
))
179 (setf h0
(f2cl-lib:fref rwork-%data%
(5) ((1 lrw
)) rwork-%offset%
))
181 (f2cl-lib:fref iwork-%data%
(8) ((1 liw
)) iwork-%offset%
))
182 (if (< mxordn
0) (go label628
))
183 (if (= mxordn
0) (setf mxordn
100))
185 (min (the f2cl-lib
:integer4 mxordn
)
186 (the f2cl-lib
:integer4
187 (f2cl-lib:fref mord
(1) ((1 2))))))
189 (f2cl-lib:fref iwork-%data%
(9) ((1 liw
)) iwork-%offset%
))
190 (if (< mxords
0) (go label629
))
191 (if (= mxords
0) (setf mxords
100))
193 (min (the f2cl-lib
:integer4 mxords
)
194 (the f2cl-lib
:integer4
195 (f2cl-lib:fref mord
(2) ((1 2))))))
196 (if (< (* (- tout t$
) h0
) 0.0d0
) (go label614
))
199 (f2cl-lib:fref rwork-%data%
(6) ((1 lrw
)) rwork-%offset%
))
200 (if (< hmax
0.0d0
) (go label615
))
202 (if (> hmax
0.0d0
) (setf hmxi
(/ 1.0d0 hmax
)))
204 (f2cl-lib:fref rwork-%data%
(7) ((1 lrw
)) rwork-%offset%
))
205 (if (< hmin
0.0d0
) (go label616
))
207 (if (= istate
1) (setf meth
1))
208 (if (= istate
1) (setf nyh n
))
210 (setf lg1
(f2cl-lib:int-add lg0 ng
))
211 (setf lgx
(f2cl-lib:int-add lg1 ng
))
212 (setf lyhnew
(f2cl-lib:int-add lgx ng
))
213 (if (= istate
1) (setf lyh lyhnew
))
214 (if (= lyhnew lyh
) (go label62
))
215 (setf lenyh
(f2cl-lib:int-mul l nyh
))
216 (if (< lrw
(f2cl-lib:int-add
(f2cl-lib:int-sub lyhnew
1) lenyh
))
219 (if (> lyhnew lyh
) (setf i1 -
1))
221 (f2cl-lib:array-slice rwork-%data%
227 (f2cl-lib:array-slice rwork-%data%
236 (f2cl-lib:int-add
(f2cl-lib:int-sub lyhnew
1)
238 (f2cl-lib:int-add mxordn
1)
241 (f2cl-lib:int-add
(f2cl-lib:int-sub lyhnew
1)
243 (f2cl-lib:int-add mxords
1)
245 (setf lwm
(f2cl-lib:int-add len1s
1))
247 (setf lenwm
(f2cl-lib:int-add
(f2cl-lib:int-mul n n
) 2)))
252 (f2cl-lib:int-add
(f2cl-lib:int-mul
2 ml
) mu
1)
255 (setf len1s
(f2cl-lib:int-add len1s lenwm
))
257 (if (= meth
2) (setf len1c len1s
))
259 (max (the f2cl-lib
:integer4 len1n
)
260 (the f2cl-lib
:integer4 len1s
)))
261 (setf len2
(f2cl-lib:int-mul
3 n
))
262 (setf lenrw
(f2cl-lib:int-add len1 len2
))
263 (setf lenrwc
(f2cl-lib:int-add len1c len2
))
264 (setf (f2cl-lib:fref iwork-%data%
(17) ((1 liw
)) iwork-%offset%
)
267 (setf leniw
(f2cl-lib:int-add
20 n
))
269 (if (= meth
2) (setf leniwc leniw
))
270 (setf (f2cl-lib:fref iwork-%data%
(18) ((1 liw
)) iwork-%offset%
)
272 (if (and (= istate
1) (< lrw lenrwc
)) (go label617
))
273 (if (and (= istate
1) (< liw leniwc
)) (go label618
))
274 (if (and (= istate
3) (< lrw lenrwc
)) (go label550
))
275 (if (and (= istate
3) (< liw leniwc
)) (go label555
))
276 (setf lewt
(f2cl-lib:int-add len1
1))
278 (if (>= lrw lenrw
) (go label65
))
280 (setf lewt
(f2cl-lib:int-add len1c
1))
281 (f2cl-lib:f2cl-set-string msg
282 "DLSODAR- Warning.. RWORK length is sufficient for now, but "
284 (xerrwd msg
60 103 0 0 0 0 0 0.0d0
0.0d0
)
285 (f2cl-lib:f2cl-set-string msg
286 " may not be later. Integration will proceed anyway. "
288 (xerrwd msg
60 103 0 0 0 0 0 0.0d0
0.0d0
)
289 (f2cl-lib:f2cl-set-string msg
290 " Length needed is LENRW = I1, while LRW = I2."
292 (xerrwd msg
50 103 0 2 lenrw lrw
0 0.0d0
0.0d0
)
294 (setf lsavf
(f2cl-lib:int-add lewt n
))
295 (setf lacor
(f2cl-lib:int-add lsavf n
))
297 (if (>= liw leniw
) (go label70
))
299 (f2cl-lib:f2cl-set-string msg
300 "DLSODAR- Warning.. IWORK length is sufficient for now, but "
302 (xerrwd msg
60 104 0 0 0 0 0 0.0d0
0.0d0
)
303 (f2cl-lib:f2cl-set-string msg
304 " may not be later. Integration will proceed anyway. "
306 (xerrwd msg
60 104 0 0 0 0 0 0.0d0
0.0d0
)
307 (f2cl-lib:f2cl-set-string msg
308 " Length needed is LENIW = I1, while LIW = I2."
310 (xerrwd msg
50 104 0 2 leniw liw
0 0.0d0
0.0d0
)
312 (setf rtoli
(f2cl-lib:fref rtol-%data%
(1) ((1 *)) rtol-%offset%
))
313 (setf atoli
(f2cl-lib:fref atol-%data%
(1) ((1 *)) atol-%offset%
))
314 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
319 (f2cl-lib:fref rtol-%data%
323 (if (or (= itol
2) (= itol
4))
325 (f2cl-lib:fref atol-%data%
329 (if (< rtoli
0.0d0
) (go label619
))
330 (if (< atoli
0.0d0
) (go label620
))
332 (if (= istate
1) (go label100
))
334 (if (= n nyh
) (go label200
))
335 (setf i1
(f2cl-lib:int-add lyh
(f2cl-lib:int-mul l nyh
)))
338 (f2cl-lib:int-add lyh
340 (f2cl-lib:int-add maxord
1)
343 (if (> i1 i2
) (go label200
))
344 (f2cl-lib:fdo
(i i1
(f2cl-lib:int-add i
1))
348 (setf (f2cl-lib:fref rwork-%data%
(i) ((1 lrw
)) rwork-%offset%
)
352 (setf uround
(dumach))
356 (if (and (/= itask
4) (/= itask
5)) (go label110
))
358 (f2cl-lib:fref rwork-%data%
(1) ((1 lrw
)) rwork-%offset%
))
359 (if (< (* (- tcrit tout
) (- tout t$
)) 0.0d0
) (go label625
))
360 (if (and (/= h0
0.0d0
) (> (* (- (+ t$ h0
) tcrit
) h0
) 0.0d0
))
361 (setf h0
(- tcrit t$
)))
376 (setf lf0
(f2cl-lib:int-add lyh nyh
))
377 (multiple-value-bind (var-0 var-1 var-2 var-3
)
382 (f2cl-lib:array-slice rwork-%data%
387 (declare (ignore var-0 var-2 var-3
))
391 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
395 (setf (f2cl-lib:fref rwork-%data%
397 (f2cl-lib:int-add i lyh
)
401 (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
))))
404 (dewset n itol rtol atol
405 (f2cl-lib:array-slice rwork-%data%
410 (f2cl-lib:array-slice rwork-%data%
415 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
420 (f2cl-lib:fref rwork-%data%
421 ((f2cl-lib:int-sub
(f2cl-lib:int-add i lewt
)
428 (setf (f2cl-lib:fref rwork-%data%
430 (f2cl-lib:int-add i lewt
)
435 (f2cl-lib:fref rwork-%data%
437 (f2cl-lib:int-add i lewt
)
441 (if (/= h0
0.0d0
) (go label180
))
442 (setf tdist
(abs (- tout t$
)))
443 (setf w0
(max (abs t$
) (abs tout
)))
444 (if (< tdist
(* 2.0d0 uround w0
)) (go label622
))
445 (setf tol
(f2cl-lib:fref rtol-%data%
(1) ((1 *)) rtol-%offset%
))
446 (if (<= itol
2) (go label140
))
447 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
453 (f2cl-lib:fref rtol-%data%
458 (if (> tol
0.0d0
) (go label160
))
459 (setf atoli
(f2cl-lib:fref atol-%data%
(1) ((1 *)) atol-%offset%
))
460 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
463 (if (or (= itol
2) (= itol
4))
465 (f2cl-lib:fref atol-%data%
470 (abs (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)))
471 (if (/= ayi
0.0d0
) (setf tol
(max tol
(/ atoli ayi
))))
474 (setf tol
(max tol
(* 100.0d0 uround
)))
475 (setf tol
(min tol
0.001d0
))
478 (f2cl-lib:array-slice rwork-%data%
483 (f2cl-lib:array-slice rwork-%data%
488 (setf sum
(+ (/ 1.0d0
(* tol w0 w0
)) (* tol
(expt sum
2))))
489 (setf h0
(/ 1.0d0
(f2cl-lib:fsqrt sum
)))
490 (setf h0
(min h0 tdist
))
491 (setf h0
(f2cl-lib:sign h0
(- tout t$
)))
493 (setf rh
(* (abs h0
) hmxi
))
494 (if (> rh
1.0d0
) (setf h0
(/ h0 rh
)))
496 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
500 (setf (f2cl-lib:fref rwork-%data%
502 (f2cl-lib:int-add i lf0
)
507 (f2cl-lib:fref rwork-%data%
509 (f2cl-lib:int-add i lf0
)
515 (if (= ngc
0) (go label270
))
517 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
520 (f2cl-lib:array-slice rwork-%data%
526 (f2cl-lib:array-slice rwork-%data%
531 (f2cl-lib:array-slice rwork-%data%
536 (f2cl-lib:array-slice rwork-%data%
542 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
545 (if (= irt
0) (go label270
))
550 (if (= ngc
0) (go label205
))
551 (if (or (= itask
1) (= itask
4)) (setf toutc tout
))
553 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
556 (f2cl-lib:array-slice rwork-%data%
562 (f2cl-lib:array-slice rwork-%data%
567 (f2cl-lib:array-slice rwork-%data%
572 (f2cl-lib:array-slice rwork-%data%
578 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
581 (if (/= irt
1) (go label205
))
588 (if (and (= irfp
1) (/= tlast tn
) (= itask
2)) (go label400
))
589 (f2cl-lib:computed-goto
590 (label210 label250 label220 label230 label240
)
593 (if (< (* (- tn tout
) h
) 0.0d0
) (go label250
))
594 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
596 (f2cl-lib:array-slice rwork-%data%
602 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
604 (if (/= iflag
0) (go label627
))
608 (setf tp
(- tn
(* hu
(+ 1.0d0
(* 100.0d0 uround
)))))
609 (if (> (* (- tp tout
) h
) 0.0d0
) (go label623
))
610 (if (< (* (- tn tout
) h
) 0.0d0
) (go label250
))
615 (f2cl-lib:fref rwork-%data%
(1) ((1 lrw
)) rwork-%offset%
))
616 (if (> (* (- tn tcrit
) h
) 0.0d0
) (go label624
))
617 (if (< (* (- tcrit tout
) h
) 0.0d0
) (go label625
))
618 (if (< (* (- tn tout
) h
) 0.0d0
) (go label245
))
619 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
621 (f2cl-lib:array-slice rwork-%data%
627 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
629 (if (/= iflag
0) (go label627
))
634 (f2cl-lib:fref rwork-%data%
(1) ((1 lrw
)) rwork-%offset%
))
635 (if (> (* (- tn tcrit
) h
) 0.0d0
) (go label624
))
637 (setf hmx
(+ (abs tn
) (abs h
)))
638 (setf ihit
(<= (abs (- tn tcrit
)) (* 100.0d0 uround hmx
)))
639 (if ihit
(setf t$ tcrit
))
640 (if (and (= irfp
1) (/= tlast tn
) (= itask
5)) (go label400
))
641 (if ihit
(go label400
))
642 (setf tnext
(+ tn
(* h
(+ 1.0d0
(* 4.0d0 uround
)))))
643 (if (<= (* (- tnext tcrit
) h
) 0.0d0
) (go label250
))
644 (setf h
(* (- tcrit tn
) (- 1.0d0
(* 4.0d0 uround
))))
645 (if (and (= istate
2) (>= jstart
0)) (setf jstart -
2))
647 (if (= meth mused
) (go label255
))
648 (if (= insufr
1) (go label550
))
649 (if (= insufi
1) (go label555
))
651 (if (>= (f2cl-lib:int-sub nst nslast
) mxstep
) (go label500
))
652 (dewset n itol rtol atol
653 (f2cl-lib:array-slice rwork-%data%
658 (f2cl-lib:array-slice rwork-%data%
663 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
668 (f2cl-lib:fref rwork-%data%
669 ((f2cl-lib:int-sub
(f2cl-lib:int-add i lewt
)
676 (setf (f2cl-lib:fref rwork-%data%
678 (f2cl-lib:int-add i lewt
)
683 (f2cl-lib:fref rwork-%data%
685 (f2cl-lib:int-add i lewt
)
693 (f2cl-lib:array-slice rwork-%data%
698 (f2cl-lib:array-slice rwork-%data%
703 (if (<= tolsf
1.0d0
) (go label280
))
704 (setf tolsf
(* tolsf
2.0d0
))
705 (if (= nst
0) (go label626
))
708 (if (/= (+ tn h
) tn
) (go label290
))
709 (setf nhnil
(f2cl-lib:int-add nhnil
1))
710 (if (> nhnil mxhnil
) (go label290
))
711 (f2cl-lib:f2cl-set-string msg
712 "DLSODAR: Warning: Internal T(=R1) and H(=R2) are "
714 (xerrwd msg
50 101 0 0 0 0 0 0.0d0
0.0d0
)
715 (f2cl-lib:f2cl-set-string msg
716 " such that in the machine, T + H = T on the next step "
718 (xerrwd msg
60 101 0 0 0 0 0 0.0d0
0.0d0
)
719 (f2cl-lib:f2cl-set-string msg
720 " (H = step size). Solver will continue anyway."
722 (xerrwd msg
50 101 0 0 0 0 2 tn h
)
723 (if (< nhnil mxhnil
) (go label290
))
724 (f2cl-lib:f2cl-set-string msg
725 "DLSODAR- Above warning has been issued I1 times. "
727 (xerrwd msg
50 102 0 0 0 0 0 0.0d0
0.0d0
)
728 (f2cl-lib:f2cl-set-string msg
729 " It will not be issued again for this problem."
731 (xerrwd msg
50 102 0 1 mxhnil
0 0 0.0d0
0.0d0
)
734 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
735 var-10 var-11 var-12 var-13
)
737 (f2cl-lib:array-slice rwork-%data%
743 (f2cl-lib:array-slice rwork-%data%
748 (f2cl-lib:array-slice rwork-%data%
753 (f2cl-lib:array-slice rwork-%data%
758 (f2cl-lib:array-slice rwork-%data%
763 (f2cl-lib:array-slice rwork-%data%
768 (f2cl-lib:array-slice iwork-%data%
773 f jac
#'dprja
#'dsolsy
)
774 (declare (ignore var-0 var-1 var-2 var-4 var-5 var-6 var-7 var-8
775 var-9 var-10 var-11 var-12 var-13
))
777 (setf kgo
(f2cl-lib:int-sub
1 kflag
))
778 (f2cl-lib:computed-goto
(label300 label530 label540
) kgo
)
781 (if (= meth mused
) (go label310
))
784 (if (= meth
2) (setf maxord mxords
))
786 (setf (f2cl-lib:fref rwork-%data%
790 (f2cl-lib:fsqrt uround
)))
792 (min (the f2cl-lib
:integer4 insufr
)
793 (the f2cl-lib
:integer4
1)))
795 (min (the f2cl-lib
:integer4 insufi
)
796 (the f2cl-lib
:integer4
1)))
798 (if (= ixpr
0) (go label310
))
801 (f2cl-lib:f2cl-set-string msg
802 "DLSODAR- A switch to the BDF (stiff) method has occurred "
804 (xerrwd msg
60 105 0 0 0 0 0 0.0d0
0.0d0
)))
807 (f2cl-lib:f2cl-set-string msg
808 "DLSODAR- A switch to the Adams (nonstiff) method occurred "
810 (xerrwd msg
60 106 0 0 0 0 0 0.0d0
0.0d0
)))
811 (f2cl-lib:f2cl-set-string msg
812 " at T = R1, tentative step size H = R2, step NST = I1 "
814 (xerrwd msg
60 107 0 1 nst
0 2 tn h
)
816 (if (= ngc
0) (go label315
))
818 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
821 (f2cl-lib:array-slice rwork-%data%
827 (f2cl-lib:array-slice rwork-%data%
832 (f2cl-lib:array-slice rwork-%data%
837 (f2cl-lib:array-slice rwork-%data%
843 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
846 (if (/= irt
1) (go label315
))
852 (f2cl-lib:computed-goto
853 (label320 label400 label330 label340 label350
)
856 (if (< (* (- tn tout
) h
) 0.0d0
) (go label250
))
857 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
859 (f2cl-lib:array-slice rwork-%data%
865 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
870 (if (>= (* (- tn tout
) h
) 0.0d0
) (go label400
))
873 (if (< (* (- tn tout
) h
) 0.0d0
) (go label345
))
874 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
876 (f2cl-lib:array-slice rwork-%data%
882 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
887 (setf hmx
(+ (abs tn
) (abs h
)))
888 (setf ihit
(<= (abs (- tn tcrit
)) (* 100.0d0 uround hmx
)))
889 (if ihit
(go label400
))
890 (setf tnext
(+ tn
(* h
(+ 1.0d0
(* 4.0d0 uround
)))))
891 (if (<= (* (- tnext tcrit
) h
) 0.0d0
) (go label250
))
892 (setf h
(* (- tcrit tn
) (- 1.0d0
(* 4.0d0 uround
))))
893 (if (>= jstart
0) (setf jstart -
2))
896 (setf hmx
(+ (abs tn
) (abs h
)))
897 (setf ihit
(<= (abs (- tn tcrit
)) (* 100.0d0 uround hmx
)))
899 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
903 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
904 (f2cl-lib:fref rwork-%data%
906 (f2cl-lib:int-add i lyh
)
911 (if (and (/= itask
4) (/= itask
5)) (go label420
))
912 (if ihit
(setf t$ tcrit
))
916 (setf (f2cl-lib:fref rwork-%data%
(11) ((1 lrw
)) rwork-%offset%
)
918 (setf (f2cl-lib:fref rwork-%data%
(12) ((1 lrw
)) rwork-%offset%
) h
)
919 (setf (f2cl-lib:fref rwork-%data%
(13) ((1 lrw
)) rwork-%offset%
)
921 (setf (f2cl-lib:fref rwork-%data%
(15) ((1 lrw
)) rwork-%offset%
)
923 (setf (f2cl-lib:fref iwork-%data%
(11) ((1 liw
)) iwork-%offset%
)
925 (setf (f2cl-lib:fref iwork-%data%
(12) ((1 liw
)) iwork-%offset%
)
927 (setf (f2cl-lib:fref iwork-%data%
(13) ((1 liw
)) iwork-%offset%
)
929 (setf (f2cl-lib:fref iwork-%data%
(14) ((1 liw
)) iwork-%offset%
)
931 (setf (f2cl-lib:fref iwork-%data%
(15) ((1 liw
)) iwork-%offset%
)
933 (setf (f2cl-lib:fref iwork-%data%
(19) ((1 liw
)) iwork-%offset%
)
935 (setf (f2cl-lib:fref iwork-%data%
(20) ((1 liw
)) iwork-%offset%
)
937 (setf (f2cl-lib:fref iwork-%data%
(10) ((1 liw
)) iwork-%offset%
)
942 (f2cl-lib:f2cl-set-string msg
943 "DLSODAR- At current T (=R1), MXSTEP (=I1) steps "
945 (xerrwd msg
50 201 0 0 0 0 0 0.0d0
0.0d0
)
946 (f2cl-lib:f2cl-set-string msg
947 " taken on this call before reaching TOUT "
949 (xerrwd msg
50 201 0 1 mxstep
0 1 tn
0.0d0
)
954 (f2cl-lib:fref rwork-%data%
955 ((f2cl-lib:int-sub
(f2cl-lib:int-add lewt i
)
959 (f2cl-lib:f2cl-set-string msg
960 "DLSODAR- At T(=R1), EWT(I1) has become R2 <= 0."
962 (xerrwd msg
50 202 0 1 i
0 2 tn ewti
)
966 (f2cl-lib:f2cl-set-string msg
967 "DLSODAR- At T (=R1), too much accuracy requested "
969 (xerrwd msg
50 203 0 0 0 0 0 0.0d0
0.0d0
)
970 (f2cl-lib:f2cl-set-string msg
971 " for precision of machine.. See TOLSF (=R2) "
973 (xerrwd msg
50 203 0 0 0 0 2 tn tolsf
)
974 (setf (f2cl-lib:fref rwork-%data%
(14) ((1 lrw
)) rwork-%offset%
)
979 (f2cl-lib:f2cl-set-string msg
980 "DLSODAR- At T(=R1), step size H(=R2), the error "
982 (xerrwd msg
50 204 0 0 0 0 0 0.0d0
0.0d0
)
983 (f2cl-lib:f2cl-set-string msg
984 " test failed repeatedly or with ABS(H) = HMIN"
986 (xerrwd msg
50 204 0 0 0 0 2 tn h
)
990 (f2cl-lib:f2cl-set-string msg
991 "DLSODAR- At T (=R1) and step size H (=R2), the "
993 (xerrwd msg
50 205 0 0 0 0 0 0.0d0
0.0d0
)
994 (f2cl-lib:f2cl-set-string msg
995 " corrector convergence failed repeatedly "
997 (xerrwd msg
50 205 0 0 0 0 0 0.0d0
0.0d0
)
998 (f2cl-lib:f2cl-set-string msg
999 " or with ABS(H) = HMIN "
1001 (xerrwd msg
30 205 0 0 0 0 2 tn h
)
1005 (f2cl-lib:f2cl-set-string msg
1006 "DLSODAR- At current T(=R1), RWORK length too small"
1008 (xerrwd msg
50 206 0 0 0 0 0 0.0d0
0.0d0
)
1009 (f2cl-lib:f2cl-set-string msg
1010 " to proceed. The integration was otherwise successful."
1012 (xerrwd msg
60 206 0 0 0 0 1 tn
0.0d0
)
1016 (f2cl-lib:f2cl-set-string msg
1017 "DLSODAR- At current T(=R1), IWORK length too small"
1019 (xerrwd msg
50 207 0 0 0 0 0 0.0d0
0.0d0
)
1020 (f2cl-lib:f2cl-set-string msg
1021 " to proceed. The integration was otherwise successful."
1023 (xerrwd msg
60 207 0 0 0 0 1 tn
0.0d0
)
1029 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
1035 (f2cl-lib:fref rwork-%data%
1037 (f2cl-lib:int-add i lacor
)
1041 (f2cl-lib:fref rwork-%data%
1043 (f2cl-lib:int-add i lewt
)
1047 (if (>= big size
) (go label570
))
1051 (setf (f2cl-lib:fref iwork-%data%
(16) ((1 liw
)) iwork-%offset%
)
1054 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
1058 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
1059 (f2cl-lib:fref rwork-%data%
1061 (f2cl-lib:int-add i lyh
)
1066 (setf (f2cl-lib:fref rwork-%data%
(11) ((1 lrw
)) rwork-%offset%
)
1068 (setf (f2cl-lib:fref rwork-%data%
(12) ((1 lrw
)) rwork-%offset%
) h
)
1069 (setf (f2cl-lib:fref rwork-%data%
(13) ((1 lrw
)) rwork-%offset%
)
1071 (setf (f2cl-lib:fref rwork-%data%
(15) ((1 lrw
)) rwork-%offset%
)
1073 (setf (f2cl-lib:fref iwork-%data%
(11) ((1 liw
)) iwork-%offset%
)
1075 (setf (f2cl-lib:fref iwork-%data%
(12) ((1 liw
)) iwork-%offset%
)
1077 (setf (f2cl-lib:fref iwork-%data%
(13) ((1 liw
)) iwork-%offset%
)
1079 (setf (f2cl-lib:fref iwork-%data%
(14) ((1 liw
)) iwork-%offset%
)
1081 (setf (f2cl-lib:fref iwork-%data%
(15) ((1 liw
)) iwork-%offset%
)
1083 (setf (f2cl-lib:fref iwork-%data%
(19) ((1 liw
)) iwork-%offset%
)
1085 (setf (f2cl-lib:fref iwork-%data%
(20) ((1 liw
)) iwork-%offset%
)
1087 (setf (f2cl-lib:fref iwork-%data%
(10) ((1 liw
)) iwork-%offset%
)
1092 (f2cl-lib:f2cl-set-string msg
1093 "DLSODAR- ISTATE(=I1) illegal."
1095 (xerrwd msg
30 1 0 1 istate
0 0 0.0d0
0.0d0
)
1096 (if (< istate
0) (go label800
))
1099 (f2cl-lib:f2cl-set-string msg
1100 "DLSODAR- ITASK (=I1) illegal."
1102 (xerrwd msg
30 2 0 1 itask
0 0 0.0d0
0.0d0
)
1105 (f2cl-lib:f2cl-set-string msg
1106 "DLSODAR- ISTATE > 1 but DLSODAR not initialized."
1108 (xerrwd msg
50 3 0 0 0 0 0 0.0d0
0.0d0
)
1111 (f2cl-lib:f2cl-set-string msg
1112 "DLSODAR- NEQ (=I1) < 1 "
1114 (xerrwd msg
30 4 0 1
1115 (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0 0 0.0d0
1119 (f2cl-lib:f2cl-set-string msg
1120 "DLSODAR- ISTATE = 3 and NEQ increased (I1 to I2)."
1122 (xerrwd msg
50 5 0 2 n
1123 (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0 0.0d0
0.0d0
)
1126 (f2cl-lib:f2cl-set-string msg
1127 "DLSODAR- ITOL (=I1) illegal. "
1129 (xerrwd msg
30 6 0 1 itol
0 0 0.0d0
0.0d0
)
1132 (f2cl-lib:f2cl-set-string msg
1133 "DLSODAR- IOPT (=I1) illegal. "
1135 (xerrwd msg
30 7 0 1 iopt
0 0 0.0d0
0.0d0
)
1138 (f2cl-lib:f2cl-set-string msg
1139 "DLSODAR- JT (=I1) illegal. "
1141 (xerrwd msg
30 8 0 1 jt
0 0 0.0d0
0.0d0
)
1144 (f2cl-lib:f2cl-set-string msg
1145 "DLSODAR- ML (=I1) illegal: < 0 or >= NEQ (=I2)"
1147 (xerrwd msg
50 9 0 2 ml
1148 (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0 0.0d0
0.0d0
)
1151 (f2cl-lib:f2cl-set-string msg
1152 "DLSODAR- MU (=I1) illegal: < 0 or >= NEQ (=I2)"
1154 (xerrwd msg
50 10 0 2 mu
1155 (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0 0.0d0
0.0d0
)
1158 (f2cl-lib:f2cl-set-string msg
1159 "DLSODAR- IXPR (=I1) illegal. "
1161 (xerrwd msg
30 11 0 1 ixpr
0 0 0.0d0
0.0d0
)
1164 (f2cl-lib:f2cl-set-string msg
1165 "DLSODAR- MXSTEP (=I1) < 0 "
1167 (xerrwd msg
30 12 0 1 mxstep
0 0 0.0d0
0.0d0
)
1170 (f2cl-lib:f2cl-set-string msg
1171 "DLSODAR- MXHNIL (=I1) < 0 "
1173 (xerrwd msg
30 13 0 1 mxhnil
0 0 0.0d0
0.0d0
)
1176 (f2cl-lib:f2cl-set-string msg
1177 "DLSODAR- TOUT (=R1) behind T (=R2) "
1179 (xerrwd msg
40 14 0 0 0 0 2 tout t$
)
1180 (f2cl-lib:f2cl-set-string msg
1181 " Integration direction is given by H0 (=R1) "
1183 (xerrwd msg
50 14 0 0 0 0 1 h0
0.0d0
)
1186 (f2cl-lib:f2cl-set-string msg
1187 "DLSODAR- HMAX (=R1) < 0.0 "
1189 (xerrwd msg
30 15 0 0 0 0 1 hmax
0.0d0
)
1192 (f2cl-lib:f2cl-set-string msg
1193 "DLSODAR- HMIN (=R1) < 0.0 "
1195 (xerrwd msg
30 16 0 0 0 0 1 hmin
0.0d0
)
1198 (f2cl-lib:f2cl-set-string msg
1199 "DLSODAR- RWORK length needed, LENRW(=I1), exceeds LRW(=I2) "
1201 (xerrwd msg
60 17 0 2 lenrw lrw
0 0.0d0
0.0d0
)
1204 (f2cl-lib:f2cl-set-string msg
1205 "DLSODAR- IWORK length needed, LENIW(=I1), exceeds LIW(=I2) "
1207 (xerrwd msg
60 18 0 2 leniw liw
0 0.0d0
0.0d0
)
1210 (f2cl-lib:f2cl-set-string msg
1211 "DLSODAR- RTOL(I1) is R1 < 0.0 "
1213 (xerrwd msg
40 19 0 1 i
0 1 rtoli
0.0d0
)
1216 (f2cl-lib:f2cl-set-string msg
1217 "DLSODAR- ATOL(I1) is R1 < 0.0 "
1219 (xerrwd msg
40 20 0 1 i
0 1 atoli
0.0d0
)
1223 (f2cl-lib:fref rwork-%data%
1224 ((f2cl-lib:int-sub
(f2cl-lib:int-add lewt i
)
1228 (f2cl-lib:f2cl-set-string msg
1229 "DLSODAR- EWT(I1) is R1 <= 0.0 "
1231 (xerrwd msg
40 21 0 1 i
0 1 ewti
0.0d0
)
1234 (f2cl-lib:f2cl-set-string msg
1235 "DLSODAR- TOUT(=R1) too close to T(=R2) to start integration."
1237 (xerrwd msg
60 22 0 0 0 0 2 tout t$
)
1240 (f2cl-lib:f2cl-set-string msg
1241 "DLSODAR- ITASK = I1 and TOUT (=R1) behind TCUR - HU (= R2) "
1243 (xerrwd msg
60 23 0 1 itask
0 2 tout tp
)
1246 (f2cl-lib:f2cl-set-string msg
1247 "DLSODAR- ITASK = 4 or 5 and TCRIT (=R1) behind TCUR (=R2) "
1249 (xerrwd msg
60 24 0 0 0 0 2 tcrit tn
)
1252 (f2cl-lib:f2cl-set-string msg
1253 "DLSODAR- ITASK = 4 or 5 and TCRIT (=R1) behind TOUT (=R2) "
1255 (xerrwd msg
60 25 0 0 0 0 2 tcrit tout
)
1258 (f2cl-lib:f2cl-set-string msg
1259 "DLSODAR- At start of problem, too much accuracy "
1261 (xerrwd msg
50 26 0 0 0 0 0 0.0d0
0.0d0
)
1262 (f2cl-lib:f2cl-set-string msg
1263 " requested for precision of machine.. See TOLSF (=R1) "
1265 (xerrwd msg
60 26 0 0 0 0 1 tolsf
0.0d0
)
1266 (setf (f2cl-lib:fref rwork-%data%
(14) ((1 lrw
)) rwork-%offset%
)
1270 (f2cl-lib:f2cl-set-string msg
1271 "DLSODAR- Trouble in DINTDY. ITASK = I1, TOUT = R1"
1273 (xerrwd msg
50 27 0 1 itask
0 1 tout
0.0d0
)
1276 (f2cl-lib:f2cl-set-string msg
1277 "DLSODAR- MXORDN (=I1) < 0 "
1279 (xerrwd msg
30 28 0 1 mxordn
0 0 0.0d0
0.0d0
)
1282 (f2cl-lib:f2cl-set-string msg
1283 "DLSODAR- MXORDS (=I1) < 0 "
1285 (xerrwd msg
30 29 0 1 mxords
0 0 0.0d0
0.0d0
)
1288 (f2cl-lib:f2cl-set-string msg
1289 "DLSODAR- NG (=I1) < 0 "
1291 (xerrwd msg
30 30 0 1 ng
0 0 0.0d0
0.0d0
)
1294 (f2cl-lib:f2cl-set-string msg
1295 "DLSODAR- NG changed (from I1 to I2) illegally, "
1297 (xerrwd msg
50 31 0 0 0 0 0 0.0d0
0.0d0
)
1298 (f2cl-lib:f2cl-set-string msg
1299 " i.e. not immediately after a root was found."
1301 (xerrwd msg
50 31 0 2 ngc ng
0 0.0d0
0.0d0
)
1304 (f2cl-lib:f2cl-set-string msg
1305 "DLSODAR- One or more components of g has a root "
1307 (xerrwd msg
50 32 0 0 0 0 0 0.0d0
0.0d0
)
1308 (f2cl-lib:f2cl-set-string msg
1309 " too near to the initial point. "
1311 (xerrwd msg
40 32 0 0 0 0 0 0.0d0
0.0d0
)
1316 (f2cl-lib:f2cl-set-string msg
1317 "DLSODAR- Run aborted.. apparent infinite loop. "
1319 (xerrwd msg
50 303 2 0 0 0 0 0.0d0
0.0d0
)
1344 (in-package #:cl-user
)
1345 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
1346 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
1347 (setf (gethash 'fortran-to-lisp
::dlsodar
1348 fortran-to-lisp
::*f2cl-function-info
*)
1349 (fortran-to-lisp::make-f2cl-finfo
1350 :arg-types
'(t (array fortran-to-lisp
::integer4
(*))
1351 (array double-float
(*)) (double-float) (double-float)
1352 (fortran-to-lisp::integer4
) (array double-float
(*))
1353 (array double-float
(*)) (fortran-to-lisp::integer4
)
1354 (fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
1355 (array double-float
(*)) (fortran-to-lisp::integer4
)
1356 (array fortran-to-lisp
::integer4
(*))
1357 (fortran-to-lisp::integer4
) t
1358 (fortran-to-lisp::integer4
) t
1359 (fortran-to-lisp::integer4
)
1360 (array fortran-to-lisp
::integer4
(*)))
1361 :return-values
'(nil nil nil fortran-to-lisp
::t$ nil nil nil nil nil
1362 fortran-to-lisp
::istate nil nil nil nil nil nil nil
1364 :calls
'(fortran-to-lisp::dstoda fortran-to-lisp
::dintdy
1365 fortran-to-lisp
::drchek fortran-to-lisp
::dmnorm
1366 fortran-to-lisp
::dewset fortran-to-lisp
::xerrwd
1367 fortran-to-lisp
::dcopy
))))