| 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 | |
| 23 | subroutine cd1yms(n,n64,cc,cs) |
| 24 | c |
| 25 | c## routine modifiee le 08.10.1993: ajout des save |
| 26 | c |
| 27 | |
| 28 | implicit double precision(a-h,o-z) |
| 29 | |
| 30 | c |
| 31 | c***** calcul de la derivee premiere de n64 fonctions simultanement. |
| 32 | c**** subroutine completement craytinisee. |
| 33 | c |
| 34 | c arguments de la subroutine: |
| 35 | c |
| 36 | c n =nombre des degres de libertee-1 |
| 37 | c n64 =nombre des fonctions dont on veut calculer la derivee. |
| 38 | c cc =tableau imput contenant les coefficients de tchebytchev |
| 39 | c des fonctions a deriver. |
| 40 | c cs =output. toutes les donnes sont stockees dans le mode |
| 41 | c 'parallel' (voir les subroutines tfm ou,tfinm,chem64, |
| 42 | c chixms pour une explication detaillee') |
| 43 | c |
| 44 | c subroutine specialisee pour etre employee avec fuci2s ou |
| 45 | c fuci3s. |
| 46 | c |
| 47 | c subroutine ayant aubit tous les test de routine le |
| 48 | c 16/12/86. |
| 49 | c |
| 50 | C |
| 51 | C $Id: cd1yms.f,v 1.2 2012/03/30 12:12:42 j_novak Exp $ |
| 52 | C $Log: cd1yms.f,v $ |
| 53 | C Revision 1.2 2012/03/30 12:12:42 j_novak |
| 54 | C Cleaning of fortran files |
| 55 | C |
| 56 | C Revision 1.1.1.1 2001/11/20 15:19:30 e_gourgoulhon |
| 57 | C LORENE |
| 58 | C |
| 59 | c Revision 1.2 1997/05/23 11:35:17 hyc |
| 60 | c *** empty log message *** |
| 61 | c |
| 62 | C Revision 1.1 1997/03/17 20:21:23 hyc |
| 63 | C Initial revision |
| 64 | C |
| 65 | C |
| 66 | C $Header: /cvsroot/Lorene/F77/Source/Poisson2d/cd1yms.f,v 1.2 2012/03/30 12:12:42 j_novak Exp $ |
| 67 | C |
| 68 | C |
| 69 | character*120 header |
| 70 | data header/'$Header: /cvsroot/Lorene/F77/Source/Poisson2d/cd1yms.f,v 1.2 2012/03/30 12:12:42 j_novak Exp $'/ |
| 71 | |
| 72 | dimension cc(*),cs(*),somm(520) |
| 73 | data nfon/0/ |
| 74 | data ndim/0/ |
| 75 | c## |
| 76 | save ndim, nfon, n1, n11, nn, n65, nm65, nm651, n65n65 |
| 77 | save nm065, nm965 |
| 78 | |
| 79 | n520=520 |
| 80 | if(n64.gt.n520) then |
| 81 | print 200,n520,n64 |
| 82 | 200 format(10x,'dimension insuffisantes dans la sub.ced1m64' |
| 83 | , ,' dimensions max. admise=',i4,' n64=',i5) |
| 84 | call exit |
| 85 | endif |
| 86 | c |
| 87 | if(n.eq.ndim.and.nfon.eq.n64) go to 10 |
| 88 | ndim=n |
| 89 | n1=n+1 |
| 90 | n11=n+2 |
| 91 | nn=n+n |
| 92 | c |
| 93 | nfon=n64 |
| 94 | n65=n64 |
| 95 | if((n64/8)*8.eq.n64)n65=n64+1 |
| 96 | nm65=n*n65 |
| 97 | nm651=nm65+n65 |
| 98 | n65n65=n65+n65 |
| 99 | nm065=(n-1)*n65 |
| 100 | nm965=nm065-n65 |
| 101 | 10 continue |
| 102 | c |
| 103 | do 4 l=1,nm651 |
| 104 | cs(l)=0 |
| 105 | 4 continue |
| 106 | c |
| 107 | do 18 m=1,n64 |
| 108 | somm(m)=0 |
| 109 | 18 continue |
| 110 | c |
| 111 | do 12 m=nm65+1,nm651 |
| 112 | cc(m)=cc(m)*.5 |
| 113 | 12 continue |
| 114 | c |
| 115 | al1=nn |
| 116 | lm1=nm065 |
| 117 | lm=nm65 |
| 118 | do 1 lp=1,n,2 |
| 119 | do 13 m=1,n64 |
| 120 | somm(m)=somm(m)-al1*cc(m+lm) |
| 121 | 13 continue |
| 122 | c |
| 123 | do 14 m=1,n64 |
| 124 | cs(m+lm1)=somm(m) |
| 125 | 14 continue |
| 126 | c |
| 127 | al1=al1-4. |
| 128 | lm1=lm1-n65n65 |
| 129 | lm=lm1+n65 |
| 130 | 1 continue |
| 131 | c |
| 132 | c |
| 133 | do 15 m=1,n64 |
| 134 | somm(m)=0 |
| 135 | 15 continue |
| 136 | c |
| 137 | al1=nn-2 |
| 138 | lm1=nm965 |
| 139 | lm=nm065 |
| 140 | do 2 lp=2,n,2 |
| 141 | do 16 m=1,n64 |
| 142 | somm(m)=somm(m)-al1*cc(m+lm) |
| 143 | 16 continue |
| 144 | do 17 m=1,n64 |
| 145 | cs(m+lm1)=somm(m) |
| 146 | 17 continue |
| 147 | al1=al1-4 |
| 148 | lm=lm-n65n65 |
| 149 | lm1=lm-n65 |
| 150 | c |
| 151 | 2 continue |
| 152 | 100 format(1x,'ced1m64',10d12.4) |
| 153 | 101 format(1x,'ced164') |
| 154 | 110 format(1x,'ced1m64',20i5) |
| 155 | return |
| 156 | end |
| 157 | c |