File: /nfs/home/0/users/jenkins/mfix.git/model/indices_mod.f

1     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
2     !                                                                      !
3     !  Module: indices                                                     !
4     !  Author: M. Syamlal                                 Date: dd-mmm-yy  !
5     !                                                                      !
6     !  Purpose: Global arrays for index computations.                      !
7     !                                                                      !
8     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
9           MODULE indices
10     
11           Use param1, only: MAX_CLASS
12     
13     ! Increments used for index computation
14           INTEGER :: INCREMENT_FOR_n (MAX_CLASS)
15           INTEGER :: INCREMENT_FOR_s (MAX_CLASS)
16           INTEGER :: INCREMENT_FOR_e (MAX_CLASS)
17           INTEGER :: INCREMENT_FOR_w (MAX_CLASS)
18           INTEGER :: INCREMENT_FOR_t (MAX_CLASS)
19           INTEGER :: INCREMENT_FOR_b (MAX_CLASS)
20           INTEGER :: INCREMENT_FOR_im(MAX_CLASS)
21           INTEGER :: INCREMENT_FOR_ip(MAX_CLASS)
22           INTEGER :: INCREMENT_FOR_jm(MAX_CLASS)
23           INTEGER :: INCREMENT_FOR_jp(MAX_CLASS)
24           INTEGER :: INCREMENT_FOR_km(MAX_CLASS)
25           INTEGER :: INCREMENT_FOR_kp(MAX_CLASS)
26     
27           INTEGER :: INCREMENT_FOR_MP(6,MAX_CLASS) = 0
28           INTEGER :: INCREMENT_FOR_NB(6,MAX_CLASS) = 0
29     
30     ! Increments used for index computation of 3rd layer
31           INTEGER :: INCREMENT3_FOR_im(MAX_CLASS)
32           INTEGER :: INCREMENT3_FOR_ip(MAX_CLASS)
33           INTEGER :: INCREMENT3_FOR_jm(MAX_CLASS)
34           INTEGER :: INCREMENT3_FOR_jp(MAX_CLASS)
35           INTEGER :: INCREMENT3_FOR_km(MAX_CLASS)
36           INTEGER :: INCREMENT3_FOR_kp(MAX_CLASS)
37     
38     ! Store LM index values
39           INTEGER, DIMENSION(:,:), ALLOCATABLE :: STORE_LM
40     
41     ! Identification of the cell class
42           INTEGER, DIMENSION(:), ALLOCATABLE :: CELL_CLASS
43     
44     ! Maps between IJK and the base I/J/K indices
45           INTEGER, DIMENSION(:), ALLOCATABLE :: I_OF ! IJK --> I
46           INTEGER, DIMENSION(:), ALLOCATABLE :: J_OF ! IJK --> J
47           INTEGER, DIMENSION(:), ALLOCATABLE :: K_OF ! IJK --> K
48     
49     ! +/- increments, shifted for cyclic BCs and DMP partitions.
50           INTEGER, DIMENSION(:), ALLOCATABLE :: Im1, Ip1 ! I-1, I+1
51           INTEGER, DIMENSION(:), ALLOCATABLE :: Jm1, Jp1 ! J-1, J+1
52           INTEGER, DIMENSION(:), ALLOCATABLE :: Km1, Kp1 ! K-1, K+1
53     
54     ! Identification of the cell class for higher order scheme
55           INTEGER, DIMENSION(:), ALLOCATABLE :: CELL_CLASS3
56     
57           INTEGER, DIMENSION(:), ALLOCATABLE :: I3_OF
58           INTEGER, DIMENSION(:), ALLOCATABLE :: J3_OF
59           INTEGER, DIMENSION(:), ALLOCATABLE :: K3_OF
60     
61           INTEGER, DIMENSION(:), ALLOCATABLE :: Im1_3, Ip1_3
62           INTEGER, DIMENSION(:), ALLOCATABLE :: Jm1_3, Jp1_3
63           INTEGER, DIMENSION(:), ALLOCATABLE :: Km1_3, Kp1_3
64     
65     ! Save original IJK value of Background grid (new to old mapping)
66           INTEGER, DIMENSION(:), ALLOCATABLE :: BACKGROUND_IJK_OF
67     ! Save new IJK value of Background grid (old to new mapping)
68           INTEGER, DIMENSION(:), ALLOCATABLE :: IJK_OF_BACKGROUND
69     ! Save original IJKEND3 value of Background grid
70           INTEGER :: BACKGROUND_IJKEND3
71     
72           END MODULE indices
73