c=========================================================== c vswave: Generates time-series of profiles of c left-moving "wave" (f(t+x) = constant) and outputs to c 'vs' server. c=========================================================== program vswave implicit none integer n parameter ( n = 65 ) real*8 f real*8 x(n), y(n) integer i, j, nx, nt real*8 h, t, dt nx = n nt = n h = 1.0d0 / (nx - 1) x(1) = 0.0d0 do j = 1 , nx - 1 x(j+1) = x(j) + h end do t = 0.0d0 dt = 1.0d0 / (nt - 1) do i = 1 , nt do j = 1 , nx c----------------------------------------------------------- c Define y(x,t) c----------------------------------------------------------- y(j) = f(mod((x(j) + t),1.0d0)) end do c----------------------------------------------------------- c Transmit data to server c----------------------------------------------------------- call vsxynt('vswave',t,x,y,nx) t = t + dt end do stop end c----------------------------------------------------------- c Gaussian function. c----------------------------------------------------------- double precision function f(x) implicit none real*8 x f = exp(-((x-0.5d0)/0.1d0)**2) return end