diff --git a/src/CPFEM2.f90 b/src/CPFEM2.f90 index db22748ce..b80c3733b 100644 --- a/src/CPFEM2.f90 +++ b/src/CPFEM2.f90 @@ -162,30 +162,30 @@ subroutine CPFEM_restartWrite character(len=32) :: rankStr, PlasticItem, HomogItem integer(HID_T) :: fileHandle, groupPlastic, groupHomog - if (iand(debug_level(debug_CPFEM), debug_levelBasic) /= 0) & - write(6,'(a)') '<< CPFEM >> writing restart variables of last converged step to hdf5 file' + + write(6,'(a)') 'Writing current constitutive variables for restart to file';flush(6) write(rankStr,'(a1,i0)')'_',worldrank fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','a') - call HDF5_write(fileHandle,crystallite_F0, 'convergedF') - call HDF5_write(fileHandle,crystallite_Fp0, 'convergedFp') - call HDF5_write(fileHandle,crystallite_Fi0, 'convergedFi') - call HDF5_write(fileHandle,crystallite_Lp0, 'convergedLp') - call HDF5_write(fileHandle,crystallite_Li0, 'convergedLi') - call HDF5_write(fileHandle,crystallite_S0, 'convergedS') + call HDF5_write(fileHandle,crystallite_partionedF, 'convergedF') + call HDF5_write(fileHandle,crystallite_Fp, 'convergedFp') + call HDF5_write(fileHandle,crystallite_Fi, 'convergedFi') + call HDF5_write(fileHandle,crystallite_Lp, 'convergedLp') + call HDF5_write(fileHandle,crystallite_Li, 'convergedLi') + call HDF5_write(fileHandle,crystallite_S, 'convergedS') groupPlastic = HDF5_addGroup(fileHandle,'PlasticPhases') do ph = 1,size(phase_plasticity) write(PlasticItem,*) ph,'_' - call HDF5_write(groupPlastic,plasticState(ph)%state0,trim(PlasticItem)//'convergedStateConst') + call HDF5_write(groupPlastic,plasticState(ph)%state,trim(PlasticItem)//'convergedStateConst') enddo call HDF5_closeGroup(groupPlastic) groupHomog = HDF5_addGroup(fileHandle,'HomogStates') do homog = 1, material_Nhomogenization write(HomogItem,*) homog,'_' - call HDF5_write(groupHomog,homogState(homog)%state0,trim(HomogItem)//'convergedStateHomog') + call HDF5_write(groupHomog,homogState(homog)%state,trim(HomogItem)//'convergedStateHomog') enddo call HDF5_closeGroup(groupHomog) diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 249555048..a217b0cbc 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -472,6 +472,7 @@ program DAMASK_spectral case(FIELD_DAMAGE_ID); call grid_damage_spectral_forward end select enddo + restartWrite = .false. !-------------------------------------------------------------------------------------------------- ! solve fields diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index f470249aa..1af44c65d 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -307,7 +307,7 @@ subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformat call utilities_updateCoords(F) if (restartWrite) then - write(6,'(/,a)') ' writing converged results for restart';flush(6) + write(6,'(a)') 'Writing current solver data for restart to file';flush(6) write(rankStr,'(a1,i0)')'_',worldrank fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w') @@ -326,7 +326,6 @@ subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformat call HDF5_closeFile(fileHandle) call CPFEM_restartWrite - restartWrite = .false. endif C_volAvgLastInc = C_volAvg diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index bee07a80b..79c46b07f 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -286,7 +286,7 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi call utilities_updateCoords(F) if (restartWrite) then - write(6,'(/,a)') ' writing converged results for restart';flush(6) + write(6,'(a)') 'Writing current solver data for restart to file';flush(6) write(rankStr,'(a1,i0)')'_',worldrank fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w') @@ -304,7 +304,6 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi call HDF5_closeFile(fileHandle) call CPFEM_restartWrite - restartWrite = .false. endif C_volAvgLastInc = C_volAvg diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index 200c902c9..21d16369b 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -307,7 +307,7 @@ subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loa call utilities_updateCoords(F) if (restartWrite) then - write(6,'(/,a)') ' writing converged results for restart';flush(6) + write(6,'(a)') 'Writing current solver data for restart to file';flush(6) write(rankStr,'(a1,i0)')'_',worldrank fileHandle = HDF5_openFile(trim(getSolverJobName())//trim(rankStr)//'.hdf5','w') @@ -326,7 +326,6 @@ subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loa call HDF5_closeFile(fileHandle) call CPFEM_restartWrite - restartWrite = .false. endif C_volAvgLastInc = C_volAvg diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 74060920b..87543b68c 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -1130,10 +1130,10 @@ subroutine utilities_saveReferenceStiffness fileUnit if (worldrank == 0) then - write(6,'(/,a)') ' writing reference stiffness to file' - flush(6) + write(6,'(a)') 'Writing current reference stiffness for restart to file';flush(6) fileUnit = IO_open_jobFile_binary('C_ref','w') - write(fileUnit) C_ref; close(fileUnit) + write(fileUnit) C_ref + close(fileUnit) endif end subroutine utilities_saveReferenceStiffness