⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initial.f90

📁 求解粘性Burger方程和非粘性Burger方程的各种差分格式
💻 F90
字号:
subroutine InputInitial(lenX,deltX,deltT,coeff,maxLenX)
! Input initial parameter
	
	integer lenX
	real :: left_x=0,right_x=1,deltX,deltT,coeff

!	print '(a)'," ** Input the value of interval: leftX  rightX **"
!	read *, left_x,right_x


	print *, "** Input the length of vector in space direction : lenX(<) ** ",maxLenX
	read *, lenX

	deltX=real(right_x-left_x)/lenX
	print *,"-- step length in space delt_x=",deltX

	print *,"** Iput step length in time : **"
	read *, deltT

	print *,"** Input coeff of the second order differential : **"
	read *,coeff
	
end subroutine InputInitial

!*************************************************

subroutine InitialValue(unZero,lenX,delt_x)
! Initial value 
	
	integer k
	real unZero(lenX+1)   
	real,external :: f
	
	do k=1,lenX+1
		unZero(k)=funInit((k-1)*delt_x)
	end do
		
end subroutine InitialValue


function funInit(x)
! Function in t=0
	real funInit
	real,parameter :: PI=3.1415926
	funInit=sin(2*PI*x)
end function funInit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -