grid modelがしんどいわけ その1 にたような配列添え字を何度も書かないといけない をfortranで計算するためには do i =1, nx d2udx2(i) = ( u(i+1) - 2.0*u(i) + u(i-1) ) / dx**2 end do