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
) mf 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
(*)) 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 (delt (aref (dlpk01-part-0 *dlpk01-common-block
*) 0))
76 (sqrtn (aref (dlpk01-part-0 *dlpk01-common-block
*) 2))
77 (rsqrtn (aref (dlpk01-part-0 *dlpk01-common-block
*) 3))
78 (jpre (aref (dlpk01-part-1 *dlpk01-common-block
*) 0))
79 (jacflg (aref (dlpk01-part-1 *dlpk01-common-block
*) 1))
80 (locwp (aref (dlpk01-part-1 *dlpk01-common-block
*) 2))
81 (lociwp (aref (dlpk01-part-1 *dlpk01-common-block
*) 3))
82 (lsavx (aref (dlpk01-part-1 *dlpk01-common-block
*) 4))
83 (kmp (aref (dlpk01-part-1 *dlpk01-common-block
*) 5))
84 (maxl (aref (dlpk01-part-1 *dlpk01-common-block
*) 6))
85 (nni (aref (dlpk01-part-1 *dlpk01-common-block
*) 8))
86 (nli (aref (dlpk01-part-1 *dlpk01-common-block
*) 9))
87 (nps (aref (dlpk01-part-1 *dlpk01-common-block
*) 10))
88 (ncfn (aref (dlpk01-part-1 *dlpk01-common-block
*) 11))
89 (ncfl (aref (dlpk01-part-1 *dlpk01-common-block
*) 12)))
90 (f2cl-lib:with-multi-array-data
91 ((neq f2cl-lib
:integer4 neq-%data% neq-%offset%
)
92 (iwork f2cl-lib
:integer4 iwork-%data% iwork-%offset%
)
93 (y double-float y-%data% y-%offset%
)
94 (rtol double-float rtol-%data% rtol-%offset%
)
95 (atol double-float atol-%data% atol-%offset%
)
96 (rwork double-float rwork-%data% rwork-%offset%
))
97 (prog ((nwarn 0) (nstd 0) (nnid 0) (nni0 0) (nli0 0) (ncfl0 0)
98 (ncfn0 0) (lwp 0) (liwp 0) (lenwk 0) (lenwm 0) (lenrw 0)
99 (leniwk 0) (leniw 0) (lf0 0) (kgo 0) (imxer 0) (iflag 0)
100 (i2 0) (i1 0) (i 0) (w0 0.0d0
) (sum 0.0d0
) (size 0.0d0
)
101 (tp 0.0d0
) (tolsf 0.0d0
) (tol 0.0d0
) (tnext 0.0d0
)
102 (tdist 0.0d0
) (tcrit 0.0d0
) (rtoli 0.0d0
) (rh 0.0d0
)
103 (rcfn 0.0d0
) (rcfl 0.0d0
) (hmx 0.0d0
) (hmax 0.0d0
) (h0 0.0d0
)
104 (ewti 0.0d0
) (big 0.0d0
) (ayi 0.0d0
) (avdim 0.0d0
)
105 (atoli 0.0d0
) (lwarn nil
) (lcfl nil
) (lcfn nil
) (lavd nil
)
109 :element-type
'character
110 :initial-element
#\
)))
111 (declare (type (string 60) msg
)
112 (type f2cl-lib
:logical ihit lavd lcfn lcfl lwarn
)
113 (type (double-float) atoli avdim ayi big ewti h0 hmax hmx
114 rcfl rcfn rh rtoli tcrit tdist tnext
115 tol tolsf tp size sum w0
)
116 (type (f2cl-lib:integer4
) i i1 i2 iflag imxer kgo lf0
117 leniw leniwk lenrw lenwm lenwk
118 liwp lwp ncfn0 ncfl0 nli0 nni0
120 (if (or (< istate
1) (> istate
3)) (go label601
))
121 (if (or (< itask
1) (> itask
5)) (go label602
))
122 (if (= istate
1) (go label10
))
123 (if (= init
0) (go label603
))
124 (if (= istate
2) (go label200
))
128 (if (= tout t$
) (go end_label
))
130 (if (<= (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0)
132 (if (= istate
1) (go label25
))
133 (if (> (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) n
)
136 (setf n
(f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
))
137 (if (or (< itol
1) (> itol
4)) (go label606
))
138 (if (or (< iopt
0) (> iopt
1)) (go label607
))
139 (setf meth
(the f2cl-lib
:integer4
(truncate mf
10)))
140 (setf miter
(f2cl-lib:int-sub mf
(f2cl-lib:int-mul
10 meth
)))
141 (if (or (< meth
1) (> meth
2)) (go label608
))
142 (if (< miter
0) (go label608
))
143 (if (and (> miter
4) (< miter
9)) (go label608
))
146 (f2cl-lib:fref iwork-%data%
153 (f2cl-lib:fref iwork-%data%
157 (if (= iopt
1) (go label40
))
158 (setf maxord
(f2cl-lib:fref mord
(meth) ((1 2))))
161 (if (= istate
1) (setf h0
0.0d0
))
165 (min (the f2cl-lib
:integer4
5) (the f2cl-lib
:integer4 n
)))
171 (f2cl-lib:fref iwork-%data%
(5) ((1 liw
)) iwork-%offset%
))
172 (if (< maxord
0) (go label611
))
173 (if (= maxord
0) (setf maxord
100))
175 (min (the f2cl-lib
:integer4 maxord
)
176 (the f2cl-lib
:integer4
177 (f2cl-lib:fref mord
(meth) ((1 2))))))
179 (f2cl-lib:fref iwork-%data%
(6) ((1 liw
)) iwork-%offset%
))
180 (if (< mxstep
0) (go label612
))
181 (if (= mxstep
0) (setf mxstep mxstp0
))
183 (f2cl-lib:fref iwork-%data%
(7) ((1 liw
)) iwork-%offset%
))
184 (if (< mxhnil
0) (go label613
))
185 (if (= mxhnil
0) (setf mxhnil mxhnl0
))
186 (if (/= istate
1) (go label50
))
187 (setf h0
(f2cl-lib:fref rwork-%data%
(5) ((1 lrw
)) rwork-%offset%
))
188 (if (< (* (- tout t$
) h0
) 0.0d0
) (go label614
))
191 (f2cl-lib:fref rwork-%data%
(6) ((1 lrw
)) rwork-%offset%
))
192 (if (< hmax
0.0d0
) (go label615
))
194 (if (> hmax
0.0d0
) (setf hmxi
(/ 1.0d0 hmax
)))
196 (f2cl-lib:fref rwork-%data%
(7) ((1 lrw
)) rwork-%offset%
))
197 (if (< hmin
0.0d0
) (go label616
))
199 (f2cl-lib:fref iwork-%data%
(8) ((1 liw
)) iwork-%offset%
))
200 (if (= maxl
0) (setf maxl
5))
202 (min (the f2cl-lib
:integer4 maxl
)
203 (the f2cl-lib
:integer4 n
)))
205 (f2cl-lib:fref iwork-%data%
(9) ((1 liw
)) iwork-%offset%
))
206 (if (or (= kmp
0) (> kmp maxl
)) (setf kmp maxl
))
208 (f2cl-lib:fref rwork-%data%
(8) ((1 lrw
)) rwork-%offset%
))
209 (if (= delt
0.0d0
) (setf delt
0.05d0
))
212 (if (= istate
1) (setf nyh n
))
214 (f2cl-lib:int-add lyh
216 (f2cl-lib:int-add maxord
1)
218 (if (= miter
0) (setf lenwk
0))
222 (f2cl-lib:int-mul n
(f2cl-lib:int-add maxl
2))
223 (f2cl-lib:int-mul maxl maxl
))))
228 (f2cl-lib:int-add maxl
239 (f2cl-lib:int-mul
(f2cl-lib:int-add maxl
3) maxl
)
241 (if (or (= miter
3) (= miter
4))
242 (setf lenwk
(f2cl-lib:int-mul
5 n
)))
243 (if (= miter
9) (setf lenwk
(f2cl-lib:int-mul
2 n
)))
247 (f2cl-lib:fref iwork-%data%
251 (setf lenwm
(f2cl-lib:int-add lenwk lwp
))
252 (setf locwp
(f2cl-lib:int-add lenwk
1))
253 (setf lewt
(f2cl-lib:int-add lwm lenwm
))
254 (setf lsavf
(f2cl-lib:int-add lewt n
))
255 (setf lsavx
(f2cl-lib:int-add lsavf n
))
256 (setf lacor
(f2cl-lib:int-add lsavx n
))
257 (if (= miter
0) (setf lacor
(f2cl-lib:int-add lsavf n
)))
258 (setf lenrw
(f2cl-lib:int-sub
(f2cl-lib:int-add lacor n
) 1))
259 (setf (f2cl-lib:fref iwork-%data%
(17) ((1 liw
)) iwork-%offset%
)
263 (if (= miter
1) (setf leniwk maxl
))
267 (f2cl-lib:fref iwork-%data%
271 (setf leniw
(f2cl-lib:int-add
30 leniwk liwp
))
272 (setf lociwp
(f2cl-lib:int-add leniwk
1))
273 (setf (f2cl-lib:fref iwork-%data%
(18) ((1 liw
)) iwork-%offset%
)
275 (if (> lenrw lrw
) (go label617
))
276 (if (> leniw liw
) (go label618
))
277 (setf rtoli
(f2cl-lib:fref rtol-%data%
(1) ((1 *)) rtol-%offset%
))
278 (setf atoli
(f2cl-lib:fref atol-%data%
(1) ((1 *)) atol-%offset%
))
279 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
284 (f2cl-lib:fref rtol-%data%
288 (if (or (= itol
2) (= itol
4))
290 (f2cl-lib:fref atol-%data%
294 (if (< rtoli
0.0d0
) (go label619
))
295 (if (< atoli
0.0d0
) (go label620
))
298 (coerce (f2cl-lib:fsqrt
(f2cl-lib:freal n
)) 'double-float
))
299 (setf rsqrtn
(/ 1.0d0 sqrtn
))
300 (if (= istate
1) (go label100
))
302 (if (<= nq maxord
) (go label90
))
303 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
307 (setf (f2cl-lib:fref rwork-%data%
309 (f2cl-lib:int-add i lsavf
)
313 (f2cl-lib:fref rwork-%data%
315 (f2cl-lib:int-add i lwm
)
320 (if (= n nyh
) (go label200
))
321 (setf i1
(f2cl-lib:int-add lyh
(f2cl-lib:int-mul l nyh
)))
324 (f2cl-lib:int-add lyh
326 (f2cl-lib:int-add maxord
1)
329 (if (> i1 i2
) (go label200
))
330 (f2cl-lib:fdo
(i i1
(f2cl-lib:int-add i
1))
334 (setf (f2cl-lib:fref rwork-%data%
(i) ((1 lrw
)) rwork-%offset%
)
338 (setf uround
(dumach))
340 (if (and (/= itask
4) (/= itask
5)) (go label110
))
342 (f2cl-lib:fref rwork-%data%
(1) ((1 lrw
)) rwork-%offset%
))
343 (if (< (* (- tcrit tout
) (- tout t$
)) 0.0d0
) (go label625
))
344 (if (and (/= h0
0.0d0
) (> (* (- (+ t$ h0
) tcrit
) h0
) 0.0d0
))
345 (setf h0
(- tcrit t$
)))
368 (setf lf0
(f2cl-lib:int-add lyh nyh
))
369 (multiple-value-bind (var-0 var-1 var-2 var-3
)
374 (f2cl-lib:array-slice rwork-%data%
379 (declare (ignore var-0 var-2 var-3
))
383 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
387 (setf (f2cl-lib:fref rwork-%data%
389 (f2cl-lib:int-add i lyh
)
393 (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
))))
396 (dewset n itol rtol atol
397 (f2cl-lib:array-slice rwork-%data%
402 (f2cl-lib:array-slice rwork-%data%
407 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
412 (f2cl-lib:fref rwork-%data%
413 ((f2cl-lib:int-sub
(f2cl-lib:int-add i lewt
)
420 (setf (f2cl-lib:fref rwork-%data%
422 (f2cl-lib:int-add i lewt
)
427 (f2cl-lib:fref rwork-%data%
429 (f2cl-lib:int-add i lewt
)
433 (if (/= h0
0.0d0
) (go label180
))
434 (setf tdist
(abs (- tout t$
)))
435 (setf w0
(max (abs t$
) (abs tout
)))
436 (if (< tdist
(* 2.0d0 uround w0
)) (go label622
))
437 (setf tol
(f2cl-lib:fref rtol-%data%
(1) ((1 *)) rtol-%offset%
))
438 (if (<= itol
2) (go label140
))
439 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
445 (f2cl-lib:fref rtol-%data%
450 (if (> tol
0.0d0
) (go label160
))
451 (setf atoli
(f2cl-lib:fref atol-%data%
(1) ((1 *)) atol-%offset%
))
452 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
455 (if (or (= itol
2) (= itol
4))
457 (f2cl-lib:fref atol-%data%
462 (abs (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)))
463 (if (/= ayi
0.0d0
) (setf tol
(max tol
(/ atoli ayi
))))
466 (setf tol
(max tol
(* 100.0d0 uround
)))
467 (setf tol
(min tol
0.001d0
))
470 (f2cl-lib:array-slice rwork-%data%
475 (f2cl-lib:array-slice rwork-%data%
480 (setf sum
(+ (/ 1.0d0
(* tol w0 w0
)) (* tol
(expt sum
2))))
481 (setf h0
(/ 1.0d0
(f2cl-lib:fsqrt sum
)))
482 (setf h0
(min h0 tdist
))
483 (setf h0
(f2cl-lib:sign h0
(- tout t$
)))
485 (setf rh
(* (abs h0
) hmxi
))
486 (if (> rh
1.0d0
) (setf h0
(/ h0 rh
)))
488 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
492 (setf (f2cl-lib:fref rwork-%data%
494 (f2cl-lib:int-add i lf0
)
499 (f2cl-lib:fref rwork-%data%
501 (f2cl-lib:int-add i lf0
)
513 (f2cl-lib:computed-goto
514 (label210 label250 label220 label230 label240
)
517 (if (< (* (- tn tout
) h
) 0.0d0
) (go label250
))
518 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
520 (f2cl-lib:array-slice rwork-%data%
526 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
528 (if (/= iflag
0) (go label627
))
532 (setf tp
(- tn
(* hu
(+ 1.0d0
(* 100.0d0 uround
)))))
533 (if (> (* (- tp tout
) h
) 0.0d0
) (go label623
))
534 (if (< (* (- tn tout
) h
) 0.0d0
) (go label250
))
538 (f2cl-lib:fref rwork-%data%
(1) ((1 lrw
)) rwork-%offset%
))
539 (if (> (* (- tn tcrit
) h
) 0.0d0
) (go label624
))
540 (if (< (* (- tcrit tout
) h
) 0.0d0
) (go label625
))
541 (if (< (* (- tn tout
) h
) 0.0d0
) (go label245
))
542 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
544 (f2cl-lib:array-slice rwork-%data%
550 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
552 (if (/= iflag
0) (go label627
))
557 (f2cl-lib:fref rwork-%data%
(1) ((1 lrw
)) rwork-%offset%
))
558 (if (> (* (- tn tcrit
) h
) 0.0d0
) (go label624
))
560 (setf hmx
(+ (abs tn
) (abs h
)))
561 (setf ihit
(<= (abs (- tn tcrit
)) (* 100.0d0 uround hmx
)))
562 (if ihit
(go label400
))
563 (setf tnext
(+ tn
(* h
(+ 1.0d0
(* 4.0d0 uround
)))))
564 (if (<= (* (- tnext tcrit
) h
) 0.0d0
) (go label250
))
565 (setf h
(* (- tcrit tn
) (- 1.0d0
(* 4.0d0 uround
))))
566 (if (= istate
2) (setf jstart -
2))
568 (if (>= (f2cl-lib:int-sub nst nslast
) mxstep
) (go label500
))
569 (setf nstd
(f2cl-lib:int-sub nst nslast
))
570 (setf nnid
(f2cl-lib:int-sub nni nni0
))
571 (if (or (< nstd
10) (= nnid
0)) (go label255
))
574 (/ (f2cl-lib:freal
(f2cl-lib:int-sub nli nli0
))
575 (f2cl-lib:freal nnid
))
579 (/ (f2cl-lib:freal
(f2cl-lib:int-sub ncfn ncfn0
))
580 (f2cl-lib:freal nstd
))
584 (/ (f2cl-lib:freal
(f2cl-lib:int-sub ncfl ncfl0
))
585 (f2cl-lib:freal nnid
))
587 (setf lavd
(> avdim
(- maxl
0.05d0
)))
588 (setf lcfn
(> rcfn
0.9d0
))
589 (setf lcfl
(> rcfl
0.9d0
))
590 (setf lwarn
(or lavd lcfn lcfl
))
591 (if (not lwarn
) (go label255
))
592 (setf nwarn
(f2cl-lib:int-add nwarn
1))
593 (if (> nwarn
10) (go label255
))
596 (f2cl-lib:f2cl-set-string msg
597 "DLSODPK- Warning. Poor iterative algorithm performance seen "
599 (xerrwd msg
60 111 0 0 0 0 0 0.0d0
0.0d0
)))
602 (f2cl-lib:f2cl-set-string msg
603 " at T = R1 by average no. of linear iterations = R2 "
605 (xerrwd msg
60 111 0 0 0 0 2 tn avdim
)))
608 (f2cl-lib:f2cl-set-string msg
609 "DLSODPK- Warning. Poor iterative algorithm performance seen "
611 (xerrwd msg
60 112 0 0 0 0 0 0.0d0
0.0d0
)))
614 (f2cl-lib:f2cl-set-string msg
615 " at T = R1 by nonlinear convergence failure rate = R2 "
617 (xerrwd msg
60 112 0 0 0 0 2 tn rcfn
)))
620 (f2cl-lib:f2cl-set-string msg
621 "DLSODPK- Warning. Poor iterative algorithm performance seen "
623 (xerrwd msg
60 113 0 0 0 0 0 0.0d0
0.0d0
)))
626 (f2cl-lib:f2cl-set-string msg
627 " at T = R1 by linear convergence failure rate = R2 "
629 (xerrwd msg
60 113 0 0 0 0 2 tn rcfl
)))
631 (dewset n itol rtol atol
632 (f2cl-lib:array-slice rwork-%data%
637 (f2cl-lib:array-slice rwork-%data%
642 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
647 (f2cl-lib:fref rwork-%data%
648 ((f2cl-lib:int-sub
(f2cl-lib:int-add i lewt
)
655 (setf (f2cl-lib:fref rwork-%data%
657 (f2cl-lib:int-add i lewt
)
662 (f2cl-lib:fref rwork-%data%
664 (f2cl-lib:int-add i lewt
)
672 (f2cl-lib:array-slice rwork-%data%
677 (f2cl-lib:array-slice rwork-%data%
682 (if (<= tolsf
1.0d0
) (go label280
))
683 (setf tolsf
(* tolsf
2.0d0
))
684 (if (= nst
0) (go label626
))
687 (if (/= (+ tn h
) tn
) (go label290
))
688 (setf nhnil
(f2cl-lib:int-add nhnil
1))
689 (if (> nhnil mxhnil
) (go label290
))
690 (f2cl-lib:f2cl-set-string msg
691 "DLSODPK- Warning..Internal T(=R1) and H(=R2) are "
693 (xerrwd msg
50 101 0 0 0 0 0 0.0d0
0.0d0
)
694 (f2cl-lib:f2cl-set-string msg
695 " such that in the machine, T + H = T on the next step "
697 (xerrwd msg
60 101 0 0 0 0 0 0.0d0
0.0d0
)
698 (f2cl-lib:f2cl-set-string msg
699 " (H = step size). Solver will continue anyway."
701 (xerrwd msg
50 101 0 0 0 0 2 tn h
)
702 (if (< nhnil mxhnil
) (go label290
))
703 (f2cl-lib:f2cl-set-string msg
704 "DLSODPK- Above warning has been issued I1 times. "
706 (xerrwd msg
50 102 0 0 0 0 0 0.0d0
0.0d0
)
707 (f2cl-lib:f2cl-set-string msg
708 " It will not be issued again for this problem."
710 (xerrwd msg
50 102 0 1 mxhnil
0 0 0.0d0
0.0d0
)
713 (f2cl-lib:array-slice rwork-%data%
719 (f2cl-lib:array-slice rwork-%data%
724 (f2cl-lib:array-slice rwork-%data%
729 (f2cl-lib:array-slice rwork-%data%
734 (f2cl-lib:array-slice rwork-%data%
739 (f2cl-lib:array-slice rwork-%data%
744 (f2cl-lib:array-slice rwork-%data%
749 (f2cl-lib:array-slice iwork-%data%
755 (setf kgo
(f2cl-lib:int-sub
1 kflag
))
756 (f2cl-lib:computed-goto
(label300 label530 label540 label550
) kgo
)
759 (f2cl-lib:computed-goto
760 (label310 label400 label330 label340 label350
)
763 (if (< (* (- tn tout
) h
) 0.0d0
) (go label250
))
764 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
766 (f2cl-lib:array-slice rwork-%data%
772 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
777 (if (>= (* (- tn tout
) h
) 0.0d0
) (go label400
))
780 (if (< (* (- tn tout
) h
) 0.0d0
) (go label345
))
781 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5
)
783 (f2cl-lib:array-slice rwork-%data%
789 (declare (ignore var-0 var-1 var-2 var-3 var-4
))
794 (setf hmx
(+ (abs tn
) (abs h
)))
795 (setf ihit
(<= (abs (- tn tcrit
)) (* 100.0d0 uround hmx
)))
796 (if ihit
(go label400
))
797 (setf tnext
(+ tn
(* h
(+ 1.0d0
(* 4.0d0 uround
)))))
798 (if (<= (* (- tnext tcrit
) h
) 0.0d0
) (go label250
))
799 (setf h
(* (- tcrit tn
) (- 1.0d0
(* 4.0d0 uround
))))
803 (setf hmx
(+ (abs tn
) (abs h
)))
804 (setf ihit
(<= (abs (- tn tcrit
)) (* 100.0d0 uround hmx
)))
806 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
810 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
811 (f2cl-lib:fref rwork-%data%
813 (f2cl-lib:int-add i lyh
)
818 (if (and (/= itask
4) (/= itask
5)) (go label420
))
819 (if ihit
(setf t$ tcrit
))
822 (setf (f2cl-lib:fref rwork-%data%
(11) ((1 lrw
)) rwork-%offset%
)
824 (setf (f2cl-lib:fref rwork-%data%
(12) ((1 lrw
)) rwork-%offset%
) h
)
825 (setf (f2cl-lib:fref rwork-%data%
(13) ((1 lrw
)) rwork-%offset%
)
827 (setf (f2cl-lib:fref iwork-%data%
(11) ((1 liw
)) iwork-%offset%
)
829 (setf (f2cl-lib:fref iwork-%data%
(12) ((1 liw
)) iwork-%offset%
)
831 (setf (f2cl-lib:fref iwork-%data%
(13) ((1 liw
)) iwork-%offset%
)
833 (setf (f2cl-lib:fref iwork-%data%
(14) ((1 liw
)) iwork-%offset%
)
835 (setf (f2cl-lib:fref iwork-%data%
(15) ((1 liw
)) iwork-%offset%
)
837 (setf (f2cl-lib:fref iwork-%data%
(19) ((1 liw
)) iwork-%offset%
)
839 (setf (f2cl-lib:fref iwork-%data%
(20) ((1 liw
)) iwork-%offset%
)
841 (setf (f2cl-lib:fref iwork-%data%
(21) ((1 liw
)) iwork-%offset%
)
843 (setf (f2cl-lib:fref iwork-%data%
(22) ((1 liw
)) iwork-%offset%
)
845 (setf (f2cl-lib:fref iwork-%data%
(23) ((1 liw
)) iwork-%offset%
)
849 (f2cl-lib:f2cl-set-string msg
850 "DLSODPK- At current T (=R1), MXSTEP (=I1) steps "
852 (xerrwd msg
50 201 0 0 0 0 0 0.0d0
0.0d0
)
853 (f2cl-lib:f2cl-set-string msg
854 " taken on this call before reaching TOUT "
856 (xerrwd msg
50 201 0 1 mxstep
0 1 tn
0.0d0
)
861 (f2cl-lib:fref rwork-%data%
862 ((f2cl-lib:int-sub
(f2cl-lib:int-add lewt i
)
866 (f2cl-lib:f2cl-set-string msg
867 "DLSODPK- At T (=R1), EWT(I1) has become R2 <= 0. "
869 (xerrwd msg
50 202 0 1 i
0 2 tn ewti
)
873 (f2cl-lib:f2cl-set-string msg
874 "DLSODPK- At T (=R1), too much accuracy requested "
876 (xerrwd msg
50 203 0 0 0 0 0 0.0d0
0.0d0
)
877 (f2cl-lib:f2cl-set-string msg
878 " for precision of machine.. See TOLSF (=R2) "
880 (xerrwd msg
50 203 0 0 0 0 2 tn tolsf
)
881 (setf (f2cl-lib:fref rwork-%data%
(14) ((1 lrw
)) rwork-%offset%
)
886 (f2cl-lib:f2cl-set-string msg
887 "DLSODPK- At T(=R1), step size H(=R2), the error "
889 (xerrwd msg
50 204 0 0 0 0 0 0.0d0
0.0d0
)
890 (f2cl-lib:f2cl-set-string msg
891 " test failed repeatedly or with ABS(H) = HMIN"
893 (xerrwd msg
50 204 0 0 0 0 2 tn h
)
897 (f2cl-lib:f2cl-set-string msg
898 "DLSODPK- At T (=R1) and step size H (=R2), the "
900 (xerrwd msg
50 205 0 0 0 0 0 0.0d0
0.0d0
)
901 (f2cl-lib:f2cl-set-string msg
902 " corrector convergence failed repeatedly "
904 (xerrwd msg
50 205 0 0 0 0 0 0.0d0
0.0d0
)
905 (f2cl-lib:f2cl-set-string msg
906 " or with ABS(H) = HMIN "
908 (xerrwd msg
30 205 0 0 0 0 2 tn h
)
912 (f2cl-lib:f2cl-set-string msg
913 "DLSODPK- At T (=R1) an unrecoverable error return"
915 (xerrwd msg
50 205 0 0 0 0 0 0.0d0
0.0d0
)
916 (f2cl-lib:f2cl-set-string msg
917 " was made from Subroutine PSOL "
919 (xerrwd msg
40 205 0 0 0 0 1 tn
0.0d0
)
925 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
931 (f2cl-lib:fref rwork-%data%
933 (f2cl-lib:int-add i lacor
)
937 (f2cl-lib:fref rwork-%data%
939 (f2cl-lib:int-add i lewt
)
943 (if (>= big size
) (go label570
))
947 (setf (f2cl-lib:fref iwork-%data%
(16) ((1 liw
)) iwork-%offset%
)
950 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
954 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
955 (f2cl-lib:fref rwork-%data%
957 (f2cl-lib:int-add i lyh
)
962 (setf (f2cl-lib:fref rwork-%data%
(11) ((1 lrw
)) rwork-%offset%
)
964 (setf (f2cl-lib:fref rwork-%data%
(12) ((1 lrw
)) rwork-%offset%
) h
)
965 (setf (f2cl-lib:fref rwork-%data%
(13) ((1 lrw
)) rwork-%offset%
)
967 (setf (f2cl-lib:fref iwork-%data%
(11) ((1 liw
)) iwork-%offset%
)
969 (setf (f2cl-lib:fref iwork-%data%
(12) ((1 liw
)) iwork-%offset%
)
971 (setf (f2cl-lib:fref iwork-%data%
(13) ((1 liw
)) iwork-%offset%
)
973 (setf (f2cl-lib:fref iwork-%data%
(14) ((1 liw
)) iwork-%offset%
)
975 (setf (f2cl-lib:fref iwork-%data%
(15) ((1 liw
)) iwork-%offset%
)
977 (setf (f2cl-lib:fref iwork-%data%
(19) ((1 liw
)) iwork-%offset%
)
979 (setf (f2cl-lib:fref iwork-%data%
(20) ((1 liw
)) iwork-%offset%
)
981 (setf (f2cl-lib:fref iwork-%data%
(21) ((1 liw
)) iwork-%offset%
)
983 (setf (f2cl-lib:fref iwork-%data%
(22) ((1 liw
)) iwork-%offset%
)
985 (setf (f2cl-lib:fref iwork-%data%
(23) ((1 liw
)) iwork-%offset%
)
989 (f2cl-lib:f2cl-set-string msg
990 "DLSODPK- ISTATE(=I1) illegal."
992 (xerrwd msg
30 1 0 1 istate
0 0 0.0d0
0.0d0
)
993 (if (< istate
0) (go label800
))
996 (f2cl-lib:f2cl-set-string msg
997 "DLSODPK- ITASK (=I1) illegal."
999 (xerrwd msg
30 2 0 1 itask
0 0 0.0d0
0.0d0
)
1002 (f2cl-lib:f2cl-set-string msg
1003 "DLSODPK- ISTATE > 1 but DLSODPK not initialized."
1005 (xerrwd msg
50 3 0 0 0 0 0 0.0d0
0.0d0
)
1008 (f2cl-lib:f2cl-set-string msg
1009 "DLSODPK- NEQ (=I1) < 1 "
1011 (xerrwd msg
30 4 0 1
1012 (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0 0 0.0d0
1016 (f2cl-lib:f2cl-set-string msg
1017 "DLSODPK- ISTATE = 3 and NEQ increased (I1 to I2)."
1019 (xerrwd msg
50 5 0 2 n
1020 (f2cl-lib:fref neq-%data%
(1) ((1 *)) neq-%offset%
) 0 0.0d0
0.0d0
)
1023 (f2cl-lib:f2cl-set-string msg
1024 "DLSODPK- ITOL (=I1) illegal. "
1026 (xerrwd msg
30 6 0 1 itol
0 0 0.0d0
0.0d0
)
1029 (f2cl-lib:f2cl-set-string msg
1030 "DLSODPK- IOPT (=I1) illegal. "
1032 (xerrwd msg
30 7 0 1 iopt
0 0 0.0d0
0.0d0
)
1035 (f2cl-lib:f2cl-set-string msg
1036 "DLSODPK- MF (=I1) illegal. "
1038 (xerrwd msg
30 8 0 1 mf
0 0 0.0d0
0.0d0
)
1041 (f2cl-lib:f2cl-set-string msg
1042 "DLSODPK- MAXORD (=I1) < 0 "
1044 (xerrwd msg
30 11 0 1 maxord
0 0 0.0d0
0.0d0
)
1047 (f2cl-lib:f2cl-set-string msg
1048 "DLSODPK- MXSTEP (=I1) < 0 "
1050 (xerrwd msg
30 12 0 1 mxstep
0 0 0.0d0
0.0d0
)
1053 (f2cl-lib:f2cl-set-string msg
1054 "DLSODPK- MXHNIL (=I1) < 0 "
1056 (xerrwd msg
30 13 0 1 mxhnil
0 0 0.0d0
0.0d0
)
1059 (f2cl-lib:f2cl-set-string msg
1060 "DLSODPK- TOUT (=R1) behind T (=R2) "
1062 (xerrwd msg
40 14 0 0 0 0 2 tout t$
)
1063 (f2cl-lib:f2cl-set-string msg
1064 " Integration direction is given by H0 (=R1) "
1066 (xerrwd msg
50 14 0 0 0 0 1 h0
0.0d0
)
1069 (f2cl-lib:f2cl-set-string msg
1070 "DLSODPK- HMAX (=R1) < 0.0 "
1072 (xerrwd msg
30 15 0 0 0 0 1 hmax
0.0d0
)
1075 (f2cl-lib:f2cl-set-string msg
1076 "DLSODPK- HMIN (=R1) < 0.0 "
1078 (xerrwd msg
30 16 0 0 0 0 1 hmin
0.0d0
)
1081 (f2cl-lib:f2cl-set-string msg
1082 "DLSODPK- RWORK length needed, LENRW(=I1), exceeds LRW(=I2) "
1084 (xerrwd msg
60 17 0 2 lenrw lrw
0 0.0d0
0.0d0
)
1087 (f2cl-lib:f2cl-set-string msg
1088 "DLSODPK- IWORK length needed, LENIW(=I1), exceeds LIW(=I2) "
1090 (xerrwd msg
60 18 0 2 leniw liw
0 0.0d0
0.0d0
)
1093 (f2cl-lib:f2cl-set-string msg
1094 "DLSODPK- RTOL(I1) is R1 < 0.0 "
1096 (xerrwd msg
40 19 0 1 i
0 1 rtoli
0.0d0
)
1099 (f2cl-lib:f2cl-set-string msg
1100 "DLSODPK- ATOL(I1) is R1 < 0.0 "
1102 (xerrwd msg
40 20 0 1 i
0 1 atoli
0.0d0
)
1106 (f2cl-lib:fref rwork-%data%
1107 ((f2cl-lib:int-sub
(f2cl-lib:int-add lewt i
)
1111 (f2cl-lib:f2cl-set-string msg
1112 "DLSODPK- EWT(I1) is R1 <= 0.0 "
1114 (xerrwd msg
40 21 0 1 i
0 1 ewti
0.0d0
)
1117 (f2cl-lib:f2cl-set-string msg
1118 "DLSODPK- TOUT(=R1) too close to T(=R2) to start integration."
1120 (xerrwd msg
60 22 0 0 0 0 2 tout t$
)
1123 (f2cl-lib:f2cl-set-string msg
1124 "DLSODPK- ITASK = I1 and TOUT (=R1) behind TCUR - HU (= R2) "
1126 (xerrwd msg
60 23 0 1 itask
0 2 tout tp
)
1129 (f2cl-lib:f2cl-set-string msg
1130 "DLSODPK- ITASK = 4 or 5 and TCRIT (=R1) behind TCUR (=R2) "
1132 (xerrwd msg
60 24 0 0 0 0 2 tcrit tn
)
1135 (f2cl-lib:f2cl-set-string msg
1136 "DLSODPK- ITASK = 4 or 5 and TCRIT (=R1) behind TOUT (=R2) "
1138 (xerrwd msg
60 25 0 0 0 0 2 tcrit tout
)
1141 (f2cl-lib:f2cl-set-string msg
1142 "DLSODPK- At start of problem, too much accuracy "
1144 (xerrwd msg
50 26 0 0 0 0 0 0.0d0
0.0d0
)
1145 (f2cl-lib:f2cl-set-string msg
1146 " requested for precision of machine.. See TOLSF (=R1) "
1148 (xerrwd msg
60 26 0 0 0 0 1 tolsf
0.0d0
)
1149 (setf (f2cl-lib:fref rwork-%data%
(14) ((1 lrw
)) rwork-%offset%
)
1153 (f2cl-lib:f2cl-set-string msg
1154 "DLSODPK- Trouble in DINTDY. ITASK = I1, TOUT = R1"
1156 (xerrwd msg
50 27 0 1 itask
0 1 tout
0.0d0
)
1161 (f2cl-lib:f2cl-set-string msg
1162 "DLSODPK- Run aborted.. apparent infinite loop. "
1164 (xerrwd msg
50 303 2 0 0 0 0 0.0d0
0.0d0
)
1187 (in-package #:cl-user
)
1188 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
1189 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
1190 (setf (gethash 'fortran-to-lisp
::dlsodpk
1191 fortran-to-lisp
::*f2cl-function-info
*)
1192 (fortran-to-lisp::make-f2cl-finfo
1193 :arg-types
'(t (array fortran-to-lisp
::integer4
(*))
1194 (array double-float
(*)) (double-float) (double-float)
1195 (fortran-to-lisp::integer4
) (array double-float
(*))
1196 (array double-float
(*)) (fortran-to-lisp::integer4
)
1197 (fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
1198 (array double-float
(*)) (fortran-to-lisp::integer4
)
1199 (array fortran-to-lisp
::integer4
(*))
1200 (fortran-to-lisp::integer4
) t t
1201 (fortran-to-lisp::integer4
))
1202 :return-values
'(nil nil nil fortran-to-lisp
::t$ nil nil nil nil nil
1203 fortran-to-lisp
::istate nil nil nil nil nil nil nil
1205 :calls
'(fortran-to-lisp::dstodpk fortran-to-lisp
::xerrwd
1206 fortran-to-lisp
::dintdy fortran-to-lisp
::dvnorm
1207 fortran-to-lisp
::dewset
))))