| 1 | C |
| 2 | C Copyright (c) 1997 Silvano Bonazzola |
| 3 | C |
| 4 | C This file is part of LORENE. |
| 5 | C |
| 6 | C LORENE is free software; you can redistribute it and/or modify |
| 7 | C it under the terms of the GNU General Public License as published by |
| 8 | C the Free Software Foundation; either version 2 of the License, or |
| 9 | C (at your option) any later version. |
| 10 | C |
| 11 | C LORENE is distributed in the hope that it will be useful, |
| 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | C GNU General Public License for more details. |
| 15 | C |
| 16 | C You should have received a copy of the GNU General Public License |
| 17 | C along with LORENE; if not, write to the Free Software |
| 18 | C Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | C |
| 20 | C |
| 21 | |
| 22 | subroutine tfm3s(n,n64,y,cc) |
| 23 | |
| 24 | implicit double precision(a-h,o-z) |
| 25 | |
| 26 | c |
| 27 | c## routine modifiee le 04.04.1994: ajout des save |
| 28 | c suppression de la variable jjj non utilisee |
| 29 | c |
| 30 | c |
| 31 | c routine pour le calcul de les tf de n64 fonctions |
| 32 | c a la fois. |
| 33 | c |
| 34 | c arguments de la routine: |
| 35 | c |
| 36 | c n = nombre des degres de libertee. n doit |
| 37 | c etre= a 2**p*3**q*5**r avec p,q,r nombrs |
| 38 | c entiers (p.ne.0). |
| 39 | c |
| 40 | c n64 = nombres des fonctions dont on veut calculer |
| 41 | c les tf. |
| 42 | c y = tableau contenant en imput les echantillons des fon- |
| 43 | c ctions. y doit avoir (n+4)*(n64+1) dimensions. |
| 44 | c les n echantillons des n64 fonctions sont |
| 45 | c stockes en parallel ou en serie. en paralel |
| 46 | c on a: |
| 47 | c y(1),y(2),...y(n64) contient les valeures |
| 48 | c des n64 fonctions dans le point x=0, |
| 49 | c y(1+n64),y(2+n64),...y(n64+n64) |
| 50 | c les valeures des fonctions pour x=2*pi/n |
| 51 | c y(1+2*n64),y(2+2*n64),...y(n64+2*n64) |
| 52 | c les valeures pour x=(2*pi/n)*2 et ainsi de |
| 53 | c jusqu' a x=(2*pi/n)*(n-1). |
| 54 | c |
| 55 | c cc = output: les coeeficients de cc impaires contienent |
| 56 | c les cosinus et les coefficients paires les sinus. |
| 57 | c (cc(2)=0 par definition. l'argument de cc est donc |
| 58 | c compris entre 1 et n+1. |
| 59 | c |
| 60 | c routine testee le 14/9/1985 |
| 61 | c |
| 62 | C |
| 63 | C $Id: tfm3s.f,v 1.2 2012/03/30 12:12:44 j_novak Exp $ |
| 64 | C $Log: tfm3s.f,v $ |
| 65 | C Revision 1.2 2012/03/30 12:12:44 j_novak |
| 66 | C Cleaning of fortran files |
| 67 | C |
| 68 | C Revision 1.1.1.1 2001/11/20 15:19:31 e_gourgoulhon |
| 69 | C LORENE |
| 70 | C |
| 71 | c Revision 1.1 1997/10/23 08:20:52 eric |
| 72 | c Initial revision |
| 73 | c |
| 74 | C |
| 75 | C $Header: /cvsroot/Lorene/F77/Source/Poisson2d/tfm3s.f,v 1.2 2012/03/30 12:12:44 j_novak Exp $ |
| 76 | C |
| 77 | C |
| 78 | character*120 header |
| 79 | data header/'$Header: /cvsroot/Lorene/F77/Source/Poisson2d/tfm3s.f,v 1.2 2012/03/30 12:12:44 j_novak Exp $'/ |
| 80 | |
| 81 | dimension cc(*),y(*),ifax(64),trigs(1600) |
| 82 | data ndim/0/ |
| 83 | data nfon/0/ |
| 84 | c## |
| 85 | save ndim, nfon, ifax, trigs, n65, n63, n6565, nm65, n66 |
| 86 | |
| 87 | n1040=1040 |
| 88 | if(n.gt.n1040) then |
| 89 | print 800,n |
| 90 | 800 format(10x,'dimension insuffisantes dans la routine' |
| 91 | , ,' tfm, n=',i5,' > a la dimension de trigs*2/3=',i5) |
| 92 | endif |
| 93 | c |
| 94 | if(n.eq.ndim) go to 1 |
| 95 | call fax(ifax,n,3) |
| 96 | call fftrig(trigs,n,3) |
| 97 | 1 continue |
| 98 | c |
| 99 | if(nfon.eq.n64.and.ndim.eq.n) go to 4 |
| 100 | nfon=n64 |
| 101 | ndim=n |
| 102 | n65=n64 |
| 103 | if((n64/8)*8.eq.n64)n65=n64+1 |
| 104 | n63=n64-1 |
| 105 | n6565=n65+n65 |
| 106 | nm65=n*n65 |
| 107 | n66=n65+1 |
| 108 | 4 continue |
| 109 | c |
| 110 | c |
| 111 | c |
| 112 | do 10 l=1,nm65 |
| 113 | cc(l)=y(l)*2 |
| 114 | 10 continue |
| 115 | c |
| 116 | c calcul de la tf en parallel |
| 117 | c |
| 118 | call fft991(cc,y,trigs,ifax,n65,1,n,n64,-1) |
| 119 | c |
| 120 | 101 format(1x,'tfm') |
| 121 | 100 format(1x,'tfm',10d12.4) |
| 122 | c |
| 123 | return |
| 124 | end |
| 125 |