subroutine initializeFlow( * u, nX, nY, * nMax, x, * y) implicit none real*8 u, x, y real*8 iniUVal, iniVVal, psiTmp real rand integer nX, nY, nMax integer i,j dimension u(2,0:nMax+1,0:nMax+1) dimension psiTmp(0:nMax+1, 0:nMax+1) dimension x(0:nMax+1) dimension y(0:nMax+1) do j=0,nY+1 do i=0,nX+1 psiTmp(i,j) = 1.d-5*rand() enddo psiTmp(0,j) = 0.d0 psiTmp(1,j) = 0.d0 psiTmp(nX,j) = 0.d0 psiTmp(nX+1,j) = 0.d0 enddo do i=0,nX+1 psiTmp(i,0) = 0.d0 psiTmp(i,1) = 0.d0 psiTmp(i,nY) = 0.d0 psiTmp(i,nY+1) = 0.d0 enddo call uFromPsi(u, psiTmp, nX, nY, * nMax, 1.d0, 1.d0, 1.d-5) c do j=0,nMax+1 c do i=0,nMax+1 c u(1,i,j) = iniUVal( c * X(i), Y(j)) c u(2,i,j) = iniVVal( c * X(i), Y(j)) c enddo c enddo return end