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 !> @brief solver job name (no extension) as combination of geometry and load case name
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function getSolverJobName function getSolverJobName()
character(len=:), allocatable :: getSolverJobName character(len=:), allocatable :: getSolverJobName
character(1024) :: inputName character(1024) :: inputName

View File

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