From bdae2a40cc5af474b318656412c31c85f1d773ab Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 25 Jan 2020 08:56:39 +0100 Subject: [PATCH] independent of IO --- src/DAMASK_marc.f90 | 2 +- src/FEsolving.f90 | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/DAMASK_marc.f90 b/src/DAMASK_marc.f90 index 32ec08e83..e4f9728df 100644 --- a/src/DAMASK_marc.f90 +++ b/src/DAMASK_marc.f90 @@ -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 diff --git a/src/FEsolving.f90 b/src/FEsolving.f90 index bb2fe04ed..e71dceca8 100644 --- a/src/FEsolving.f90 +++ b/src/FEsolving.f90 @@ -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)