From 169bc977d7061b75b4ec30a082cb7c50164b3dda Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 23 Dec 2023 22:39:23 +0100 Subject: [PATCH] was a 'write-only' variable --- src/Marc/materialpoint_Marc.f90 | 1 - src/grid/grid_mech_FEM.f90 | 2 -- src/grid/grid_mech_spectral_basic.f90 | 3 --- src/grid/grid_mech_spectral_polarization.f90 | 2 -- src/grid/spectral_utilities.f90 | 2 +- src/homogenization.f90 | 1 - src/homogenization_mechanical.f90 | 3 +-- src/mesh/mesh_mech_FEM.f90 | 1 - 8 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Marc/materialpoint_Marc.f90 b/src/Marc/materialpoint_Marc.f90 index 0e3835924..bce0e6db6 100644 --- a/src/Marc/materialpoint_Marc.f90 +++ b/src/Marc/materialpoint_Marc.f90 @@ -142,7 +142,6 @@ subroutine materialpoint_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, if (iand(mode, materialpoint_AGERESULTS) /= 0) call materialpoint_forward - homogenization_F0(1:3,1:3,ce) = ffn homogenization_F(1:3,1:3,ce) = ffn1 if (iand(mode, materialpoint_CALCRESULTS) /= 0) then diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 754942ae1..f7346055f 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -269,7 +269,6 @@ subroutine grid_mechanical_FEM_init(num_grid) F = spread(spread(spread(math_I3,3,cells(1)),4,cells(2)),5,cells3) end if restartRead - homogenization_F0 = reshape(F_lastInc, [3,3,product(cells(1:2))*cells3]) ! set starting condition for homogenization_mechanical_response call utilities_updateCoords(F) call utilities_constitutiveResponse(P_current,P_av,C_volAvg,devNull, & ! stress field, stress avg, global average of stiffness and (min+max)/2 F, & ! target F @@ -390,7 +389,6 @@ subroutine grid_mechanical_FEM_forward(cutBack,guess,Delta_t,Delta_t_old,t_remai F_lastInc = F - homogenization_F0 = reshape(F, [3,3,product(cells(1:2))*cells3]) end if !-------------------------------------------------------------------------------------------------- diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index 5bcfec438..3fad9d59c 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -226,7 +226,6 @@ subroutine grid_mechanical_spectral_basic_init(num_grid) F = reshape(F_lastInc,[9,cells(1),cells(2),cells3]) end if restartRead - homogenization_F0 = reshape(F_lastInc, [3,3,product(cells(1:2))*cells3]) ! set starting condition for homogenization_mechanical_response call utilities_updateCoords(reshape(F,shape(F_lastInc))) call utilities_constitutiveResponse(P,P_av,C_volAvg,C_minMaxAvg, & ! stress field, stress avg, global average of stiffness and (min+max)/2 reshape(F,shape(F_lastInc)), & ! target F @@ -347,8 +346,6 @@ subroutine grid_mechanical_spectral_basic_forward(cutBack,guess,Delta_t,Delta_t_ F_lastInc,reshape(F,[3,3,cells(1),cells(2),cells3]),Delta_t_old, & rotation_BC%rotate(F_aimDot,active=.true.)) F_lastInc = reshape(F,[3,3,cells(1),cells(2),cells3]) - - homogenization_F0 = reshape(F,[3,3,product(cells(1:2))*cells3]) end if !-------------------------------------------------------------------------------------------------- diff --git a/src/grid/grid_mech_spectral_polarization.f90 b/src/grid/grid_mech_spectral_polarization.f90 index efa1a64a9..3b7cbda14 100644 --- a/src/grid/grid_mech_spectral_polarization.f90 +++ b/src/grid/grid_mech_spectral_polarization.f90 @@ -255,7 +255,6 @@ subroutine grid_mechanical_spectral_polarization_init(num_grid) F_tau_lastInc = 2.0_pREAL*F_lastInc end if restartRead - homogenization_F0 = reshape(F_lastInc, [3,3,product(cells(1:2))*cells3]) ! set starting condition for homogenization_mechanical_response call utilities_updateCoords(reshape(F,shape(F_lastInc))) call utilities_constitutiveResponse(P,P_av,C_volAvg,C_minMaxAvg, & ! stress field, stress avg, global average of stiffness and (min+max)/2 reshape(F,shape(F_lastInc)), & ! target F @@ -391,7 +390,6 @@ subroutine grid_mechanical_spectral_polarization_forward(cutBack,guess,Delta_t,D F_lastInc = reshape(F, [3,3,cells(1),cells(2),cells3]) F_tau_lastInc = reshape(F_tau,[3,3,cells(1),cells(2),cells3]) - homogenization_F0 = reshape(F,[3,3,product(cells(1:2))*cells3]) end if !-------------------------------------------------------------------------------------------------- diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 9ed5cbe17..19f497d57 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -756,7 +756,7 @@ end function utilities_vectorDivergence !-------------------------------------------------------------------------------------------------- -!> @brief calculate constitutive response from homogenization_F0 to F during Delta_t +!> @brief Calculate constitutive response. !-------------------------------------------------------------------------------------------------- subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,& F,Delta_t,rotation_BC) diff --git a/src/homogenization.f90 b/src/homogenization.f90 index ebb18b232..366e38053 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -52,7 +52,6 @@ module homogenization !-------------------------------------------------------------------------------------------------- ! General variables for the homogenization at a material point real(pREAL), dimension(:,:,:), allocatable, public :: & - homogenization_F0, & !< def grad of IP at start of FE increment homogenization_F !< def grad of IP to be reached at end of FE increment real(pREAL), dimension(:,:,:), allocatable, public :: & !, protected :: & Issue with ifort homogenization_P !< first P--K stress of IP diff --git a/src/homogenization_mechanical.f90 b/src/homogenization_mechanical.f90 index 31bd42aa5..6a0d916fb 100644 --- a/src/homogenization_mechanical.f90 +++ b/src/homogenization_mechanical.f90 @@ -77,8 +77,7 @@ module subroutine mechanical_init() call parseMechanical() allocate(homogenization_dPdF(3,3,3,3,discretization_Ncells), source=0.0_pREAL) - homogenization_F0 = spread(math_I3,3,discretization_Ncells) - homogenization_F = homogenization_F0 + homogenization_F = spread(math_I3,3,discretization_Ncells) allocate(homogenization_P(3,3,discretization_Ncells),source=0.0_pREAL) if (any(mechanical_type == MECHANICAL_PASS_ID)) call pass_init() diff --git a/src/mesh/mesh_mech_FEM.f90 b/src/mesh/mesh_mech_FEM.f90 index 824ebecdd..f3c08c16c 100644 --- a/src/mesh/mesh_mech_FEM.f90 +++ b/src/mesh/mesh_mech_FEM.f90 @@ -686,7 +686,6 @@ subroutine FEM_mechanical_forward(guess,Delta_t,Delta_t_prev,mechBC) ! forward last inc if (guess .and. .not. cutBack) then ForwardData = .True. - homogenization_F0 = homogenization_F call SNESGetDM(mechanical_snes,dm_local,err_PETSc) !< retrieve mesh info from mechanical_snes into dm_local CHKERRQ(err_PETSc) call DMGetSection(dm_local,section,err_PETSc)