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-2020-04 (21D 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 double-float))
17 (in-package "HOMPACK")
20 (defun gmfads (nn a nwk maxa
)
21 (declare (type (array f2cl-lib
:integer4
(*)) maxa
)
22 (type (array double-float
(*)) a
)
23 (type (f2cl-lib:integer4
) nwk nn
))
24 (f2cl-lib:with-multi-array-data
25 ((a double-float a-%data% a-%offset%
)
26 (maxa f2cl-lib
:integer4 maxa-%data% maxa-%offset%
))
27 (prog ((bet 0.0) (del 0.0) (dj 0.0) (g 0.0) (gam 0.0) (gam1 0.0) (phi 0.0)
28 (the$
0.0) (the1 0.0) (xt1 0.0) (xt2 0.0) (zet 0.0) (zet1 0.0) (i 0)
29 (i0 0) (i1 0) (i2 0) (i3 0) (i4 0) (j 0) (j1 0) (k 0) (k1 0) (k2 0)
30 (kh 0) (kl 0) (kn 0) (ku 0) (kz 0) (l 0) (l1 0) (l2 0) (l3 0) (m 0)
31 (m1 0) (n1 0) (nnn 0))
32 (declare (type (f2cl-lib:integer4
) nnn n1 m1 m l3 l2 l1 l kz ku kn kl kh
33 k2 k1 k j1 j i4 i3 i2 i1 i0 i
)
34 (type (double-float) zet1 zet xt2 xt1 the1 the$ phi gam1 gam g
36 (setf g
(coerce 0.0f0
'double-float
))
37 (setf gam
(coerce 0.0f0
'double-float
))
38 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
42 (f2cl-lib:fref maxa-%data%
44 ((1 (f2cl-lib:int-add nn
1)))
48 (* (f2cl-lib:fref a-%data%
(k) ((1 nwk
)) a-%offset%
)
49 (f2cl-lib:fref a-%data%
(k) ((1 nwk
)) a-%offset%
))))
50 (setf gam1
(abs (f2cl-lib:fref a-%data%
(k) ((1 nwk
)) a-%offset%
)))
51 (if (> gam1 gam
) (setf gam gam1
))
53 (setf zet
(coerce 0.0f0
'double-float
))
54 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
58 (f2cl-lib:fref maxa-%data%
60 ((1 (f2cl-lib:int-add nn
1)))
64 (f2cl-lib:fref maxa-%data%
65 ((f2cl-lib:int-add i
1))
66 ((1 (f2cl-lib:int-add nn
1)))
69 (setf k2
(f2cl-lib:int-sub k1 k
))
70 (if (= k2
0) (go label3
))
71 (setf l
(f2cl-lib:int-add k
1))
72 (f2cl-lib:fdo
(j l
(f2cl-lib:int-add j
1))
78 (f2cl-lib:fref a-%data%
(j) ((1 nwk
)) a-%offset%
)
79 (f2cl-lib:fref a-%data%
84 (abs (f2cl-lib:fref a-%data%
(j) ((1 nwk
)) a-%offset%
)))
85 (if (> zet1 zet
) (setf zet zet1
))
89 (setf del
(f2cl-lib:d1mach
4))
91 (if (> zet bet
) (setf bet zet
))
92 (if (> gam bet
) (setf bet gam
))
93 (setf g
(f2cl-lib:fsqrt g
))
94 (if (> g
1.0f0
) (setf del
(* del g
)))
95 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
98 (setf n1
(f2cl-lib:int-sub i
1))
100 (f2cl-lib:fref maxa-%data%
102 ((1 (f2cl-lib:int-add nn
1)))
104 (setf kl
(f2cl-lib:int-add kn
1))
107 (f2cl-lib:fref maxa-%data%
108 ((f2cl-lib:int-add i
1))
109 ((1 (f2cl-lib:int-add nn
1)))
112 (setf kh
(f2cl-lib:int-sub ku kl
))
113 (setf phi
(f2cl-lib:fref a-%data%
(kn) ((1 nwk
)) a-%offset%
))
114 (if (< kh
0) (go label10
))
115 (setf k1
(f2cl-lib:int-add kn
1))
117 (f2cl-lib:fdo
(j k1
(f2cl-lib:int-add j
1))
120 (setf k2
(f2cl-lib:int-sub k2
1))
122 (f2cl-lib:fref maxa-%data%
124 ((1 (f2cl-lib:int-add nn
1)))
129 (- (f2cl-lib:fref a-%data%
(j) ((1 nwk
)) a-%offset%
))
130 (f2cl-lib:fref a-%data%
(j) ((1 nwk
)) a-%offset%
)
131 (f2cl-lib:fref a-%data%
(kz) ((1 nwk
)) a-%offset%
))))
135 (setf l
(f2cl-lib:int-add i
1))
136 (setf the$
(coerce 0.0f0
'double-float
))
137 (setf nnn
(f2cl-lib:int-add nn
1))
138 (if (= l nnn
) (go label11
))
139 (f2cl-lib:fdo
(j l
(f2cl-lib:int-add j
1))
143 (f2cl-lib:fref maxa-%data%
145 ((1 (f2cl-lib:int-add nn
1)))
148 (f2cl-lib:fref maxa-%data%
149 ((f2cl-lib:int-add j
1))
150 ((1 (f2cl-lib:int-add nn
1)))
152 (setf l3
(f2cl-lib:int-sub l2 l1
1))
153 (setf m
(f2cl-lib:int-sub j i
))
154 (if (< l3 m
) (go label6
))
155 (setf m1
(f2cl-lib:int-add l1 m
))
156 (if (= n1
0) (go label7
))
157 (f2cl-lib:fdo
(j1 1 (f2cl-lib:int-add j1
1))
161 (f2cl-lib:fref maxa-%data%
163 ((1 (f2cl-lib:int-add nn
1)))
166 (f2cl-lib:fref maxa-%data%
168 ((1 (f2cl-lib:int-add nn
1)))
170 (setf i2
(f2cl-lib:int-sub i j1
))
171 (setf i3
(f2cl-lib:int-sub i1 kn
1))
172 (setf i4
(f2cl-lib:int-sub j j1
))
173 (if (< i3 i2
) (go label8
))
174 (if (< l3 i4
) (go label8
))
176 (f2cl-lib:fref a-%data%
177 ((f2cl-lib:int-add kn i2
))
181 (f2cl-lib:fref a-%data%
182 ((f2cl-lib:int-add l1 i4
))
185 (setf (f2cl-lib:fref a-%data%
(m1) ((1 nwk
)) a-%offset%
)
186 (+ (f2cl-lib:fref a-%data%
(m1) ((1 nwk
)) a-%offset%
)
189 (f2cl-lib:fref a-%data%
196 (abs (f2cl-lib:fref a-%data%
(m1) ((1 nwk
)) a-%offset%
)))
197 (if (< the$ the1
) (setf the$ the1
))
200 (setf the$
(/ (* the$ the$
) bet
))
202 (if (> phi dj
) (setf dj phi
))
203 (if (> the$ dj
) (setf dj the$
))
204 (setf (f2cl-lib:fref a-%data%
(kn) ((1 nwk
)) a-%offset%
) dj
)
205 (if (= l nnn
) (go label4
))
206 (f2cl-lib:fdo
(j l
(f2cl-lib:int-add j
1))
210 (f2cl-lib:fref maxa-%data%
212 ((1 (f2cl-lib:int-add nn
1)))
215 (f2cl-lib:fref maxa-%data%
216 ((f2cl-lib:int-add j
1))
217 ((1 (f2cl-lib:int-add nn
1)))
219 (setf l3
(f2cl-lib:int-sub l2 l1
1))
220 (setf m
(f2cl-lib:int-sub j i
))
221 (if (< l3 m
) (go label9
))
222 (setf m1
(f2cl-lib:int-add l1 m
))
223 (setf (f2cl-lib:fref a-%data%
(m1) ((1 nwk
)) a-%offset%
)
224 (/ (f2cl-lib:fref a-%data%
(m1) ((1 nwk
)) a-%offset%
)
225 (f2cl-lib:fref a-%data%
(kn) ((1 nwk
)) a-%offset%
)))
230 (return (values nil nil nil nil
)))))
232 (in-package #:cl-user
)
233 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
234 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
235 (setf (gethash 'fortran-to-lisp
::gmfads
236 fortran-to-lisp
::*f2cl-function-info
*)
237 (fortran-to-lisp::make-f2cl-finfo
238 :arg-types
'((fortran-to-lisp::integer4
) (array double-float
(*))
239 (fortran-to-lisp::integer4
)
240 (array fortran-to-lisp
::integer4
(*)))
241 :return-values
'(nil nil nil nil
)
242 :calls
'(fortran-to-lisp::d1mach
))))