📄 main.f90
字号:
program main
implicit none
real*8 lef,rig,f,h,no,t0,i,x0,y0,z0,x1,y1,z1
integer n
!parameter(theta=10,r=24.74,b=8/3)
lef=0 !left of []
rig=20 !rigth of []
no=1.0e4 !number of steps
h=abs(rig-lef)/no ! step length
t0=0
x0=0.1 !start value of x
y0=0.4 !strat value of y
z0=0.5 !strat value of z
open(9,file='test.txt',status='unknown')
do i=1,no
t0=t0+h
n=1
call rk4(t0,x0,y0,z0,h,n,x1) !caculate the first equation of ode
x0=x1
n=2
call rk4(t0,x0,y0,z0,h,n,y1) !caculate the second equation of ode
y0=y1
n=3
call rk4(t0,x0,y0,z0,h,n,z1) !caculate the third equation of ode
z0=z1
write(9,*)x1,y1,z1
end do
close(9)
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -