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 dprjs (neq y yh nyh ewt ftem savf wk iwk f jac
)
21 (declare (type (f2cl-lib:integer4
) nyh
)
22 (type (array double-float
(*)) wk savf ftem ewt yh y
)
23 (type (array f2cl-lib
:integer4
(*)) iwk neq
))
25 (symbol-macrolet ((el0 (aref (dls001-part-0 *dls001-common-block
*) 210))
26 (h (aref (dls001-part-0 *dls001-common-block
*) 211))
27 (rc (aref (dls001-part-0 *dls001-common-block
*) 215))
28 (tn (aref (dls001-part-0 *dls001-common-block
*) 216))
29 (uround (aref (dls001-part-0 *dls001-common-block
*) 217))
30 (icf (aref (dls001-part-1 *dls001-common-block
*) 12))
31 (ierpj (aref (dls001-part-1 *dls001-common-block
*) 13))
32 (jcur (aref (dls001-part-1 *dls001-common-block
*) 15))
33 (miter (aref (dls001-part-1 *dls001-common-block
*) 26))
34 (n (aref (dls001-part-1 *dls001-common-block
*) 31))
35 (nst (aref (dls001-part-1 *dls001-common-block
*) 33))
36 (nfe (aref (dls001-part-1 *dls001-common-block
*) 34))
37 (nje (aref (dls001-part-1 *dls001-common-block
*) 35))
38 (con0 (aref (dlss01-part-0 *dlss01-common-block
*) 0))
39 (conmin (aref (dlss01-part-0 *dlss01-common-block
*) 1))
40 (ccmxj (aref (dlss01-part-0 *dlss01-common-block
*) 2))
41 (psmall (aref (dlss01-part-0 *dlss01-common-block
*) 3))
42 (rbig (aref (dlss01-part-0 *dlss01-common-block
*) 4))
43 (iplost (aref (dlss01-part-1 *dlss01-common-block
*) 0))
44 (iesp (aref (dlss01-part-1 *dlss01-common-block
*) 1))
45 (iys (aref (dlss01-part-1 *dlss01-common-block
*) 3))
46 (iba (aref (dlss01-part-1 *dlss01-common-block
*) 4))
47 (ibian (aref (dlss01-part-1 *dlss01-common-block
*) 5))
48 (ibjan (aref (dlss01-part-1 *dlss01-common-block
*) 6))
49 (ibjgp (aref (dlss01-part-1 *dlss01-common-block
*) 7))
50 (ipian (aref (dlss01-part-1 *dlss01-common-block
*) 8))
51 (ipjan (aref (dlss01-part-1 *dlss01-common-block
*) 9))
52 (ipigp (aref (dlss01-part-1 *dlss01-common-block
*) 11))
53 (ipr (aref (dlss01-part-1 *dlss01-common-block
*) 12))
54 (ipc (aref (dlss01-part-1 *dlss01-common-block
*) 13))
55 (ipic (aref (dlss01-part-1 *dlss01-common-block
*) 14))
56 (ipisp (aref (dlss01-part-1 *dlss01-common-block
*) 15))
57 (iprsp (aref (dlss01-part-1 *dlss01-common-block
*) 16))
58 (ipa (aref (dlss01-part-1 *dlss01-common-block
*) 17))
59 (msbj (aref (dlss01-part-1 *dlss01-common-block
*) 26))
60 (nslj (aref (dlss01-part-1 *dlss01-common-block
*) 27))
61 (ngp (aref (dlss01-part-1 *dlss01-common-block
*) 28))
62 (nlu (aref (dlss01-part-1 *dlss01-common-block
*) 29))
63 (nsp (aref (dlss01-part-1 *dlss01-common-block
*) 31)))
64 (f2cl-lib:with-multi-array-data
65 ((neq f2cl-lib
:integer4 neq-%data% neq-%offset%
)
66 (iwk f2cl-lib
:integer4 iwk-%data% iwk-%offset%
)
67 (y double-float y-%data% y-%offset%
)
68 (yh double-float yh-%data% yh-%offset%
)
69 (ewt double-float ewt-%data% ewt-%offset%
)
70 (ftem double-float ftem-%data% ftem-%offset%
)
71 (savf double-float savf-%data% savf-%offset%
)
72 (wk double-float wk-%data% wk-%offset%
))
73 (prog ((ng 0) (kmin 0) (kmax 0) (k 0) (jmin 0) (jmax 0) (jok 0) (jj 0)
74 (j 0) (imul 0) (i 0) (srur 0.0d0
) (rcont 0.0d0
) (rcon 0.0d0
)
75 (r0 0.0d0
) (r 0.0d0
) (pij 0.0d0
) (hl0 0.0d0
) (fac 0.0d0
)
76 (di 0.0d0
) (con 0.0d0
))
77 (declare (type (double-float) con di fac hl0 pij r r0 rcon rcont
79 (type (f2cl-lib:integer4
) i imul j jj jok jmax jmin k kmax
83 (if (= miter
3) (go label300
))
85 (if (or (= nst
0) (>= nst
(f2cl-lib:int-add nslj msbj
)))
87 (if (and (= icf
1) (< (abs (- rc
1.0d0
)) ccmxj
)) (setf jok
0))
88 (if (= icf
2) (setf jok
0))
89 (if (= jok
1) (go label250
))
92 (setf nje
(f2cl-lib:int-add nje
1))
95 (setf conmin
(abs con
))
96 (f2cl-lib:computed-goto
(label100 label200
) miter
)
98 (setf kmin
(f2cl-lib:fref iwk-%data%
(ipian) ((1 *)) iwk-%offset%
))
99 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
104 (f2cl-lib:fref iwk-%data%
105 ((f2cl-lib:int-add ipian j
))
109 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
113 (setf (f2cl-lib:fref ftem-%data%
(i) ((1 *)) ftem-%offset%
)
115 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
121 (f2cl-lib:array-slice iwk-%data%
126 (f2cl-lib:array-slice iwk-%data%
132 (declare (ignore var-0 var-2 var-4 var-5 var-6
))
137 (f2cl-lib:fdo
(k kmin
(f2cl-lib:int-add k
1))
141 (f2cl-lib:fref iwk-%data%
142 ((f2cl-lib:int-add ibjan k
))
145 (setf (f2cl-lib:fref wk-%data%
146 ((f2cl-lib:int-add iba k
))
150 (f2cl-lib:fref ftem-%data%
156 (setf (f2cl-lib:fref wk-%data%
157 ((f2cl-lib:int-add iba k
))
161 (f2cl-lib:fref wk-%data%
162 ((f2cl-lib:int-add iba k
))
167 (setf kmin
(f2cl-lib:int-add kmax
1))
171 (setf fac
(dvnorm n savf ewt
))
172 (setf r0
(* 1000.0d0
(abs h
) uround n fac
))
173 (if (= r0
0.0d0
) (setf r0
1.0d0
))
174 (setf srur
(f2cl-lib:fref wk-%data%
(1) ((1 *)) wk-%offset%
))
175 (setf jmin
(f2cl-lib:fref iwk-%data%
(ipigp) ((1 *)) iwk-%offset%
))
176 (f2cl-lib:fdo
(ng 1 (f2cl-lib:int-add ng
1))
181 (f2cl-lib:fref iwk-%data%
182 ((f2cl-lib:int-add ipigp ng
))
186 (f2cl-lib:fdo
(j jmin
(f2cl-lib:int-add j
1))
190 (f2cl-lib:fref iwk-%data%
191 ((f2cl-lib:int-add ibjgp j
))
198 (f2cl-lib:fref y-%data%
203 (f2cl-lib:fref ewt-%data%
208 (setf (f2cl-lib:fref y-%data%
(jj) ((1 *)) y-%offset%
)
209 (+ (f2cl-lib:fref y-%data%
(jj) ((1 *)) y-%offset%
)
211 (multiple-value-bind (var-0 var-1 var-2 var-3
)
212 (funcall f neq tn y ftem
)
213 (declare (ignore var-0 var-2 var-3
))
216 (f2cl-lib:fdo
(j jmin
(f2cl-lib:int-add j
1))
220 (f2cl-lib:fref iwk-%data%
221 ((f2cl-lib:int-add ibjgp j
))
224 (setf (f2cl-lib:fref y-%data%
(jj) ((1 *)) y-%offset%
)
225 (f2cl-lib:fref yh-%data%
233 (f2cl-lib:fref y-%data%
238 (f2cl-lib:fref ewt-%data%
242 (setf fac
(/ (- hl0
) r
))
244 (f2cl-lib:fref iwk-%data%
245 ((f2cl-lib:int-add ibian jj
))
250 (f2cl-lib:fref iwk-%data%
251 ((f2cl-lib:int-add ibian jj
1))
255 (f2cl-lib:fdo
(k kmin
(f2cl-lib:int-add k
1))
259 (f2cl-lib:fref iwk-%data%
260 ((f2cl-lib:int-add ibjan k
))
263 (setf (f2cl-lib:fref wk-%data%
264 ((f2cl-lib:int-add iba k
))
269 (f2cl-lib:fref ftem-%data%
273 (f2cl-lib:fref savf-%data%
279 (setf (f2cl-lib:fref wk-%data%
280 ((f2cl-lib:int-add iba k
))
284 (f2cl-lib:fref wk-%data%
285 ((f2cl-lib:int-add iba k
))
291 (setf jmin
(f2cl-lib:int-add jmax
1))
293 (setf nfe
(f2cl-lib:int-add nfe ngp
))
297 (setf rcon
(/ con con0
))
298 (setf rcont
(/ (abs con
) conmin
))
299 (if (and (> rcont rbig
) (= iplost
1)) (go label20
))
300 (setf kmin
(f2cl-lib:fref iwk-%data%
(ipian) ((1 *)) iwk-%offset%
))
301 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
306 (f2cl-lib:fref iwk-%data%
307 ((f2cl-lib:int-add ipian j
))
311 (f2cl-lib:fdo
(k kmin
(f2cl-lib:int-add k
1))
315 (f2cl-lib:fref iwk-%data%
316 ((f2cl-lib:int-add ibjan k
))
320 (f2cl-lib:fref wk-%data%
321 ((f2cl-lib:int-add iba k
))
324 (if (/= i j
) (go label260
))
325 (setf pij
(- pij
1.0d0
))
326 (if (>= (abs pij
) psmall
) (go label260
))
328 (setf conmin
(min (abs con0
) conmin
))
330 (setf pij
(* pij rcon
))
331 (if (= i j
) (setf pij
(+ pij
1.0d0
)))
332 (setf (f2cl-lib:fref wk-%data%
333 ((f2cl-lib:int-add iba k
))
338 (setf kmin
(f2cl-lib:int-add kmax
1))
341 (setf nlu
(f2cl-lib:int-add nlu
1))
344 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
348 (setf (f2cl-lib:fref ftem-%data%
(i) ((1 *)) ftem-%offset%
)
351 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
352 var-10 var-11 var-12 var-13 var-14
)
354 (f2cl-lib:array-slice iwk-%data%
359 (f2cl-lib:array-slice iwk-%data%
364 (f2cl-lib:array-slice iwk-%data%
369 (f2cl-lib:array-slice iwk-%data%
374 (f2cl-lib:array-slice iwk-%data%
379 (f2cl-lib:array-slice wk-%data%
385 (f2cl-lib:array-slice iwk-%data%
390 (f2cl-lib:array-slice wk-%data%
396 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
397 var-8 var-9 var-10 var-11 var-13
))
400 (if (= iys
0) (go end_label
))
401 (setf imul
(the f2cl-lib
:integer4
(truncate (- iys
1) n
)))
403 (if (= imul
8) (setf ierpj
1))
404 (if (= imul
10) (setf ierpj -
1))
408 (setf nje
(f2cl-lib:int-add nje
1))
409 (setf (f2cl-lib:fref wk-%data%
(2) ((1 *)) wk-%offset%
) hl0
)
411 (setf r
(* el0
0.1d0
))
412 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
416 (setf (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
417 (+ (f2cl-lib:fref y-%data%
(i) ((1 *)) y-%offset%
)
421 (f2cl-lib:fref savf-%data%
425 (f2cl-lib:fref yh-%data%
429 (multiple-value-bind (var-0 var-1 var-2 var-3
)
434 (f2cl-lib:array-slice wk-%data%
439 (declare (ignore var-0 var-2 var-3
))
442 (setf nfe
(f2cl-lib:int-add nfe
1))
443 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
449 (f2cl-lib:fref savf-%data%
453 (f2cl-lib:fref yh-%data%
461 (f2cl-lib:fref wk-%data%
462 ((f2cl-lib:int-add i
2))
465 (f2cl-lib:fref savf-%data%
469 (setf (f2cl-lib:fref wk-%data%
470 ((f2cl-lib:int-add i
2))
477 (f2cl-lib:fref ewt-%data%
(i) ((1 *)) ewt-%offset%
)))
479 (if (= (abs di
) 0.0d0
) (go label330
))
480 (setf (f2cl-lib:fref wk-%data%
481 ((f2cl-lib:int-add i
2))
491 (return (values nil nil nil nil nil nil nil nil nil nil nil
)))))))
493 (in-package #:cl-user
)
494 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
495 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
496 (setf (gethash 'fortran-to-lisp
::dprjs fortran-to-lisp
::*f2cl-function-info
*)
497 (fortran-to-lisp::make-f2cl-finfo
498 :arg-types
'((array fortran-to-lisp
::integer4
(*))
499 (array double-float
(*)) (array double-float
(*))
500 (fortran-to-lisp::integer4
) (array double-float
(*))
501 (array double-float
(*)) (array double-float
(*))
502 (array double-float
(*))
503 (array fortran-to-lisp
::integer4
(*)) t t
)
504 :return-values
'(nil nil nil nil nil nil nil nil nil nil nil
)
505 :calls
'(fortran-to-lisp::cdrv fortran-to-lisp
::dvnorm
))))