PLaSK library
Loading...
Searching...
No Matches
c1f4kb.c
Go to the documentation of this file.
1/* c1f4kb.f -- translated by f2c (version 20100827).
2 You must link the resulting object file with libf2c:
3 on Microsoft Windows system, link with libf2c.lib;
4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 or, if you install libf2c.a in a standard place, with -lf2c -lm
6 -- in that order, at the end of the command line, as in
7 cc *.o -lf2c -lm
8 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10 http://www.netlib.org/f2c/libf2c.zip
11*/
12
13#include "f2c.h"
14
15/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16/* * * */
17/* * copyright (c) 2011 by UCAR * */
18/* * * */
19/* * University Corporation for Atmospheric Research * */
20/* * * */
21/* * all rights reserved * */
22/* * * */
23/* * FFTPACK version 5.1 * */
24/* * * */
25/* * A Fortran Package of Fast Fourier * */
26/* * * */
27/* * Subroutines and Example Programs * */
28/* * * */
29/* * by * */
30/* * * */
31/* * Paul Swarztrauber and Dick Valent * */
32/* * * */
33/* * of * */
34/* * * */
35/* * the National Center for Atmospheric Research * */
36/* * * */
37/* * Boulder, Colorado (80307) U.S.A. * */
38/* * * */
39/* * which is sponsored by * */
40/* * * */
41/* * the National Science Foundation * */
42/* * * */
43/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
44
45/* Subroutine */ int c1f4kb_(integer *ido, integer *l1, integer *na,
46 doublereal *cc, integer *in1, doublereal *ch, integer *in2,
47 doublereal *wa)
48{
49 /* System generated locals */
50 integer cc_dim1, cc_dim2, cc_dim3, cc_offset, ch_dim1, ch_dim2, ch_offset,
51 wa_dim1, wa_offset, i__1, i__2;
52
53 /* Local variables */
54 integer i__, k;
55 doublereal ci2, ci3, ci4, cr2, cr3, cr4, ti1, ti2, ti3, ti4, tr1, tr2,
56 tr3, tr4;
57
58
59/* FFTPACK 5.1 auxiliary routine */
60
61 /* Parameter adjustments */
62 wa_dim1 = *ido;
63 wa_offset = 1 + (wa_dim1 << 2);
64 wa -= wa_offset;
65 cc_dim1 = *in1;
66 cc_dim2 = *l1;
67 cc_dim3 = *ido;
68 cc_offset = 1 + cc_dim1 * (1 + cc_dim2 * (1 + cc_dim3));
69 cc -= cc_offset;
70 ch_dim1 = *in2;
71 ch_dim2 = *l1;
72 ch_offset = 1 + ch_dim1 * (1 + ch_dim2 * 5);
73 ch -= ch_offset;
74
75 /* Function Body */
76 if (*ido > 1 || *na == 1) {
77 goto L102;
78 }
79 i__1 = *l1;
80 for (k = 1; k <= i__1; ++k) {
81 ti1 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] - cc[(k + (
82 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 2];
83 ti2 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] + cc[(k + (
84 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 2];
85 tr4 = cc[(k + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 2] - cc[(k
86 + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 2];
87 ti3 = cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 2] + cc[(k
88 + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 2];
89 tr1 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] - cc[(k + (
90 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 1];
91 tr2 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] + cc[(k + (
92 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 1];
93 ti4 = cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 1] - cc[(k
94 + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 1];
95 tr3 = cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 1] + cc[(k
96 + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 1];
97 cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] = tr2 + tr3;
98 cc[(k + (cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 1] = tr2 - tr3;
99 cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] = ti2 + ti3;
100 cc[(k + (cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 2] = ti2 - ti3;
101 cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 1] = tr1 + tr4;
102 cc[(k + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 1] = tr1 - tr4;
103 cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 2] = ti1 + ti4;
104 cc[(k + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 2] = ti1 - ti4;
105/* L101: */
106 }
107 return 0;
108L102:
109 i__1 = *l1;
110 for (k = 1; k <= i__1; ++k) {
111 ti1 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] - cc[(k + (
112 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 2];
113 ti2 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] + cc[(k + (
114 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 2];
115 tr4 = cc[(k + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 2] - cc[(k
116 + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 2];
117 ti3 = cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 2] + cc[(k
118 + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 2];
119 tr1 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] - cc[(k + (
120 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 1];
121 tr2 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] + cc[(k + (
122 cc_dim3 * 3 + 1) * cc_dim2) * cc_dim1 + 1];
123 ti4 = cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 1] - cc[(k
124 + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 1];
125 tr3 = cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 1] + cc[(k
126 + ((cc_dim3 << 2) + 1) * cc_dim2) * cc_dim1 + 1];
127 ch[(k + ch_dim2 * 5) * ch_dim1 + 1] = tr2 + tr3;
128 ch[(k + ch_dim2 * 7) * ch_dim1 + 1] = tr2 - tr3;
129 ch[(k + ch_dim2 * 5) * ch_dim1 + 2] = ti2 + ti3;
130 ch[(k + ch_dim2 * 7) * ch_dim1 + 2] = ti2 - ti3;
131 ch[(k + ch_dim2 * 6) * ch_dim1 + 1] = tr1 + tr4;
132 ch[(k + (ch_dim2 << 3)) * ch_dim1 + 1] = tr1 - tr4;
133 ch[(k + ch_dim2 * 6) * ch_dim1 + 2] = ti1 + ti4;
134 ch[(k + (ch_dim2 << 3)) * ch_dim1 + 2] = ti1 - ti4;
135/* L103: */
136 }
137 if (*ido == 1) {
138 return 0;
139 }
140 i__1 = *ido;
141 for (i__ = 2; i__ <= i__1; ++i__) {
142 i__2 = *l1;
143 for (k = 1; k <= i__2; ++k) {
144 ti1 = cc[(k + (i__ + cc_dim3) * cc_dim2) * cc_dim1 + 2] - cc[(k +
145 (i__ + cc_dim3 * 3) * cc_dim2) * cc_dim1 + 2];
146 ti2 = cc[(k + (i__ + cc_dim3) * cc_dim2) * cc_dim1 + 2] + cc[(k +
147 (i__ + cc_dim3 * 3) * cc_dim2) * cc_dim1 + 2];
148 ti3 = cc[(k + (i__ + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 2] +
149 cc[(k + (i__ + (cc_dim3 << 2)) * cc_dim2) * cc_dim1 + 2];
150 tr4 = cc[(k + (i__ + (cc_dim3 << 2)) * cc_dim2) * cc_dim1 + 2] -
151 cc[(k + (i__ + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 2];
152 tr1 = cc[(k + (i__ + cc_dim3) * cc_dim2) * cc_dim1 + 1] - cc[(k +
153 (i__ + cc_dim3 * 3) * cc_dim2) * cc_dim1 + 1];
154 tr2 = cc[(k + (i__ + cc_dim3) * cc_dim2) * cc_dim1 + 1] + cc[(k +
155 (i__ + cc_dim3 * 3) * cc_dim2) * cc_dim1 + 1];
156 ti4 = cc[(k + (i__ + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 1] -
157 cc[(k + (i__ + (cc_dim3 << 2)) * cc_dim2) * cc_dim1 + 1];
158 tr3 = cc[(k + (i__ + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 1] +
159 cc[(k + (i__ + (cc_dim3 << 2)) * cc_dim2) * cc_dim1 + 1];
160 ch[(k + ((i__ << 2) + 1) * ch_dim2) * ch_dim1 + 1] = tr2 + tr3;
161 cr3 = tr2 - tr3;
162 ch[(k + ((i__ << 2) + 1) * ch_dim2) * ch_dim1 + 2] = ti2 + ti3;
163 ci3 = ti2 - ti3;
164 cr2 = tr1 + tr4;
165 cr4 = tr1 - tr4;
166 ci2 = ti1 + ti4;
167 ci4 = ti1 - ti4;
168 ch[(k + ((i__ << 2) + 2) * ch_dim2) * ch_dim1 + 1] = wa[i__ + (
169 wa_dim1 << 2)] * cr2 - wa[i__ + wa_dim1 * 7] * ci2;
170 ch[(k + ((i__ << 2) + 2) * ch_dim2) * ch_dim1 + 2] = wa[i__ + (
171 wa_dim1 << 2)] * ci2 + wa[i__ + wa_dim1 * 7] * cr2;
172 ch[(k + ((i__ << 2) + 3) * ch_dim2) * ch_dim1 + 1] = wa[i__ +
173 wa_dim1 * 5] * cr3 - wa[i__ + (wa_dim1 << 3)] * ci3;
174 ch[(k + ((i__ << 2) + 3) * ch_dim2) * ch_dim1 + 2] = wa[i__ +
175 wa_dim1 * 5] * ci3 + wa[i__ + (wa_dim1 << 3)] * cr3;
176 ch[(k + ((i__ << 2) + 4) * ch_dim2) * ch_dim1 + 1] = wa[i__ +
177 wa_dim1 * 6] * cr4 - wa[i__ + wa_dim1 * 9] * ci4;
178 ch[(k + ((i__ << 2) + 4) * ch_dim2) * ch_dim1 + 2] = wa[i__ +
179 wa_dim1 * 6] * ci4 + wa[i__ + wa_dim1 * 9] * cr4;
180/* L104: */
181 }
182/* L105: */
183 }
184 return 0;
185} /* c1f4kb_ */
186