diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 0925e54bf..24c9da274 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -60,7 +60,8 @@ program DAMASK_spectral remainingLoadCaseTime = 0.0_pReal !< remaining time of current load case logical :: & guess, & !< guess along former trajectory - stagIterate + stagIterate, & + cutBack = .false. integer :: & i, j, k, l, field, & errorID = 0, & @@ -472,13 +473,13 @@ program DAMASK_spectral select case(loadCases(currentLoadCase)%ID(field)) case(FIELD_MECH_ID) call mech_forward (& - guess,timeinc,timeIncOld,remainingLoadCaseTime, & + cutBack,guess,timeinc,timeIncOld,remainingLoadCaseTime, & deformation_BC = loadCases(currentLoadCase)%deformation, & stress_BC = loadCases(currentLoadCase)%stress, & rotation_BC = loadCases(currentLoadCase)%rotation) - case(FIELD_THERMAL_ID); call grid_thermal_spectral_forward - case(FIELD_DAMAGE_ID); call grid_damage_spectral_forward + case(FIELD_THERMAL_ID); call grid_thermal_spectral_forward(cutBack) + case(FIELD_DAMAGE_ID); call grid_damage_spectral_forward(cutBack) end select enddo if(.not. cutBack) call CPFEM_forward diff --git a/src/grid/grid_damage_spectral.f90 b/src/grid/grid_damage_spectral.f90 index 3a6fe2181..1fb91b49b 100644 --- a/src/grid/grid_damage_spectral.f90 +++ b/src/grid/grid_damage_spectral.f90 @@ -203,8 +203,9 @@ end function grid_damage_spectral_solution !-------------------------------------------------------------------------------------------------- !> @brief spectral damage forwarding routine !-------------------------------------------------------------------------------------------------- -subroutine grid_damage_spectral_forward +subroutine grid_damage_spectral_forward(cutBack) + logical, intent(in) :: cutBack integer :: i, j, k, cell DM :: dm_local PetscScalar, dimension(:,:,:), pointer :: x_scal diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index d81b071de..0c3844fcf 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -284,9 +284,11 @@ end function grid_mech_FEM_solution !> @details find new boundary conditions and best F estimate for end of current timestep !> possibly writing restart information, triggering of state increment in DAMASK, and updating of IPcoordinates !-------------------------------------------------------------------------------------------------- -subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation_BC,stress_BC,rotation_BC) +subroutine grid_mech_FEM_forward(cutBack,guess,timeinc,timeinc_old,loadCaseTime,& + deformation_BC,stress_BC,rotation_BC) logical, intent(in) :: & + cutBack, & guess real(pReal), intent(in) :: & timeinc_old, & diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index d0952b1ca..3dc978dc6 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -256,9 +256,11 @@ end function grid_mech_spectral_basic_solution !> @details find new boundary conditions and best F estimate for end of current timestep !> possibly writing restart information, triggering of state increment in DAMASK, and updating of IPcoordinates !-------------------------------------------------------------------------------------------------- -subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation_BC,stress_BC,rotation_BC) +subroutine grid_mech_spectral_basic_forward(cutBack,guess,timeinc,timeinc_old,loadCaseTime,& + deformation_BC,stress_BC,rotation_BC) logical, intent(in) :: & + cutBack, & guess real(pReal), intent(in) :: & timeinc_old, & diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index 0d9f56af4..c1b5d79c9 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -275,9 +275,11 @@ end function grid_mech_spectral_polarisation_solution !> @details find new boundary conditions and best F estimate for end of current timestep !> possibly writing restart information, triggering of state increment in DAMASK, and updating of IPcoordinates !-------------------------------------------------------------------------------------------------- -subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation_BC,stress_BC,rotation_BC) +subroutine grid_mech_spectral_polarisation_forward(cutBack,guess,timeinc,timeinc_old,loadCaseTime,& + deformation_BC,stress_BC,rotation_BC) - logical, intent(in) :: & + logical, intent(in) :: & + cutBack, & guess real(pReal), intent(in) :: & timeinc_old, & diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index 04b3ace66..c7f886f13 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -203,8 +203,9 @@ end function grid_thermal_spectral_solution !-------------------------------------------------------------------------------------------------- !> @brief forwarding routine !-------------------------------------------------------------------------------------------------- -subroutine grid_thermal_spectral_forward +subroutine grid_thermal_spectral_forward(cutBack) + logical, intent(in) :: cutBack integer :: i, j, k, cell DM :: dm_local PetscScalar, dimension(:,:,:), pointer :: x_scal diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index b85e84c86..1a3aefa35 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -22,9 +22,7 @@ module spectral_utilities private include 'fftw3-mpi.f03' - - logical, public :: cutBack = .false. !< cut back of BVP solver in case convergence is not achieved or a material point is terminally ill - + !-------------------------------------------------------------------------------------------------- ! field labels information enum, bind(c)