diff --git a/code/FEsolving.f90 b/code/FEsolving.f90 index 99957e147..03408a921 100644 --- a/code/FEsolving.f90 +++ b/code/FEsolving.f90 @@ -80,9 +80,14 @@ restartRead = iand(IO_intValue(line,positions,1),2_pInt) > 0_pInt case ('*restart') do i=2,positions(1) - restartWrite = IO_lc(IO_StringValue(line,positions,i)) == 'write' -! restartRead = IO_lc(IO_StringValue(line,positions,i)) == 'read' + restartWrite = (IO_lc(IO_StringValue(line,positions,i)) == 'write') .or. restartWrite + restartRead = (IO_lc(IO_StringValue(line,positions,i)) == 'read') .or. restartRead enddo + if(restartWrite) then + do i=2,positions(1) + restartWrite = (IO_lc(IO_StringValue(line,positions,i)) /= 'frequency=0') .and. restartWrite + enddo + endif end select enddo else @@ -103,13 +108,16 @@ IO_lc(IO_stringValue(line,positions,4)) == 'id' ) & FEmodelGeometry = IO_StringValue(line,positions,6) enddo - elseif (FEsolver == 'Abaqus' .and. IO_open_jobFile(fileunit, 'com')) then + elseif (FEsolver == 'Abaqus' .and. IO_open_inputFile(fileunit,FEmodelGeometry)) then rewind(fileunit) do read (fileunit,'(a1024)',END=200) line positions = IO_stringPos(line,maxNchunks) -! if ( IO_lc(IO_stringValue(line,positions,?)) == 'oldjob?') & -! FEmodelGeometry = IO_StringValue(line,positions,?) + if ( IO_lc(IO_stringValue(line,positions,1))=='*heading') then + read (fileunit,'(a1024)',END=200) line + positions = IO_stringPos(line,maxNchunks) + FEmodelGeometry = IO_StringValue(line,positions,1) + endif enddo else call IO_error(106) ! cannot open file for old job info diff --git a/code/IO.f90 b/code/IO.f90 index c077a697f..f08387661 100644 --- a/code/IO.f90 +++ b/code/IO.f90 @@ -76,12 +76,18 @@ recursive function IO_abaqus_assembleInputFile(unit1,unit2) result(createSuccess character(len=300) line,fname integer(pInt), intent(in) :: unit1, unit2 logical createSuccess,fexist + integer(pInt), parameter :: maxNchunks = 6 + integer(pInt), dimension(1+2*maxNchunks) :: positions + do read(unit2,'(A300)',END=220) line - line = IO_lc(trim(line)) +! line = IO_lc(trim(line)) +! do not change the whole line to lower case, file names in Linux are case sensitive! + positions = IO_stringPos(line,maxNchunks) + ! call IO_lcInPlace(line) - if (line(1:8)=='*include') then + if (IO_lc(IO_StringValue(line,positions,1))=='*include') then fname = trim(getSolverWorkingDirectoryName())//trim(line(9+scan(line(9:),'='):)) inquire(file=fname, exist=fexist) if (.not.(fexist)) then