independent of IO

This commit is contained in:
Martin Diehl 2020-01-25 08:56:39 +01:00
parent bfe8585903
commit bdae2a40cc
2 changed files with 6 additions and 5 deletions

View File

@ -95,7 +95,7 @@ end subroutine DAMASK_interface_init
!--------------------------------------------------------------------------------------------------
!> @brief solver job name (no extension) as combination of geometry and load case name
!--------------------------------------------------------------------------------------------------
function getSolverJobName
function getSolverJobName()
character(len=:), allocatable :: getSolverJobName
character(1024) :: inputName

View File

@ -5,7 +5,6 @@
!--------------------------------------------------------------------------------------------------
module FEsolving
use prec
use IO
use DAMASK_interface
implicit none
@ -41,7 +40,7 @@ subroutine FE_init
#if defined(Marc4DAMASK)
block
character(len=pStringLen) :: line
integer :: myStat,fileUnit
integer :: myStat,fileUnit,s,e
integer, allocatable, dimension(:) :: chunkPos
open(newunit=fileUnit, file=getSolverJobName()//INPUTFILEEXTENSION, &
status='old', position='rewind', action='read',iostat=myStat)
@ -49,8 +48,10 @@ subroutine FE_init
read (fileUnit,'(A)',END=100) line
if(index(trim(lc(line)),'solver') == 1) then
read (fileUnit,'(A)',END=100) line ! next line
chunkPos = IO_stringPos(line)
symmetricSolver = (IO_intValue(line,chunkPos,2) /= 1)
s = verify(line, ' ') ! start of first chunk
s = s + verify(line(s+1:),' ') ! start of second chunk
e = s + scan (line(s+1:),' ') ! end of second chunk
symmetricSolver = line(s:e) /= '1'
endif
enddo
100 close(fileUnit)