GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: dyn3d_common/divgrad2.F Lines: 21 21 100.0 %
Date: 2023-06-30 12:51:15 Branches: 17 18 94.4 %

Line Branch Exec Source
1
!
2
! $Header$
3
!
4
338
      SUBROUTINE divgrad2 ( klevel, h, deltapres, lh, divgra )
5
c
6
c     P. Le Van
7
c
8
c   ***************************************************************
9
c
10
c     .....   calcul de  (div( grad ))   de (  pext * h ) .....
11
c   ****************************************************************
12
c   h ,klevel,lh et pext  sont des arguments  d'entree pour le s-prg
13
c         divgra     est  un argument  de sortie pour le s-prg
14
c
15
      IMPLICIT NONE
16
c
17
      INCLUDE "dimensions.h"
18
      INCLUDE "paramet.h"
19
      INCLUDE "comgeom2.h"
20
      INCLUDE "comdissipn.h"
21
22
c    .......    variables en arguments   .......
23
c
24
      INTEGER klevel
25
      REAL h( ip1jmp1,klevel ), deltapres( ip1jmp1,klevel )
26
      REAL divgra( ip1jmp1,klevel)
27
c
28
c    .......    variables  locales    ..........
29
c
30
      REAL     signe, nudivgrs, sqrtps( ip1jmp1,llm )
31
      INTEGER  l,ij,iter,lh
32
c    ...................................................................
33
34
c
35
338
      signe    = (-1.)**lh
36
338
      nudivgrs = signe * cdivh
37
38
338
      CALL SCOPY ( ip1jmp1 * klevel, h, 1, divgra, 1 )
39
40
c
41
338
      CALL laplacien( klevel, divgra, divgra )
42
43
11620
      DO l = 1, klevel
44
12297718
       DO ij = 1, ip1jmp1
45
12297380
        sqrtps( ij,l ) = SQRT( deltapres(ij,l) )
46
       ENDDO
47
      ENDDO
48
c
49
11620
      DO l = 1, klevel
50
12297718
        DO ij = 1, ip1jmp1
51
12297380
         divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l)
52
        ENDDO
53
      ENDDO
54
55
c    ........    Iteration de l'operateur  laplacien_gam    ........
56
c
57
338
      DO  iter = 1, lh - 2
58
       CALL laplacien_gam ( klevel,cuvscvgam2,cvuscugam2,unsair_gam2,
59
338
     *                     unsapolnga2, unsapolsga2,  divgra, divgra )
60
      ENDDO
61
c
62
c    ...............................................................
63
64
11620
      DO l = 1, klevel
65
12297718
        DO ij = 1, ip1jmp1
66
12297380
          divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l)
67
        ENDDO
68
      ENDDO
69
c
70
338
      CALL laplacien ( klevel, divgra, divgra )
71
c
72
11620
      DO l  = 1,klevel
73
12297718
      DO ij = 1,ip1jmp1
74
12297380
      divgra(ij,l) =  nudivgrs * divgra(ij,l) / deltapres(ij,l)
75
      ENDDO
76
      ENDDO
77
78
338
      RETURN
79
      END