MFIX  2016-1
out_array_k.f
Go to the documentation of this file.
1 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvC
2 ! C
3 ! Module name: OUT_ARRAY_K C
4 ! Purpose: print out a 2D (constant k-plane) array to standard output C
5 ! C
6 ! Author: P.Nicoletti Date: 02-DEC-91 C
7 ! Reviewer: W. Rogers, M. Syamlal, S. Venkatesan Date: 31-JAN-92 C
8 ! C
9 ! Revision Number: C
10 ! Purpose: C
11 ! Author: Date: dd-mmm-yy C
12 ! Reviewer: Date: dd-mmm-yy C
13 ! C
14 ! Literature/Document References: C
15 ! C
16 ! Variables referenced: IMAX2, JMAX2 C
17 ! Variables modified: C
18 ! C
19 ! Local variables: NCOL, NTAB, LL1, LL2, LL3, IFORM1, IFORM2, IJK, IJ2
20 ! C
21 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C
22  SUBROUTINE out_array_k(ARRAY)
23 !...Translated by Pacific-Sierra Research VAST-90 2.06G5 12:17:31 12/09/98
24 !...Switches: -xf
25 !
26 !-----------------------------------------------
27 ! M o d u l e s
28 !-----------------------------------------------
29  USE param
30  USE param1
31  USE geometry
32  USE fldvar
33  USE physprop
34  USE indices
35  USE funits
36  USE compar
37  USE functions
38  IMPLICIT NONE
39 !-----------------------------------------------
40 ! G l o b a l P a r a m e t e r s
41 !-----------------------------------------------
42 !-----------------------------------------------
43 ! D u m m y A r g u m e n t s
44 !-----------------------------------------------
45 !
46  DOUBLE PRECISION ARRAY(*)
47 !
48 ! number of columns to print out across the page
49  INTEGER NCOL
50 !
51 ! number of tables the 2D array must be split into
52 ! for printing
53  INTEGER NTAB
54 !
55 ! loop indices
56  INTEGER LL1, LL2, LL3
57 !
58 ! start and end 'I' for current table
59  INTEGER IFORM1 , IFORM2
60 !
61 ! start 'IJ' and end 'IJ' for a given 'J' to print out
62  INTEGER IJK , IJ2
63 !
64 
65 !
66 !-----------------------------------------------
67 !
68 ! NOTE: IF NCOL IS CHANGED TO A NUMBER GREATER THAN 30, THEN THE "30"
69 ! IN FORMATS 5050 AND 5100 MUST BE CHANGED TO THAT NUMBER.
70 !
71  ncol = 10
72 !// Adjust for cyclic in x direction
73  IF(cyclic_x) then
74  ntab = (imax2-1)/ncol + 1
75  ELSE
76  ntab = imax2/ncol + 1
77  ENDIF
78 
79 !// Adjust for cyclic in x direction
80  IF(cyclic_x) then
81  IF (mod(imax2-1,ncol) == 0) ntab = ntab - 1
82  ELSE
83  IF (mod(imax2,ncol) == 0) ntab = ntab - 1
84  ENDIF
85 !
86  DO ll1 = 1, ntab
87 
88 !// Adjust for cyclic in x direction
89  IF(cyclic_x.AND.ll1.eq.1) then
90  iform1 = 2 + ncol*(ll1 - 1)
91  ELSE
92  iform1 = 1 + ncol*(ll1 - 1)
93  ENDIF
94 
95  iform2 = ncol*ll1
96 
97 !// Adjust for cyclic in x direction
98  IF(cyclic_x) then
99  iform2 = min(iform2,imax2-1)
100  ELSE
101  iform2 = min(iform2,imax2)
102  ENDIF
103 
104  WRITE (unit_out, 5050) (ll3,ll3=iform1,iform2)
105  DO ll2 = jmax2, 1, -1
106  ijk = funijk_io(iform1,ll2,1)
107  ij2 = funijk_io(iform2,ll2,1)
108 !efd
109 ! WRITE (UNIT_OUT, 5100) LL2, (ARRAY(LL3),LL3=IJK,IJ2)
110  WRITE (unit_out, 5100) ll2, &
111  (array(funijk_io(ll3,ll2,1)),ll3=iform1,iform2)
112  END DO
113  END DO
114  5050 FORMAT(3x,'J',3x,'I=',3x,10(i3,9x))
115  5100 FORMAT(1x,i3,3x,10(1pe12.4))
116  RETURN
117  END SUBROUTINE out_array_k
integer imax2
Definition: geometry_mod.f:61
integer, parameter unit_out
Definition: funits_mod.f:18
integer jmax2
Definition: geometry_mod.f:63
logical cyclic_x
Definition: geometry_mod.f:149
Definition: param_mod.f:2
subroutine out_array_k(ARRAY)
Definition: out_array_k.f:23
double precision, dimension(:), allocatable x
Definition: geometry_mod.f:129