1 subroutine dsint1f ( n, inc, x, lenx, wsave, lensav, work, lenwrk, ier )
3 !*****************************************************************************80
5 !! DSINT1F: real double precision forward sine transform, 1D.
9 ! DSINT1F computes the one-dimensional Fourier transform of an odd
10 ! sequence within a real array. This transform is referred to as the
11 ! forward transform or Fourier analysis, transforming the sequence
12 ! from physical to spectral space.
14 ! This transform is normalized since a call to DSINT1F followed
15 ! by a call to DSINT1B (or vice-versa) reproduces the original
16 ! array within roundoff error.
26 ! Original real single precision by Paul Swarztrauber, Richard Valent.
27 ! Real double precision version by John Burkardt.
32 ! Vectorizing the Fast Fourier Transforms,
33 ! in Parallel Computations,
34 ! edited by G. Rodrigue,
35 ! Academic Press, 1982.
38 ! Fast Fourier Transform Algorithms for Vector Computers,
39 ! Parallel Computing, pages 45-63, 1984.
43 ! Input, integer ( kind = 4 ) N, the length of the sequence to be
44 ! transformed. The transform is most efficient when N+1 is a product of
47 ! Input, integer ( kind = 4 ) INC, the increment between the locations,
48 ! in array R, of two consecutive elements within the sequence.
50 ! Input/output, real ( kind = 8 ) R(LENR), on input, contains the sequence
51 ! to be transformed, and on output, the transformed sequence.
53 ! Input, integer ( kind = 4 ) LENR, the dimension of the R array.
54 ! LENR must be at least INC*(N-1)+ 1.
56 ! Input, real ( kind = 8 ) WSAVE(LENSAV). WSAVE's contents must be
57 ! initialized with a call to DSINT1I before the first call to routine
58 ! DSINT1F or DSINT1B for a given transform length N. WSAVE's contents
59 ! may be re-used for subsequent calls to DSINT1F and DSINT1B with the same N.
61 ! Input, integer ( kind = 4 ) LENSAV, the dimension of the WSAVE array.
62 ! LENSAV must be at least N/2 + N + INT(LOG(REAL(N))) + 4.
64 ! Workspace, real ( kind = 8 ) WORK(LENWRK).
66 ! Input, integer ( kind = 4 ) LENWRK, the dimension of the WORK array.
67 ! LENWRK must be at least 2*N+2.
69 ! Output, integer ( kind = 4 ) IER, error flag.
71 ! 1, input parameter LENR not big enough;
72 ! 2, input parameter LENSAV not big enough;
73 ! 3, input parameter LENWRK not big enough;
74 ! 20, input error returned by lower level routine.
78 integer ( kind = 4 ) inc
79 integer ( kind = 4 ) lensav
80 integer ( kind = 4 ) lenwrk
82 integer ( kind = 4 ) ier
83 integer ( kind = 4 ) ier1
84 integer ( kind = 4 ) lenx
85 integer ( kind = 4 ) n
86 real ( kind = 8 ) work(lenwrk)
87 real ( kind = 8 ) wsave(lensav)
88 real ( kind = 8 ) x(inc,*)
92 if ( lenx < inc * ( n - 1 ) + 1 ) then
94 call xerfft ( 'DSINT1F', 6 )
98 if ( lensav < n / 2 + n + int ( log ( real ( n, kind = 8 ) ) ) + 4 ) then
100 call xerfft ( 'DSINT1F', 8 )
104 if ( lenwrk < 2 * n + 2 ) then
106 call xerfft ( 'DSINT1F', 10 )
110 call dsintf1 ( n, inc, x, wsave, work, work(n+2), ier1 )
112 if ( ier1 /= 0 ) then
114 call xerfft ( 'DSINT1F', -5 )