reverted handling back
This commit is contained in:
parent
97f7abf915
commit
91f96cf69b
|
@ -239,23 +239,23 @@ character(len=1024) function storeWorkingDirectory(workingDirectoryArg,geometryA
|
||||||
if (error) call quit(1_pInt)
|
if (error) call quit(1_pInt)
|
||||||
storeWorkingDirectory = trim(cwd)//pathSep//workingDirectoryArg
|
storeWorkingDirectory = trim(cwd)//pathSep//workingDirectoryArg
|
||||||
endif absolutePath
|
endif absolutePath
|
||||||
if (storeWorkingDirectory(len(trim(storeWorkingDirectory)):len(trim(storeWorkingDirectory)))/= pathSep) &
|
if (storeWorkingDirectory(len(trim(storeWorkingDirectory)):len(trim(storeWorkingDirectory))) /= pathSep) &
|
||||||
storeWorkingDirectory = trim(storeWorkingDirectory)//pathSep ! if path seperator is not given, append it
|
storeWorkingDirectory = trim(storeWorkingDirectory)//pathSep ! if path seperator is not given, append it
|
||||||
if(.not. isDirectory(trim(storeWorkingDirectory))) then ! check if the directory exists
|
|
||||||
write(6,'(a20,a,a16)') ' working directory "',trim(storeWorkingDirectory),'" does not exist'
|
|
||||||
call quit(1_pInt)
|
|
||||||
endif
|
|
||||||
else wdGiven
|
else wdGiven
|
||||||
if (geometryArg(1:1) == pathSep) then ! absolute path given as command line argument
|
if (geometryArg(1:1) == pathSep) then ! absolute path given as command line argument
|
||||||
storeWorkingDirectory = geometryArg(1:scan(geometryArg,pathSep,back=.true.))
|
storeWorkingDirectory = geometryArg(1:scan(geometryArg,pathSep,back=.true.))
|
||||||
else
|
else
|
||||||
error = getCWD(cwd) ! relative path given as command line argument
|
error = getCWD(cwd) ! relative path given as command line argument
|
||||||
if (error) call quit(1_pInt)
|
if (error) call quit(1_pInt)
|
||||||
storeWorkingDirectory = trim(cwd)//pathSep//&
|
storeWorkingDirectory = trim(cwd)//pathSep//geometryArg(1:scan(geometryArg,pathSep,back=.true.))
|
||||||
geometryArg(1:scan(geometryArg,pathSep,back=.true.))
|
|
||||||
endif
|
endif
|
||||||
endif wdGiven
|
endif wdGiven
|
||||||
|
|
||||||
storeWorkingDirectory = trim(rectifyPath(storeWorkingDirectory))
|
storeWorkingDirectory = trim(rectifyPath(storeWorkingDirectory))
|
||||||
|
if(.not. isDirectory(trim(storeWorkingDirectory))) then ! check if the directory exists
|
||||||
|
write(6,'(a20,a,a16)') ' working directory "',trim(storeWorkingDirectory),'" does not exist'
|
||||||
|
call quit(1_pInt)
|
||||||
|
endif
|
||||||
|
|
||||||
end function storeWorkingDirectory
|
end function storeWorkingDirectory
|
||||||
|
|
||||||
|
@ -302,11 +302,16 @@ end function getSolverJobName
|
||||||
!> @brief basename of geometry file with extension from command line arguments
|
!> @brief basename of geometry file with extension from command line arguments
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
character(len=1024) function getGeometryFile(geometryParameter)
|
character(len=1024) function getGeometryFile(geometryParameter)
|
||||||
|
use system_routines, only: &
|
||||||
|
getCWD
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=1024), intent(in) :: &
|
character(len=1024), intent(in) :: &
|
||||||
geometryParameter
|
geometryParameter
|
||||||
|
character(len=1024) :: &
|
||||||
|
cwd
|
||||||
integer :: posExt, posSep
|
integer :: posExt, posSep
|
||||||
|
logical :: error
|
||||||
character :: pathSep
|
character :: pathSep
|
||||||
|
|
||||||
getGeometryFile = geometryParameter
|
getGeometryFile = geometryParameter
|
||||||
|
@ -316,7 +321,8 @@ character(len=1024) function getGeometryFile(geometryParameter)
|
||||||
|
|
||||||
if (posExt <= posSep) getGeometryFile = trim(getGeometryFile)//('.geom') ! no extension present
|
if (posExt <= posSep) getGeometryFile = trim(getGeometryFile)//('.geom') ! no extension present
|
||||||
if (scan(getGeometryFile,pathSep) /= 1) then ! relative path given as command line argument
|
if (scan(getGeometryFile,pathSep) /= 1) then ! relative path given as command line argument
|
||||||
getGeometryFile = rectifyPath(trim(workingDirectory)//pathSep//getGeometryFile)
|
error = getcwd(cwd)
|
||||||
|
getGeometryFile = rectifyPath(trim(cwd)//pathSep//getGeometryFile)
|
||||||
else
|
else
|
||||||
getGeometryFile = rectifyPath(getGeometryFile)
|
getGeometryFile = rectifyPath(getGeometryFile)
|
||||||
endif
|
endif
|
||||||
|
@ -330,11 +336,16 @@ end function getGeometryFile
|
||||||
!> @brief relative path of loadcase from command line arguments
|
!> @brief relative path of loadcase from command line arguments
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
character(len=1024) function getLoadCaseFile(loadCaseParameter)
|
character(len=1024) function getLoadCaseFile(loadCaseParameter)
|
||||||
|
use system_routines, only: &
|
||||||
|
getCWD
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=1024), intent(in) :: &
|
character(len=1024), intent(in) :: &
|
||||||
loadCaseParameter
|
loadCaseParameter
|
||||||
|
character(len=1024) :: &
|
||||||
|
cwd
|
||||||
integer :: posExt, posSep
|
integer :: posExt, posSep
|
||||||
|
logical :: error
|
||||||
character :: pathSep
|
character :: pathSep
|
||||||
|
|
||||||
getLoadCaseFile = loadcaseParameter
|
getLoadCaseFile = loadcaseParameter
|
||||||
|
@ -344,7 +355,8 @@ character(len=1024) function getLoadCaseFile(loadCaseParameter)
|
||||||
|
|
||||||
if (posExt <= posSep) getLoadCaseFile = trim(getLoadCaseFile)//('.load') ! no extension present
|
if (posExt <= posSep) getLoadCaseFile = trim(getLoadCaseFile)//('.load') ! no extension present
|
||||||
if (scan(getLoadCaseFile,pathSep) /= 1) then ! relative path given as command line argument
|
if (scan(getLoadCaseFile,pathSep) /= 1) then ! relative path given as command line argument
|
||||||
getLoadCaseFile = rectifyPath(trim(workingDirectory)//pathSep//getLoadCaseFile)
|
error = getcwd(cwd)
|
||||||
|
getLoadCaseFile = rectifyPath(trim(cwd)//pathSep//getLoadCaseFile)
|
||||||
else
|
else
|
||||||
getLoadCaseFile = rectifyPath(getLoadCaseFile)
|
getLoadCaseFile = rectifyPath(getLoadCaseFile)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue