Skip to content

Commit

Permalink
Merge branch 'solver-cleanup' into 'development'
Browse files Browse the repository at this point in the history
was a 'write-only' variable

See merge request damask/DAMASK!885
  • Loading branch information
sharanroongta committed Dec 24, 2023
2 parents 1bf1695 + 169bc97 commit 0f69eff
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/Marc/materialpoint_Marc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/grid/grid_mech_FEM.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

!--------------------------------------------------------------------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions src/grid/grid_mech_spectral_basic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

!--------------------------------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/grid/grid_mech_spectral_polarization.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

!--------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/grid/spectral_utilities.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/homogenization.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/homogenization_mechanical.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion src/mesh/mesh_mech_FEM.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f69eff

Please sign in to comment.