File: RELATIVE:/../../../mfix.git/model/xsi_array_mod.f

1     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvC
2     !                                                                      C
3     !  Purpose: Use convection weighting factors for higher order          C
4     !  discretization.                                                     C
5     !                                                                      C
6     !  IMPORTANT:  For using these arrays in a subroutine                  C
7     !   -lock the module in the beginning of the subroutine                C
8     !    call lock_xsi_array                                               C
9     !   -and unlock the module at the end of the subroutine                C
10     !    call unlock_xsi_array                                             C
11     !                                                                      C
12     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C
13     
14           MODULE xsi_array
15           IMPLICIT NONE
16     
17     ! discretization factors xsi of dimension_3
18           DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: XSI_e, XSI_n, &
19                                                          XSI_t
20     
21           LOGICAL :: xsi_array_locked = .false.
22     
23     
24           CONTAINS
25     
26     
27           SUBROUTINE lock_xsi_array
28           use compar, only: mype
29           IMPLICIT NONE
30           IF(xsi_array_locked) THEN
31              Write(*,*)'Error:  Multiple use of xsi_array ',&
32                    '(xsi_array_mod.f)'
33              CALL MFIX_EXIT(myPE)
34           Else
35              xsi_array_locked = .true.
36           Endif
37           END SUBROUTINE lock_xsi_array
38     
39     
40           SUBROUTINE unlock_xsi_array
41           IMPLICIT NONE
42           xsi_array_locked = .false.
43           END SUBROUTINE unlock_xsi_array
44     
45           END MODULE xsi_array
46