writetofile.f90
来自「动力学计算程序」· F90 代码 · 共 39 行
F90
39 行
subroutine WriteToFile(a,b,c)
!-----------------------------------------------------------------------
! Purpose : write time and value to files
! Inputs: a - time
! b - vector of displacement, velocity or acceleration
! c - 'd' means b is displacement; 'v' means b is velocity; 'a' means acceleration.
!-----------------------------------------------------------------------
use module_parameter
use module_ioport
implicit none
real :: a,b(*)
integer i
character :: c
logical pcomp
! Write value of displacement to Disp_filename.
if(Disp_flag .and. pcomp(c,'d',1)) then
do i=1,n_Disp_dof
write(oport_disp(i), 201) a,b(Disp_dof(i))
end do
end if
! Write value of displacement to Velo_filename.
if(Velo_flag .and. pcomp(c,'v',1)) then
do i=1,n_Velo_dof
write(oport_velo(i), 201) a,b(Velo_dof(i))
end do
end if
! Write value of displacement to Disp_filename.
if(Acce_flag .and. pcomp(c,'a',1)) then
do i=1,n_Acce_dof
write(oport_acce(i), 201) a,b(Acce_dof(i))
end do
end if
201 format(f12.6, 4X, f12.6)
end subroutine WriteToFile
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?