PLaSK library
Loading...
Searching...
No Matches
c1f2kb.c
Go to the documentation of this file.
1/* c1f2kb.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 c1f2kb_(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 ti2, tr2, chold1, chold2;
56
57
58 /* Parameter adjustments */
59 wa_dim1 = *ido;
60 wa_offset = 1 + (wa_dim1 << 1);
61 wa -= wa_offset;
62 cc_dim1 = *in1;
63 cc_dim2 = *l1;
64 cc_dim3 = *ido;
65 cc_offset = 1 + cc_dim1 * (1 + cc_dim2 * (1 + cc_dim3));
66 cc -= cc_offset;
67 ch_dim1 = *in2;
68 ch_dim2 = *l1;
69 ch_offset = 1 + ch_dim1 * (1 + ch_dim2 * 3);
70 ch -= ch_offset;
71
72 /* Function Body */
73 if (*ido > 1 || *na == 1) {
74 goto L102;
75 }
76 i__1 = *l1;
77 for (k = 1; k <= i__1; ++k) {
78 chold1 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] + cc[(k + ((
79 cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 1];
80 cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 1] = cc[(k + (
81 cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] - cc[(k + ((cc_dim3 <<
82 1) + 1) * cc_dim2) * cc_dim1 + 1];
83 cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 1] = chold1;
84 chold2 = cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] + cc[(k + ((
85 cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 2];
86 cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) * cc_dim1 + 2] = cc[(k + (
87 cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] - cc[(k + ((cc_dim3 <<
88 1) + 1) * cc_dim2) * cc_dim1 + 2];
89 cc[(k + (cc_dim3 + 1) * cc_dim2) * cc_dim1 + 2] = chold2;
90/* L101: */
91 }
92 return 0;
93L102:
94 i__1 = *l1;
95 for (k = 1; k <= i__1; ++k) {
96 ch[(k + ch_dim2 * 3) * ch_dim1 + 1] = cc[(k + (cc_dim3 + 1) * cc_dim2)
97 * cc_dim1 + 1] + cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) *
98 cc_dim1 + 1];
99 ch[(k + (ch_dim2 << 2)) * ch_dim1 + 1] = cc[(k + (cc_dim3 + 1) *
100 cc_dim2) * cc_dim1 + 1] - cc[(k + ((cc_dim3 << 1) + 1) *
101 cc_dim2) * cc_dim1 + 1];
102 ch[(k + ch_dim2 * 3) * ch_dim1 + 2] = cc[(k + (cc_dim3 + 1) * cc_dim2)
103 * cc_dim1 + 2] + cc[(k + ((cc_dim3 << 1) + 1) * cc_dim2) *
104 cc_dim1 + 2];
105 ch[(k + (ch_dim2 << 2)) * ch_dim1 + 2] = cc[(k + (cc_dim3 + 1) *
106 cc_dim2) * cc_dim1 + 2] - cc[(k + ((cc_dim3 << 1) + 1) *
107 cc_dim2) * cc_dim1 + 2];
108/* L103: */
109 }
110 if (*ido == 1) {
111 return 0;
112 }
113 i__1 = *ido;
114 for (i__ = 2; i__ <= i__1; ++i__) {
115 i__2 = *l1;
116 for (k = 1; k <= i__2; ++k) {
117 ch[(k + ((i__ << 1) + 1) * ch_dim2) * ch_dim1 + 1] = cc[(k + (i__
118 + cc_dim3) * cc_dim2) * cc_dim1 + 1] + cc[(k + (i__ + (
119 cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 1];
120 tr2 = cc[(k + (i__ + cc_dim3) * cc_dim2) * cc_dim1 + 1] - cc[(k +
121 (i__ + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 1];
122 ch[(k + ((i__ << 1) + 1) * ch_dim2) * ch_dim1 + 2] = cc[(k + (i__
123 + cc_dim3) * cc_dim2) * cc_dim1 + 2] + cc[(k + (i__ + (
124 cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 2];
125 ti2 = cc[(k + (i__ + cc_dim3) * cc_dim2) * cc_dim1 + 2] - cc[(k +
126 (i__ + (cc_dim3 << 1)) * cc_dim2) * cc_dim1 + 2];
127 ch[(k + ((i__ << 1) + 2) * ch_dim2) * ch_dim1 + 2] = wa[i__ + (
128 wa_dim1 << 1)] * ti2 + wa[i__ + wa_dim1 * 3] * tr2;
129 ch[(k + ((i__ << 1) + 2) * ch_dim2) * ch_dim1 + 1] = wa[i__ + (
130 wa_dim1 << 1)] * tr2 - wa[i__ + wa_dim1 * 3] * ti2;
131/* L104: */
132 }
133/* L105: */
134 }
135 return 0;
136} /* c1f2kb_ */
137