本帖最后由 kyra 于 2020-3-10 09:31 编辑
[Fortran] 纯文本查看 复制代码 include "link_fnl_shared.h"
module constant
implicit none
real,parameter :: pi = 3.1415926
real,parameter :: lc=9, lt=1.2, ls = 0.545, L= 100, x00=10,mr=60.64
real,parameter :: xx(4)=(/x00, x00+2*lt, x00+2*lc, x00+2*(lc+lt)/)
integer,parameter :: NM = 120 ,dof_c=10
integer,parameter :: N = floor(L/ls), DOF=dof_c+NM+2*N
contains
subroutine Zp_Zw(Zpp,Zww)
implicit none
integer :: I,J,I1,J1
real(kind=4) :: Zpp(NM,N),Zww(NM,4)
do I = 1,NM
do J = 1,4
Zww(I,J)=((2/(mr*L))**0.5)*sin(I*pi*xx(J)/L)
end do
end do
do I1 = 1,NM
do J1 = 1,N
Zpp(I1,J1)= ((2/(mr*L))**0.5)*sin(I1*pi*xx(J1)/L)
end do
end do
end subroutine
end module constant
Program test_IMSL
use constant
use operation_x
implicit none
real(kind=4) :: Zp(NM,N),Zw(NM,4)
call Zp_Zw(Zp,Zw)
pause
end program |