! ********************************************************************* ! * * ! * subroutine rect * ! * * ! ********************************************************************* ! Single Precision Version 1.01 ! Written by D. Vaughan Griffiths, Nov 16, 1999 ! Latest Update: Jul 23, 2002 ! ! PURPOSE set up the element and node numbering for the slope problem ! of RSLOPE2D. ! ! DESCRIPTION ! ! This routine sets up the node/element numbers and coordinates for ! the slope problem. It is assumed that the slope looks like ! y ! -- +---------------- ^ ! ^ | \ | ! | | \ | ! | | \ | ! ny1 | \ +-----------> x ! | | \ ! _|_ | \__________________ ! ^ | | ! | | | ! ny2 | | ! | | | ! _|_ +========================================+ ! ! |<---- nx1 ---->| |<--- nx2 ------->| ! ! The number of elements in the x-direction through the embankment is ! determined to be ny1*ngrad, so that the total number of elements ! in the x-direction is (nx1 + ny1*ngrad + nx2) and the total number ! of elements in the y-direction is (ny1 + ny2). ! ! ARGUMENTS ! The arguments nf, g_num, g_coord, nels, nn, and n are output. ! All others are input. ! ! REVISION HISTORY: ! 1.01 properly identified output variables above. (Jul 23/02) !----------------------------------------------------------------------- subroutine rect2mod(nx1,nx2,nx3,ny1,ny2,ny3,rgrad,rgrad1,dx,g_coord,nf,inf, & g_num,maxel,nels,nn,n) real g_coord(2,inf) integer nf(inf,2),g_num(8,maxel),ny4 real coord(8,2) integer num(8) ! ngrad=NINT(rgrad) ngrad1=NINT(rgrad1) dy=dx nye=ny1+ny2 ny4=nye-ny3 w1=dx*nx1 w2=dx*nx2 w3=dx*nx3 h1=dy*ny1 h2=dy*ny2 h3=dy*ny3 h4=dy*ny4 If(nx3>=0)then ! ! down the left hand side ! nm=0 ic=0 do 811 i=1,2*ny4 nm=nm+1 nf(nm,1)=0 ic=ic+1 811 nf(nm,2)=ic ! ! bottom left corner ! nm=nm+1 nf(nm,1)=0 nf(nm,2)=0 ! ! internal nodes in left rectangular block ! do 821 j=1,nx3 do 831 i=1,ny4 nm=nm+1 ic=ic+1 nf(nm,1)=ic ic=ic+1 831 nf(nm,2)=ic nm=nm+1 nf(nm,1)=0 nf(nm,2)=0 if(j=0)then yshift=dy*ny3 nm=0 do 18 ip=1,nx3 do 18 iq=1,ny4 nm=nm+1 num(1)=(ip-1)*(3*ny4+2)+2*iq+1 num(2)=num(1)-1 num(3)=num(1)-2 num(4)=(ip-1)*(3*ny4+2)+2*ny4+iq+1 if(ip