subroutine initsl(ncells,fx,lx,ifirst,ilast, & xold) c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ double precision roundoff,small,huge,undefind common/machine/roundoff,small,huge,undefind c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ include "./linearad.i" c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ integer ncells,fx,lx,ifirst,ilast double precision xold(fx:lx,1:4) integer ie, je double precision width,velocity double precision temp, temp1, temp2 c ****************************************************************** c interior values only; others defined by boundary conditions c ****************************************************************** width=statergt-statelft if(beta.ne.0.d0) then velocity=alpha/beta else velocity=0.d0 endif width=width/dble(ilast/4-ifirst) do ie=ifirst,ilast/4 xold(ie,1)=statelft+dble(ie)*width xold(ie,2)=statergt xold(ie,3)=0.d0 xold(ie,4)=-1.d0 enddo do ie=ilast/4+1,ilast/2 xold(ie,1)=statergt xold(ie,2)=statergt-dble(ie-ilast/4)*width xold(ie,3)=-1.d0 xold(ie,4)=0.d0 enddo do ie=ilast/2+1,ilast*3/4 xold(ie,1)=statergt-width*dble(ie-ilast/2) xold(ie,2)=statelft xold(ie,3)=0.d0 xold(ie,4)=1.d0 enddo do ie=ilast*3/4+1,ilast xold(ie,1)=statelft xold(ie,2)=statelft+width*dble(ie-ilast*3/4) xold(ie,3)=1.d0 xold(ie,4)=0.d0 enddo open( UNIT=10, FILE='ini.txt') do ie=ifirst,ilast read(10,*) xold(ie,1), xold(ie,2), xold(ie,3), xold(ie,4) c xold(ie,1) = xold(ie,1)*1.666666667d0 c xold(ie,2) = xold(ie,2)*1.666666667d0 enddo rewind(10) return end