| 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 city3s(ndeg,ndimr,ndimy,nnn64,itch,idr,ind,c64,cc,cs,den) |
| 23 | |
| 24 | c |
| 25 | c## version du 08.10.1993 : suppression des variables declarees mais non |
| 26 | c utilisees |
| 27 | c |
| 28 | implicit none |
| 29 | c |
| 30 | c routine pour le calcul des transformees de fourier |
| 31 | c et de tchebytchev d'un tableau a 3 dimensions. |
| 32 | c |
| 33 | c routine completement craytinizee. |
| 34 | c |
| 35 | c arguments de la routine: |
| 36 | c |
| 37 | c ndeg = tableau, ndeg(3) contenant les de- |
| 38 | c gres de liberte des transformees |
| 39 | c a effectuer, ndeg(1) concerne le pre- |
| 40 | c mier indice de la matrice, ndeg(2) |
| 41 | c le 2me indice, ndeg(3) le 3me indice de la |
| 42 | c matrice. |
| 43 | c ndeg doit imperativement etre de la |
| 44 | c forme 2**m*3**p*5**q pour les trans- |
| 45 | c formees de fourier (m,p,q nombres |
| 46 | c entiers) |
| 47 | c et 2**p*3**p*5*q+1 pour les transfor- |
| 48 | c mees de tchebytchev. |
| 49 | c |
| 50 | c ndimy,ndimz =dimesion du tableau yy(lr,ly,lz). |
| 51 | c pour des raisons de craytinisation ndimy et ndimz ne doivent pas |
| 52 | c etre un multiple de 8. |
| 53 | c |
| 54 | c nnn64 = parametre de la vectorization, par exemple |
| 55 | c nnn64=64 signifie que 64 fonctions a transformer |
| 56 | c sont vectorizee. |
| 57 | c |
| 58 | c itch =parametre, sii itch.eq.1 la transformee |
| 59 | c de fourier est effectuee, si itch=2 la rou- |
| 60 | c tine effectue la transformee de tchebytchev. |
| 61 | c |
| 62 | c |
| 63 | c idr =prametre: si idr=1 la derivee premiere est effectuee |
| 64 | c si idr=2 la derivee 2me est executee. |
| 65 | c |
| 66 | c in1 = parametre, si in1=1 la transformee est |
| 67 | c effectuee sur le premier indice, si in1=2 sur le |
| 68 | c deuxieme, si in1=3 sur le 3me,. |
| 69 | c par exemple itch=2, in1=1 signifie |
| 70 | c qu'on effectue la transformation de tcheby- |
| 71 | c tchev sur le premier indice du tableau yy. |
| 72 | c |
| 73 | c ind = parametre: en output on a les coefficients |
| 74 | c de fourier (ou de tchebytchev selon itch) des deri- |
| 75 | c vees (premieres ou deuxiemes selon idr) si ind=1. |
| 76 | c si ind=2 on a les derivees des fonctions. |
| 77 | c |
| 78 | c c64,cc,cs= tableaux de travail: dimension minime= |
| 79 | c (nnn64+1)*((max(ndeg(1),ndeg(2))+3) |
| 80 | c |
| 81 | c den =tableau a 3 dimensions contenant la fonction |
| 82 | c a transformer en input, et la transformee en |
| 83 | c output. les coefficients de fourier (dans le cas |
| 84 | c d'une transformation de fourier) sont stockes |
| 85 | c dans la facon suivante: (exemple dans le cas |
| 86 | c de la transformation du 1er indice) dans den(1,l,m) |
| 87 | c il-y-a le coefficient de fourier cosinus de la |
| 88 | c frequence zero, dans les coefficients pairs |
| 89 | c (den(2,l,m),den(4,l,m)...den(2*n,l,m) les coefi- |
| 90 | c cients en cosinus, dans les coefficients impairs |
| 91 | c den(3,l,m),den(5,l,m),...den(2*n-1) les termes en |
| 92 | c sinus. par consequent les termes den(2,l,m) et den(3,l,m) |
| 93 | c sont les termes du developpement de fourier correspon- |
| 94 | c dants a la meme frequence. en totale il-y-a 2*n |
| 95 | c degres de liberte. |
| 96 | c |
| 97 | c routine ayant testee avec le protocol ordinaire le 10/1/1987 |
| 98 | c routine modifiee le 28/octobre 1994 - den(ndimr,ndimy,*) |
| 99 | c |
| 100 | C |
| 101 | C $Id: city3s.f,v 1.3 2012/03/30 12:12:43 j_novak Exp $ |
| 102 | C $Log: city3s.f,v $ |
| 103 | C Revision 1.3 2012/03/30 12:12:43 j_novak |
| 104 | C Cleaning of fortran files |
| 105 | C |
| 106 | C Revision 1.2 2005/11/02 08:59:33 m_bejger |
| 107 | C Commented out multiple initializations of data variables, line 129,130 |
| 108 | C (issue known to produce internal compiler error with |
| 109 | C gcc-gfortran 4.0.0, 4.0.1) |
| 110 | C |
| 111 | C Revision 1.1.1.1 2001/11/20 15:19:30 e_gourgoulhon |
| 112 | C LORENE |
| 113 | C |
| 114 | c Revision 1.2 1997/05/23 11:31:15 hyc |
| 115 | c *** empty log message *** |
| 116 | c |
| 117 | C Revision 1.1 1997/03/17 20:21:45 hyc |
| 118 | C Initial revision |
| 119 | C |
| 120 | C |
| 121 | C $Header: /cvsroot/Lorene/F77/Source/Poisson2d/city3s.f,v 1.3 2012/03/30 12:12:43 j_novak Exp $ |
| 122 | C |
| 123 | C |
| 124 | character*120 header |
| 125 | data header/'$Header: /cvsroot/Lorene/F77/Source/Poisson2d/city3s.f,v 1.3 2012/03/30 12:12:43 j_novak Exp $'/ |
| 126 | |
| 127 | integer |
| 128 | 1 ndimr,ndimy,nr1,ny1,nz1,ndy,ndz,ndr,neq,nnn64,nr,ny,nz,nnn65 |
| 129 | 1 ,nn64y,nn65y,ireee2,multy,ndeg,nr1z1,iresty,n6y,mult1,ii |
| 130 | 1 ,i2,ldy,lyy2,lyy1,n64y,n65y,n6565y,iyy2y,ly1,ly2,l |
| 131 | 1 ,lmu,jy,ly,jz,lz,lr,n365y,itch,lyy,ny64y,lz3,initi |
| 132 | 1 ,ny65y,mu2,lz1,lr1,lm,lz2,lr2,n63r,jjz,lsr,n265,idr1 |
| 133 | 1 ,n256,ide1,ide2,n25,idr2,ind,idr |
| 134 | c |
| 135 | real*8 cc,c64,den,cs |
| 136 | c |
| 137 | c data ndy,ndr,ndz/0,0,0/ |
| 138 | c data neq/0/ |
| 139 | c |
| 140 | dimension ide1(257),den(ndimr,ndimy,*),c64(*),cc(*),cs(*),ndeg(3) |
| 141 | dimension ide2(257) |
| 142 | data initi,neq,ndy,ndr,ndz/0,0,0,0,0/ |
| 143 | |
| 144 | save n256,n25,ide1,ide2,initi,nr1,ny1,nz1,ndr,ndy,ndz,neq |
| 145 | save nr,nz,ny,nnn65,nn64y,nn65y,nr1z1,multy,iresty,n6y |
| 146 | save mult1,ireee2,ii,i2,lyy1,lyy2,ldy,n6565y,n365y,iyy2y |
| 147 | save n64y,n65y |
| 148 | |
| 149 | c |
| 150 | c initialisation. |
| 151 | c |
| 152 | if(initi.ne.314) then |
| 153 | c |
| 154 | n256=256 |
| 155 | n25=n256/2 |
| 156 | do 700 l=1,n25 |
| 157 | ide1(l+l)=-l |
| 158 | ide1(l+l+1)=l |
| 159 | ide2(l+l)=-l*l |
| 160 | ide2(l+l+1)=-l*l |
| 161 | 700 continue |
| 162 | initi=314 |
| 163 | endif |
| 164 | c |
| 165 | nr1=ndeg(1) |
| 166 | ny1=ndeg(2) |
| 167 | nz1=ndeg(3) |
| 168 | c |
| 169 | if(ndy.eq.ny1.and.ndz.eq.nz1.and.ndr.eq.nr1.and.neq.eq.nnn64) go to 800 |
| 170 | c |
| 171 | if(nr1.gt.n256.or.ny1.gt.n256.or.nz1.gt.n256) then |
| 172 | print 2000,nr1,ny1,nz1 |
| 173 | 2000 format(1x,'DIMENSIONS INSUFF. DANS LA SUB. CITY3S: NR1,NY1,NZ1=' |
| 174 | 1 ,3i3) |
| 175 | call exit |
| 176 | endif |
| 177 | c |
| 178 | ndr=nr1 |
| 179 | ndy=ny1 |
| 180 | ndz=nz1 |
| 181 | neq=nnn64 |
| 182 | nr=nr1-1 |
| 183 | nz=nz1-1 |
| 184 | ny=ny1-1 |
| 185 | nnn65=nnn64 |
| 186 | if((nnn64/8)*8.eq.nnn64)nnn65=nnn64+1 |
| 187 | c |
| 188 | c preparation des quantites necessaires pour la transfor- |
| 189 | c mation du 1er index du tableau. |
| 190 | c |
| 191 | nn64y=nnn64 |
| 192 | nn65y=nnn65 |
| 193 | nr1z1=nr1*nz1 |
| 194 | multy=(nr1z1)/nn64y |
| 195 | iresty=nr1z1-multy*nn64y |
| 196 | c |
| 197 | c optimisation de nn64y: on cherche une valeur de nn64y qui |
| 198 | c soit < nnn64 mais un multiple de ny1. cela en vue de reduire |
| 199 | c le nombre d'operations dans le transfert des valeurs de den |
| 200 | c dans c64. |
| 201 | c |
| 202 | if(multy.gt.0.and.nnn64.gt.nr1) then |
| 203 | n6y=(nnn64/nr1)*nr1 |
| 204 | mult1=nr1z1/n6y |
| 205 | ireee2=nr1z1-mult1*n6y |
| 206 | ii=0 |
| 207 | i2=0 |
| 208 | if(iresty.gt.0)ii=1 |
| 209 | if(ireee2.gt.0)i2=1 |
| 210 | if(mult1+i2.le.multy+ii) then |
| 211 | multy=mult1 |
| 212 | nn64y=n6y |
| 213 | nn65y=nn64y |
| 214 | if((nn64y/8)*8.eq.nn64y)nn65y=nn64y+1 |
| 215 | iresty=ireee2 |
| 216 | endif |
| 217 | endif |
| 218 | |
| 219 | if(multy.eq.0) then |
| 220 | nn64y=nr1z1 |
| 221 | nn65y=nn64y |
| 222 | if((nn64y/8)*8.eq.nn64y) nn65y=nn64y+1 |
| 223 | multy=1 |
| 224 | iresty=0 |
| 225 | endif |
| 226 | lyy1=1 |
| 227 | lyy2=nn64y/nr1 |
| 228 | ldy=lyy2-lyy1 |
| 229 | c |
| 230 | if(iresty.gt.0) then |
| 231 | n64y=iresty |
| 232 | n65y=n64y |
| 233 | if((n64y/8)*8.eq.n64y)n65y=n64y+1 |
| 234 | endif |
| 235 | c |
| 236 | n6565y=nn65y+nn65y |
| 237 | n365y=n6565y+nn65y |
| 238 | iyy2y=nn64y-(nn64y/nr1)*nr1 |
| 239 | c |
| 240 | 800 continue |
| 241 | c |
| 242 | c22222222222222222222222222222222222222222222222222222222222222222222222222222222 |
| 243 | c222222222222222222222222222222222222222222222222222222222222222222222222222 |
| 244 | c |
| 245 | c transformation du 2eme indice |
| 246 | c |
| 247 | c calcul des coefficients de la derivee premiere |
| 248 | c |
| 249 | idr1=1 |
| 250 | idr2=1 |
| 251 | if(idr.eq.6) idr1=-1 |
| 252 | if(idr.eq.4) idr2=-1 |
| 253 | c |
| 254 | if(iyy2y.eq.0)then |
| 255 | c |
| 256 | c on effectue la transformation dans le cas nn64y multiple de nr1. |
| 257 | c |
| 258 | ly1=lyy1 |
| 259 | ly2=lyy2 |
| 260 | c |
| 261 | do 40 lmu=1,multy |
| 262 | c |
| 263 | jy=0 |
| 264 | do 13 ly=1,ny1 |
| 265 | jz=jy |
| 266 | do 14 lz=ly1,ly2 |
| 267 | do 15 lr=1,nr1 |
| 268 | cc(lr+jz)=den(lr,ly,lz) |
| 269 | 15 continue |
| 270 | jz=jz+nr1 |
| 271 | 14 continue |
| 272 | jy=jy+nn65y |
| 273 | 13 continue |
| 274 | c |
| 275 | if(idr.eq.0) call citxms(ny,nn64y,itch,cc,cs,c64) |
| 276 | c |
| 277 | if(idr.eq.1) then |
| 278 | if(itch.eq.0) call cd1mrs(ny,nn64y,2,cc,c64,1,cs) |
| 279 | if(itch.eq.1) call derfms(ny,nn64y,cc,cs,c64) |
| 280 | endif |
| 281 | c |
| 282 | if(idr.eq.2) call cd2mrs(ny,nn64y,itch,cc,cs,c64) |
| 283 | c |
| 284 | if(idr.eq.3.or.idr.eq.4) call dir2ms(ny,itch,idr2,nn64y,cc,cs,c64) |
| 285 | if(idr.eq.5.or.idr.eq.6) call dimras(ny,itch,idr1,nn64y,cc,c64) |
| 286 | if(idr.eq.7) call cd1mrs(nr,nn64y,itch,cc,c64,1,cs) |
| 287 | c |
| 288 | c les valeurs de la fonction sont stockees dans den |
| 289 | c |
| 290 | if(idr.ne.0.and.ind.eq.2) then |
| 291 | c |
| 292 | call citxms(ny,nn64y,itch,c64,cs,cc) |
| 293 | jy=0 |
| 294 | do 1 ly=1,ny1 |
| 295 | jz=jy |
| 296 | do 2 lz=ly1,ly2 |
| 297 | do 3 lr=1,nr1 |
| 298 | den(lr,ly,lz)=cc(lr+jz) |
| 299 | 3 continue |
| 300 | jz=jz+nr1 |
| 301 | 2 continue |
| 302 | jy=jy+nn65y |
| 303 | 1 continue |
| 304 | go to 801 |
| 305 | c |
| 306 | endif |
| 307 | c |
| 308 | jy=0 |
| 309 | do 413 ly=1,ny1 |
| 310 | jz=jy |
| 311 | do 415 lz=ly1,ly2 |
| 312 | do 414 lr=1,nr1 |
| 313 | den(lr,ly,lz)=c64(lr+jz) |
| 314 | 414 continue |
| 315 | jz=jz+nr1 |
| 316 | 415 continue |
| 317 | jy=jy+nn65y |
| 318 | 413 continue |
| 319 | 801 continue |
| 320 | c |
| 321 | ly1=ly2+1 |
| 322 | ly2=ly1+ldy |
| 323 | 40 continue |
| 324 | c |
| 325 | if(iresty.eq.0) return |
| 326 | c |
| 327 | c le calcul est continue' si ny1*nr1 n'est pas un multiple |
| 328 | c de n64y(cas ind=1). |
| 329 | c |
| 330 | if(iresty.gt.0) then |
| 331 | c |
| 332 | jy=0 |
| 333 | do 28 ly=1,ny1 |
| 334 | jz=jy |
| 335 | do 29 lz=ly1,nz1 |
| 336 | do 30 lr=1,nr1 |
| 337 | cc(lr+jz)=den(lr,ly,lz) |
| 338 | 30 continue |
| 339 | jz=jz+nr1 |
| 340 | 29 continue |
| 341 | jy=jy+n65y |
| 342 | 28 continue |
| 343 | c |
| 344 | if(idr.eq.0) call citxms(ny,n64y,itch,cc,cs,c64) |
| 345 | c |
| 346 | if(idr.eq.1) then |
| 347 | if(itch.eq.0) call cd1mrs(ny,n64y,2,cc,c64,1,cs) |
| 348 | if(itch.eq.1) call derfms(ny,n64y,cc,cs,c64) |
| 349 | endif |
| 350 | c |
| 351 | if(idr.eq.2) call cd2mrs(ny,n64y,itch,cc,cs,c64) |
| 352 | c |
| 353 | if(idr.eq.3.or.idr.eq.4) call dir2ms(ny,itch,idr2,n64y,cc,cs,c64) |
| 354 | if(idr.eq.5.or.idr.eq.6) call dimras(ny,itch,idr1,n64y,cc,c64) |
| 355 | if(idr.eq.7) call cd1mrs(ny,n64y,itch,cc,c64,1,cs) |
| 356 | c |
| 357 | if(ind.eq.2.and.idr.ne.0) then |
| 358 | c |
| 359 | call citxms(ny,n64y,itch,c64,cs,cc) |
| 360 | jy=0 |
| 361 | do 416 ly=1,ny1 |
| 362 | jz=jy |
| 363 | do 417 lz=ly1,nz1 |
| 364 | do 418 lr=1,nr1 |
| 365 | den(lr,ly,lz)=cc(lr+jz) |
| 366 | 418 continue |
| 367 | jz=jz+nr1 |
| 368 | 417 continue |
| 369 | jy=jy+n65y |
| 370 | 416 continue |
| 371 | return |
| 372 | endif |
| 373 | c |
| 374 | jy=0 |
| 375 | do 16 ly=1,ny1 |
| 376 | jz=jy |
| 377 | do 17 lz=ly1,nz1 |
| 378 | do 18 lr=1,nr1 |
| 379 | den(lr,ly,lz)=c64(lr+jz) |
| 380 | 18 continue |
| 381 | jz=jz+nr1 |
| 382 | 17 continue |
| 383 | jy=jy+n65y |
| 384 | 16 continue |
| 385 | c |
| 386 | endif |
| 387 | return |
| 388 | endif |
| 389 | c |
| 390 | c fin du calcul pour le cas nn64z multiple de ny1 (cas ind=1) |
| 391 | c |
| 392 | c........................................................................... |
| 393 | c |
| 394 | c calcul de la tf dans le cas ou n64y n'est pas un multiple de |
| 395 | c ny1.cas(ind=1). |
| 396 | c |
| 397 | if(iyy2y.gt.0) then |
| 398 | c |
| 399 | c les coefficients de fourier sont stockes dans cc |
| 400 | c |
| 401 | ny64y=nn64y |
| 402 | n63r=nr1-ny64y+1 |
| 403 | ny65y=nn65y |
| 404 | mu2=ny64y |
| 405 | lz1=1 |
| 406 | lr1=1 |
| 407 | lyy=1 |
| 408 | c |
| 409 | do 99 lm=1,multy |
| 410 | if(lyy.gt.nr1) lyy=1 |
| 411 | lyy1=0 |
| 412 | lz1=(mu2-ny64y)/nr1+1 |
| 413 | lz2=.99999+float(mu2)/nr1 |
| 414 | lr1=+mu2+n63r-lz1*nr1 |
| 415 | lr2=mu2-(lz2-1)*nr1 |
| 416 | c |
| 417 | jy=0 |
| 418 | do 71 ly=1,ny1 |
| 419 | jjz=jy |
| 420 | if(lz2.gt.lz1) then |
| 421 | c |
| 422 | jz=jy-lyy+1 |
| 423 | do 66 lr=lyy,nr1 |
| 424 | cc(lr+jz)=den(lr,ly,lz1) |
| 425 | 66 continue |
| 426 | jjz=nr1+jz |
| 427 | lyy1=1 |
| 428 | endif |
| 429 | c |
| 430 | if(lz2.gt.lz1+1) then |
| 431 | jz=jjz |
| 432 | do 67 lz=lz1+1,lz2-1 |
| 433 | do 68 lr=1,nr1 |
| 434 | cc(lr+jz)=den(lr,ly,lz) |
| 435 | 68 continue |
| 436 | jz=jz+nr1 |
| 437 | 67 continue |
| 438 | jjz=jz |
| 439 | endif |
| 440 | c |
| 441 | if(lr2.ge.lr1.or.lyy1.eq.1) then |
| 442 | if(lyy1.eq.0) then |
| 443 | jz=jjz+1-lr1 |
| 444 | do 69 lr=lr1,lr2 |
| 445 | cc(lr+jz)=den(lr,ly,lz2) |
| 446 | 69 continue |
| 447 | endif |
| 448 | c |
| 449 | if(lyy1.eq.1) then |
| 450 | jz=jjz |
| 451 | do 70 lr=1,lr2 |
| 452 | cc(lr+jz)=den(lr,ly,lz2) |
| 453 | 70 continue |
| 454 | endif |
| 455 | c |
| 456 | lsr=lr2+1 |
| 457 | endif |
| 458 | jy=jy+ny65y |
| 459 | 71 continue |
| 460 | c |
| 461 | if(idr.eq.0) call citxms(ny,ny64y,itch,cc,cs,c64) |
| 462 | c |
| 463 | if(idr.eq.1) then |
| 464 | if(itch.eq.0) call cd1mrs(ny,ny64y,2,cc,c64,1,cs) |
| 465 | if(itch.eq.1) call derfms(ny,ny64y,cc,cs,c64) |
| 466 | endif |
| 467 | c |
| 468 | if(idr.eq.2) call cd2mrs(ny,ny64y,itch,cc,cs,c64) |
| 469 | c |
| 470 | if(idr.eq.3.or.idr.eq.4) call dir2ms(ny,itch,idr2,ny64y,cc,cs,c64) |
| 471 | if(idr.eq.5.or.idr.eq.6) call dimras(ny,itch,idr1,ny64y,cc,c64) |
| 472 | if(idr.eq.7) call cd1mrs(ny,ny64y,itch,cc,c64,1,cs) |
| 473 | c |
| 474 | if(ind.eq.2.and.idr.ne.0) then |
| 475 | c |
| 476 | call citxms(ny,ny64y,itch,c64,cs,cc) |
| 477 | jy=0 |
| 478 | do 424 ly=1,ny1 |
| 479 | jjz=jy |
| 480 | if(lz2.gt.lz1) then |
| 481 | jz=jy-lyy+1 |
| 482 | c |
| 483 | do 419 lr=lyy,nr1 |
| 484 | den(lr,ly,lz1)=cc(lr+jz) |
| 485 | 419 continue |
| 486 | jjz=nr1+jz |
| 487 | lyy1=1 |
| 488 | endif |
| 489 | c |
| 490 | if(lz2.gt.lz1+1) then |
| 491 | jz=jjz |
| 492 | do 420 lz=lz1+1,lz2-1 |
| 493 | do 421 lr=1,nr1 |
| 494 | den(lr,ly,lz)=cc(lr+jz) |
| 495 | 421 continue |
| 496 | jz=jz+nr1 |
| 497 | 420 continue |
| 498 | jjz=jz |
| 499 | endif |
| 500 | c |
| 501 | if(lr2.ge.lr1.or.lyy1.eq.1) then |
| 502 | c |
| 503 | if(lyy1.eq.0) then |
| 504 | jz=jjz+1-lr1 |
| 505 | do 422 lr=lr1,lr2 |
| 506 | den(lr,ly,lz2)=cc(lr+jz) |
| 507 | 422 continue |
| 508 | endif |
| 509 | if(lyy1.eq.1) then |
| 510 | jz=jjz |
| 511 | do 423 lr=1,lr2 |
| 512 | den(lr,ly,lz2)=cc(lr+jz) |
| 513 | 423 continue |
| 514 | endif |
| 515 | c |
| 516 | lsr=lr2+1 |
| 517 | endif |
| 518 | jy=jy+ny65y |
| 519 | 424 continue |
| 520 | go to 802 |
| 521 | endif |
| 522 | jy=0 |
| 523 | c |
| 524 | do 46 ly=1,ny1 |
| 525 | jjz=jy |
| 526 | if(lz2.gt.lz1) then |
| 527 | jz=jy-lyy+1 |
| 528 | c |
| 529 | do 41 lr=lyy,nr1 |
| 530 | den(lr,ly,lz1)=c64(lr+jz) |
| 531 | 41 continue |
| 532 | jjz=nr1+jz |
| 533 | lyy1=1 |
| 534 | endif |
| 535 | c |
| 536 | if(lz2.gt.lz1+1) then |
| 537 | jz=jjz |
| 538 | do 42 lz=lz1+1,lz2-1 |
| 539 | do 43 lr=1,nr1 |
| 540 | den(lr,ly,lz)=c64(lr+jz) |
| 541 | 43 continue |
| 542 | jz=jz+nr1 |
| 543 | 42 continue |
| 544 | jjz=jz |
| 545 | endif |
| 546 | c |
| 547 | if(lr2.ge.lr1.or.lyy1.eq.1) then |
| 548 | c |
| 549 | if(lyy1.eq.0) then |
| 550 | jz=jjz+1-lr1 |
| 551 | do 44 lr=lr1,lr2 |
| 552 | den(lr,ly,lz2)=c64(lr+jz) |
| 553 | 44 continue |
| 554 | endif |
| 555 | if(lyy1.eq.1) then |
| 556 | jz=jjz |
| 557 | do 45 lr=1,lr2 |
| 558 | den(lr,ly,lz2)=c64(lr+jz) |
| 559 | 45 continue |
| 560 | endif |
| 561 | c |
| 562 | lsr=lr2+1 |
| 563 | endif |
| 564 | jy=jy+ny65y |
| 565 | 46 continue |
| 566 | 802 continue |
| 567 | c |
| 568 | lyy=lsr |
| 569 | mu2=mu2+ny64y |
| 570 | 99 continue |
| 571 | c |
| 572 | if(iresty.eq.0) return |
| 573 | c |
| 574 | c si n64r n'est pas un multiple exacte de nr1*nz1 le calcul |
| 575 | c continue |
| 576 | c |
| 577 | jy=0 |
| 578 | lr1=lyy |
| 579 | lz1=lz2 |
| 580 | lz3=lz2 |
| 581 | if(lyy.gt.nr1) then |
| 582 | lr1=1 |
| 583 | lz3=lz2+1 |
| 584 | endif |
| 585 | ny64y=iresty |
| 586 | ny65y=ny64y |
| 587 | if((ny64y/8)*8.eq.ny64y)ny65y=ny64y+1 |
| 588 | n265=ny65y+ny65y |
| 589 | c |
| 590 | c |
| 591 | c les coefficients de fourier sont stockes dans cc |
| 592 | c |
| 593 | jy=-lr1+1 |
| 594 | c |
| 595 | do 93 ly=1,ny1 |
| 596 | c |
| 597 | jz=jy |
| 598 | if(lyy.le.nr1) then |
| 599 | do 90 lr=lr1,nr1 |
| 600 | cc(lr+jz)=den(lr,ly,lz2) |
| 601 | 90 continue |
| 602 | lz3=1+lz2 |
| 603 | jz=jz+nr1 |
| 604 | endif |
| 605 | c |
| 606 | if(lz3.le.nz1)then |
| 607 | do 91 lz=lz3,nz1 |
| 608 | do 92 lr=1,nr1 |
| 609 | cc(lr+jz)=den(lr,ly,lz) |
| 610 | 92 continue |
| 611 | jz=jz+nr1 |
| 612 | 91 continue |
| 613 | endif |
| 614 | jy=jy+ny65y |
| 615 | 93 continue |
| 616 | c |
| 617 | if(idr.eq.0) call citxms(ny,ny64y,itch,cc,cs,c64) |
| 618 | c |
| 619 | if(idr.eq.1) then |
| 620 | if(itch.eq.0) call cd1mrs(ny,ny64y,2,cc,c64,1,cs) |
| 621 | if(itch.eq.1) call derfms(ny,ny64y,cc,cs,c64) |
| 622 | endif |
| 623 | c |
| 624 | if(idr.eq.2) call cd2mrs(ny,ny64y,itch,cc,cs,c64) |
| 625 | c |
| 626 | if(idr.eq.3.or.idr.eq.4) call dir2ms(ny,itch,idr2,ny64y,cc,cs,c64) |
| 627 | if(idr.eq.5.or.idr.eq.6) call dimras(ny,itch,idr1,ny64y,cc,c64) |
| 628 | if(idr.eq.7) call cd1mrs(ny,ny64y,itch,cc,c64,1,cs) |
| 629 | if(ind.eq.2.and.idr.ne.0) then |
| 630 | c |
| 631 | call citxms(ny,ny64y,itch,c64,cs,cc) |
| 632 | jy=-lr1+1 |
| 633 | do 76 ly=1,ny1 |
| 634 | jz=jy |
| 635 | if(lyy.le.nr1) then |
| 636 | do 73 lr=lr1,nr1 |
| 637 | den(lr,ly,lz2)=cc(lr+jz) |
| 638 | 73 continue |
| 639 | lz3=1+lz2 |
| 640 | jz=jz+nr1 |
| 641 | endif |
| 642 | c |
| 643 | if(lz3.le.nz1)then |
| 644 | do 74 lz=lz3,nz1 |
| 645 | do 75 lr=1,nr1 |
| 646 | den(lr,ly,lz)=cc(lr+jz) |
| 647 | 75 continue |
| 648 | jz=jz+nr1 |
| 649 | 74 continue |
| 650 | endif |
| 651 | jy=jy+ny65y |
| 652 | 76 continue |
| 653 | return |
| 654 | endif |
| 655 | c |
| 656 | jy=-lr1+1 |
| 657 | do 428 ly=1,ny1 |
| 658 | jz=jy |
| 659 | if(lyy.le.nr1) then |
| 660 | do 425 lr=lr1,nr1 |
| 661 | den(lr,ly,lz2)=c64(lr+jz) |
| 662 | 425 continue |
| 663 | lz3=1+lz2 |
| 664 | jz=jz+nr1 |
| 665 | endif |
| 666 | c |
| 667 | if(lz3.le.nz1)then |
| 668 | do 426 lz=lz3,nz1 |
| 669 | do 427 lr=1,nr1 |
| 670 | den(lr,ly,lz)=c64(lr+jz) |
| 671 | 427 continue |
| 672 | jz=jz+nr1 |
| 673 | 426 continue |
| 674 | endif |
| 675 | jy=jy+ny65y |
| 676 | 428 continue |
| 677 | endif |
| 678 | return |
| 679 | 1000 format(1x,10e12.4) |
| 680 | 1010 format(1x,' ') |
| 681 | end |
| 682 |