21 INTEGER,
INTENT(IN) :: BCV
22 INTEGER,
INTENT(IN) :: BCV_I
23 DOUBLE PRECISION,
INTENT(IN) :: MAX_DIA
25 LOGICAL,
parameter :: setDBG = .false.
26 LOGICAL,
parameter :: showMAP = .false.
113 INTEGER,
INTENT(IN) :: BCV
114 INTEGER,
INTENT(IN) :: BCV_I
116 DOUBLE PRECISION,
INTENT(IN) :: MAX_DIA
118 LOGICAL,
INTENT(IN) :: setDBG, showMAP
129 DOUBLE PRECISION :: TMP_DP
133 INTEGER,
allocatable :: MESH_H(:)
134 INTEGER,
allocatable :: MESH_W(:)
136 DOUBLE PRECISION,
allocatable :: MESH_P(:)
137 DOUBLE PRECISION,
allocatable :: MESH_Q(:)
139 INTEGER,
allocatable :: RAND_MAP(:)
141 INTEGER,
allocatable :: FULL_MAP(:,:)
143 INTEGER :: WMAX, HMAX
144 INTEGER :: maxEXT(2), minEXT(2)
146 DOUBLE PRECISION :: PLEN, QLEN
150 DOUBLE PRECISION :: SHIFT, WINDOW
152 DOUBLE PRECISION :: CENTER(3), HALFSIZE(3)
163 if(dflag)
write(*,
"(2/,'Building NS DEM_MI: ',I3)") bcv_i
170 plen = bc_x_e(bcv) - bc_x_w(bcv)
171 wmax = floor(
real(plen/max_dia))
172 allocate( mesh_w(wmax) )
173 allocate( mesh_p(0:wmax) )
177 hmax = floor(
real(qlen/max_dia))
178 allocate( mesh_h(hmax) )
179 allocate( mesh_q(0:hmax) )
182 allocate( full_map(wmax, hmax))
187 shift = merge(-
one,
one, bc_plane(bcv) ==
'N')
188 dem_mi(bcv_i)%OFFSET = bc_y_s(bcv) + max_dia*shift
189 dem_mi(bcv_i)%L = j + int(shift)
190 if(dflag)
write(*,
"(2x,'Offset: ',3x,I4,3x,g12.5)") &
191 dem_mi(bcv_i)%L, dem_mi(bcv_i)%OFFSET
196 dem_mi(bcv_i)%WINDOW = min(plen/wmax, qlen/hmax)
197 window = dem_mi(bcv_i)%WINDOW
198 if(dflag)
write(*,
"(2x,'Windows size: ',g12.5)") window
201 shift =
half*(plen - wmax*window)
202 mesh_p(0) = bc_x_w(bcv) + shift
203 if(dflag)
write(*,8005)
'P', shift,
'P', mesh_p(0)
205 mesh_p(lc) = mesh_p(0) + dble(lc-1)*window
206 shift = mesh_p(lc) +
half*window
208 IF(dflag)
WRITE(*,8006) lc,
'W', mesh_w(lc),
'P', mesh_p(lc)
213 shift =
half*(qlen - hmax*window)
214 mesh_q(0) =
bc_z_b(bcv) + shift
215 if(dflag)
write(*,8005)
'Q',shift,
'Q',mesh_q(0)
217 mesh_q(lc) = mesh_q(0) + dble(lc-1)*window
218 shift = mesh_q(lc) +
half*window
220 IF(dflag)
WRITE(*,8006) lc,
'H', mesh_h(lc),
'Q', mesh_q(lc)
240 IF(.NOT.is_on_mype_owns(i,j,k)) cycle
248 shift = mesh_p(w)+window
252 shift = mesh_q(h)+window
265 shift = mesh_p(w)+window
270 full_map(w,h) =
mype+1
280 halfsize(2) = 1.10d0*max_dia
281 halfsize(1) =
half*(window * 1.10d0)
282 halfsize(3) =
half*(window * 1.10d0)
284 minext(1) = hmax+1; maxext(1) = 0
285 minext(2) = wmax+1; maxext(2) = 0
289 center(2) = bc_y_s(bcv)
290 center(1) = mesh_p(w) +
half*window
291 center(3) = mesh_q(h) +
half*window
293 facet_lp:
DO lc=1, stl_start(default_stl)-1
295 IF(bc_y_s(bcv) > maxval(
vertex(:,2,lc))) cycle facet_lp
296 IF(bc_y_s(bcv) < minval(
vertex(:,2,lc))) cycle facet_lp
298 IF(bc_x_w(bcv) > maxval(
vertex(:,1,lc))) cycle facet_lp
299 IF(bc_x_e(bcv) < minval(
vertex(:,1,lc))) cycle facet_lp
311 full_map(w:wmax,h) = 0
316 full_map(w,h:hmax) = 0
318 minext(1) = min(minext(1),h)
319 minext(2) = min(minext(2),w)
321 maxext(1) = max(maxext(1),h)
322 maxext(2) = max(maxext(2),w)
330 if(minext(1) < hmax+1) full_map(:,:minext(1)) = 0
331 if(maxext(1) > 0) full_map(:,maxext(1):) = 0
333 if(minext(2) /= wmax+1) full_map(:minext(2),:) = 0
334 if(maxext(2) > 0) full_map(maxext(2):,:) = 0
340 IF(full_map(w,h) /= 0) occupants = occupants + 1
349 IF(occupants == 0)
THEN 354 1100
FORMAT(
'Error 1100: No un-cut fluid cells adjacent to DEM_MI ', &
355 'staging area.',/
'Unable to setup the discrete solids mass ', &
359 dem_mi(bcv_i)%OCCUPANTS = occupants
362 IF(dflag .OR. (
dmp_log .AND. showmap))
THEN 363 WRITE(*,
"(2/,2x,'Displaying Fill Map:')")
365 WRITE(*,
"(2x,'H =',I3)",advance=
'no')h
367 IF(full_map(w,h) == 0)
then 368 WRITE(*,
"(' *')",advance=
'no')
370 WRITE(*,
"(' .')",advance=
'no')
378 if(dflag)
write(*,
"(2/,2x,'Building RAND_MAP:')")
379 allocate( rand_map(occupants) )
386 DO WHILE (rand_map(occupants) .EQ. 0)
387 CALL random_number(tmp_dp)
388 tmp_int = ceiling(
real(tmp_dp*dble(occupants)))
390 IF(tmp_int .EQ. rand_map(lc) )
EXIT 392 if(dflag)
WRITE(*,
"(4x,'LC:',I9,' : ',I9)") lc, tmp_int
393 rand_map(lc) = tmp_int
403 dem_mi(bcv_i)%VACANCY = 1
406 allocate( dem_mi(bcv_i)%W(occupants) )
407 allocate( dem_mi(bcv_i)%P(occupants) )
408 allocate( dem_mi(bcv_i)%H(occupants) )
409 allocate( dem_mi(bcv_i)%Q(occupants) )
410 allocate( dem_mi(bcv_i)%OWNER(occupants) )
412 if(dflag)
write(*,8010)
417 IF(full_map(w,h) == 0) cycle
420 dem_mi(bcv_i)%OWNER(ll) = full_map(w,h) - 1
422 dem_mi(bcv_i)%W(ll) = mesh_w(w)
423 dem_mi(bcv_i)%H(ll) = mesh_h(h)
425 dem_mi(bcv_i)%P(ll) = mesh_p(w)
426 dem_mi(bcv_i)%Q(ll) = mesh_q(h)
428 if(dflag)
write(*,8011) dem_mi(bcv_i)%OWNER(ll), &
429 dem_mi(bcv_i)%W(ll), dem_mi(bcv_i)%H(ll), dem_mi(bcv_i)%L, &
430 dem_mi(bcv_i)%P(ll), dem_mi(bcv_i)%Q(ll), dem_mi(bcv_i)%OFFSET
436 8010
FORMAT(2/,2x,
'Storing DEM_MI data:',/4x,
'OWNER',5x,
'W',5x,
'H', &
437 5x,
'L',7x,
'P',12x,
'Q',12x,
'R')
438 8011
FORMAT(4x,i5,3(2x,i4),3(2x,g12.5))
441 if(dflag .OR. (
dmp_log .AND. showmap))
THEN 442 write(*,
"(2/,2x,'Inlet area sizes:')")
443 write(*,9000)
'mfix.dat: ', plen * qlen
444 write(*,9000)
'BC_AREA: ', bc_area(bcv)
445 write(*,9000)
'DEM_MI: ', occupants * (window**2)
447 9000
FORMAT(2x,a,g12.5)
450 IF(
allocated(mesh_h))
deallocate(mesh_h)
451 IF(
allocated(mesh_w))
deallocate(mesh_w)
452 IF(
allocated(mesh_p))
deallocate(mesh_p)
453 IF(
allocated(mesh_q))
deallocate(mesh_q)
455 IF(
allocated(rand_map))
deallocate(rand_map)
456 IF(
allocated(full_map))
deallocate(full_map)
462 8005
FORMAT(2/,2x,
'Building MESH_',a1,
':',/4x,
'Shift:',f8.4,/4x, &
463 'MESH_',a1,
'(0) = ',f8.4,/)
465 8006
FORMAT(4x,
'LC = ',i4,3x,a1,
' =',i3,3x,a1,
' =',f8.4)
526 INTEGER,
INTENT(IN) :: BCV
527 INTEGER,
INTENT(IN) :: BCV_I
529 DOUBLE PRECISION,
INTENT(IN) :: MAX_DIA
531 LOGICAL,
INTENT(IN) :: setDBG, showMAP
542 DOUBLE PRECISION :: TMP_DP
546 INTEGER,
allocatable :: MESH_H(:)
547 INTEGER,
allocatable :: MESH_W(:)
549 DOUBLE PRECISION,
allocatable :: MESH_P(:)
550 DOUBLE PRECISION,
allocatable :: MESH_Q(:)
552 INTEGER,
allocatable :: RAND_MAP(:)
554 INTEGER,
allocatable :: FULL_MAP(:,:)
556 INTEGER :: WMAX, HMAX
557 INTEGER :: maxEXT(2), minEXT(2)
559 DOUBLE PRECISION :: PLEN, QLEN
563 DOUBLE PRECISION :: SHIFT, WINDOW
565 DOUBLE PRECISION :: CENTER(3), HALFSIZE(3)
579 if(dflag)
write(*,
"(2/,'Building EW DEM_MI: ',I3)") bcv_i
584 plen = bc_y_n(bcv) - bc_y_s(bcv)
585 wmax = floor(
real(plen/max_dia))
586 allocate( mesh_w(wmax) )
587 allocate( mesh_p(0:wmax) )
591 hmax = floor(
real(qlen/max_dia))
592 allocate( mesh_h(hmax) )
593 allocate( mesh_q(0:hmax) )
596 allocate( full_map(wmax, hmax))
601 shift = merge(-
one,
one, bc_plane(bcv) ==
'E')
602 dem_mi(bcv_i)%OFFSET = bc_x_w(bcv) + max_dia*shift
603 dem_mi(bcv_i)%L = i + int(shift)
604 if(dflag)
write(*,
"(2x,'Offset: ',3x,I4,3x,g12.5)") &
605 dem_mi(bcv_i)%L, dem_mi(bcv_i)%OFFSET
610 dem_mi(bcv_i)%WINDOW = min(plen/wmax, qlen/hmax)
611 window = dem_mi(bcv_i)%WINDOW
612 if(dflag)
write(*,
"(2x,'Windows size: ',g12.5)") window
615 shift =
half*(plen - wmax*window)
616 mesh_p(0) = bc_y_s(bcv) + shift
617 if(dflag)
write(*,8005)
'P', shift,
'P', mesh_p(0)
619 mesh_p(lc) = mesh_p(0) + dble(lc-1)*window
620 shift = mesh_p(lc) +
half*window
622 IF(dflag)
WRITE(*,8006) lc,
'W', mesh_w(lc),
'P', mesh_p(lc)
627 shift =
half*(qlen - hmax*window)
628 mesh_q(0) =
bc_z_b(bcv) + shift
629 if(dflag)
write(*,8005)
'Q',shift,
'Q',mesh_q(0)
631 mesh_q(lc) = mesh_q(0) + dble(lc-1)*window
632 shift = mesh_q(lc) +
half*window
634 IF(dflag)
WRITE(*,8006) lc,
'H', mesh_h(lc),
'Q', mesh_q(lc)
654 IF(.NOT.is_on_mype_owns(i,j,k)) cycle
662 shift = mesh_p(w)+window
666 shift = mesh_q(h)+window
679 shift = mesh_p(w)+window
684 full_map(w,h) =
mype+1
694 halfsize(1) = 1.10d0*max_dia
695 halfsize(2) =
half*(window * 1.10d0)
696 halfsize(3) =
half*(window * 1.10d0)
698 minext(1) = hmax+1; maxext(1) = 0
699 minext(2) = wmax+1; maxext(2) = 0
704 center(1) = bc_x_w(bcv)
705 center(2) = mesh_p(w) +
half*window
706 center(3) = mesh_q(h) +
half*window
708 facet_lp:
DO lc=1, stl_start(default_stl)-1
710 IF(bc_x_w(bcv) > maxval(
vertex(:,1,lc))) cycle facet_lp
711 IF(bc_x_w(bcv) < minval(
vertex(:,1,lc))) cycle facet_lp
713 IF(bc_y_s(bcv) > maxval(
vertex(:,2,lc))) cycle facet_lp
714 IF(bc_y_n(bcv) < minval(
vertex(:,2,lc))) cycle facet_lp
726 full_map(w:wmax,h) = 0
731 full_map(w,h:hmax) = 0
734 minext(1) = min(minext(1),h)
735 minext(2) = min(minext(2),w)
737 maxext(1) = max(maxext(1),h)
738 maxext(2) = max(maxext(2),w)
748 if(minext(1) < hmax+1) full_map(:,:minext(1)) = 0
749 if(maxext(1) > 0) full_map(:,maxext(1):) = 0
751 if(minext(2) /= wmax+1) full_map(:minext(2),:) = 0
752 if(maxext(2) > 0) full_map(maxext(2):,:) = 0
759 IF(full_map(w,h) /= 0) occupants = occupants + 1
768 IF(occupants == 0)
THEN 773 1100
FORMAT(
'Error 1100: No un-cut fluid cells adjacent to DEM_MI ', &
774 'staging area.',/
'Unable to setup the discrete solids mass ', &
778 dem_mi(bcv_i)%OCCUPANTS = occupants
781 IF(dflag .OR. (
dmp_log .AND. showmap))
THEN 782 WRITE(*,
"(2/,2x,'Displaying Fill Map:')")
784 WRITE(*,
"(2x,'H =',I3)",advance=
'no')h
786 IF(full_map(w,h) == 0)
then 787 WRITE(*,
"(' *')",advance=
'no')
789 WRITE(*,
"(' .')",advance=
'no')
797 if(dflag)
write(*,
"(2/,2x,'Building RAND_MAP:')")
798 allocate( rand_map(occupants) )
805 DO WHILE (rand_map(occupants) .EQ. 0)
806 CALL random_number(tmp_dp)
807 tmp_int = ceiling(
real(tmp_dp*dble(occupants)))
809 IF(tmp_int .EQ. rand_map(lc) )
EXIT 811 if(dflag)
WRITE(*,
"(4x,'LC:',I6,' : ',I6)") lc, tmp_int
812 rand_map(lc) = tmp_int
822 dem_mi(bcv_i)%VACANCY = 1
825 allocate( dem_mi(bcv_i)%W(occupants) )
826 allocate( dem_mi(bcv_i)%P(occupants) )
827 allocate( dem_mi(bcv_i)%H(occupants) )
828 allocate( dem_mi(bcv_i)%Q(occupants) )
829 allocate( dem_mi(bcv_i)%OWNER(occupants) )
831 if(dflag)
write(*,8010)
836 IF(full_map(w,h) == 0) cycle
839 dem_mi(bcv_i)%OWNER(ll) = full_map(w,h) - 1
841 dem_mi(bcv_i)%W(ll) = mesh_w(w)
842 dem_mi(bcv_i)%H(ll) = mesh_h(h)
844 dem_mi(bcv_i)%P(ll) = mesh_p(w)
845 dem_mi(bcv_i)%Q(ll) = mesh_q(h)
847 if(dflag)
write(*,8011) dem_mi(bcv_i)%OWNER(ll), &
848 dem_mi(bcv_i)%W(ll), dem_mi(bcv_i)%H(ll), dem_mi(bcv_i)%L, &
849 dem_mi(bcv_i)%P(ll), dem_mi(bcv_i)%Q(ll), dem_mi(bcv_i)%OFFSET
855 8010
FORMAT(2/,2x,
'Storing DEM_MI data:',/4x,
'OWNER',5x,
'W',5x,
'H', &
856 5x,
'L',7x,
'P',12x,
'Q',12x,
'R')
857 8011
FORMAT(4x,i5,3(2x,i4),3(2x,g12.5))
859 if(dflag .OR. (
dmp_log .AND. showmap))
THEN 860 write(*,
"(2/,2x,'Inlet area sizes:')")
861 write(*,9000)
'mfix.dat: ', plen * qlen
862 write(*,9000)
'BC_AREA: ', bc_area(bcv)
863 write(*,9000)
'DEM_MI: ', occupants * (window**2)
865 9000
FORMAT(2x,a,g12.5)
868 IF(
allocated(mesh_h))
deallocate(mesh_h)
869 IF(
allocated(mesh_w))
deallocate(mesh_w)
870 IF(
allocated(mesh_p))
deallocate(mesh_p)
871 IF(
allocated(mesh_q))
deallocate(mesh_q)
873 IF(
allocated(rand_map))
deallocate(rand_map)
874 IF(
allocated(full_map))
deallocate(full_map)
880 8005
FORMAT(2/,2x,
'Building MESH_',a1,
':',/4x,
'Shift:',f8.4,/4x, &
881 'MESH_',a1,
'(0) = ',f8.4,/)
883 8006
FORMAT(4x,
'LC = ',i4,3x,a1,
' =',i3,3x,a1,
' =',f8.4)
945 INTEGER,
INTENT(IN) :: BCV
946 INTEGER,
INTENT(IN) :: BCV_I
948 DOUBLE PRECISION,
INTENT(IN) :: MAX_DIA
950 LOGICAL,
INTENT(IN) :: setDBG, showMAP
961 DOUBLE PRECISION :: TMP_DP
965 INTEGER,
allocatable :: MESH_H(:)
966 INTEGER,
allocatable :: MESH_W(:)
968 DOUBLE PRECISION,
allocatable :: MESH_P(:)
969 DOUBLE PRECISION,
allocatable :: MESH_Q(:)
971 INTEGER,
allocatable :: RAND_MAP(:)
973 INTEGER,
allocatable :: FULL_MAP(:,:)
975 INTEGER :: WMAX, HMAX
976 INTEGER :: maxEXT(2), minEXT(2)
978 DOUBLE PRECISION :: PLEN, QLEN
982 DOUBLE PRECISION :: SHIFT, WINDOW
984 DOUBLE PRECISION :: CENTER(3), HALFSIZE(3)
998 if(dflag)
write(*,
"(2/,'Building TB DEM_MI: ',I3)") bcv_i
1005 plen = bc_x_e(bcv) - bc_x_w(bcv)
1006 wmax = floor(
real(plen/max_dia))
1007 allocate( mesh_w(wmax) )
1008 allocate( mesh_p(0:wmax) )
1012 hmax = floor(
real(qlen/max_dia))
1013 allocate( mesh_h(hmax) )
1014 allocate( mesh_q(0:hmax) )
1017 allocate( full_map(wmax, hmax))
1022 shift = merge(-
one,
one, bc_plane(bcv) ==
'T')
1023 dem_mi(bcv_i)%OFFSET = bc_z_b(bcv) + max_dia*shift
1024 dem_mi(bcv_i)%L = k + int(shift)
1025 if(dflag)
write(*,
"(2x,'Offset: ',3x,I4,3x,g12.5)") &
1026 dem_mi(bcv_i)%L, dem_mi(bcv_i)%OFFSET
1031 dem_mi(bcv_i)%WINDOW = min(plen/wmax, qlen/hmax)
1032 window = dem_mi(bcv_i)%WINDOW
1033 if(dflag)
write(*,
"(2x,'Windows size: ',g12.5)") window
1036 shift =
half*(plen - wmax*window)
1037 mesh_p(0) = bc_x_w(bcv) + shift
1038 if(dflag)
write(*,8005)
'P', shift,
'P', mesh_p(0)
1040 mesh_p(lc) = mesh_p(0) + dble(lc-1)*window
1041 shift = mesh_p(lc) +
half*window
1043 IF(dflag)
WRITE(*,8006) lc,
'W', mesh_w(lc),
'P', mesh_p(lc)
1047 shift =
half*(qlen - hmax*window)
1048 mesh_q(0) =
bc_y_s(bcv) + shift
1049 if(dflag)
write(*,8005)
'Q',shift,
'Q',mesh_q(0)
1051 mesh_q(lc) = mesh_q(0) + dble(lc-1)*window
1052 shift = mesh_q(lc) +
half*window
1054 IF(dflag)
WRITE(*,8006) lc,
'H', mesh_h(lc),
'Q', mesh_q(lc)
1069 IF(.NOT.is_on_mype_owns(i,j,k)) cycle
1075 shift = mesh_p(w)+window
1079 shift = mesh_q(h)+window
1086 full_map(w,h) =
mype+1
1095 halfsize(3) = 1.10d0*max_dia
1096 halfsize(1) =
half*(window * 1.10d0)
1097 halfsize(2) =
half*(window * 1.10d0)
1099 minext(1) = hmax+1; maxext(1) = 0
1100 minext(2) = wmax+1; maxext(2) = 0
1105 center(3) = bc_z_b(bcv)
1106 center(1) = mesh_p(w) +
half*window
1107 center(2) = mesh_q(h) +
half*window
1109 facet_lp:
DO lc=1, stl_start(default_stl)-1
1111 IF(bc_z_b(bcv) > maxval(
vertex(:,3,lc))) cycle facet_lp
1112 IF(bc_z_b(bcv) < minval(
vertex(:,3,lc))) cycle facet_lp
1114 IF(bc_x_w(bcv) > maxval(
vertex(:,1,lc))) cycle facet_lp
1115 IF(bc_x_e(bcv) < minval(
vertex(:,1,lc))) cycle facet_lp
1117 IF(
bc_y_s(bcv) > maxval(
vertex(:,2,lc))) cycle facet_lp
1118 IF(
bc_y_n(bcv) < minval(
vertex(:,2,lc))) cycle facet_lp
1127 full_map(w:wmax,h) = 0
1132 full_map(w,h:hmax) = 0
1135 minext(1) = min(minext(1),h)
1136 minext(2) = min(minext(2),w)
1138 maxext(1) = max(maxext(1),h)
1139 maxext(2) = max(maxext(2),w)
1149 if(minext(1) < hmax+1) full_map(:,:minext(1)) = 0
1150 if(maxext(1) > 0) full_map(:,maxext(1):) = 0
1152 if(minext(2) /= wmax+1) full_map(:minext(2),:) = 0
1153 if(maxext(2) > 0) full_map(maxext(2):,:) = 0
1160 IF(full_map(w,h) /= 0) occupants = occupants + 1
1169 IF(occupants == 0)
THEN 1174 1100
FORMAT(
'Error 1100: No un-cut fluid cells adjacent to DEM_MI ', &
1175 'staging area.',/
'Unable to setup the discrete solids mass ', &
1179 dem_mi(bcv_i)%OCCUPANTS = occupants
1182 IF(dflag .OR. (
dmp_log .AND. showmap))
THEN 1183 WRITE(*,
"(2/,2x,'Displaying Fill Map:')")
1185 WRITE(*,
"(2x,'H =',I3)",advance=
'no')h
1187 IF(full_map(w,h) == 0)
then 1188 WRITE(*,
"(' *')",advance=
'no')
1190 WRITE(*,
"(' .')",advance=
'no')
1198 if(dflag)
write(*,
"(2/,2x,'Building RAND_MAP:')")
1199 allocate( rand_map(occupants) )
1206 DO WHILE (rand_map(occupants) .EQ. 0)
1207 CALL random_number(tmp_dp)
1208 tmp_int = ceiling(
real(tmp_dp*dble(occupants)))
1210 IF(tmp_int .EQ. rand_map(lc) )
EXIT 1212 if(dflag)
WRITE(*,
"(4x,'LC:',I3,' : ',I3)") lc, tmp_int
1213 rand_map(lc) = tmp_int
1223 dem_mi(bcv_i)%VACANCY = 1
1226 allocate( dem_mi(bcv_i)%W(occupants) )
1227 allocate( dem_mi(bcv_i)%P(occupants) )
1228 allocate( dem_mi(bcv_i)%H(occupants) )
1229 allocate( dem_mi(bcv_i)%Q(occupants) )
1230 allocate( dem_mi(bcv_i)%OWNER(occupants) )
1232 if(dflag)
write(*,8010)
1237 IF(full_map(w,h) == 0) cycle
1240 dem_mi(bcv_i)%OWNER(ll) = full_map(w,h) - 1
1242 dem_mi(bcv_i)%W(ll) = mesh_w(w)
1243 dem_mi(bcv_i)%H(ll) = mesh_h(h)
1245 dem_mi(bcv_i)%P(ll) = mesh_p(w)
1246 dem_mi(bcv_i)%Q(ll) = mesh_q(h)
1248 if(dflag)
write(*,8011) dem_mi(bcv_i)%OWNER(ll), &
1249 dem_mi(bcv_i)%W(ll), dem_mi(bcv_i)%H(ll), dem_mi(bcv_i)%L, &
1250 dem_mi(bcv_i)%P(ll), dem_mi(bcv_i)%Q(ll), dem_mi(bcv_i)%OFFSET
1256 8010
FORMAT(2/,2x,
'Storing DEM_MI data:',/4x,
'OWNER',5x,
'W',5x,
'H', &
1257 5x,
'L',7x,
'P',12x,
'Q',12x,
'R')
1258 8011
FORMAT(4x,i5,3(2x,i4),3(2x,g12.5))
1260 if(dflag .OR. (
dmp_log .AND. showmap))
THEN 1261 write(*,
"(2/,2x,'Inlet area sizes:')")
1262 write(*,9000)
'mfix.dat: ', plen * qlen
1263 write(*,9000)
'BC_AREA: ', bc_area(bcv)
1264 write(*,9000)
'DEM_MI: ', occupants * (window**2)
1266 9000
FORMAT(2x,a,g12.5)
1269 IF(
allocated(mesh_h))
deallocate(mesh_h)
1270 IF(
allocated(mesh_w))
deallocate(mesh_w)
1271 IF(
allocated(mesh_p))
deallocate(mesh_p)
1272 IF(
allocated(mesh_q))
deallocate(mesh_q)
1274 IF(
allocated(rand_map))
deallocate(rand_map)
1275 IF(
allocated(full_map))
deallocate(full_map)
1281 8005
FORMAT(2/,2x,
'Building MESH_',a1,
':',/4x,
'Shift:',f8.4,/4x, &
1282 'MESH_',a1,
'(0) = ',f8.4,/)
1284 8006
FORMAT(4x,
'LC = ',i4,3x,a1,
' =',i3,3x,a1,
' =',f8.4)
1322 INTEGER,
INTENT(IN) :: BCV
1323 INTEGER,
INTENT(IN) :: BCV_I
1326 INTEGER :: LC1, OCCUPANTS
1329 occupants =
dem_mi(bcv_i)%OCCUPANTS
1330 allocate(
dem_mi(bcv_i)%OWNER(occupants))
1341 IF(is_on_mype_owns(i,j,k)) &
1351 IF(is_on_mype_owns(i,j,k)) &
1361 IF(is_on_mype_owns(i,j,k)) &
subroutine tri_box_overlap(pCENTER, pHALFSIZE, pVERTS, pOVERLAP)
double precision, dimension(dimension_bc) bc_y_n
logical function exclude_dem_mi_cell(lI, lJ, lK)
subroutine layout_dem_mi_ew(BCV, BCV_I, MAX_DIA, setDBG, showMAP)
subroutine layout_dem_mi_tb(BCV, BCV_I, MAX_DIA, setDBG, showMAP)
double precision, parameter one
double precision, dimension(3, 3, dim_stl) vertex
double precision, dimension(0:dim_j) dy
integer, dimension(4) stl_start
double precision, dimension(dimension_bc) bc_x_e
double precision, dimension(0:dim_k) dz
double precision, dimension(dimension_bc) bc_y_s
character, dimension(dimension_bc) bc_plane
subroutine init_err_msg(CALLER)
integer, parameter default_stl
character(len=16) run_type
double precision, dimension(3, dim_stl) norm_face
double precision, dimension(0:dim_i) dx
subroutine calc_cell_intersect(RMIN, LOC, D_DIR, N_DIR, CELL)
subroutine layout_dem_mi_ns(BCV, BCV_I, MAX_DIA, setDBG, showMAP)
double precision, parameter half
subroutine set_dem_mi_owner(BCV, BCV_I)
double precision, dimension(dimension_bc) bc_z_b
character(len=line_length), dimension(line_count) err_msg
double precision, dimension(dimension_bc) bc_z_t
type(dem_mi_), dimension(:), allocatable, target dem_mi
subroutine layout_mi_dem(BCV, BCV_I, MAX_DIA)
double precision, parameter zero
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)
double precision, dimension(dimension_bc) bc_area
double precision, dimension(dimension_bc) bc_x_w