4. 2次元ベクトルデータを用いた2次元流線図



ソースプログラム(Fortran 90,自動倍精度利用)
!************************************ ! 2D Graphic Sample No. 4 * ! Brusselator * ! Vectors and Field Lines * !************************************ program gsample4 implicit none real x,r,y(2),f(2) real xx(500),yy(500),xf(0:20,0:20),yf(0:20,0:20) integer i,j call fr_ginit call fr_opencanvas(1,'gsample4',101) call fr_margin2d(80,50,80,80) call fr_aspect2d(1.0,1.0,0) call fr_frame2d(0.0,5.0,0.0,5.0,10) call fr_xyname('x','y') x = 0 r = 0.05 do j = 0, 20 do i = 0, 20 y(1) = 0.25*i y(2) = 0.25*j call hannou(y,f) call fr_vector2d(y(1),y(2),r*f(1),r*f(2),2,0) xf(i,j) = f(1) yf(i,j) = f(2) enddo enddo do i = 1, 10 xx(1) = 0.4*i yy(1) = 0.2*i call fr_flow2dline(xx,yy,500,xf,yf,21,21,4,1.d-5,5) enddo call fr_gend end program gsample4 subroutine hannou(f,df) implicit none real f(2),df(2) df(1) = 0.5 + f(1)*(f(1)*f(2) - 3.0) df(2) = f(1)*(2.0 - f(1)*f(2)) end subroutine hannou


Copyright (C) Toshihiro Taguchi, Setsunan University, 2000-2012 All rights reserved.