42
43
44
45 USE my_alloc_mod
52
53
54
55#include "implicit_f.inc"
56
57
58
59#include "com04_c.inc"
60#include "param_c.inc"
61
62
63
64 INTEGER ,DIMENSION(LISKN,*) ,INTENT(IN) :: ISKN
65 INTEGER ,DIMENSION(NUMNOD) ,INTENT(IN) :: ITABM1
66 my_real ,
DIMENSION(3,NUMNOD) ,
INTENT(IN) :: x
67 my_real ,
DIMENSION(LSKEW,*) ,
INTENT(IN) :: skew
68 my_real ,
DIMENSION(NTRANSF,*) ,
INTENT(IN) :: rtrans
69 TYPE (UNIT_TYPE_) ,INTENT(IN) :: UNITAB
70 TYPE(SUBMODEL_DATA),DIMENSION(*) ,INTENT(IN) :: LSUBMODEL
71 TYPE (BOX_) ,DIMENSION(NBBOX) :: IBOX
72
73
74
75 INTEGER I,II,J,UID,LEN,BOXID,IUNIT,FLAGUNIT,
76 . IAD,NBOX,NBOX_RECT,NBOX_CYL,NBOX_SPHER,NBOX_BOX,NLIST
78 INTEGER :: IWORK(70000)
79 INTEGER INDEX(NBBOX*3),IX1(NBBOX),IX2(NBBOX)
80 INTEGER, DIMENSION(:) ,ALLOCATABLE :: BUFTMP,IBOXTMP
81 CHARACTER(LEN=NCHARKEY) :: KEY,KEY2
82 CHARACTER(nchartitle) :: TITR,MESS
83 LOGICAL :: IS_AVAILABLE
84
85 DATA mess/'BOX DEFINITION '/
86
87
88
89 INTEGER LISTCNT,NBOXLST
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
120
121 nbox = nbox_rect + nbox_cyl + nbox_spher + nbox_box
122
123 iad = 0
124 len = 5*nbbox
125 CALL my_alloc(buftmp ,len)
126
127
129 . ibox ,iad ,nbox_spher,itabm1 ,x ,
130 . rtrans ,unitab ,lsubmodel )
131
133 . ibox ,iad ,nbox_cyl ,itabm1 ,x ,
134 . rtrans ,unitab ,lsubmodel )
135
137 . ibox ,iad ,nbox_rect ,iskn ,skew ,
138 . itabm1 ,x ,rtrans ,unitab ,lsubmodel)
139
141
142
143
144
145 CALL my_alloc (iboxtmp ,nbox )
146 iboxtmp(1:nbox) = ibox(1:nbox)%ID
148
149
150
151
152 IF (nbox_box > 0) THEN
153 ii = 0
154 DO i = 1,nbbox
155 IF (ibox(i)%TYPE == 0) THEN
156 nlist = ibox(i)%NBOXBOX
157 boxid = ibox(i)%ID
158 titr = ibox(i)%TITLE
159 IF (nlist > 0) THEN
160 nlist =
nboxlst(ibox(i)%IBOXBOX,nlist ,iboxtmp ,nbbox,
161 . buftmp ,buftmp(1+nbbox),buftmp(1+2*nbbox),
162 . ii,boxid,titr)
163 ii = 1
164 ibox(i)%NBOXBOX = nlist
165 ELSE
166 ibox(iad)%NBOXBOX = 0
167 ENDIF
168 ENDIF
169 ENDDO
170 ENDIF
171
172 IF (ALLOCATED(iboxtmp)) DEALLOCATE (iboxtmp)
173 IF (ALLOCATED(buftmp) ) DEALLOCATE (buftmp )
174
175 RETURN
subroutine hm_option_count(entity_type, hm_option_number)
integer, parameter ncharkey
integer function nboxlst(list, nlist, iboxtmp, nbbox, ix1, ix2, index, kk, id, titr)
subroutine read_box_box(ibox, iad, nbox, lsubmodel)
subroutine read_box_cyl(ibox, iad, nbox, itabm1, x, rtrans, unitab, lsubmodel)
subroutine read_box_rect(ibox, iad, nbox, iskn, skew, itabm1, x, rtrans, unitab, lsubmodel)
subroutine read_box_spher(ibox, iad, nbox, itabm1, x, rtrans, unitab, lsubmodel)
subroutine udouble_igr(list, nlist, mess, ir, rlist)