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'
651 ALLOCATE(startnumnp_loc_implicit(1:nprocs))
652 ALLOCATE(numnp_loc_implicit(1:nprocs))
653 ALLOCATE(mapnodeimp(1:numnp_prmry))
654 ALLOCATE(nodeprocimpglobal(1:numnp_prmry))
655 numnp_loc_implicit(:) = 0
657 DO i = 1, numnp_prmry
658 numnp_loc_implicit(npart(
i)) = numnp_loc_implicit(npart(
i)) + 1
659 mapnodeimp(
i) = numnp_loc_implicit(npart(
i))
660 nodeprocimpglobal(
i) = npart(
i) - 1
663 startnumnp_loc_implicit(1) = 0
665 startnumnp_loc_implicit(
i) =
sum(numnp_loc_implicit(1:
i-1))
668 DO i = 1, numnp_prmry
669 mapnodeimp(
i) = mapnodeimp(
i) + startnumnp_loc_implicit(npart(
i))
675 IF(numvertx.EQ.8)
THEN
689 OPEN(13,file=
'pmvis.nod')
690 DO i = 1, numnp_prmry
691 WRITE(13,
'(3e16.9)') coor(1:3,
i)
695 OPEN(13,file=
'pmvis.ele')
696 DO i = 1, numelv_prmry
697 WRITE(13,
'(4i10)') lmelv_prmry(1:4,
i)
701 OPEN(13,file=
'pmvis.part')
702 DO i = 1, numelv_prmry
703 WRITE(13,
'(1i10)') epart(
i)
721 ALLOCATE(indsburnflg(1:numnp_prmry))
727 nullify(bc_structural_head,bc_structural_tail)
728 nullify(bc_meshmotion_head,bc_meshmotion_tail)
729 nullify(bc_thermal_head,bc_thermal_tail)
731 nullify(surfmesh_tri3_ov1_head,surfmesh_tri3_ov1_tail)
732 nullify(surfmesh_tri3_ov2_head,surfmesh_tri3_ov2_tail)
733 nullify(surfmesh_tri3_s_head,surfmesh_tri3_s_tail)
734 nullify(surfmesh_tri3_sf_head,surfmesh_tri3_sf_tail)
735 nullify(surfmesh_tri6_s_head,surfmesh_tri6_s_tail)
736 nullify(surfmesh_tri6_sf_head,surfmesh_tri6_sf_tail)
737 nullify(surfmesh_hex8_s_head,surfmesh_hex8_s_tail)
738 nullify(surfmesh_hex8_sf_head,surfmesh_hex8_sf_tail)
742 ALLOCATE(numbc_structural(1:nprocs))
743 ALLOCATE(numbc_meshmotion(1:nprocs))
744 ALLOCATE(numbc_thermal(1:nprocs))
745 ALLOCATE(numbc_flag(1:nprocs))
746 numbc_structural(:) = 0
747 numbc_meshmotion(:) = 0
750 ALLOCATE(bc_flag(1:3,1:numnp_prmry))
755 print*,
'FINISH READING PATRAN FILE'
756 print*,
'Reading Boundary Conditions'
759 DO ibody = 1, numgeombodies
764 READ(iunit,*) itype,
id,iv,
kc
775 ELSE IF(itype.EQ. 3)
THEN
779 ELSE IF(itype .EQ. 6)
THEN
782 READ(iunit,
'(i1,i1,i1,i6,8i1)')
i,
i,
i,
i,n1,n2,n3,n4,n5,n6,n7,n8
784 intfaceflag = abs(int(press))
786 IF(.NOT.(interactmesh))
THEN
787 IF(intfaceflag.GE.0.AND.intfaceflag.LE.2) interactmesh = .true.
792 IF(n1.EQ.1.AND.n2.EQ.1.AND.n3.EQ.1 &
793 .AND.n4.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
794 IF(eltypeid(
id).EQ.4)
THEN
795 nnd1 = lmelv_prmry(1,
id)
796 nnd2 = lmelv_prmry(3,
id)
797 nnd3 = lmelv_prmry(2,
id)
801 nnd1 = lmelv_prmry(1,
id)
802 nnd2 = lmelv_prmry(3,
id)
803 nnd3 = lmelv_prmry(2,
id)
804 nnd4 = lmelv_prmry(7,
id)
805 nnd5 = lmelv_prmry(6,
id)
806 nnd6 = lmelv_prmry(5,
id)
809 ELSE IF(n1.EQ.1.AND.n2.EQ.1.AND.n4.EQ.1 &
810 .AND.n3.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
811 IF(eltypeid(
id).EQ.4)
THEN
812 nnd1 = lmelv_prmry(1,
id)
813 nnd2 = lmelv_prmry(2,
id)
814 nnd3 = lmelv_prmry(4,
id)
818 nnd1 = lmelv_prmry(1,
id)
819 nnd2 = lmelv_prmry(2,
id)
820 nnd3 = lmelv_prmry(4,
id)
821 nnd4 = lmelv_prmry(5,
id)
822 nnd5 = lmelv_prmry(9,
id)
823 nnd6 = lmelv_prmry(8,
id)
826 ELSE IF(n2.EQ.1.AND.n3.EQ.1.AND.n4.EQ.1 &
827 .AND.n1.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
828 IF(eltypeid(
id).EQ.4)
THEN
829 nnd1 = lmelv_prmry(2,
id)
830 nnd2 = lmelv_prmry(3,
id)
831 nnd3 = lmelv_prmry(4,
id)
835 nnd1 = lmelv_prmry(2,
id)
836 nnd2 = lmelv_prmry(3,
id)
837 nnd3 = lmelv_prmry(4,
id)
838 nnd4 = lmelv_prmry(6,
id)
839 nnd5 = lmelv_prmry(10,
id)
840 nnd6 = lmelv_prmry(9,
id)
843 ELSE IF(n1.EQ.1.AND.n3.EQ.1.AND.n4.EQ.1 &
844 .AND.n2.EQ.0.AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
845 IF(eltypeid(
id).EQ.4)
THEN
846 nnd1 = lmelv_prmry(4,
id)
847 nnd2 = lmelv_prmry(3,
id)
848 nnd3 = lmelv_prmry(1,
id)
852 nnd1 = lmelv_prmry(4,
id)
853 nnd2 = lmelv_prmry(3,
id)
854 nnd3 = lmelv_prmry(1,
id)
855 nnd4 = lmelv_prmry(10,
id)
856 nnd5 = lmelv_prmry(7,
id)
857 nnd6 = lmelv_prmry(8,
id)
861 ELSE IF(n1.EQ.1.AND.n2.EQ.1.AND.n3.EQ.1.AND.n4.EQ.1 &
862 .AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
863 IF(eltypeid(
id).EQ.8)
THEN
864 nnd1 = lmelv_prmry(4,
id)
865 nnd2 = lmelv_prmry(3,
id)
866 nnd3 = lmelv_prmry(2,
id)
867 nnd4 = lmelv_prmry(1,
id)
871 ELSE IF(n1.EQ.0.AND.n2.EQ.0.AND.n3.EQ.0.AND.n4.EQ.0 &
872 .AND.n5.EQ.1.AND.n6.EQ.1.AND.n7.EQ.1.AND.n8.EQ.1)
THEN
873 IF(eltypeid(
id).EQ.8)
THEN
874 nnd1 = lmelv_prmry(5,
id)
875 nnd2 = lmelv_prmry(6,
id)
876 nnd3 = lmelv_prmry(7,
id)
877 nnd4 = lmelv_prmry(8,
id)
881 ELSE IF(n1.EQ.1.AND.n2.EQ.1.AND.n3.EQ.0.AND.n4.EQ.0 &
882 .AND.n5.EQ.1.AND.n6.EQ.1.AND.n7.EQ.0.AND.n8.EQ.0)
THEN
883 IF(eltypeid(
id).EQ.8)
THEN
884 nnd1 = lmelv_prmry(1,
id)
885 nnd2 = lmelv_prmry(2,
id)
886 nnd3 = lmelv_prmry(6,
id)
887 nnd4 = lmelv_prmry(5,
id)
891 ELSE IF(n1.EQ.0.AND.n2.EQ.1.AND.n3.EQ.1.AND.n4.EQ.0 &
892 .AND.n5.EQ.0.AND.n6.EQ.1.AND.n7.EQ.1.AND.n8.EQ.0)
THEN
893 IF(eltypeid(
id).EQ.8)
THEN
894 nnd1 = lmelv_prmry(2,
id)
895 nnd2 = lmelv_prmry(3,
id)
896 nnd3 = lmelv_prmry(7,
id)
897 nnd4 = lmelv_prmry(6,
id)
901 ELSE IF(n1.EQ.0.AND.n2.EQ.0.AND.n3.EQ.1.AND.n4.EQ.1 &
902 .AND.n5.EQ.0.AND.n6.EQ.0.AND.n7.EQ.1.AND.n8.EQ.1)
THEN
903 IF(eltypeid(
id).EQ.8)
THEN
904 nnd1 = lmelv_prmry(3,
id)
905 nnd2 = lmelv_prmry(4,
id)
906 nnd3 = lmelv_prmry(8,
id)
907 nnd4 = lmelv_prmry(7,
id)
911 ELSE IF(n1.EQ.1.AND.n2.EQ.0.AND.n3.EQ.0.AND.n4.EQ.1 &
912 .AND.n5.EQ.1.AND.n6.EQ.0.AND.n7.EQ.0.AND.n8.EQ.1)
THEN
913 IF(eltypeid(
id).EQ.8)
THEN
914 nnd1 = lmelv_prmry(5,
id)
915 nnd2 = lmelv_prmry(8,
id)
916 nnd3 = lmelv_prmry(4,
id)
917 nnd4 = lmelv_prmry(1,
id)
922 print*,
'Error in pressure face numbering'
934 IF(eltypeid(
id).EQ.4)
THEN
936 ALLOCATE(surfmesh_tri3_item)
938 surfmesh_tri3_item%ElemData(1) = nnd1
939 surfmesh_tri3_item%ElemData(2) = nnd2
940 surfmesh_tri3_item%ElemData(3) = nnd3
941 surfmesh_tri3_item%ElemData(4) =
id
943 IF(intfaceflag.EQ.1)
THEN
944 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_sf_head, surfmesh_tri3_sf_tail)
945 numeltet2d(1,ip) = numeltet2d(1,ip) + 1
947 ELSE IF(intfaceflag.EQ.2)
THEN
948 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_sf_nonignt_head, surfmesh_tri3_sf_nonignt_tail)
949 numeltet2d(3,ip) = numeltet2d(3,ip) + 1
950 ELSE IF(intfaceflag.EQ.0)
THEN
951 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_s_head, surfmesh_tri3_s_tail)
952 numeltet2d(2,ip) = numeltet2d(2,ip) + 1
953 ELSE IF(intfaceflag.EQ.10)
THEN
955 surfmesh_tri3_item%ElemData(5) = ifaceid
956 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_ov1_head, surfmesh_tri3_ov1_tail)
957 numeltet2d(4,ip) = numeltet2d(4,ip) + 1
958 ELSE IF(intfaceflag.EQ.100)
THEN
960 surfmesh_tri3_item%ElemData(5) = ifaceid
961 CALL
add_surfmesh_tri3(surfmesh_tri3_item, surfmesh_tri3_ov2_head, surfmesh_tri3_ov2_tail)
962 numeltet2d(5,ip) = numeltet2d(5,ip) + 1
969 ELSE IF(eltypeid(
id).EQ.10)
THEN
971 ALLOCATE(surfmesh_tri6_item)
973 surfmesh_tri6_item%ElemData(1) = nnd1
974 surfmesh_tri6_item%ElemData(2) = nnd2
975 surfmesh_tri6_item%ElemData(3) = nnd3
976 surfmesh_tri6_item%ElemData(4) = nnd4
977 surfmesh_tri6_item%ElemData(5) = nnd5
978 surfmesh_tri6_item%ElemData(6) = nnd6
979 surfmesh_tri6_item%ElemData(7) =
id
981 IF(intfaceflag.EQ.1)
THEN
982 CALL
add_surfmesh_tri6(surfmesh_tri6_item, surfmesh_tri6_sf_head, surfmesh_tri6_sf_tail)
983 numeltet2d(1,ip) = numeltet2d(1,ip) + 1
984 ELSEIF(intfaceflag.EQ.2)
THEN
985 CALL
add_surfmesh_tri6(surfmesh_tri6_item, surfmesh_tri6_sf_nonignt_head, surfmesh_tri6_sf_nonignt_tail)
986 numeltet2d(3,ip) = numeltet2d(3,ip) + 1
987 ELSE IF(intfaceflag.EQ.0)
THEN
988 CALL
add_surfmesh_tri6(surfmesh_tri6_item, surfmesh_tri6_s_head, surfmesh_tri6_s_tail)
989 numeltet2d(2,ip) = numeltet2d(2,ip) + 1
995 ELSE IF(eltypeid(
id).EQ.8)
THEN
997 ALLOCATE(surfmesh_hex8_item)
999 surfmesh_hex8_item%ElemData(1) = nnd1
1000 surfmesh_hex8_item%ElemData(2) = nnd2
1001 surfmesh_hex8_item%ElemData(3) = nnd3
1002 surfmesh_hex8_item%ElemData(4) = nnd4
1003 surfmesh_hex8_item%ElemData(5) =
id
1004 IF(intfaceflag.EQ.1)
THEN
1005 CALL
add_surfmesh_hex8(surfmesh_hex8_item, surfmesh_hex8_sf_head, surfmesh_hex8_sf_tail)
1006 numelhex2d(1,ip) = numelhex2d(1,ip) + 1
1007 ELSE IF(intfaceflag.EQ.2)
THEN
1008 CALL
add_surfmesh_hex8(surfmesh_hex8_item, surfmesh_hex8_sf_nonignt_head, surfmesh_hex8_sf_nonignt_tail)
1009 numelhex2d(3,ip) = numelhex2d(3,ip) + 1
1010 ELSE IF(intfaceflag.EQ.0)
THEN
1011 CALL
add_surfmesh_hex8(surfmesh_hex8_item, surfmesh_hex8_s_head, surfmesh_hex8_s_tail)
1012 numelhex2d(2,ip) = numelhex2d(2,ip) + 1
1014 print*,
'ERROR, interface flag type not found',intfaceflag
1025 ELSE IF(itype .EQ. 8)
THEN
1032 READ(iunit,
'(I8,6I1)') iaux, disflag(1:6)
1033 numdisflag =
sum(disflag(1:6))
1036 numserbc = numserbc + numdisflag
1038 READ(iunit,*) tmpval(1:numdisflag)
1042 IF(disflag(
i).eq.1)
THEN
1044 disflagvalue(
i) = tmpval(icnt)
1048 IF(icnt.NE.numdisflag)
THEN
1049 print*,
'ERROR in processing boundary conditions'
1055 IF(disflag(1).eq.1 )
THEN
1056 DO i = 1,numprocpernd(
id)
1057 procid = procndlist(
id,
i)
1058 numbc_structural(procid) = numbc_structural(procid) + 1
1059 IF(bc_flag(1,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1062 bc_flag(1,
id) = bc_flag(1,
id) + int(disflagvalue(1))
1064 maxnumbc_str =
max(maxnumbc_str,int(disflagvalue(1)))
1067 IF(disflag(2).eq.1 )
THEN
1068 DO i = 1,numprocpernd(
id)
1069 procid = procndlist(
id,
i)
1070 numbc_thermal(procid) = numbc_thermal(procid) + 1
1071 IF(bc_flag(2,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1074 bc_flag(2,
id) = bc_flag(2,
id) + 100*int(disflagvalue(2))
1076 maxnumbc_th =
max(maxnumbc_th,int(disflagvalue(2)))
1080 IF(disflag(3).eq.1 )
THEN
1081 DO i = 1,numprocpernd(
id)
1082 procid = procndlist(
id,
i)
1083 numbc_meshmotion(procid) = numbc_meshmotion(procid) + 1
1084 IF(bc_flag(3,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1086 bc_flag(3,
id) = bc_flag(3,
id) + 10000*int(disflagvalue(3))
1088 maxnumbc_mm =
max(maxnumbc_mm,int(disflagvalue(3)))
1093 ELSE IF(itype .EQ. 7)
THEN
1113 DO i = 1,numprocpernd(
id)
1114 procid = procndlist(
id,
i)
1115 numbc_meshmotion(procid) = numbc_meshmotion(procid) + 1
1116 IF(bc_flag(3,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1119 bc_flag(3,
id) = bc_flag(3,
id) + 10000*int(
value)
1121 maxnumbc_mm =
max(maxnumbc_mm,int(
value))
1123 ELSE IF(itype .EQ. 5)
THEN
1128 ELSE IF(itype .EQ. 10)
THEN
1141 DO i = 1,numprocpernd(
id)
1142 procid = procndlist(
id,
i)
1143 numbc_thermal(procid) = numbc_thermal(procid) + 1
1144 IF(bc_flag(2,
id).EQ.0) numbc_flag(procid) = numbc_flag(procid) + 1
1147 bc_flag(2,
id) = bc_flag(2,
id) + 100*int(
value)
1149 maxnumbc_th =
max(maxnumbc_th,int(
value))
1158 accumel =
sum(numel_glb(1:ibody))
1160 accumnd =
sum(numnp_glb(1:ibody))
1166 IF(tet4.AND..NOT.(tet10).AND..NOT.(hex8))
THEN
1168 ELSE IF (.NOT.(tet4).AND.tet10.AND..NOT.(hex8))
THEN
1170 ELSE IF (.NOT.(tet4).AND..NOT.(tet10).AND.hex8)
THEN
1180 print*,
'BOUNDARY CONDITIONS'
1181 print*,
' Total of all types = ',numserbc
1182 print*,
' Number of structural = ',maxnumbc_str
1183 print*,
' Number of meshmotion = ',maxnumbc_mm
1184 print*,
' Number of thermal = ',maxnumbc_th
1186 IF(numvertx.EQ.4)
THEN
1188 ELSE IF(numvertx.EQ.10)
THEN
1190 ELSE IF(numvertx.EQ.8)
THEN
1194 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)