diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 1af44c65d..9169cbc32 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -303,8 +303,7 @@ subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformat if (cutBack) then C_volAvg = C_volAvgLastInc else - call CPFEM_age ! age state and kinematics - call utilities_updateCoords(F) + if (restartWrite) then write(6,'(a)') 'Writing current solver data for restart to file';flush(6) @@ -327,6 +326,9 @@ subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformat call CPFEM_restartWrite endif + + call CPFEM_age ! age state and kinematics + call utilities_updateCoords(F) C_volAvgLastInc = C_volAvg diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index 79c46b07f..e5d35a5fa 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -282,8 +282,7 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi C_volAvg = C_volAvgLastInc C_minMaxAvg = C_minMaxAvgLastInc else - call CPFEM_age ! age state and kinematics - call utilities_updateCoords(F) + if (restartWrite) then write(6,'(a)') 'Writing current solver data for restart to file';flush(6) @@ -306,6 +305,9 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi call CPFEM_restartWrite endif + call CPFEM_age ! age state and kinematics + call utilities_updateCoords(F) + C_volAvgLastInc = C_volAvg C_minMaxAvgLastInc = C_minMaxAvg diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index 21d16369b..ac60d7155 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -303,9 +303,7 @@ subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loa C_volAvg = C_volAvgLastInc C_minMaxAvg = C_minMaxAvgLastInc else - call CPFEM_age ! age state and kinematics - call utilities_updateCoords(F) - + if (restartWrite) then write(6,'(a)') 'Writing current solver data for restart to file';flush(6) @@ -327,7 +325,10 @@ subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loa call CPFEM_restartWrite endif - + + call CPFEM_age ! age state and kinematics + call utilities_updateCoords(F) + C_volAvgLastInc = C_volAvg C_minMaxAvgLastInc = C_minMaxAvg