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
242 CALL getarg(
j, chr_arg)
243 IF(chr_arg.EQ.
'-np')
THEN
244 CALL getarg(
j+1, chr_procs)
245 READ(chr_procs,*) nprocs
247 ELSE IF(chr_arg.EQ.
'-un')
THEN
248 CALL getarg(
j+1, chr_units)
249 READ(chr_units,*) convertunit
251 print*,
'UNITS CONVERSION'
252 print*,
' multiply by ', convertunit
263 print*,
' MeshTran -np #'
264 print*,
' - where # is the number of processors'
273 print*,
'numvertx=',numvertx
281 dhmin = 1000000000.d0
284 print*,
'ANSYS NO LONGER SUPPORTED'
288 ELSE IF(ipatran.EQ.1)
THEN
290 numbcss = numnp_prmry
306 dt_courant = dhmin/cd_fastest
307 cd_courant = cd_fastest
310 print*,
' --------------------------------------'
311 print*,
' ---- COURANT STABILITY CONDITION -----'
312 print*,
' --------------------------------------'
313 print*,
' dt_courant =',dt_courant
314 print*,
' cd_courant =',cd_courant
315 print*,
' h_courant =',dh_courant
316 print*,
' --------------------------------------'
319 print*,
'Allocate(numel)'
320 ALLOCATE(numel(1:nummat,1:nprocs))
322 print*,
'Allocate(numel).finish'
325 DO n = 1, numelv_prmry
327 numel(imat,epart(
n)) = numel(imat,epart(
n)) + 1
330 ALLOCATE(numnp(1:nprocs))
335 numel(1:nummat,1:nprocs) = 0
337 ALLOCATE(vol_list(1:nummat))
342 print*,
'RENUMBERING VOLUMETRIC ELEMENTS'
349 ALLOCATE(procnodelist(1:nprocs))
355 ALLOCATE(nodeflag(1:numnp_prmry))
356 ALLOCATE(elflag(1:numelv_prmry))
361 ALLOCATE(nproc_neigh_lst(1:nprocs))
362 nproc_neigh_lst(:) = 0
369 CALL com_set_verbose( 10)
370 CALL rocout_load_module(
'OUT')
381 OPEN(4005,file=
'Rocin/isolid_in_00.000000.txt',
status=
'replace',
form=
'formatted')
382 WRITE(4005,*)
'@Proc: *'
384 WRITE(4005,*)
'@Files: Rocfrac/Rocin/SurfMesh.%4p.cgns'
385 WRITE(4005,*)
'@Panes: @BlockCyclic 100 100'
388 OPEN(4005,file=
'Rocin/solid_in_00.000000.txt',
status=
'replace',
form=
'formatted')
389 WRITE(4005,*)
'@Proc: *'
391 WRITE(4005,*)
'@Files: Rocfrac/Rocin/'//prefx(1:prefx_lngth)//
'.%4p.cgns'
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
440 numel(imat,ip) = numel(imat,ip) + 1
441 elonpartbndry = .false.
442 DO k = 1, eltypeid(ielem)
443 nk = lmelv_prmry(
k,ielem)
445 IF(numprocpernd(
nk).GT.1) elonpartbndry =.true.
447 IF(nodeflag(
nk).EQ.0)
THEN
448 numnp(ip) = numnp(ip) + 1
450 nodeflag(
nk) = numnp(ip)
453 vol_item%mat_vol = imat
454 vol_item%lmvol(
k) = nodeflag(
nk)
462 vol_item%press = ielem
467 IF(elonpartbndry)
THEN
482 ALLOCATE(meshcoor(1:3,1:numnp(ip)))
484 DO i = 1, numnp_prmry
485 IF(nodeflag(
i).NE.0) meshcoor(1:3,nodeflag(
i)) = coor(1:3,
i)
488 CALL com_new_attribute( volwin//
'.nc',
'n', com_double, 3,
'm')
489 CALL com_set_size( volwin//
'.nc', ip, numndperproc(ip) )
490 CALL com_set_array(volwin//
'.nc', ip, meshcoor, 3)
492 print*,
'registerd Coordinates'
494 IF(iaux.NE.numndperproc(ip))
THEN
495 print*,
'Test failed when renumbering'
497 print*,
'NumNdPerProc',numndperproc(ip)
504 print*,
'Boundary Conditions'
506 IF(numbc_flag(ip).NE.0)
THEN
508 ALLOCATE( nodeflag_str(1:2,1:numbc_flag(ip)) )
513 DO i = 1, numnp_prmry
514 IF(nodeflag(
i).NE.0.AND.bc_flag(1,
i).NE.0)
THEN
516 nodeflag_str(1,iaux) = nodeflag(
i)
517 nodeflag_str(2,iaux) = bc_flag(1,
i)
519 IF(nodeflag(
i).NE.0.AND.bc_flag(2,
i).NE.0)
THEN
521 nodeflag_str(1,iaux) = nodeflag(
i)
522 nodeflag_str(2,iaux) = bc_flag(2,
i)
524 IF(nodeflag(
i).NE.0.AND.bc_flag(3,
i).NE.0)
THEN
526 nodeflag_str(1,iaux) = nodeflag(
i)
527 nodeflag_str(2,iaux) = bc_flag(3,
i)
531 IF(iaux.NE.numbc_flag(ip))
THEN
532 print*,
'ERROR, number of BCs in partitioned mesh',iaux
533 print*,
' inconsistant with that of serial mesh',numbc_flag(ip)
538 CALL com_new_attribute( volwin//
'.bcnode',
'p', com_integer, 2,
'')
539 CALL com_set_size( volwin//
'.bcnode', ip, numbc_flag(ip) )
540 CALL com_set_array(volwin//
'.bcnode', ip, nodeflag_str, 2)
543 allocate(bcvalue(1:numbc_flag(ip)*6))
545 CALL com_new_attribute( volwin//
'.BCValue',
'p', com_double, 1,
'')
546 CALL com_set_size( volwin//
'.BCValue', ip,numbc_flag(ip)*6 )
547 CALL com_set_array(volwin//
'.BCValue', ip, bcvalue, 1)
688 itmp1 =
sum(numel(1:nummat,ip))
689 itmp2 =
sum(vol_list(1:nummat)%num_border_vol)
692 ALLOCATE(numelvolmat(1:nummat),numelpartbndrymat(1:nummat))
694 ALLOCATE(mattype(1:itmp1))
695 ALLOCATE(elconntable(1:numvertx,itmp1))
705 numelvolmat(ii) = numel(ii,ip)
706 numelpartbndrymat(ii) = vol_list(ii)%num_border_vol
709 elemcount = elemcount + numel(ii,ip)
712 CALL com_new_attribute( volwin//
'.NumElPartBndry',
'p', com_integer, 1,
'')
713 CALL com_set_size( volwin//
'.NumElPartBndry', ip, 1)
714 CALL com_resize_array(volwin//
'.NumElPartBndry', ip, tmpptr)
717 CALL com_new_attribute( volwin//
'.NumElVolMat',
'p', com_integer, 1,
'')
718 CALL com_set_size( volwin//
'.NumElVolMat', ip, nummat)
719 CALL com_set_array(volwin//
'.NumElVolMat', ip, numelvolmat, 1)
721 CALL com_new_attribute( volwin//
'.NumElPartBndryMat',
'p', com_integer, 1,
'')
722 CALL com_set_size( volwin//
'.NumElPartBndryMat', ip, nummat)
723 CALL com_set_array(volwin//
'.NumElPartBndryMat', ip, numelpartbndrymat, 1)
727 IF(numvertx.EQ.4)
THEN
731 CALL com_set_size( volwin//
'.:T4', ip, itmp1)
732 CALL com_set_array( volwin//
'.:T4', ip, elconntable, 4)
735 ELSE IF(numvertx.EQ.10)
THEN
739 CALL com_set_size( volwin//
'.:T10', ip, itmp1)
740 CALL com_set_array( volwin//
'.:T10', ip, elconntable, 10)
742 ELSE IF(numvertx.EQ.8)
THEN
745 CALL com_set_size( volwin//
'.:H8', ip, itmp1)
746 CALL com_set_array( volwin//
'.:H8', ip, elconntable, 8)
751 CALL com_new_attribute( volwin//
'.MatType',
'e', com_integer, 1,
'')
752 CALL com_set_array(volwin//
'.MatType', ip, mattype, 1)
771 IF(id_sendto(ip,
j)%num_border_comm.NE.0)
THEN
772 numneighprocs = numneighprocs + 1
773 maxnumnodescomm = maxnumnodescomm + id_sendto(ip,
j)%num_border_comm
794 ALLOCATE(pconn_comm(1:numneighprocs*2+maxnumnodescomm+1))
799 pconn_comm(icounter) = numneighprocs
803 IF(id_sendto(
j,ip)%num_border_comm.NE.0)
THEN
810 icounter = icounter+1
811 pconn_comm(icounter) =
j
813 icounter = icounter+1
814 pconn_comm(icounter) = id_sendto(
j,ip)%num_border_comm
823 IF(icounter.NE.numneighprocs*2+maxnumnodescomm+1)
THEN
824 print*,
'ERROR in Communication Pack array'
829 CALL com_new_attribute( volwin//
'.pconn',
'p', com_integer, 1,
'')
830 CALL com_set_size( volwin//
'.pconn', ip, numneighprocs*2+maxnumnodescomm+1)
831 CALL com_set_array(volwin//
'.pconn', ip, pconn_comm, 1)
842 CALL com_window_init_done( volwin)
858 write_attr = com_get_function_handle(
'OUT.write_attribute')
859 set_option = com_get_function_handle(
'OUT.set_option')
861 CALL com_call_function(
set_option, 2,
'mode',
'w')
868 CALL com_call_function(
set_option, 2,
'rankwidth',
'0')
870 vol_all = com_get_attribute_handle( volwin//
'.all')
872 CALL com_call_function(
write_attr, 4,
'Rocin/'//prefx(1:prefx_lngth)//
'.'//ichr4, vol_all,&
877 CALL com_delete_window( volwin)
882 IF(
ASSOCIATED(nodeflag_str))
DEALLOCATE(nodeflag_str)
883 IF(
ASSOCIATED(nodeflag_mm))
DEALLOCATE(nodeflag_mm)
884 IF(
ASSOCIATED(nodeflag_th))
DEALLOCATE(nodeflag_th)
886 IF(
ASSOCIATED(bcvalue))
DEALLOCATE(bcvalue)
888 DEALLOCATE(numelvolmat,numelpartbndrymat,mattype,elconntable)
892 IF(
ASSOCIATED(pconn_comm))
deallocate(pconn_comm)
894 IF(interactmesh) CALL
mesh2d(nprocs,ip,ichr4)
896 print*,
'mesh2dOverlay'
899 OPEN(456,file =
'Rocin/OverlayMappings.txt')
902 print*,
'Finsihed mesh2dOverlay', ip
Tfloat sum() const
Return the sum of all the pixel values in an image.
void set_option(const char *option_name, const char *option_val)
Set an option for Rocout, such as controlling the output format.
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)
static void write_attr(std::ostream &os, const COM::Attribute *attr, int i)
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)
void int int REAL REAL REAL *z blockDim dim * ni
subroutine mesh2doverlay(nprocs, iProcs, ichr4)
subroutine print_comm_list(arg_b, ip, iaux)
subroutine, public vol_insert_tail(arg_b, vol_item)