[135] | 1 | SUBROUTINE gradiv2(klevel, xcov, ycov, ld, gdx, gdy ) |
---|
| 2 | c |
---|
| 3 | c P. Le Van |
---|
| 4 | c |
---|
| 5 | c ********************************************************** |
---|
| 6 | c ld |
---|
| 7 | c calcul de (grad (div) ) du vect. v .... |
---|
| 8 | c |
---|
| 9 | c xcov et ycov etant les composant.covariantes de v |
---|
| 10 | c ********************************************************** |
---|
| 11 | c xcont , ycont et ld sont des arguments d'entree pour le s-prog |
---|
| 12 | c gdx et gdy sont des arguments de sortie pour le s-prog |
---|
| 13 | c |
---|
| 14 | c |
---|
| 15 | IMPLICIT NONE |
---|
| 16 | c |
---|
| 17 | #include "dimensions.h" |
---|
| 18 | #include "paramet.h" |
---|
| 19 | #include "comgeom.h" |
---|
| 20 | #include "comdissipn.h" |
---|
| 21 | c |
---|
| 22 | c ........ variables en arguments ........ |
---|
| 23 | |
---|
| 24 | INTEGER klevel |
---|
| 25 | REAL xcov( ip1jmp1,klevel ), ycov( ip1jm,klevel ) |
---|
| 26 | REAL gdx( ip1jmp1,klevel ), gdy( ip1jm,klevel ) |
---|
| 27 | c |
---|
| 28 | c ........ variables locales ......... |
---|
| 29 | c |
---|
| 30 | REAL div(ip1jmp1,llm) |
---|
| 31 | REAL signe, nugrads |
---|
| 32 | INTEGER l,ij,iter,ld |
---|
| 33 | |
---|
| 34 | c ........................................................ |
---|
| 35 | c |
---|
| 36 | EXTERNAL SCOPY, divergf, grad, laplacien_gam, filtreg |
---|
| 37 | c |
---|
| 38 | CALL SCOPY( ip1jmp1 * klevel, xcov, 1, gdx, 1 ) |
---|
| 39 | CALL SCOPY( ip1jm * klevel, ycov, 1, gdy, 1 ) |
---|
| 40 | c |
---|
| 41 | c |
---|
| 42 | signe = (-1.)**ld |
---|
| 43 | nugrads = signe * cdivu |
---|
| 44 | c |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | CALL divergf( klevel, gdx, gdy , div ) |
---|
| 48 | |
---|
| 49 | IF( ld.GT.1 ) THEN |
---|
| 50 | |
---|
| 51 | CALL laplacien ( klevel, div, div ) |
---|
| 52 | |
---|
| 53 | c ...... Iteration de l'operateur laplacien_gam ....... |
---|
| 54 | |
---|
| 55 | DO iter = 1, ld -2 |
---|
| 56 | CALL laplacien_gam ( klevel,cuvscvgam1,cvuscugam1,unsair_gam1, |
---|
| 57 | * unsapolnga1, unsapolsga1, div, div ) |
---|
| 58 | ENDDO |
---|
| 59 | |
---|
| 60 | ENDIF |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | CALL filtreg( div , jjp1, klevel, 2, 1, .TRUE., 1 ) |
---|
| 64 | CALL grad ( klevel, div, gdx, gdy ) |
---|
| 65 | |
---|
| 66 | c |
---|
| 67 | DO l = 1, klevel |
---|
| 68 | DO ij = 1, ip1jmp1 |
---|
| 69 | gdx( ij,l ) = gdx( ij,l ) * nugrads |
---|
| 70 | ENDDO |
---|
| 71 | DO ij = 1, ip1jm |
---|
| 72 | gdy( ij,l ) = gdy( ij,l ) * nugrads |
---|
| 73 | ENDDO |
---|
| 74 | ENDDO |
---|
| 75 | c |
---|
| 76 | RETURN |
---|
| 77 | END |
---|