1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! |
---|
5 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
6 | ! |
---|
7 | ! $Id: sinqmf.f,v 1.2 2004/06/15 21:29:20 rodney Exp $ |
---|
8 | ! |
---|
9 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
10 | |
---|
11 | SUBROUTINE SINQMF (LOT, JUMP, N, INC, X, LENX, WSAVE, LENSAV, & |
---|
12 | & WORK, LENWRK, IER) |
---|
13 | INTEGER LOT, JUMP, N, INC, LENX, LENSAV, LENWRK, IER |
---|
14 | REAL X(INC,*), WSAVE(LENSAV), WORK(LENWRK) |
---|
15 | LOGICAL XERCON |
---|
16 | ! |
---|
17 | IER = 0 |
---|
18 | ! |
---|
19 | IF (LENX .LT. (LOT-1)*JUMP + INC*(N-1) + 1) THEN |
---|
20 | IER = 1 |
---|
21 | CALL XERFFT ('SINQMF', 6) |
---|
22 | GO TO 300 |
---|
23 | ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))) +4) THEN |
---|
24 | IER = 2 |
---|
25 | CALL XERFFT ('SINQMF', 8) |
---|
26 | GO TO 300 |
---|
27 | ELSEIF (LENWRK .LT. LOT*N) THEN |
---|
28 | IER = 3 |
---|
29 | CALL XERFFT ('SINQMF', 10) |
---|
30 | GO TO 300 |
---|
31 | ELSEIF (.NOT. XERCON(INC,JUMP,N,LOT)) THEN |
---|
32 | IER = 4 |
---|
33 | CALL XERFFT ('SINQMF', -1) |
---|
34 | GO TO 300 |
---|
35 | ENDIF |
---|
36 | ! |
---|
37 | IF (N .EQ. 1) RETURN |
---|
38 | NS2 = N/2 |
---|
39 | LJ = (LOT-1)*JUMP+1 |
---|
40 | DO 101 K=1,NS2 |
---|
41 | KC = N-K |
---|
42 | DO 201 M=1,LJ,JUMP |
---|
43 | XHOLD = X(M,K) |
---|
44 | X(M,K) = X(M,KC+1) |
---|
45 | X(M,KC+1) = XHOLD |
---|
46 | 201 CONTINUE |
---|
47 | 101 END DO |
---|
48 | CALL COSQMF (LOT,JUMP,N,INC,X,LENX,WSAVE,LENSAV,WORK,LENWRK,IER1) |
---|
49 | IF (IER1 .NE. 0) THEN |
---|
50 | IER = 20 |
---|
51 | CALL XERFFT ('SINQMF',-5) |
---|
52 | GO TO 300 |
---|
53 | ENDIF |
---|
54 | DO 102 K=2,N,2 |
---|
55 | DO 202 M=1,LJ,JUMP |
---|
56 | X(M,K) = -X(M,K) |
---|
57 | 202 CONTINUE |
---|
58 | 102 END DO |
---|
59 | 300 CONTINUE |
---|
60 | RETURN |
---|
61 | END |
---|