loop over cells, not (element, IP)
This commit is contained in:
parent
04fdac6556
commit
b2b3a3f3f0
|
@ -156,9 +156,11 @@ subroutine materialpoint_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip,
|
||||||
materialpoint_dcsde(1:6,1:6,ip,elCP) = ODD_JACOBIAN * math_eye(6)
|
materialpoint_dcsde(1:6,1:6,ip,elCP) = ODD_JACOBIAN * math_eye(6)
|
||||||
|
|
||||||
else validCalculation
|
else validCalculation
|
||||||
call homogenization_mechanical_response(dt,(elCP-1)*discretization_nIPs + ip,(elCP-1)*discretization_nIPs + ip)
|
call homogenization_mechanical_response(dt,(elCP-1)*discretization_nIPs + ip, &
|
||||||
|
(elCP-1)*discretization_nIPs + ip)
|
||||||
if (.not. terminallyIll) &
|
if (.not. terminallyIll) &
|
||||||
call homogenization_mechanical_response2(dt,[ip,ip],[elCP,elCP])
|
call homogenization_mechanical_response2(dt,(elCP-1)*discretization_nIPs + ip, &
|
||||||
|
(elCP-1)*discretization_nIPs + ip)
|
||||||
|
|
||||||
terminalIllness: if (terminallyIll) then
|
terminalIllness: if (terminallyIll) then
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,&
|
||||||
if (.not. terminallyIll) &
|
if (.not. terminallyIll) &
|
||||||
call homogenization_thermal_response(Delta_t,1,product(cells(1:2))*cells3)
|
call homogenization_thermal_response(Delta_t,1,product(cells(1:2))*cells3)
|
||||||
if (.not. terminallyIll) &
|
if (.not. terminallyIll) &
|
||||||
call homogenization_mechanical_response2(Delta_t,[1,1],[1,product(cells(1:2))*cells3])
|
call homogenization_mechanical_response2(Delta_t,1,product(cells(1:2))*cells3)
|
||||||
|
|
||||||
P = reshape(homogenization_P, [3,3,cells(1),cells(2),cells3])
|
P = reshape(homogenization_P, [3,3,cells(1),cells(2),cells3])
|
||||||
P_av = sum(sum(sum(P,dim=5),dim=4),dim=3) * wgt
|
P_av = sum(sum(sum(P,dim=5),dim=4),dim=3) * wgt
|
||||||
|
|
|
@ -273,6 +273,7 @@ subroutine homogenization_thermal_response(Delta_t,cell_start,cell_end)
|
||||||
real(pREAL), intent(in) :: Delta_t !< time increment
|
real(pREAL), intent(in) :: Delta_t !< time increment
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
cell_start, cell_end
|
cell_start, cell_end
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
co, ce, ho
|
co, ce, ho
|
||||||
|
|
||||||
|
@ -296,37 +297,33 @@ end subroutine homogenization_thermal_response
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief
|
!> @brief
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_mechanical_response2(Delta_t,FEsolving_execIP,FEsolving_execElem)
|
subroutine homogenization_mechanical_response2(Delta_t,cell_start,cell_end)
|
||||||
|
|
||||||
real(pREAL), intent(in) :: Delta_t !< time increment
|
real(pREAL), intent(in) :: Delta_t !< time increment
|
||||||
integer, dimension(2), intent(in) :: FEsolving_execElem, FEsolving_execIP
|
integer, intent(in) :: &
|
||||||
|
cell_start, cell_end
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
ip, & !< integration point number
|
|
||||||
el, & !< element number
|
|
||||||
co, ce, ho
|
co, ce, ho
|
||||||
|
|
||||||
|
|
||||||
!$OMP PARALLEL DO PRIVATE(ho,ce)
|
!$OMP PARALLEL DO PRIVATE(ho)
|
||||||
elementLooping3: do el = FEsolving_execElem(1),FEsolving_execElem(2)
|
do ce = cell_start, cell_end
|
||||||
IpLooping3: do ip = FEsolving_execIP(1),FEsolving_execIP(2)
|
|
||||||
ce = (el-1)*discretization_nIPs + ip
|
|
||||||
ho = material_ID_homogenization(ce)
|
ho = material_ID_homogenization(ce)
|
||||||
do co = 1, homogenization_Nconstituents(ho)
|
do co = 1, homogenization_Nconstituents(ho)
|
||||||
call crystallite_orientations(co,ce)
|
call crystallite_orientations(co,ce)
|
||||||
end do
|
end do
|
||||||
call mechanical_homogenize(Delta_t,ce)
|
call mechanical_homogenize(Delta_t,ce)
|
||||||
end do IpLooping3
|
end do
|
||||||
end do elementLooping3
|
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
|
|
||||||
end subroutine homogenization_mechanical_response2
|
end subroutine homogenization_mechanical_response2
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief writes homogenization results to HDF5 output file
|
!> @brief writes homogenization results to HDF5 output file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_result
|
subroutine homogenization_result()
|
||||||
|
|
||||||
integer :: ho
|
integer :: ho
|
||||||
character(len=:), allocatable :: group_base,group
|
character(len=:), allocatable :: group_base,group
|
||||||
|
@ -361,7 +358,7 @@ end subroutine homogenization_result
|
||||||
!> @brief Forward data after successful increment.
|
!> @brief Forward data after successful increment.
|
||||||
! ToDo: Any guessing for the current states possible?
|
! ToDo: Any guessing for the current states possible?
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_forward
|
subroutine homogenization_forward()
|
||||||
|
|
||||||
integer :: ho
|
integer :: ho
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ subroutine utilities_constitutiveResponse(Delta_t,P_av,forwardData)
|
||||||
|
|
||||||
call homogenization_mechanical_response(Delta_t,1,mesh_maxNips*mesh_NcpElems) ! calculate P field
|
call homogenization_mechanical_response(Delta_t,1,mesh_maxNips*mesh_NcpElems) ! calculate P field
|
||||||
if (.not. terminallyIll) &
|
if (.not. terminallyIll) &
|
||||||
call homogenization_mechanical_response2(Delta_t,[1,mesh_maxNips],[1,mesh_NcpElems])
|
call homogenization_mechanical_response2(Delta_t,1,mesh_maxNips*mesh_NcpElems)
|
||||||
cutBack = .false.
|
cutBack = .false.
|
||||||
|
|
||||||
P_av = sum(homogenization_P,dim=3) * wgt
|
P_av = sum(homogenization_P,dim=3) * wgt
|
||||||
|
|
|
@ -607,7 +607,7 @@ end function crystallite_push33ToRef
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief determines whether a point is converged
|
!> @brief Determine whether a point is converged.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
logical pure function converged(residuum,state,atol)
|
logical pure function converged(residuum,state,atol)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue