PLaSK library
Loading...
Searching...
No Matches
r1f2kf.c
Go to the documentation of this file.
1/* r1f2kf.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 r1f2kf_(integer *ido, integer *l1, doublereal *cc,
46 integer *in1, doublereal *ch, integer *in2, doublereal *wa1)
47{
48 /* System generated locals */
49 integer ch_dim1, ch_dim2, ch_offset, cc_dim1, cc_dim2, cc_dim3, cc_offset,
50 i__1, i__2;
51
52 /* Local variables */
53 integer i__, k, ic, idp2;
54
55
56 /* Parameter adjustments */
57 --wa1;
58 cc_dim1 = *in1;
59 cc_dim2 = *ido;
60 cc_dim3 = *l1;
61 cc_offset = 1 + cc_dim1 * (1 + cc_dim2 * (1 + cc_dim3));
62 cc -= cc_offset;
63 ch_dim1 = *in2;
64 ch_dim2 = *ido;
65 ch_offset = 1 + ch_dim1 * (1 + ch_dim2 * 3);
66 ch -= ch_offset;
67
68 /* Function Body */
69 i__1 = *l1;
70 for (k = 1; k <= i__1; ++k) {
71 ch[(((k << 1) + 1) * ch_dim2 + 1) * ch_dim1 + 1] = cc[((k + cc_dim3) *
72 cc_dim2 + 1) * cc_dim1 + 1] + cc[((k + (cc_dim3 << 1)) *
73 cc_dim2 + 1) * cc_dim1 + 1];
74 ch[(*ido + ((k << 1) + 2) * ch_dim2) * ch_dim1 + 1] = cc[((k +
75 cc_dim3) * cc_dim2 + 1) * cc_dim1 + 1] - cc[((k + (cc_dim3 <<
76 1)) * cc_dim2 + 1) * cc_dim1 + 1];
77/* L101: */
78 }
79 if ((i__1 = *ido - 2) < 0) {
80 goto L107;
81 } else if (i__1 == 0) {
82 goto L105;
83 } else {
84 goto L102;
85 }
86L102:
87 idp2 = *ido + 2;
88 i__1 = *l1;
89 for (k = 1; k <= i__1; ++k) {
90 i__2 = *ido;
91 for (i__ = 3; i__ <= i__2; i__ += 2) {
92 ic = idp2 - i__;
93 ch[(i__ + ((k << 1) + 1) * ch_dim2) * ch_dim1 + 1] = cc[(i__ + (k
94 + cc_dim3) * cc_dim2) * cc_dim1 + 1] + (wa1[i__ - 2] * cc[
95 (i__ + (k + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 1] -
96 wa1[i__ - 1] * cc[(i__ - 1 + (k + (cc_dim3 << 1)) *
97 cc_dim2) * cc_dim1 + 1]);
98 ch[(ic + ((k << 1) + 2) * ch_dim2) * ch_dim1 + 1] = wa1[i__ - 2] *
99 cc[(i__ + (k + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 1]
100 - wa1[i__ - 1] * cc[(i__ - 1 + (k + (cc_dim3 << 1)) *
101 cc_dim2) * cc_dim1 + 1] - cc[(i__ + (k + cc_dim3) *
102 cc_dim2) * cc_dim1 + 1];
103 ch[(i__ - 1 + ((k << 1) + 1) * ch_dim2) * ch_dim1 + 1] = cc[(i__
104 - 1 + (k + cc_dim3) * cc_dim2) * cc_dim1 + 1] + (wa1[i__
105 - 2] * cc[(i__ - 1 + (k + (cc_dim3 << 1)) * cc_dim2) *
106 cc_dim1 + 1] + wa1[i__ - 1] * cc[(i__ + (k + (cc_dim3 <<
107 1)) * cc_dim2) * cc_dim1 + 1]);
108 ch[(ic - 1 + ((k << 1) + 2) * ch_dim2) * ch_dim1 + 1] = cc[(i__ -
109 1 + (k + cc_dim3) * cc_dim2) * cc_dim1 + 1] - (wa1[i__ -
110 2] * cc[(i__ - 1 + (k + (cc_dim3 << 1)) * cc_dim2) *
111 cc_dim1 + 1] + wa1[i__ - 1] * cc[(i__ + (k + (cc_dim3 <<
112 1)) * cc_dim2) * cc_dim1 + 1]);
113/* L103: */
114 }
115/* L104: */
116 }
117 if (*ido % 2 == 1) {
118 return 0;
119 }
120L105:
121 i__1 = *l1;
122 for (k = 1; k <= i__1; ++k) {
123 ch[(((k << 1) + 2) * ch_dim2 + 1) * ch_dim1 + 1] = -cc[(*ido + (k + (
124 cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 1];
125 ch[(*ido + ((k << 1) + 1) * ch_dim2) * ch_dim1 + 1] = cc[(*ido + (k +
126 cc_dim3) * cc_dim2) * cc_dim1 + 1];
127/* L106: */
128 }
129L107:
130 return 0;
131} /* r1f2kf_ */
132