avoid fixed string length
solved issues with wrong trim and is more robust
This commit is contained in:
parent
1bfd8a8c21
commit
7f66d4e975
|
@ -95,13 +95,13 @@ end subroutine DAMASK_interface_init
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief solver job name (no extension) as combination of geometry and load case name
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
function getSolverJobName()
|
||||
function getSolverJobName
|
||||
|
||||
character(1024) :: getSolverJobName, inputName
|
||||
character(len=:), allocatable :: getSolverJobName
|
||||
character(1024) :: inputName
|
||||
character(len=*), parameter :: pathSep = achar(47)//achar(92) ! forward and backward slash
|
||||
integer :: extPos
|
||||
|
||||
getSolverJobName=''
|
||||
inputName=''
|
||||
inquire(5, name=inputName) ! determine inputfile
|
||||
extPos = len_trim(inputName)-4
|
||||
|
|
|
@ -43,7 +43,7 @@ subroutine FE_init
|
|||
character(len=pStringLen) :: line
|
||||
integer :: myStat,fileUnit
|
||||
integer, allocatable, dimension(:) :: chunkPos
|
||||
open(newunit=fileUnit, file=trim(getSolverJobName()//INPUTFILEEXTENSION), &
|
||||
open(newunit=fileUnit, file=getSolverJobName()//INPUTFILEEXTENSION, &
|
||||
status='old', position='rewind', action='read',iostat=myStat)
|
||||
do
|
||||
read (fileUnit,'(A)',END=100) line
|
||||
|
|
Loading…
Reference in New Issue