In documentation for lreduce and rreduce, supply second argument as an explicit list
[maxima.git] / share / odepack / src / diprep.lisp
blob3415d05e33ef849888e2098706807f9b0dbfe4d2
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)
11 ;;;
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 t)
15 ;;; (:float-format single-float))
17 (in-package "ODEPACK")
20 (defstruct (dls001
21 (:predicate is-dls001-p))
22 (part-0 (make-array 218 :element-type 'double-float)
23 :type (simple-array double-float (218)))
24 (part-1 (make-array 37 :element-type 'f2cl-lib:integer4)
25 :type (simple-array f2cl-lib:integer4 (37))))
28 (defparameter *dls001-common-block*
29 (let* ()
30 (declare (ignorable))
31 (make-dls001)))
34 (defstruct (dlss01
35 (:predicate is-dlss01-p))
36 (part-0 (make-array 6 :element-type 'double-float)
37 :type (simple-array double-float (6)))
38 (part-1 (make-array 34 :element-type '(f2cl-lib:integer4))
39 :type (simple-array (f2cl-lib:integer4) (34))))
42 (defparameter *dlss01-common-block*
43 (let* ()
44 (declare (ignorable))
45 (make-dlss01)))
48 (defun diprep (neq y rwork ia ja ipflag f jac)
49 (declare (type (f2cl-lib:integer4) ipflag)
50 (type (array double-float (*)) rwork y)
51 (type (array f2cl-lib:integer4 (*)) ja ia neq))
52 (let ()
53 (symbol-macrolet ((lyh (aref (dls001-part-1 *dls001-common-block*) 19))
54 (lewt (aref (dls001-part-1 *dls001-common-block*) 20))
55 (lacor (aref (dls001-part-1 *dls001-common-block*) 21))
56 (lsavf (aref (dls001-part-1 *dls001-common-block*) 22))
57 (lwm (aref (dls001-part-1 *dls001-common-block*) 23))
58 (n (aref (dls001-part-1 *dls001-common-block*) 31))
59 (istatc (aref (dlss01-part-1 *dlss01-common-block*) 2))
60 (lenyh (aref (dlss01-part-1 *dlss01-common-block*) 18))
61 (lenyhm (aref (dlss01-part-1 *dlss01-common-block*) 19))
62 (lenwk (aref (dlss01-part-1 *dlss01-common-block*) 20))
63 (lreq (aref (dlss01-part-1 *dlss01-common-block*) 21))
64 (lwmin (aref (dlss01-part-1 *dlss01-common-block*) 24)))
65 (f2cl-lib:with-multi-array-data
66 ((neq f2cl-lib:integer4 neq-%data% neq-%offset%)
67 (ia f2cl-lib:integer4 ia-%data% ia-%offset%)
68 (ja f2cl-lib:integer4 ja-%data% ja-%offset%)
69 (y double-float y-%data% y-%offset%)
70 (rwork double-float rwork-%data% rwork-%offset%))
71 (prog ((lyhn 0) (lyhd 0) (lewtn 0) (imax 0) (i 0))
72 (declare (type (f2cl-lib:integer4) i imax lewtn lyhd lyhn))
73 (setf ipflag 0)
74 (multiple-value-bind
75 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
76 var-10 var-11 var-12)
77 (dprep neq y
78 (f2cl-lib:array-slice rwork-%data%
79 double-float
80 (lyh)
81 ((1 *))
82 rwork-%offset%)
83 (f2cl-lib:array-slice rwork-%data%
84 double-float
85 (lsavf)
86 ((1 *))
87 rwork-%offset%)
88 (f2cl-lib:array-slice rwork-%data%
89 double-float
90 (lewt)
91 ((1 *))
92 rwork-%offset%)
93 (f2cl-lib:array-slice rwork-%data%
94 double-float
95 (lacor)
96 ((1 *))
97 rwork-%offset%)
98 ia ja
99 (f2cl-lib:array-slice rwork-%data%
100 double-float
101 (lwm)
102 ((1 *))
103 rwork-%offset%)
104 (f2cl-lib:array-slice rwork-%data%
105 double-float
106 (lwm)
107 ((1 *))
108 rwork-%offset%)
109 ipflag f jac)
110 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
111 var-8 var-9 var-11 var-12))
112 (setf ipflag var-10))
113 (setf lenwk
114 (max (the f2cl-lib:integer4 lreq)
115 (the f2cl-lib:integer4 lwmin)))
116 (if (< ipflag 0) (go end_label))
117 (setf lyhn (f2cl-lib:int-add lwm lenwk))
118 (if (> lyhn lyh) (go end_label))
119 (setf lyhd (f2cl-lib:int-sub lyh lyhn))
120 (if (= lyhd 0) (go label20))
121 (setf imax (f2cl-lib:int-add (f2cl-lib:int-sub lyhn 1) lenyhm))
122 (f2cl-lib:fdo (i lyhn (f2cl-lib:int-add i 1))
123 ((> i imax) nil)
124 (tagbody
125 label10
126 (setf (f2cl-lib:fref rwork-%data% (i) ((1 *)) rwork-%offset%)
127 (f2cl-lib:fref rwork-%data%
128 ((f2cl-lib:int-add i lyhd))
129 ((1 *))
130 rwork-%offset%))))
131 (setf lyh lyhn)
132 label20
133 (setf lsavf (f2cl-lib:int-add lyh lenyh))
134 (setf lewtn (f2cl-lib:int-add lsavf n))
135 (setf lacor (f2cl-lib:int-add lewtn n))
136 (if (= istatc 3) (go label40))
137 (if (> lewtn lewt) (go end_label))
138 (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
139 ((> i n) nil)
140 (tagbody
141 label30
142 (setf (f2cl-lib:fref rwork-%data%
143 ((f2cl-lib:int-sub
144 (f2cl-lib:int-add i lewtn)
146 ((1 *))
147 rwork-%offset%)
148 (f2cl-lib:fref rwork-%data%
149 ((f2cl-lib:int-sub
150 (f2cl-lib:int-add i lewt)
152 ((1 *))
153 rwork-%offset%))))
154 label40
155 (setf lewt lewtn)
156 (go end_label)
157 end_label
158 (return (values nil nil nil nil nil ipflag nil nil)))))))
160 (in-package #:cl-user)
161 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
162 (eval-when (:load-toplevel :compile-toplevel :execute)
163 (setf (gethash 'fortran-to-lisp::diprep
164 fortran-to-lisp::*f2cl-function-info*)
165 (fortran-to-lisp::make-f2cl-finfo
166 :arg-types '((array fortran-to-lisp::integer4 (*))
167 (array double-float (*)) (array double-float (*))
168 (array fortran-to-lisp::integer4 (*))
169 (array fortran-to-lisp::integer4 (*))
170 (fortran-to-lisp::integer4) t t)
171 :return-values '(nil nil nil nil nil fortran-to-lisp::ipflag nil
172 nil)
173 :calls '(fortran-to-lisp::dprep))))