!*********************************************************************72 ! Copyright 2013 Anton Shterenlikht, The University of Bristol, UK. ! All rights reserved. ! ! Redistribution and use in source and binary forms, with or ! without modification, are permitted provided that the following ! conditions are met: ! 1. redistributions of source code must retain the above copyright ! notice, this list of conditions and the following disclaimer. ! 2. redistributions in binary form must reproduce the above ! copyright notice, this list of conditions and the following ! disclaimer in the documentation and/or other materials ! provided with the distribution. ! ! This software is provided by the author ``as is'' and any ! express or implied warranties, including, but not limited ! to, the implied warranties of merchantability and fitness ! for a particular purpose are disclaimed. In no event shall ! the author or contributors be liable for any direct, indirect, ! incidental, special, exemplary, or consequential damages ! (including, but not limited to, procurement of substitute ! goods or services; loss of use, data, or profits; or business ! interruption) however caused and on any theory of liability, ! whether in contract, strict liability, or tort (including ! negligence or otherwise) arising in any way out of the use of ! this software, even if advised of the possibility of such damage. !*********************************************************************72 subroutine abqmain ! must have these lines include 'aba_param.inc' dimension array(513), jrray(nprecd,513), lrunit(2,1) equivalence (array(1), jrray(1,1)) character*80 fname ! my vars real node,x1,x2,u1,u2 ! file initialisation fname="50mm8mm" ! the *.fil file to read, no extension nru=1 ! number of files to read, just 1 lrunit(1,1)=8 ! unit number, 8 assumes extension .fil lrunit(2,1)=2 ! 2-binary, 1-ascii loutf=0 ! will not write another res. file call initpf(fname,nru,lrunit,loutf) junit=8 ! use 8 for *.fil call dbrnu(junit) ! set the unit number ! open 2 files open(unit=101,file="coord",form="formatted",status="replace") open(unit=102,file="disp" ,form="formatted",status="replace") ! loop on all records in results file do lop=0 ! read the next record from *fil call dbfile(lop,array,jrcd) if ( jrcd .ne. 0) exit key = jrray(1,2) ! heading to stdout if ( key .eq. 1922 ) write(*,"(10a8)") (array(ixx),ixx=3,12) ! Node definitions, i.e. coord, to coord file if ( key .eq. 1901 ) write (101,*) jrray(1,3), array(4:5) ! increment start record, to disp file if ( key .eq. 2000 ) write(102,"('Step ',i2,' increment ',i3)") jrray(1,8:9) ! node disp, to disp file if ( key .eq. 101 ) write (102,*) jrray(1,3), array(4:5) end do close(101) close(102) end subroutine abqmain