65 REAL*8 :: xx,yy,zz,size1,size2,size3,size4,size5,size6
67 REAL*8,
DIMENSION(1:6) :: disflagvalue, tmpval
73 INTEGER :: n1,n2,n3,n4,n5,n6,n7,n8
78 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: npart
83 INTEGER :: iaux,iaux1,iaux2
84 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: imin,nmin,imax,nmax,ninc
85 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: imap
86 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: lm4node
87 INTEGER :: nnd1, nnd2, nnd3, nnd4, nnd5, nnd6, nnd7, nnd8, nnd9, nnd10
89 integer,
dimension(1:6) :: disflag
90 INTEGER :: ifaceid, itmp
96 LOGICAL :: hex8, tet4, tet10, fileexist
97 LOGICAL :: fileexist1, fileexist2, fileexist3, fileexist4, fileexist5, fileexist6
98 integer :: numgeombodies,iunit,ibody
100 INTEGER,
POINTER,
DIMENSION(:) :: numnp_glb,numel_glb,nummat_glb
102 INTEGER :: ielemtest, icnt, inodetest, minel, maxel,maxnd, minnd, iel10
104 INTEGER,
POINTER,
DIMENSION(:) :: epart_loc
106 INTEGER,
POINTER,
dimension(:) :: procdist
108 TYPE(link_ptr_type
) :: link
110 INTEGER :: accumel, accumnd, accumnd_old, accumel_old
112 INTEGER :: ierror, iv,
kc
126 overlaymesh = .false.
127 interactmesh = .false.
129 print*,
'MESH OPTION:'
130 print*,
' READING PATRAN MESH'
140 ALLOCATE(numelhex2d(1:5,1:nprocs))
141 ALLOCATE(numeltet2d(1:5,1:nprocs))
153 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.1.out', exist=fileexist1)
154 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.2.out', exist=fileexist2)
155 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.3.out', exist=fileexist3)
156 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.4.out', exist=fileexist4)
157 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.5.out', exist=fileexist5)
158 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.6.out', exist=fileexist6)
164 OPEN(106,file=
'Modin/'//prefx(1:prefx_lngth)//
'.6.out')
165 OPEN(105,file=
'Modin/'//prefx(1:prefx_lngth)//
'.5.out')
166 OPEN(104,file=
'Modin/'//prefx(1:prefx_lngth)//
'.4.out')
167 OPEN(103,file=
'Modin/'//prefx(1:prefx_lngth)//
'.3.out')
168 OPEN(102,file=
'Modin/'//prefx(1:prefx_lngth)//
'.2.out')
169 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.1.out')
170 ELSE IF (fileexist5)
THEN
172 OPEN(105,file=
'Modin/'//prefx(1:prefx_lngth)//
'.5.out')
173 OPEN(104,file=
'Modin/'//prefx(1:prefx_lngth)//
'.4.out')
174 OPEN(103,file=
'Modin/'//prefx(1:prefx_lngth)//
'.3.out')
175 OPEN(102,file=
'Modin/'//prefx(1:prefx_lngth)//
'.2.out')
176 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.1.out')
177 ELSE IF (fileexist4)
THEN
179 OPEN(104,file=
'Modin/'//prefx(1:prefx_lngth)//
'.4.out')
180 OPEN(103,file=
'Modin/'//prefx(1:prefx_lngth)//
'.3.out')
181 OPEN(102,file=
'Modin/'//prefx(1:prefx_lngth)//
'.2.out')
182 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.1.out')
183 ELSE IF (fileexist3)
THEN
185 OPEN(103,file=
'Modin/'//prefx(1:prefx_lngth)//
'.3.out')
186 OPEN(102,file=
'Modin/'//prefx(1:prefx_lngth)//
'.2.out')
187 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.1.out')
188 ELSE IF (fileexist2)
THEN
190 OPEN(102,file=
'Modin/'//prefx(1:prefx_lngth)//
'.2.out')
191 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.1.out')
192 ELSE IF (fileexist1)
THEN
193 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.1.out')
197 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.pat', exist=fileexist)
199 IF (.NOT. fileexist)
THEN
200 print*,
'File '//
'Modin/'//prefx(1:prefx_lngth)//
'.pat NOT found'
201 print*,
'...Trying '//
'Modin/'//prefx(1:prefx_lngth)//
'.out'
204 INQUIRE (file=
'Modin/'//prefx(1:prefx_lngth)//
'.out', exist=fileexist)
206 IF (.NOT. fileexist)
THEN
207 print*,
'ERROR: File '//
'Modin/'//prefx(1:prefx_lngth)//
'.out NOT found'
208 print*,
'ERROR: No Patran Neutral file Found, stopping'
211 print*,
'File '//
'Modin/'//prefx(1:prefx_lngth)//
'.out found'
213 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.out',
form=
'formatted')
216 OPEN(101,file=
'Modin/'//prefx(1:prefx_lngth)//
'.pat',
form=
'formatted')
221 print*,
'No. of Mesh Segment Files Found =', numgeombodies
223 ALLOCATE(numnp_glb(1:numgeombodies),numel_glb(1:numgeombodies),nummat_glb(1:numgeombodies))
225 DO ibody = 1, numgeombodies
242 READ(iunit,*)
i,
i,
i,
i,numnp_glb(ibody),numel_glb(ibody),nummat_glb(ibody)
244 IF(nummat_glb(ibody).LE.0) nummat_glb(ibody) = 1
251 numnp_prmry =
sum(numnp_glb)
252 numelv_prmry =
sum(numel_glb)
253 nummat = maxval(nummat_glb)
255 print*,
' No. of elements = ', numelv_prmry
256 print*,
' No. of nodes = ', numnp_prmry
257 print*,
' No. of Materials = ', nummat
258 print*,
' No. of vertex=',numvertx
265 ALLOCATE(epart(1:numelv_prmry))
271 DO ibody = 1, numgeombodies
278 ALLOCATE(coor(1:3,1:numnp_prmry),lmelv_prmry(1:numvertx,1:numelv_prmry))
294 DO i = 1, numnp_glb(ibody)
305 READ(iunit,
'(3e16.9)') coor(1:3,
id)
306 coor(1:3,
id) = coor(1:3,
id)*convertunit
310 inodetest = inodetest + 1
312 accumnd_old = accumnd
313 accumnd = accumnd + numnp_glb(ibody)
317 ALLOCATE(matid(1:numelv_prmry))
318 ALLOCATE(eltypeid(1:numelv_prmry))
334 element:
DO i = 1, numel_glb(ibody)
341 ielemtest = ielemtest + 1
342 accumel_old = accumel
347 READ(iunit,
'(3i8)') numvertx,
j, matid(
id)
348 IF(numvertx.NE.4)
THEN
349 IF(numvertx.NE.10)
THEN
350 IF(numvertx.NE.8)
THEN
351 print*,
'ERROR: FOUND UNSUPPORTED ELEMENT TYPE'
352 print*,
'Found element with ', numvertx,
' nodes '
359 eltypeid(
id) = numvertx
361 IF(matid(
id).LE.0) matid(
id) = 1
364 READ(iunit,*) lmelv_prmry(1:numvertx,
id)
365 lmelv_prmry(1:numvertx,
id) = lmelv_prmry(1:numvertx,
id) + accumnd_old
368 IF(numvertx.EQ.10.AND.
i.EQ.1.AND.nprocs.GT.1)
THEN
369 ALLOCATE(lm4node( 1:4,1:numel_glb(ibody)))
370 IF(ibody.EQ.1)
ALLOCATE(imap(1:numnp_prmry))
372 print*,
'Re-setting imap'
374 IF(numvertx.EQ.4.AND.
i.EQ.1.AND.nprocs.GT.1)
THEN
375 ALLOCATE(lm4node( 1:4,1:numel_glb(ibody)))
376 IF(ibody.EQ.1)
ALLOCATE(imap(1:numnp_prmry))
378 print*,
'Re-setting imap'
380 IF(numvertx.EQ.10.AND.nprocs.GT.1)
THEN
382 IF(imap(lmelv_prmry(
j,
id)).EQ.0)
THEN
383 numnp4node = numnp4node + 1
384 imap(lmelv_prmry(
j,
id)) = numnp4node
387 lm4node(
j,iel10) = imap(lmelv_prmry(
j,
id))
390 ELSE IF(numvertx.EQ.4.AND.nprocs.GT.1)
THEN
392 IF(imap(lmelv_prmry(
j,
id)).EQ.0)
THEN
393 numnp4node = numnp4node + 1
394 imap(lmelv_prmry(
j,
id)) = numnp4node
397 lm4node(
j,iel10) = imap(lmelv_prmry(
j,
id))
400 maxel =
sum(numel_glb(1:ibody))
401 minel = accumel_old + 1
407 xx = coor(1,lmelv_prmry(1,
id)) - coor(1,lmelv_prmry(2,
id))
408 yy = coor(2,lmelv_prmry(1,
id)) - coor(2,lmelv_prmry(2,
id))
409 zz = coor(3,lmelv_prmry(1,
id)) - coor(3,lmelv_prmry(2,
id))
410 size1 =
sqrt(xx*xx+yy*yy+zz*zz)
411 xx = coor(1,lmelv_prmry(2,
id)) - coor(1,lmelv_prmry(3,
id))
412 yy = coor(2,lmelv_prmry(2,
id)) - coor(2,lmelv_prmry(3,
id))
413 zz = coor(3,lmelv_prmry(2,
id)) - coor(3,lmelv_prmry(3,
id))
414 size2 =
sqrt(xx*xx+yy*yy+zz*zz)
415 xx = coor(1,lmelv_prmry(3,
id)) - coor(1,lmelv_prmry(1,
id))
416 yy = coor(2,lmelv_prmry(3,
id)) - coor(2,lmelv_prmry(1,
id))
417 zz = coor(3,lmelv_prmry(3,
id)) - coor(3,lmelv_prmry(1,
id))
418 size3 =
sqrt(xx*xx+yy*yy+zz*zz)
419 xx = coor(1,lmelv_prmry(4,
id)) - coor(1,lmelv_prmry(1,
id))
420 yy = coor(2,lmelv_prmry(4,
id)) - coor(2,lmelv_prmry(1,
id))
421 zz = coor(3,lmelv_prmry(4,
id)) - coor(3,lmelv_prmry(1,
id))
422 size4 =
sqrt(xx*xx+yy*yy+zz*zz)
423 xx = coor(1,lmelv_prmry(4,
id)) - coor(1,lmelv_prmry(2,
id))
424 yy = coor(2,lmelv_prmry(4,
id)) - coor(2,lmelv_prmry(2,
id))
425 zz = coor(3,lmelv_prmry(4,
id)) - coor(3,lmelv_prmry(2,
id))
426 size5 =
sqrt(xx*xx+yy*yy+zz*zz)
427 xx = coor(1,lmelv_prmry(4,
id)) - coor(1,lmelv_prmry(3,
id))
428 yy = coor(2,lmelv_prmry(4,
id)) - coor(2,lmelv_prmry(3,
id))
429 zz = coor(3,lmelv_prmry(4,
id)) - coor(3,lmelv_prmry(3,
id))
430 size6 =
sqrt(xx*xx+yy*yy+zz*zz)
431 dhmin =
min(size1,size2,size3,size4,size5,size6,dhmin)
434 print*,
'Done reading Element'
435 accumel = accumel + numel_glb(ibody)
438 IF(numvertx.EQ.10)
THEN
439 ALLOCATE(npart(1:numnp4node),stat=ierror)
442 print*,
'Program could not allocate space for npart'
443 print*,
'Dimensions 1 to ', numnp4node
472 print*,
'METIS for elements ',minel,
':',maxel,numel_glb(ibody)
474 ALLOCATE(epart_loc(1:numel_glb(ibody)),stat=ierror)
478 print*,
'Program could not allocate space for epart_loc'
479 print*,
'Dimensions 1 to ', numel_glb(ibody)
483 print*,
'CALLING METIS'
485 CALL metis_partmeshnodal(numel_glb(ibody),numnp4node, &
486 lm4node,2,1,nprocs,edgecut,epart_loc,npart)
488 epart(minel:maxel) = epart_loc(1:numel_glb(ibody))
489 print*,minel,maxel,1,numel_glb(ibody)
490 deallocate(epart_loc)
492 print*,
'Finished Metis'
496 ELSE IF(numvertx.EQ.4)
THEN
497 ALLOCATE(npart(1:numnp_glb(ibody)),stat=ierror)
500 print*,
'Program could not allocate space for npart'
501 print*,
'Dimensions 1 to ', numnp4node
508 print*,
'METIS for elements ',minel,
':',maxel,numel_glb(ibody)
510 ALLOCATE(epart_loc(1:numel_glb(ibody)),stat=ierror)
514 print*,
'Program could not allocate space for epart_loc'
515 print*,
'Dimensions 1 to ', numel_glb(ibody)
519 print*,
'CALLING METIS',numel_glb(ibody),numnp_glb(ibody)
521 CALL metis_partmeshnodal(numel_glb(ibody),numnp_glb(ibody), &
522 lm4node,2,1,nprocs,edgecut,epart_loc,npart)
524 epart(minel:maxel) = epart_loc(1:numel_glb(ibody))
525 print*,minel,maxel,1,numel_glb(ibody)
526 deallocate(epart_loc)
528 print*,
'Finished Metis'
562 IF(inodetest.NE.numnp_prmry)
THEN
563 print*,
'ERROR number of combined nodes not equal total nodes'
564 print*,
'Sum of Nodes =', numnp_prmry
565 print*,
'Actual Number Read =', inodetest
569 IF(ielemtest.NE.numelv_prmry)
THEN
570 print*,
'ERROR number of combined elements not equal total elements'
571 print*,
'Sum of Elements =', numelv_prmry
572 print*,
'Actual Number Read =', ielemtest
578 print*,
' REQUESTED NUMBER OF PARTITIONS =',nprocs
585 print*,
'CALLING METIS'
590 IF(numvertx.EQ.8)
THEN
591 ALLOCATE(npart(1:numnp_prmry))
592 CALL metis_partmeshdual(numelv_prmry,numnp_prmry, &
593 lmelv_prmry,3,1,nprocs,edgecut,epart,npart)
606 print*,
' Called METIS'
607 OPEN(45,file=
'LoadBalanceStats.out')
608 ALLOCATE(procdist(1:nprocs))
610 DO i = 1, numelv_prmry
611 IF(epart(
i).EQ.0)
THEN
615 procdist(epart(
i)) = procdist(epart(
i)) + 1
619 write(45,*)
i, procdist(
i)
621 print*,
'*** Load Balancing Stats ***'
622 print*,
'Maximum number of elements on a processor =', maxval(procdist(:))
623 print*,
'Minimum number of elements on a processor =', minval(procdist(:))
630 ALLOCATE(procndlist(1:numnp_prmry,1:maxnumberofprocstosharenode) )
631 ALLOCATE(numprocpernd(1:numnp_prmry))
632 ALLOCATE(numelperproc(1:nprocs))
633 ALLOCATE(numndperproc(1:nprocs))
638 print*,
'Calling NewCommList'
639 CALL
newcommlist(numelv_prmry, numnp_prmry, nprocs, numvertx, &
640 lmelv_prmry, epart,numprocpernd,procndlist,maxnumberofprocstosharenode,numelperproc, &
643 print*,
' .. completed'
653 OPEN(13,file=
'pmvis.nod')
654 DO i = 1, numnp_prmry
655 WRITE(13,
'(3e16.9)') coor(1:3,
i)
658 OPEN(13,file=
'pmvis.ele')
659 DO i = 1, numelv_prmry
660 WRITE(13,
'(4i10)') lmelv_prmry(1:4,
i)
664 OPEN(13,file=
'pmvis.part')
665 DO i = 1, numelv_prmry
666 WRITE(13,
'(1i10)') epart(
i)
683 ALLOCATE(indsburnflg(1:numnp_prmry))
689 nullify(bc_structural_head,bc_structural_tail)
690 nullify(bc_meshmotion_head,bc_meshmotion_tail)
691 nullify(bc_thermal_head,bc_thermal_tail)
693 nullify(surfmesh_tri3_ov1_head,surfmesh_tri3_ov1_tail)
694 nullify(surfmesh_tri3_ov2_head,surfmesh_tri3_ov2_tail)
695 nullify(surfmesh_tri3_s_head,surfmesh_tri3_s_tail)
696 nullify(surfmesh_tri3_sf_head,surfmesh_tri3_sf_tail)
697 nullify(surfmesh_tri6_s_head,surfmesh_tri6_s_tail)
698 nullify(surfmesh_tri6_sf_head,surfmesh_tri6_sf_tail)
699 nullify(surfmesh_hex8_s_head,surfmesh_hex8_s_tail)
700 nullify(surfmesh_hex8_sf_head,surfmesh_hex8_sf_tail)
704 ALLOCATE(numbc_structural(1:nprocs))
705 ALLOCATE(numbc_meshmotion(1:nprocs))
706 ALLOCATE(numbc_thermal(1:nprocs))
707 ALLOCATE(numbc_flag(1:nprocs))
708 numbc_structural(:) = 0
709 numbc_meshmotion(:) = 0
712 ALLOCATE(bc_flag(1:3,1:numnp_prmry))
717 print*,
'FINISH READING PATRAN FILE'
718 print*,
'Reading Boundary Conditions'
721 DO ibody = 1, numgeombodies
726 READ(iunit,*) itype,
id,iv,
kc
737 ELSE IF(itype.EQ. 3)
THEN
741 ELSE IF(itype .EQ. 6)
THEN
744 READ(iunit,
'(i1,i1,i1,i6,8i1)')
i,
i,
i,
i,n1,n2,n3,n4,n5,n6,n7,n8
746 intfaceflag = abs(int(press))
748 IF(.NOT.(interactmesh))
THEN
749 IF(intfaceflag.GE.0.AND.intfaceflag.LE.2) interactmesh = .true.
754 IF(n1.EQ.1.AND.n2.EQ.1.AND.n3.EQ.1 &
755 .AND.n4.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
756 IF(eltypeid(
id).EQ.4)
THEN
757 nnd1 = lmelv_prmry(1,
id)
758 nnd2 = lmelv_prmry(3,
id)
759 nnd3 = lmelv_prmry(2,
id)
763 nnd1 = lmelv_prmry(1,
id)
764 nnd2 = lmelv_prmry(3,
id)
765 nnd3 = lmelv_prmry(2,
id)
766 nnd4 = lmelv_prmry(7,
id)
767 nnd5 = lmelv_prmry(6,
id)
768 nnd6 = lmelv_prmry(5,
id)
771 ELSE IF(n1.EQ.1.AND.n2.EQ.1.AND.n4.EQ.1 &
772 .AND.n3.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
773 IF(eltypeid(
id).EQ.4)
THEN
774 nnd1 = lmelv_prmry(1,
id)
775 nnd2 = lmelv_prmry(2,
id)
776 nnd3 = lmelv_prmry(4,
id)
780 nnd1 = lmelv_prmry(1,
id)
781 nnd2 = lmelv_prmry(2,
id)
782 nnd3 = lmelv_prmry(4,
id)
783 nnd4 = lmelv_prmry(5,
id)
784 nnd5 = lmelv_prmry(9,
id)
785 nnd6 = lmelv_prmry(8,
id)
788 ELSE IF(n2.EQ.1.AND.n3.EQ.1.AND.n4.EQ.1 &
789 .AND.n1.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
790 IF(eltypeid(
id).EQ.4)
THEN
791 nnd1 = lmelv_prmry(2,
id)
792 nnd2 = lmelv_prmry(3,
id)
793 nnd3 = lmelv_prmry(4,
id)
797 nnd1 = lmelv_prmry(2,
id)
798 nnd2 = lmelv_prmry(3,
id)
799 nnd3 = lmelv_prmry(4,
id)
800 nnd4 = lmelv_prmry(6,
id)
801 nnd5 = lmelv_prmry(10,
id)
802 nnd6 = lmelv_prmry(9,
id)
805 ELSE IF(n1.EQ.1.AND.n3.EQ.1.AND.n4.EQ.1 &
806 .AND.n2.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
807 IF(eltypeid(
id).EQ.4)
THEN
808 nnd1 = lmelv_prmry(4,
id)
809 nnd2 = lmelv_prmry(3,
id)
810 nnd3 = lmelv_prmry(1,
id)
814 nnd1 = lmelv_prmry(4,
id)
815 nnd2 = lmelv_prmry(3,
id)
816 nnd3 = lmelv_prmry(1,
id)
817 nnd4 = lmelv_prmry(10,
id)
818 nnd5 = lmelv_prmry(7,
id)
819 nnd6 = lmelv_prmry(8,
id)
823 ELSE IF(n1.EQ.1.AND.n2.EQ.1.AND.n3.EQ.1.AND.n4.EQ.1 &
824 .AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
825 IF(eltypeid(
id).EQ.8)
THEN
826 nnd1 = lmelv_prmry(4,
id)
827 nnd2 = lmelv_prmry(3,
id)
828 nnd3 = lmelv_prmry(2,
id)
829 nnd4 = lmelv_prmry(1,
id)
833 ELSE IF(n1.EQ.0.AND.n2.EQ.0.AND.n3.EQ.0.AND.n4.EQ.0 &
834 .AND.n5.EQ.1.AND.n6.EQ.1.AND.n7.EQ.1.AND.n8.EQ.1)
THEN
835 IF(eltypeid(
id).EQ.8)
THEN
836 nnd1 = lmelv_prmry(5,
id)
837 nnd2 = lmelv_prmry(6,
id)
838 nnd3 = lmelv_prmry(7,
id)
839 nnd4 = lmelv_prmry(8,
id)
843 ELSE IF(n1.EQ.1.AND.n2.EQ.1.AND.n3.EQ.0.AND.n4.EQ.0 &
844 .AND.n5.EQ.1.AND.n6.EQ.1.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
845 IF(eltypeid(
id).EQ.8)
THEN
846 nnd1 = lmelv_prmry(1,
id)
847 nnd2 = lmelv_prmry(2,
id)
848 nnd3 = lmelv_prmry(6,
id)
849 nnd4 = lmelv_prmry(5,
id)
853 ELSE IF(n1.EQ.0.AND.n2.EQ.1.AND.n3.EQ.1.AND.n4.EQ.0 &
854 .AND.n5.EQ.0.AND.n6.EQ.1.AND.n7.EQ.1.AND.n8.EQ.0)
THEN
855 IF(eltypeid(
id).EQ.8)
THEN
856 nnd1 = lmelv_prmry(2,
id)
857 nnd2 = lmelv_prmry(3,
id)
858 nnd3 = lmelv_prmry(7,
id)
859 nnd4 = lmelv_prmry(6,
id)
863 ELSE IF(n1.EQ.0.AND.n2.EQ.0.AND.n3.EQ.1.AND.n4.EQ.1 &
864 .AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.1.AND.n8.EQ.1)
THEN
865 IF(eltypeid(
id).EQ.8)
THEN
866 nnd1 = lmelv_prmry(3,
id)
867 nnd2 = lmelv_prmry(4,
id)
868 nnd3 = lmelv_prmry(8,
id)
869 nnd4 = lmelv_prmry(7,
id)
873 ELSE IF(n1.EQ.1.AND.n2.EQ.0.AND.n3.EQ.0.AND.n4.EQ.1 &
874 .AND.n5.EQ.1.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.1)
THEN
875 IF(eltypeid(
id).EQ.8)
THEN
876 nnd1 = lmelv_prmry(5,
id)
877 nnd2 = lmelv_prmry(8,
id)
878 nnd3 = lmelv_prmry(4,
id)
879 nnd4 = lmelv_prmry(1,
id)
884 print*,
'Error in pressure face numbering'
896 IF(eltypeid(
id).EQ.4)
THEN
898 ALLOCATE(surfmesh_tri3_item)
900 surfmesh_tri3_item%ElemData(1) = nnd1
901 surfmesh_tri3_item%ElemData(2) = nnd2
902 surfmesh_tri3_item%ElemData(3) = nnd3
903 surfmesh_tri3_item%ElemData(4) =
id
905 IF(intfaceflag.EQ.1)
THEN
906 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_sf_head, surfmesh_tri3_sf_tail)
907 numeltet2d(1,ip) = numeltet2d(1,ip) + 1
909 ELSE IF(intfaceflag.EQ.2)
THEN
910 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_sf_nonignt_head, surfmesh_tri3_sf_nonignt_tail)
911 numeltet2d(3,ip) = numeltet2d(3,ip) + 1
912 ELSE IF(intfaceflag.EQ.0)
THEN
913 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_s_head, surfmesh_tri3_s_tail)
914 numeltet2d(2,ip) = numeltet2d(2,ip) + 1
915 ELSE IF(intfaceflag.EQ.10)
THEN
917 surfmesh_tri3_item%ElemData(5) = ifaceid
918 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_ov1_head, surfmesh_tri3_ov1_tail)
919 numeltet2d(4,ip) = numeltet2d(4,ip) + 1
920 ELSE IF(intfaceflag.EQ.100)
THEN
922 surfmesh_tri3_item%ElemData(5) = ifaceid
923 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_ov2_head, surfmesh_tri3_ov2_tail)
924 numeltet2d(5,ip) = numeltet2d(5,ip) + 1
931 ELSE IF(eltypeid(
id).EQ.10)
THEN
933 ALLOCATE(surfmesh_tri6_item)
935 surfmesh_tri6_item%ElemData(1) = nnd1
936 surfmesh_tri6_item%ElemData(2) = nnd2
937 surfmesh_tri6_item%ElemData(3) = nnd3
938 surfmesh_tri6_item%ElemData(4) = nnd4
939 surfmesh_tri6_item%ElemData(5) = nnd5
940 surfmesh_tri6_item%ElemData(6) = nnd6
941 surfmesh_tri6_item%ElemData(7) =
id
943 IF(intfaceflag.EQ.1)
THEN
944 CALL
add_surfmesh_tri6(surfmesh_tri6_item, surfmesh_tri6_sf_head, surfmesh_tri6_sf_tail)
945 numeltet2d(1,ip) = numeltet2d(1,ip) + 1
946 ELSEIF(intfaceflag.EQ.2)
THEN
947 CALL
add_surfmesh_tri6(surfmesh_tri6_item, surfmesh_tri6_sf_nonignt_head, surfmesh_tri6_sf_nonignt_tail)
948 numeltet2d(3,ip) = numeltet2d(3,ip) + 1
949 ELSE IF(intfaceflag.EQ.0)
THEN
950 CALL
add_surfmesh_tri6(surfmesh_tri6_item, surfmesh_tri6_s_head, surfmesh_tri6_s_tail)
951 numeltet2d(2,ip) = numeltet2d(2,ip) + 1
957 ELSE IF(eltypeid(
id).EQ.8)
THEN
959 ALLOCATE(surfmesh_hex8_item)
961 surfmesh_hex8_item%ElemData(1) = nnd1
962 surfmesh_hex8_item%ElemData(2) = nnd2
963 surfmesh_hex8_item%ElemData(3) = nnd3
964 surfmesh_hex8_item%ElemData(4) = nnd4
965 surfmesh_hex8_item%ElemData(5) =
id
966 IF(intfaceflag.EQ.1)
THEN
967 CALL
add_surfmesh_hex8(surfmesh_hex8_item, surfmesh_hex8_sf_head, surfmesh_hex8_sf_tail)
968 numelhex2d(1,ip) = numelhex2d(1,ip) + 1
969 ELSE IF(intfaceflag.EQ.2)
THEN
970 CALL
add_surfmesh_hex8(surfmesh_hex8_item, surfmesh_hex8_sf_nonignt_head, surfmesh_hex8_sf_nonignt_tail)
971 numelhex2d(3,ip) = numelhex2d(3,ip) + 1
972 ELSE IF(intfaceflag.EQ.0)
THEN
973 CALL
add_surfmesh_hex8(surfmesh_hex8_item, surfmesh_hex8_s_head, surfmesh_hex8_s_tail)
974 numelhex2d(2,ip) = numelhex2d(2,ip) + 1
976 print*,
'ERROR, interface flag type not found',intfaceflag
987 ELSE IF(itype .EQ. 8)
THEN
994 READ(iunit,
'(I8,6I1)') iaux, disflag(1:6)
995 numdisflag =
sum(disflag(1:6))
998 numserbc = numserbc + numdisflag
1000 READ(iunit,*) tmpval(1:numdisflag)
1004 IF(disflag(
i).eq.1)
THEN
1006 disflagvalue(
i) = tmpval(icnt)
1010 IF(icnt.NE.numdisflag)
THEN
1011 print*,
'ERROR in processing boundary conditions'
1017 IF(disflag(1).eq.1 )
THEN
1018 DO i = 1,numprocpernd(
id)
1019 procid = procndlist(
id,
i)
1020 numbc_structural(procid) = numbc_structural(procid) + 1
1021 IF(bc_flag(1,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1024 bc_flag(1,
id) = bc_flag(1,
id) + int(disflagvalue(1))
1026 maxnumbc_str =
max(maxnumbc_str,int(disflagvalue(1)))
1029 IF(disflag(2).eq.1 )
THEN
1030 DO i = 1,numprocpernd(
id)
1031 procid = procndlist(
id,
i)
1032 numbc_thermal(procid) = numbc_thermal(procid) + 1
1033 IF(bc_flag(2,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1036 bc_flag(2,
id) = bc_flag(2,
id) + 100*int(disflagvalue(2))
1038 maxnumbc_th =
max(maxnumbc_th,int(disflagvalue(2)))
1042 IF(disflag(3).eq.1 )
THEN
1043 DO i = 1,numprocpernd(
id)
1044 procid = procndlist(
id,
i)
1045 numbc_meshmotion(procid) = numbc_meshmotion(procid) + 1
1046 IF(bc_flag(3,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1048 bc_flag(3,
id) = bc_flag(3,
id) + 10000*int(disflagvalue(3))
1050 maxnumbc_mm =
max(maxnumbc_mm,int(disflagvalue(3)))
1055 ELSE IF(itype .EQ. 7)
THEN
1075 DO i = 1,numprocpernd(
id)
1076 procid = procndlist(
id,
i)
1077 numbc_meshmotion(procid) = numbc_meshmotion(procid) + 1
1078 IF(bc_flag(3,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1081 bc_flag(3,
id) = bc_flag(3,
id) + 10000*int(
value)
1083 maxnumbc_mm =
max(maxnumbc_mm,int(
value))
1085 ELSE IF(itype .EQ. 5)
THEN
1090 ELSE IF(itype .EQ. 10)
THEN
1103 DO i = 1,numprocpernd(
id)
1104 procid = procndlist(
id,
i)
1105 numbc_thermal(procid) = numbc_thermal(procid) + 1
1106 IF(bc_flag(2,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1109 bc_flag(2,
id) = bc_flag(2,
id) + 100*int(
value)
1111 maxnumbc_th =
max(maxnumbc_th,int(
value))
1120 accumel =
sum(numel_glb(1:ibody))
1122 accumnd =
sum(numnp_glb(1:ibody))
1128 IF(tet4.AND..NOT.(tet10).AND..NOT.(hex8))
THEN
1130 ELSE IF (.NOT.(tet4).AND.tet10.AND..NOT.(hex8))
THEN
1132 ELSE IF (.NOT.(tet4).AND..NOT.(tet10).AND.hex8)
THEN
1142 print*,
'BOUNDARY CONDITIONS'
1143 print*,
' Total of all types = ',numserbc
1144 print*,
' Number of structural = ',maxnumbc_str
1145 print*,
' Number of meshmotion = ',maxnumbc_mm
1146 print*,
' Number of thermal = ',maxnumbc_th
1148 IF(numvertx.EQ.4)
THEN
1150 ELSE IF(numvertx.EQ.10)
THEN
1152 ELSE IF(numvertx.EQ.8)
THEN
1156 DO ibody = 1, numgeombodies
subroutine add_surfmesh_tri6(new, head, tail)
**********************************************************************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 kc
size_t value()
Returns an index corresponding to a free vertex.
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine newcommlist(NumEl, NumNP, NumProcs, NumVertex, NodeConn, ElPart, NumProcPerNd, ProcNdList, MaxNumberOfProcsToShareNode, NumElPerProc, NumNdPerProc)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine add_surfmesh_tri3(new, head, tail)
subroutine read_patran(numvertx2d, dhmin, nprocs)
**********************************************************************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
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
unsigned long id(const Leda_like_handle &x)
subroutine add_surfmesh_hex8(new, head, tail)