文件
tem3dfdtd-open/tem3dfdtd/lib/getxmldata.f90
T
2026-08-14 20:51:58 +08:00

36 行
1.1 KiB
Fortran

!Copyright (c) 2013 by https://git.em3d.cn/ under guide of Xiu Li(lixiu@chd.edu.cn)
!written by Huaifeng Sun(sunhuaifeng@email.sdu.edu.cn) and Xushan Lu(luxushan@gmail.com)
!Code distribution @ https://git.em3d.cn/
!this subroutine is writen by Huaifeng Sun from May 29, 2017
subroutine getxmldata
use constantparameters
use ifport
implicit none
logical alive
integer temp_ii,iii
!this following lines 10-21 are added by huaifeng sun to get the dir 2016-10-30
character(255) dir
character(255) inputfilename
integer(4) length
length = getdrivedirqq(dir)
if (length .gt. 0) then
inputfilename=trim(dir)//'//example//input.dat'
else
write (*,*) 'failed to get current directory'
pause
end if
!the following inputfilename type are modified by hfsun 2016-10-30
inquire(file=inputfilename, exist=alive)
if(.not. alive) then
write(10005,*) "input.dat does not exist."
write (*,*)"input.dat does not exist."
pause
else
!the following starts to read the xml data file.
endif
endsubroutine getxmldata