PLaSK library
Loading...
Searching...
No Matches
sintmf.c
Go to the documentation of this file.
1/* sintmf.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/* Table of constant values */
16
17static integer c__6 = 6;
18static integer c__8 = 8;
19static integer c__10 = 10;
20static integer c_n1 = -1;
21static integer c_n5 = -5;
22
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24/* * * */
25/* * copyright (c) 2011 by UCAR * */
26/* * * */
27/* * University Corporation for Atmospheric Research * */
28/* * * */
29/* * all rights reserved * */
30/* * * */
31/* * FFTPACK version 5.1 * */
32/* * * */
33/* * A Fortran Package of Fast Fourier * */
34/* * * */
35/* * Subroutines and Example Programs * */
36/* * * */
37/* * by * */
38/* * * */
39/* * Paul Swarztrauber and Dick Valent * */
40/* * * */
41/* * of * */
42/* * * */
43/* * the National Center for Atmospheric Research * */
44/* * * */
45/* * Boulder, Colorado (80307) U.S.A. * */
46/* * * */
47/* * which is sponsored by * */
48/* * * */
49/* * the National Science Foundation * */
50/* * * */
51/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
52
53/* Subroutine */ int sintmf_(integer *lot, integer *jump, integer *n, integer
54 *inc, doublereal *x, integer *lenx, doublereal *wsave, integer *
55 lensav, doublereal *work, integer *lenwrk, integer *ier)
56{
57 /* System generated locals */
58 integer x_dim1, x_offset;
59
60 /* Builtin functions */
61 double log(doublereal);
62
63 /* Local variables */
64 integer iw1, iw2, ier1;
65 extern /* Subroutine */ int msntf1_(integer *, integer *, integer *,
67 doublereal *, integer *);
68 extern logical xercon_(integer *, integer *, integer *, integer *);
69 extern /* Subroutine */ int xerfft_(char *, integer *, ftnlen);
70
71
72 /* Parameter adjustments */
73 x_dim1 = *inc;
74 x_offset = 1 + x_dim1;
75 x -= x_offset;
76 --wsave;
77 --work;
78
79 /* Function Body */
80 *ier = 0;
81
82 if (*lenx < (*lot - 1) * *jump + *inc * (*n - 1) + 1) {
83 *ier = 1;
84 xerfft_("SINTMF", &c__6, (ftnlen)6);
85 goto L100;
86 } else if (*lensav < *n / 2 + *n + (integer) (log((doublereal) (*n)) /
87 log(2.)) + 4) {
88 *ier = 2;
89 xerfft_("SINTMF", &c__8, (ftnlen)6);
90 goto L100;
91 } else if (*lenwrk < *lot * ((*n << 1) + 4)) {
92 *ier = 3;
93 xerfft_("SINTMF", &c__10, (ftnlen)6);
94 goto L100;
95 } else if (! xercon_(inc, jump, n, lot)) {
96 *ier = 4;
97 xerfft_("SINTMF", &c_n1, (ftnlen)6);
98 goto L100;
99 }
100
101 iw1 = *lot + *lot + 1;
102 iw2 = iw1 + *lot * (*n + 1);
103 msntf1_(lot, jump, n, inc, &x[x_offset], &wsave[1], &work[1], &work[iw1],
104 &work[iw2], &ier1);
105 if (ier1 != 0) {
106 *ier = 20;
107 xerfft_("SINTMF", &c_n5, (ftnlen)6);
108 }
109L100:
110 return 0;
111} /* sintmf_ */
112