71 INTEGER :: node_lst,bc_lst
75 INTEGER :: sndn,rcvn,nodes
78 TYPE(sndrcv_buf),
ALLOCATABLE,
DIMENSION(:) :: sndrcvnod
79 TYPE(sndrcv_buf),
ALLOCATABLE,
DIMENSION(:) :: sndrcvnod_lst
84 INTEGER :: i,ii,j,jj,k,kk
85 INTEGER :: iaux,iaux1,iaux2,iaux3,n,mm
91 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: iaux89
97 INTEGER :: edgecut,nn,nprocs,iunit
99 CHARACTER*4 :: ichr4,ai1
101 INTEGER :: NumNeighProcs
104 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: ncoor
107 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: lmtri_2d
110 INTEGER,
ALLOCATABLE,
DIMENSION(:,:,:) :: lmcoh
112 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: elmnts
114 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: epart_p
116 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: numnp
117 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: numel
119 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: numclst
122 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: jk1
124 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: numbc
126 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: numbc_mm
128 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: numbc_ht
130 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: num_border_coh
132 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: nproc_neigh
134 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: nproc_neigh_lst
136 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: nproc_neigh_rco
138 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: my_neigh
140 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: bord_node_org
143 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: matclst,lmtemp
144 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: nnntemp_lst
145 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: nnntemp_rco
148 INTEGER,
DIMENSION(:),
POINTER :: proc_list
151 INTEGER,
DIMENSION(:),
POINTER :: proc_list_rco
154 REAL*8 :: xx,yy,zz,size1,size2,size3,size4,size5,size6
155 REAL*8 :: dhmin,dt_courant
156 REAL*8 :: dh_courant,cd_courant
160 INTEGER :: numnp_total,nface
162 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: NumNp2D
163 INTEGER,
ALLOCATABLE,
DIMENSION(:,:,:) :: jk1_2D
164 INTEGER,
ALLOCATABLE,
DIMENSION(:,:,:) :: ik1_2D
169 INTEGER :: num_zones,numcoh_zone,numelv_prmry_zone
170 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: numelv_prmry_zones, ik1_z
171 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: MapGlbEl2LocEl
173 INTEGER :: numel_z,numnp_z,p2max_lst,num_rco_border,ip,icount
176 INTEGER :: num_vol,num_coh
178 INTEGER,
DIMENSION(1:4) :: iflag89
184 TYPE(coh_list_type),
TARGET,
ALLOCATABLE,
DIMENSION(:) :: coh_list
188 TYPE(vol_list_type),
TARGET,
ALLOCATABLE,
DIMENSION(:) :: vol_list
191 INTEGER ni,node1,node2,node3,node4,gnode1,gnode2,gnode3,gnode4
193 TYPE(bcvalues),
DIMENSION(16) :: bc_mshmtn
196 INTEGER :: numploadelem
197 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: idpressload
198 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: ipressflag
199 REAL*8,
ALLOCATABLE,
DIMENSION(:,:) :: pressload
201 LOGICAL :: ElOnPartBndry
203 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: icnt
204 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: NumBorderVol
210 CHARACTER*4 chr_procs
211 CHARACTER*20 chr_units
213 INTEGER :: imat, itmp1, itmp2
214 INTEGER,
POINTER :: tmpptr
216 INTEGER,
DIMENSION(1:10) :: NdHistoryFlag
217 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: NumNdHistoryP
218 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: NdHistoryP
220 INTEGER :: ielem, ElemCount
222 TYPE(link_ptr_type
) :: Link
224 TYPE(procelemlist_data_ptr
),
POINTER :: ptr2
225 TYPE(bc_ptr
),
POINTER :: ptr_BC
227 CHARACTER(*),
PARAMETER :: volWin =
"vfrac"
229 REAL*8,
POINTER,
DIMENSION(:,:) :: MeshCoor
231 INTEGER :: MaxNumNodesComm, icounter
233 INTEGER :: write_attr, set_option, vol_all, errFlg, comp_pconn
244 CALL getarg( j, chr_arg)
245 IF(chr_arg.EQ.
'-np')
THEN
246 CALL getarg( j+1, chr_procs)
247 READ(chr_procs,*) nprocs
249 ELSE IF(chr_arg.EQ.
'-un')
THEN
250 CALL getarg( j+1, chr_units)
251 READ(chr_units,*) convertunit
253 print*,
'UNITS CONVERSION'
254 print*,
' multiply by ', convertunit
265 print*,
' MeshTran -np #'
266 print*,
' - where # is the number of processors'
275 print*,
'numvertx=',numvertx
283 dhmin = 1000000000.d0
286 print*,
'ANSYS NO LONGER SUPPORTED'
290 ELSE IF(ipatran.EQ.1)
THEN
292 numbcss = numnp_prmry
308 dt_courant = dhmin/cd_fastest
309 cd_courant = cd_fastest
312 print*,
' --------------------------------------'
313 print*,
' ---- COURANT STABILITY CONDITION -----'
314 print*,
' --------------------------------------'
315 print*,
' dt_courant =',dt_courant
316 print*,
' cd_courant =',cd_courant
317 print*,
' h_courant =',dh_courant
318 print*,
' --------------------------------------'
321 print*,
'Allocate(numel)'
322 ALLOCATE(numel(1:nummat,1:nprocs))
324 print*,
'Allocate(numel).finish'
327 DO n = 1, numelv_prmry
329 numel(imat,epart(n)) = numel(imat,epart(n)) + 1
332 ALLOCATE(numnp(1:nprocs))
337 numel(1:nummat,1:nprocs) = 0
339 ALLOCATE(vol_list(1:nummat))
344 print*,
'RENUMBERING VOLUMETRIC ELEMENTS'
351 ALLOCATE(procnodelist(1:nprocs))
357 ALLOCATE(nodeflag(1:numnp_prmry))
358 ALLOCATE(elflag(1:numelv_prmry))
363 ALLOCATE(nproc_neigh_lst(1:nprocs))
364 nproc_neigh_lst(:) = 0
371 CALL com_set_verbose( 10)
372 CALL rocout_load_module(
'OUT')
383 OPEN(4005,file=
'Rocin/isolid_in_00.000000.txt',
status=
'replace',
form=
'formatted')
384 WRITE(4005,*)
'@Proc: *'
385 WRITE(4005,*)
'@Files: Rocfrac/Rocin/SurfMesh.%4p.hdf'
386 WRITE(4005,*)
'@Panes: @BlockCyclic 100 100'
389 OPEN(4005,file=
'Rocin/solid_in_00.000000.txt',
status=
'replace',
form=
'formatted')
390 WRITE(4005,*)
'@Proc: *'
391 WRITE(4005,*)
'@Files: Rocfrac/Rocin/'//prefx(1:prefx_lngth)//
'.%4p.hdf'
392 WRITE(4005,*)
'@Panes: @Cyclic 1'
404 CALL com_new_window( volwin )
408 vol_list(1:nummat)%num_border_vol = 0
410 nullify(vol_list(i)%vol_head)
411 nullify(vol_list(i)%vol_tail)
414 print*,
'Processor id =',ip
416 WRITE(ichr4,
'(i4.4)') ip - 1
430 ptr2 => procelemlist(ip)%head
435 DO WHILE(
ASSOCIATED(ptr2))
437 ielem = ptr2%GlbElNum
439 numel(imat,ip) = numel(imat,ip) + 1
440 elonpartbndry = .false.
441 DO k = 1, eltypeid(ielem)
442 nk = lmelv_prmry(k,ielem)
444 IF(numprocpernd(nk).GT.1) elonpartbndry =.true.
446 IF(nodeflag(nk).EQ.0)
THEN
447 numnp(ip) = numnp(ip) + 1
449 nodeflag(nk) = numnp(ip)
452 vol_item%mat_vol = imat
453 vol_item%lmvol(k) = nodeflag(nk)
461 vol_item%press = ielem
466 IF(elonpartbndry)
THEN
481 ALLOCATE(meshcoor(1:3,1:numnp(ip)))
483 DO i = 1, numnp_prmry
484 IF(nodeflag(i).NE.0)
then
485 meshcoor(1:3,nodeflag(i)) = coor(1:3,i)
490 CALL com_new_attribute( volwin//
'.nc',
'n', com_double, 3,
'm')
491 CALL com_set_size( volwin//
'.nc', ip, numndperproc(ip) )
492 CALL com_set_array(volwin//
'.nc', ip, meshcoor, 3)
495 print*,
'registered Coordinates'
497 IF(iaux.NE.numndperproc(ip))
THEN
498 print*,
'Test failed when renumbering'
500 print*,
'NumNdPerProc',numndperproc(ip)
507 print*,
'Boundary Conditions'
509 IF(numbc_flag(ip).NE.0)
THEN
511 ALLOCATE( nodeflag_str(1:2,1:numbc_flag(ip)) )
516 DO i = 1, numnp_prmry
517 IF(nodeflag(i).NE.0.AND.bc_flag(1,i).NE.0)
THEN
519 nodeflag_str(1,iaux) = nodeflag(i)
520 nodeflag_str(2,iaux) = bc_flag(1,i)
522 IF(nodeflag(i).NE.0.AND.bc_flag(2,i).NE.0)
THEN
524 nodeflag_str(1,iaux) = nodeflag(i)
525 nodeflag_str(2,iaux) = bc_flag(2,i)
527 IF(nodeflag(i).NE.0.AND.bc_flag(3,i).NE.0)
THEN
529 nodeflag_str(1,iaux) = nodeflag(i)
530 nodeflag_str(2,iaux) = bc_flag(3,i)
534 IF(iaux.NE.numbc_flag(ip))
THEN
535 print*,
'ERROR, number of BCs in partitioned mesh',iaux
536 print*,
' inconsistant with that of serial mesh',numbc_flag(ip)
541 CALL com_new_attribute( volwin//
'.bcnode',
'p', com_integer, 2,
'')
542 CALL com_set_size( volwin//
'.bcnode', ip, numbc_flag(ip) )
543 CALL com_set_array(volwin//
'.bcnode', ip, nodeflag_str, 2)
546 allocate(bcvalue(1:numbc_flag(ip)*6))
548 CALL com_new_attribute( volwin//
'.BCValue',
'p', com_double, 1,
'')
549 CALL com_set_size( volwin//
'.BCValue', ip,numbc_flag(ip)*6 )
550 CALL com_set_array(volwin//
'.BCValue', ip, bcvalue, 1)
691 itmp1 =
sum(numel(1:nummat,ip))
692 itmp2 =
sum(vol_list(1:nummat)%num_border_vol)
695 ALLOCATE(numelvolmat(1:nummat),numelpartbndrymat(1:nummat))
697 ALLOCATE(mattype(1:itmp1))
698 ALLOCATE(elconntable(1:numvertx,itmp1))
708 numelvolmat(ii) = numel(ii,ip)
709 numelpartbndrymat(ii) = vol_list(ii)%num_border_vol
712 elemcount = elemcount + numel(ii,ip)
715 CALL com_new_attribute( volwin//
'.NumElPartBndry',
'p', com_integer, 1,
'')
716 CALL com_set_size( volwin//
'.NumElPartBndry', ip, 1)
717 CALL com_allocate_array(volwin//
'.NumElPartBndry', ip, tmpptr)
720 CALL com_new_attribute( volwin//
'.NumElVolMat',
'p', com_integer, 1,
'')
721 CALL com_set_size( volwin//
'.NumElVolMat', ip, nummat)
722 CALL com_set_array(volwin//
'.NumElVolMat', ip, numelvolmat, 1)
724 CALL com_new_attribute( volwin//
'.NumElPartBndryMat',
'p', com_integer, 1,
'')
725 CALL com_set_size( volwin//
'.NumElPartBndryMat', ip, nummat)
726 CALL com_set_array(volwin//
'.NumElPartBndryMat', ip, numelpartbndrymat, 1)
730 IF(numvertx.EQ.4)
THEN
734 CALL com_set_size( volwin//
'.:T4', ip, itmp1)
735 CALL com_set_array( volwin//
'.:T4', ip, elconntable, 4)
738 ELSE IF(numvertx.EQ.10)
THEN
742 CALL com_set_size( volwin//
'.:T10', ip, itmp1)
743 CALL com_set_array( volwin//
'.:T10', ip, elconntable, 10)
745 ELSE IF(numvertx.EQ.8)
THEN
748 CALL com_set_size( volwin//
'.:H8', ip, itmp1)
749 CALL com_set_array( volwin//
'.:H8', ip, elconntable, 8)
753 CALL com_new_attribute( volwin//
'.MatType',
'e', com_integer, 1,
'')
754 CALL com_set_array(volwin//
'.MatType', ip, mattype, 1)
765 CALL com_new_attribute( volwin//
'.NumNPLocal',
'p', com_integer, 1,
'')
766 CALL com_set_size( volwin//
'.NumNPLocal', ip, 1)
767 CALL com_set_array(volwin//
'.NumNPLocal', ip, numnp_loc_implicit(ip), 1)
769 CALL com_new_attribute( volwin//
'.NumNPGlobal',
'p', com_integer, 1,
'')
770 CALL com_set_size( volwin//
'.NumNPGlobal', ip, 1)
771 CALL com_set_array(volwin//
'.NumNPGlobal', ip, numnp_prmry, 1)
773 ALLOCATE(nodenumglobalimp(1:numndperproc(ip)))
774 ALLOCATE(nodeprocimp(1:numndperproc(ip)))
776 DO i = 1, numnp_prmry
777 IF(nodeflag(i).NE.0)
THEN
779 nodenumglobalimp(ii) = mapnodeimp(i)
780 nodeprocimp(ii) = nodeprocimpglobal(i)
784 CALL com_new_attribute( volwin//
'.NodeNumGlobal',
'p', com_integer, 1,
'')
785 CALL com_set_size( volwin//
'.NodeNumGlobal', ip, numndperproc(ip) )
786 CALL com_set_array(volwin//
'.NodeNumGlobal', ip, nodenumglobalimp, 1)
788 CALL com_new_attribute( volwin//
'.NodeProc',
'p', com_integer, 1,
'')
789 CALL com_set_size( volwin//
'.NodeProc', ip, numndperproc(ip) )
790 CALL com_set_array(volwin//
'.NodeProc', ip, nodeprocimp, 1)
798 CALL com_new_attribute( volwin//
'.IMP',
'p', com_integer, 1,
'')
799 CALL com_set_size( volwin//
'.IMP', ip, 1)
800 CALL com_set_array(volwin//
'.IMP', ip, imp_val, 1)
819 IF(id_sendto(ip,j)%num_border_comm.NE.0)
THEN
820 numneighprocs = numneighprocs + 1
821 maxnumnodescomm = maxnumnodescomm + id_sendto(ip,j)%num_border_comm
842 ALLOCATE(pconn_comm(1:numneighprocs*2+maxnumnodescomm+1))
847 pconn_comm(icounter) = numneighprocs
851 IF(id_sendto(j,ip)%num_border_comm.NE.0)
THEN
858 icounter = icounter+1
859 pconn_comm(icounter) = j
861 icounter = icounter+1
862 pconn_comm(icounter) = id_sendto(j,ip)%num_border_comm
871 IF(icounter.NE.numneighprocs*2+maxnumnodescomm+1)
THEN
872 print*,
'ERROR in Communication Pack array'
877 CALL com_new_attribute( volwin//
'.pconn',
'p', com_integer, 1,
'')
878 CALL com_set_size( volwin//
'.pconn', ip, numneighprocs*2+maxnumnodescomm+1)
879 CALL com_set_array(volwin//
'.pconn', ip, pconn_comm, 1)
890 CALL com_window_init_done( volwin)
906 write_attr = com_get_function_handle(
'OUT.write_attribute')
907 set_option = com_get_function_handle(
'OUT.set_option')
909 CALL com_call_function( set_option, 2,
'mode',
'w')
913 CALL com_call_function( set_option, 2,
'rankwidth',
'0')
915 vol_all = com_get_attribute_handle( volwin//
'.all')
917 CALL com_call_function( write_attr, 4,
'Rocin/'//prefx(1:prefx_lngth)//
'.'//ichr4, vol_all,&
922 CALL com_delete_window( volwin)
925 DEALLOCATE(nodenumglobalimp)
926 DEALLOCATE(nodeprocimp)
931 IF(
ASSOCIATED(nodeflag_str))
DEALLOCATE(nodeflag_str)
932 IF(
ASSOCIATED(nodeflag_mm))
DEALLOCATE(nodeflag_mm)
933 IF(
ASSOCIATED(nodeflag_th))
DEALLOCATE(nodeflag_th)
935 IF(
ASSOCIATED(bcvalue))
DEALLOCATE(bcvalue)
937 DEALLOCATE(numelvolmat,numelpartbndrymat,mattype,elconntable)
941 IF(
ASSOCIATED(pconn_comm))
deallocate(pconn_comm)
944 IF(interactmesh) CALL
mesh2d(nprocs,ip,ichr4)
948 print*,
'mesh2dOverlay'
951 OPEN(456,file =
'Rocin/OverlayMappings.txt')
954 print*,
'Finsihed mesh2dOverlay', ip
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine, public vol_insert_head(arg_b, vol_item)
int status() const
Obtain the status of the attribute.
subroutine print_vol_list(arg_b, imat, Inum, ElemCount)
subroutine mesh2d(nprocs, iProcs, ichr4)
subroutine read_patran(numvertx2d, dhmin, nprocs)
subroutine readinp(ntime)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
subroutine, public li_init_list(List)
subroutine mesh2doverlay(nprocs, iProcs, ichr4)
subroutine print_comm_list(arg_b, ip, iaux)
subroutine, public vol_insert_tail(arg_b, vol_item)