PLaSK library
Loading...
Searching...
No Matches
tables.c
Go to the documentation of this file.
1/* tables.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 tables_(integer *ido, integer *ip, doublereal *wa)
46{
47 /* System generated locals */
48 integer wa_dim1, wa_dim2, wa_offset, i__1, i__2;
49
50 /* Builtin functions */
51 double atan(doublereal), cos(doublereal), sin(doublereal);
52
53 /* Local variables */
54 integer i__, j;
55 doublereal tpi, arg1, arg2, arg3, arg4, argz;
56
57
58 /* Parameter adjustments */
59 wa_dim1 = *ido;
60 wa_dim2 = *ip - 1;
61 wa_offset = 1 + wa_dim1 * (1 + wa_dim2);
62 wa -= wa_offset;
63
64 /* Function Body */
65 tpi = atan(1.) * 8.;
66 argz = tpi / (doublereal) (*ip);
67 arg1 = tpi / (doublereal) (*ido * *ip);
68 i__1 = *ip;
69 for (j = 2; j <= i__1; ++j) {
70 arg2 = (doublereal) (j - 1) * arg1;
71 i__2 = *ido;
72 for (i__ = 1; i__ <= i__2; ++i__) {
73 arg3 = (doublereal) (i__ - 1) * arg2;
74 wa[i__ + (j - 1 + wa_dim2) * wa_dim1] = cos(arg3);
75 wa[i__ + (j - 1 + (wa_dim2 << 1)) * wa_dim1] = sin(arg3);
76/* L100: */
77 }
78 if (*ip <= 5) {
79 goto L110;
80 }
81 arg4 = (doublereal) (j - 1) * argz;
82 wa[(j - 1 + wa_dim2) * wa_dim1 + 1] = cos(arg4);
83 wa[(j - 1 + (wa_dim2 << 1)) * wa_dim1 + 1] = sin(arg4);
84L110:
85 ;
86 }
87 return 0;
88} /* tables_ */
89