c-------------------------------------------------------------------------------- c SAMPLE FORTRAN UNFORMATTED INPUT c-------------------------------------------------------------------------------- open (unit=inmesh,file=filen, form='unformatted') c read(inmesh) ntetra,npyr,nprizm,nhex read(inmesh) nnode,nbface3,nbface4,npatch,ncomp,nbod,nfrpts c if (ntetra .gt. 0) then write(iterm2,*) 'Reading in Tet Connectivity Matrix ...' read(inmesh)(ndc4(i,1),i=1,ntetra) read(inmesh)(ndc4(i,2),i=1,ntetra) read(inmesh)(ndc4(i,3),i=1,ntetra) read(inmesh)(ndc4(i,4),i=1,ntetra) end if c if (npyr .gt. 0) then write(iterm2,*) 'Reading in Pyramid Connectivity Matrix ...' read(inmesh)(ndc5(i,1),i=1,npyr) read(inmesh)(ndc5(i,2),i=1,npyr) read(inmesh)(ndc5(i,3),i=1,npyr) read(inmesh)(ndc5(i,4),i=1,npyr) read(inmesh)(ndc5(i,5),i=1,npyr) end if c if (nprizm .gt. 0) then write(iterm2,*) 'Reading in Prizm Connectivity Matrix ...' read(inmesh)(ndc6(i,1),i=1,nprizm) read(inmesh)(ndc6(i,2),i=1,nprizm) read(inmesh)(ndc6(i,3),i=1,nprizm) read(inmesh)(ndc6(i,4),i=1,nprizm) read(inmesh)(ndc6(i,5),i=1,nprizm) read(inmesh)(ndc6(i,6),i=1,nprizm) end if c if (nhex .gt. 0) then write(iterm2,*) 'Reading in Hex Connectivity Matrix ...' read(inmesh)(ndc8(i,1),i=1,nhex) read(inmesh)(ndc8(i,2),i=1,nhex) read(inmesh)(ndc8(i,3),i=1,nhex) read(inmesh)(ndc8(i,4),i=1,nhex) read(inmesh)(ndc8(i,5),i=1,nhex) read(inmesh)(ndc8(i,6),i=1,nhex) read(inmesh)(ndc8(i,7),i=1,nhex) read(inmesh)(ndc8(i,8),i=1,nhex) end if c write(iterm2,*) 'Reading in Node Coordinates ...' read(inmesh)(x(i,1),i=1,nnode) read(inmesh)(x(i,2),i=1,nnode) read(inmesh)(x(i,3),i=1,nnode) c c--Load Tri/Quads in Reverse Order c if (nbface3 .gt. 0) then write(iterm2,*) 'Reading in Triangular Boundary Faces ...' read(inmesh)(nbf(i,1),i=nbface4+1,nbface4+nbface3) read(inmesh)(nbf(i,2),i=nbface4+1,nbface4+nbface3) read(inmesh)(nbf(i,3),i=nbface4+1,nbface4+nbface3) read(inmesh)(ifbc(i) ,i=nbface4+1,nbface4+nbface3) end if c if (nbface4 .gt. 0) then write(iterm2,*) 'Reading in Quad Boundary Faces ...' read(inmesh)(nbf(i,1),i=1,nbface4) read(inmesh)(nbf(i,2),i=1,nbface4) read(inmesh)(nbf(i,3),i=1,nbface4) read(inmesh)(nbf(i,4),i=1,nbface4) read(inmesh)(ifbc(i) ,i=1,nbface4) end if c write(iterm2,*) 'Reading in Boundary Faces Attributes ...' c if (nbface3 .gt. 0) then read(inmesh)(ifpat(i),i=nbface4+1,nbface4+nbface3) read(inmesh)(fspln(i,1,1),i=nbface4+1,nbface4+nbface3) read(inmesh)(fspln(i,2,1),i=nbface4+1,nbface4+nbface3) read(inmesh)(fspln(i,3,1),i=nbface4+1,nbface4+nbface3) read(inmesh)(fspln(i,1,2),i=nbface4+1,nbface4+nbface3) read(inmesh)(fspln(i,2,2),i=nbface4+1,nbface4+nbface3) read(inmesh)(fspln(i,3,2),i=nbface4+1,nbface4+nbface3) end if c if (nbface4 .gt. 0) then read(inmesh)(ifpat(i),i=1,nbface4) read(inmesh)(fspln(i,1,1),i=1,nbface4) read(inmesh)(fspln(i,2,1),i=1,nbface4) read(inmesh)(fspln(i,3,1),i=1,nbface4) read(inmesh)(fspln(i,4,1),i=1,nbface4) read(inmesh)(fspln(i,1,2),i=1,nbface4) read(inmesh)(fspln(i,2,2),i=1,nbface4) read(inmesh)(fspln(i,3,2),i=1,nbface4) read(inmesh)(fspln(i,4,2),i=1,nbface4) end if c write(iterm2,*) 'Reading in Surface Definition ...' read(inmesh)(icomp(i),i=1,npatch) read(inmesh)(ibod(i),i=0,ncomp) c if (nfrpts .gt. 0) then read(inmesh)(ifrpts(i),i=1,nfrpts) end if c read(inmesh,end=2800,err=2800)(ccomp(i),i=0,ncomp) read(inmesh,end=2800,err=2800)(cbod(i),i=1,nbod) go to 2999 c 2800 continue do i=0,ncomp ccomp(i) = 'unnamed' enddo do i=1,nbod cbod(i) = 'unnamed' enddo c 2999 continue close(inmesh)