[Fortran] 纯文本查看 复制代码 subroutine ReadPrescribedVelocityNode(FileUnit)
!**********************************************************************
!
! Function: To read data for prescribed velocity in nodes
!
!**********************************************************************
!implicit none
!
! integer(INTEGER_TYPE), intent(in) :: FileUnit
!
! ! local variables
! integer(INTEGER_TYPE) :: I
! integer(INTEGER_TYPE), dimension(NVECTOR+1) :: DumI
! real(REAL_TYPE), dimension(NVECTOR) :: DumR
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! integer::wave_num=1400!地震波定义
! integer::i
! real,dimension(wave_num)::wave_t,wave_v
!
!
! call DestroyPrescribedNodalVeloData()
!
! read(FileUnit,*) DumI(1)
! CalParams%PrescribedVelo%NNodePrescribedVelo = DumI(1)
!
! call InitialisePrescribedNodalVeloData(CalParams%PrescribedVelo%NNodePrescribedVelo)
!
! do I = 1, CalParams%PrescribedVelo%NNodePrescribedVelo
! read(FileUnit,*) DumI(1), DumI(2:NVECTOR+1), DumR(1:NVECTOR)
! CalParams%PrescribedVelo%NodePrescribedVelo(I) = DumI(1)
! CalParams%PrescribedVelo%NodalPrescribedVelocityDirection(I, 1:NVECTOR) = DumI(2:NVECTOR+1)
!
! if (DumR(1:NVECTOR)==999) then!地震波触发条件,输入999
! open(10,file='v-t.txt',status='old')
! do i=1,wave_num
! read(10,*)wave_t(i),wave_v(i)
! if (i==IDTimerLoadStep) then! 时间步
! CalParams%PrescribedVelo%NodalPrescribedVelocityValue(I, 1:NVECTOR)= =q(i)
! end if
! end do
! close (10)
!
! else
! CalParams%PrescribedVelo%NodalPrescribedVelocityValue(I, 1:NVECTOR) = DumR(1:NVECTOR)
! end if
!
!
! end do
implicit none
integer(INTEGER_TYPE), intent(in) :: FileUnit
! local variables
integer(INTEGER_TYPE) :: I
integer(INTEGER_TYPE), dimension(NVECTOR+1) :: DumI
real(REAL_TYPE), dimension(NVECTOR) :: DumR
call DestroyPrescribedNodalVeloData()
read(FileUnit,*) DumI(1)
CalParams%PrescribedVelo%NNodePrescribedVelo = DumI(1)
call InitialisePrescribedNodalVeloData(CalParams%PrescribedVelo%NNodePrescribedVelo)
do I = 1, CalParams%PrescribedVelo%NNodePrescribedVelo
read(FileUnit,*) DumI(1), DumI(2:NVECTOR+1), DumR(1:NVECTOR)
CalParams%PrescribedVelo%NodePrescribedVelo(I) = DumI(1)
CalParams%PrescribedVelo%NodalPrescribedVelocityDirection(I, 1:NVECTOR) = DumI(2:NVECTOR+1)
CalParams%PrescribedVelo%NodalPrescribedVelocityValue(I, 1:NVECTOR) = DumR(1:NVECTOR)
end do
end subroutine ReadPrescribedVelocityNode
注释行是我更改后的,但是报错的位置却显示的不是这个子程序错误C:\Users\admin\Desktop\错误信息.jpg
|