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")
20 (defun dprep (neq y yh savf ewt ftem ia ja wk iwk ipper f jac
)
21 (declare (type (f2cl-lib:integer4
) ipper
)
22 (type (array double-float
(*)) wk ftem ewt savf yh y
)
23 (type (array f2cl-lib
:integer4
(*)) iwk ja ia neq
))
25 (symbol-macrolet ((tn (aref (dls001-part-0 *dls001-common-block
*) 216))
26 (miter (aref (dls001-part-1 *dls001-common-block
*) 26))
27 (n (aref (dls001-part-1 *dls001-common-block
*) 31))
28 (seth (aref (dlss01-part-0 *dlss01-common-block
*) 5))
29 (iesp (aref (dlss01-part-1 *dlss01-common-block
*) 1))
30 (istatc (aref (dlss01-part-1 *dlss01-common-block
*) 2))
31 (iys (aref (dlss01-part-1 *dlss01-common-block
*) 3))
32 (iba (aref (dlss01-part-1 *dlss01-common-block
*) 4))
33 (ibian (aref (dlss01-part-1 *dlss01-common-block
*) 5))
34 (ibjan (aref (dlss01-part-1 *dlss01-common-block
*) 6))
35 (ibjgp (aref (dlss01-part-1 *dlss01-common-block
*) 7))
36 (ipian (aref (dlss01-part-1 *dlss01-common-block
*) 8))
37 (ipjan (aref (dlss01-part-1 *dlss01-common-block
*) 9))
38 (ipjgp (aref (dlss01-part-1 *dlss01-common-block
*) 10))
39 (ipigp (aref (dlss01-part-1 *dlss01-common-block
*) 11))
40 (ipr (aref (dlss01-part-1 *dlss01-common-block
*) 12))
41 (ipc (aref (dlss01-part-1 *dlss01-common-block
*) 13))
42 (ipic (aref (dlss01-part-1 *dlss01-common-block
*) 14))
43 (ipisp (aref (dlss01-part-1 *dlss01-common-block
*) 15))
44 (iprsp (aref (dlss01-part-1 *dlss01-common-block
*) 16))
45 (ipa (aref (dlss01-part-1 *dlss01-common-block
*) 17))
46 (lenwk (aref (dlss01-part-1 *dlss01-common-block
*) 20))
47 (lreq (aref (dlss01-part-1 *dlss01-common-block
*) 21))
48 (lrat (aref (dlss01-part-1 *dlss01-common-block
*) 22))
49 (moss (aref (dlss01-part-1 *dlss01-common-block
*) 25))
50 (ngp (aref (dlss01-part-1 *dlss01-common-block
*) 28))
51 (nnz (aref (dlss01-part-1 *dlss01-common-block
*) 30))
52 (nsp (aref (dlss01-part-1 *dlss01-common-block
*) 31))
53 (nzl (aref (dlss01-part-1 *dlss01-common-block
*) 32))
54 (nzu (aref (dlss01-part-1 *dlss01-common-block
*) 33)))
55 (f2cl-lib:with-multi-array-data
56 ((neq f2cl-lib
:integer4 neq-%data% neq-%offset%
)
57 (ia f2cl-lib
:integer4 ia-%data% ia-%offset%
)
58 (ja f2cl-lib
:integer4 ja-%data% ja-%offset%
)
59 (iwk f2cl-lib
:integer4 iwk-%data% iwk-%offset%
)
60 (y double-float y-%data% y-%offset%
)
61 (yh double-float yh-%data% yh-%offset%
)
62 (savf double-float savf-%data% savf-%offset%
)
63 (ewt double-float ewt-%data% ewt-%offset%
)
64 (ftem double-float ftem-%data% ftem-%offset%
)
65 (wk double-float wk-%data% wk-%offset%
))
66 (prog ((nzsut 0) (np1 0) (maxg 0) (liwk 0) (lenigp 0) (ldif 0) (kmin 0)
67 (kmax 0) (knew 0) (k 0) (jfound 0) (j 0) (iptt2 0) (iptt1 0)
68 (ipiu 0) (ipil 0) (ier 0) (ibr 0) (i 0) (yj 0.0d0
) (fac 0.0d0
)
69 (erwt 0.0d0
) (dyj 0.0d0
) (dq 0.0d0
))
70 (declare (type (double-float) dq dyj erwt fac yj
)
71 (type (f2cl-lib:integer4
) i ibr ier ipil ipiu iptt1 iptt2 j
72 jfound k knew kmax kmin ldif
73 lenigp liwk maxg np1 nzsut
))
74 (setf ibian
(f2cl-lib:int-mul lrat
2))
75 (setf ipian
(f2cl-lib:int-add ibian
1))
76 (setf np1
(f2cl-lib:int-add n
1))
77 (setf ipjan
(f2cl-lib:int-add ipian np1
))
78 (setf ibjan
(f2cl-lib:int-sub ipjan
1))
79 (setf liwk
(f2cl-lib:int-mul lenwk lrat
))
80 (if (> (f2cl-lib:int-sub
(f2cl-lib:int-add ipjan n
) 1) liwk
)
82 (if (= moss
0) (go label30
))
83 (if (= istatc
3) (go label20
))
84 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
89 (f2cl-lib:fref ewt-%data%
(i) ((1 *)) ewt-%offset%
)))
90 (setf fac
(+ 1.0d0
(/ 1.0d0
(+ i
1.0d0
))))
91 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
92 (+ (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
95 (f2cl-lib:fref y-%data%
100 (f2cl-lib:computed-goto
(label70 label100
) moss
)
102 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
106 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
107 (f2cl-lib:fref yh-%data%
(i) ((1 *)) yh-%offset%
))))
108 (f2cl-lib:computed-goto
(label70 label100
) moss
)
111 (setf kmin
(f2cl-lib:fref ia-%data%
(1) ((1 *)) ia-%offset%
))
112 (setf (f2cl-lib:fref iwk-%data%
(ipian) ((1 *)) iwk-%offset%
) 1)
113 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
119 (f2cl-lib:fref ia-%data%
120 ((f2cl-lib:int-add j
1))
124 (if (> kmin kmax
) (go label45
))
125 (f2cl-lib:fdo
(k kmin
(f2cl-lib:int-add k
1))
128 (setf i
(f2cl-lib:fref ja-%data%
(k) ((1 *)) ja-%offset%
))
129 (if (= i j
) (setf jfound
1))
130 (if (> knew liwk
) (go label210
))
131 (setf (f2cl-lib:fref iwk-%data%
(knew) ((1 *)) iwk-%offset%
)
133 (setf knew
(f2cl-lib:int-add knew
1))
135 (if (= jfound
1) (go label50
))
137 (if (> knew liwk
) (go label210
))
138 (setf (f2cl-lib:fref iwk-%data%
(knew) ((1 *)) iwk-%offset%
) j
)
139 (setf knew
(f2cl-lib:int-add knew
1))
141 (setf (f2cl-lib:fref iwk-%data%
142 ((f2cl-lib:int-add ipian j
))
145 (f2cl-lib:int-sub
(f2cl-lib:int-add knew
1) ipjan
))
146 (setf kmin
(f2cl-lib:int-add kmax
1))
150 (multiple-value-bind (var-0 var-1 var-2 var-3
)
151 (funcall f neq tn y savf
)
152 (declare (ignore var-0 var-2 var-3
))
156 (setf (f2cl-lib:fref iwk-%data%
(ipian) ((1 *)) iwk-%offset%
) 1)
157 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
160 (if (> k liwk
) (go label210
))
161 (setf (f2cl-lib:fref iwk-%data%
(k) ((1 *)) iwk-%offset%
) j
)
162 (setf k
(f2cl-lib:int-add k
1))
163 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
167 (setf (f2cl-lib:fref savf-%data%
(i) ((1 *)) savf-%offset%
)
169 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
175 (f2cl-lib:array-slice iwk-%data%
180 (f2cl-lib:array-slice iwk-%data%
186 (declare (ignore var-0 var-2 var-4 var-5 var-6
))
191 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
196 (abs (f2cl-lib:fref savf-%data%
(i) ((1 *)) savf-%offset%
))
199 (if (= i j
) (go label80
))
200 (if (> k liwk
) (go label210
))
201 (setf (f2cl-lib:fref iwk-%data%
(k) ((1 *)) iwk-%offset%
) i
)
202 (setf k
(f2cl-lib:int-add k
1))
204 (setf (f2cl-lib:fref iwk-%data%
205 ((f2cl-lib:int-add ipian j
))
208 (f2cl-lib:int-sub
(f2cl-lib:int-add k
1) ipjan
))
213 (setf (f2cl-lib:fref iwk-%data%
(ipian) ((1 *)) iwk-%offset%
) 1)
214 (multiple-value-bind (var-0 var-1 var-2 var-3
)
215 (funcall f neq tn y savf
)
216 (declare (ignore var-0 var-2 var-3
))
219 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
222 (if (> k liwk
) (go label210
))
223 (setf (f2cl-lib:fref iwk-%data%
(k) ((1 *)) iwk-%offset%
) j
)
224 (setf k
(f2cl-lib:int-add k
1))
225 (setf yj
(f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
))
228 (f2cl-lib:fref ewt-%data%
(j) ((1 *)) ewt-%offset%
)))
229 (setf dyj
(f2cl-lib:sign erwt yj
))
230 (setf (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
) (+ yj dyj
))
231 (multiple-value-bind (var-0 var-1 var-2 var-3
)
232 (funcall f neq tn y ftem
)
233 (declare (ignore var-0 var-2 var-3
))
236 (setf (f2cl-lib:fref y-%data%
(j) ((1 *)) y-%offset%
) yj
)
237 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
243 (f2cl-lib:fref ftem-%data%
247 (f2cl-lib:fref savf-%data%
252 (if (<= (abs dq
) seth
) (go label110
))
253 (if (= i j
) (go label110
))
254 (if (> k liwk
) (go label210
))
255 (setf (f2cl-lib:fref iwk-%data%
(k) ((1 *)) iwk-%offset%
) i
)
256 (setf k
(f2cl-lib:int-add k
1))
258 (setf (f2cl-lib:fref iwk-%data%
259 ((f2cl-lib:int-add ipian j
))
262 (f2cl-lib:int-sub
(f2cl-lib:int-add k
1) ipjan
))
265 (if (or (= moss
0) (/= istatc
1)) (go label150
))
266 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
270 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
271 (f2cl-lib:fref yh-%data%
(i) ((1 *)) yh-%offset%
))))
275 (f2cl-lib:fref iwk-%data%
276 ((f2cl-lib:int-add ipian n
))
281 (setf ipigp
(f2cl-lib:int-add ipjan nnz
))
282 (if (/= miter
2) (go label160
))
284 (setf ipjgp
(f2cl-lib:int-add ipjan nnz
))
285 (setf ibjgp
(f2cl-lib:int-sub ipjgp
1))
286 (setf ipigp
(f2cl-lib:int-add ipjgp n
))
287 (setf iptt1
(f2cl-lib:int-add ipigp np1
))
288 (setf iptt2
(f2cl-lib:int-add iptt1 n
))
289 (setf lreq
(f2cl-lib:int-sub
(f2cl-lib:int-add iptt2 n
) 1))
290 (if (> lreq liwk
) (go label220
))
292 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
)
294 (f2cl-lib:array-slice iwk-%data%
299 (f2cl-lib:array-slice iwk-%data%
305 (f2cl-lib:array-slice iwk-%data%
310 (f2cl-lib:array-slice iwk-%data%
315 (f2cl-lib:array-slice iwk-%data%
320 (f2cl-lib:array-slice iwk-%data%
326 (declare (ignore var-0 var-1 var-2 var-3 var-5 var-6 var-7 var-8
))
329 (if (/= ier
0) (go label220
))
330 (setf lenigp
(f2cl-lib:int-add ngp
1))
332 (setf ipr
(f2cl-lib:int-add ipigp lenigp
))
334 (setf ipic
(f2cl-lib:int-add ipc n
))
335 (setf ipisp
(f2cl-lib:int-add ipic n
))
337 (+ (the f2cl-lib
:integer4
(truncate (- ipisp
2) lrat
)) 2))
338 (setf iesp
(f2cl-lib:int-sub
(f2cl-lib:int-add lenwk
1) iprsp
))
339 (if (< iesp
0) (go label230
))
340 (setf ibr
(f2cl-lib:int-sub ipr
1))
341 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
345 (setf (f2cl-lib:fref iwk-%data%
346 ((f2cl-lib:int-add ibr i
))
350 (setf nsp
(f2cl-lib:int-sub
(f2cl-lib:int-add liwk
1) ipisp
))
352 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
)
354 (f2cl-lib:array-slice iwk-%data%
359 (f2cl-lib:array-slice iwk-%data%
365 (f2cl-lib:array-slice iwk-%data%
370 (f2cl-lib:array-slice iwk-%data%
376 (f2cl-lib:array-slice iwk-%data%
382 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
385 (if (= iys
(f2cl-lib:int-add
(f2cl-lib:int-mul
11 n
) 1))
387 (if (/= iys
0) (go label230
))
388 (setf ipa
(f2cl-lib:int-sub
(f2cl-lib:int-add lenwk
1) nnz
))
389 (setf nsp
(f2cl-lib:int-sub ipa iprsp
))
392 (max (the f2cl-lib
:integer4
(truncate (* 12 n
) lrat
))
393 (+ (the f2cl-lib
:integer4
(truncate (* 6 n
) lrat
))
394 (f2cl-lib:int-mul
2 n
)
399 (f2cl-lib:int-sub
(f2cl-lib:int-add lreq iprsp
) 1)
401 (if (> lreq lenwk
) (go label250
))
402 (setf iba
(f2cl-lib:int-sub ipa
1))
403 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
407 (setf (f2cl-lib:fref wk-%data%
408 ((f2cl-lib:int-add iba i
))
414 (f2cl-lib:int-mul lrat
(f2cl-lib:int-sub iprsp
1))
417 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
418 var-10 var-11 var-12 var-13 var-14
)
420 (f2cl-lib:array-slice iwk-%data%
425 (f2cl-lib:array-slice iwk-%data%
430 (f2cl-lib:array-slice iwk-%data%
435 (f2cl-lib:array-slice iwk-%data%
440 (f2cl-lib:array-slice iwk-%data%
445 (f2cl-lib:array-slice wk-%data%
450 (f2cl-lib:array-slice wk-%data%
455 (f2cl-lib:array-slice wk-%data%
461 (f2cl-lib:array-slice iwk-%data%
466 (f2cl-lib:array-slice wk-%data%
472 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
473 var-8 var-9 var-10 var-11 var-13
))
476 (setf lreq
(f2cl-lib:int-sub lenwk iesp
))
477 (if (= iys
(f2cl-lib:int-add
(f2cl-lib:int-mul
10 n
) 1))
479 (if (/= iys
0) (go label260
))
481 (setf ipiu
(f2cl-lib:int-add ipil
(f2cl-lib:int-mul
2 n
) 1))
484 (f2cl-lib:fref iwk-%data%
485 ((f2cl-lib:int-add ipil n
))
488 (f2cl-lib:fref iwk-%data%
(ipil) ((1 *)) iwk-%offset%
)))
491 (f2cl-lib:fref iwk-%data%
492 ((f2cl-lib:int-add ipiu n
))
495 (f2cl-lib:fref iwk-%data%
(ipiu) ((1 *)) iwk-%offset%
)))
496 (if (> lrat
1) (go label190
))
497 (multiple-value-bind (var-0 var-1 var-2
)
499 (f2cl-lib:array-slice iwk-%data%
505 (declare (ignore var-0 var-1
))
507 (setf lreq
(f2cl-lib:int-add lreq ldif
))
509 (if (and (= lrat
2) (= nnz n
)) (setf lreq
(f2cl-lib:int-add lreq
1)))
510 (setf nsp
(f2cl-lib:int-sub
(f2cl-lib:int-add nsp lreq
) lenwk
))
511 (setf ipa
(f2cl-lib:int-sub
(f2cl-lib:int-add lreq
1) nnz
))
512 (setf iba
(f2cl-lib:int-sub ipa
1))
518 (+ 2 (the f2cl-lib
:integer4
(truncate (+ (* 2 n
) 1) lrat
))))
520 (max (the f2cl-lib
:integer4
(f2cl-lib:int-add lenwk
1))
521 (the f2cl-lib
:integer4 lreq
)))
525 (setf lreq
(+ (the f2cl-lib
:integer4
(truncate (- lreq
1) lrat
)) 1))
529 (multiple-value-bind (var-0 var-1 var-2 var-3
)
531 (f2cl-lib:array-slice iwk-%data%
536 (f2cl-lib:array-slice iwk-%data%
542 (declare (ignore var-0 var-1 var-2
))
545 (+ (f2cl-lib:int-sub lenwk iesp
)
546 (the f2cl-lib
:integer4
547 (truncate (- (+ (* 3 n
) (* 4 nzsut
)) 1) lrat
))
562 (values nil nil nil nil nil nil nil nil nil nil ipper nil nil
)))))))
564 (in-package #:cl-user
)
565 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
566 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
567 (setf (gethash 'fortran-to-lisp
::dprep fortran-to-lisp
::*f2cl-function-info
*)
568 (fortran-to-lisp::make-f2cl-finfo
569 :arg-types
'((array fortran-to-lisp
::integer4
(*))
570 (array double-float
(*)) (array double-float
(*))
571 (array double-float
(*)) (array double-float
(*))
572 (array double-float
(*))
573 (array fortran-to-lisp
::integer4
(*))
574 (array fortran-to-lisp
::integer4
(*))
575 (array double-float
(*))
576 (array fortran-to-lisp
::integer4
(*))
577 (fortran-to-lisp::integer4
) t t
)
578 :return-values
'(nil nil nil nil nil nil nil nil nil nil
579 fortran-to-lisp
::ipper nil nil
)
580 :calls
'(fortran-to-lisp::cntnzu fortran-to-lisp
::adjlr
581 fortran-to-lisp
::cdrv fortran-to-lisp
::odrv
582 fortran-to-lisp
::jgroup
))))