diff --git a/src/CPFEM2.f90 b/src/CPFEM2.f90 index a606856c1..64c33703a 100644 --- a/src/CPFEM2.f90 +++ b/src/CPFEM2.f90 @@ -33,7 +33,7 @@ module CPFEM2 private public :: & - CPFEM_age, & + CPFEM_forward, & CPFEM_initAll, & CPFEM_results, & CPFEM_restartWrite @@ -123,7 +123,7 @@ end subroutine CPFEM_init !-------------------------------------------------------------------------------------------------- !> @brief Forward data after successful increment. !-------------------------------------------------------------------------------------------------- -subroutine CPFEM_age +subroutine CPFEM_forward integer :: i, homog, mySource @@ -150,7 +150,7 @@ subroutine CPFEM_age damageState (homog)%state0 = damageState (homog)%state enddo -end subroutine CPFEM_age +end subroutine CPFEM_forward !-------------------------------------------------------------------------------------------------- diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 7ffa8fcd7..397a53c13 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -481,6 +481,7 @@ program DAMASK_spectral case(FIELD_DAMAGE_ID); call grid_damage_spectral_forward end select enddo + call CPFEM_forward !-------------------------------------------------------------------------------------------------- ! solve fields @@ -518,7 +519,6 @@ program DAMASK_spectral if ( (all(solres(:)%converged .and. solres(:)%stagConverged)) & ! converged .and. .not. solres(1)%termIll) then ! and acceptable solution found call mech_age - call CPFEM_age timeIncOld = timeinc cutBack = .false. guess = .true. ! start guessing after first converged (sub)inc diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index b50b52885..f7a0d796f 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -338,6 +338,8 @@ subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformat F_lastInc = F ! winding F forward endif + materialpoint_F0 = reshape(F, [3,3,1,product(grid(1:2))*grid3]) + !-------------------------------------------------------------------------------------------------- ! update average and local deformation gradients F_aim = F_aim_lastInc + F_aimDot * timeinc @@ -354,7 +356,6 @@ end subroutine grid_mech_FEM_forward !-------------------------------------------------------------------------------------------------- subroutine grid_mech_FEM_age() - materialpoint_F0 = reshape(F, [3,3,1,product(grid(1:2))*grid3]) call utilities_updateCoords(F) end subroutine grid_mech_FEM_age diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index c3f538680..46ef3145b 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -302,6 +302,8 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi math_rotate_backward33(F_aimDot,rotation_BC)) F_lastInc = reshape(F,[3,3,grid(1),grid(2),grid3]) ! winding F forward endif + + materialpoint_F0 = reshape(F, [3,3,1,product(grid(1:2))*grid3]) !-------------------------------------------------------------------------------------------------- ! update average and local deformation gradients @@ -322,7 +324,6 @@ subroutine grid_mech_spectral_basic_age() PetscScalar, dimension(:,:,:,:), pointer :: F call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr) - materialpoint_F0 = reshape(F, [3,3,1,product(grid(1:2))*grid3]) call utilities_updateCoords(F) call DMDAVecRestoreArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr) diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index 4c3f2de72..9c54b75d6 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -330,6 +330,8 @@ subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loa F_tau_lastInc = reshape(F_tau,[3,3,grid(1),grid(2),grid3]) ! winding F_tau forward endif + materialpoint_F0 = reshape(F,[3,3,1,product(grid(1:2))*grid3]) + !-------------------------------------------------------------------------------------------------- ! update average and local deformation gradients F_aim = F_aim_lastInc + F_aimDot * timeinc @@ -366,7 +368,6 @@ subroutine grid_mech_spectral_polarisation_age() call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr) F => FandF_tau(0:8,:,:,:) - materialpoint_F0 = reshape(F,[3,3,1,product(grid(1:2))*grid3]) call utilities_updateCoords(F) call DMDAVecRestoreArrayF90(da,solution_vec,FandF_tau,ierr); CHKERRQ(ierr)