checked and improved on Franz' one call to CPFEM only improvement
This commit is contained in:
parent
96577b18fb
commit
d1985e0bef
|
@ -683,9 +683,16 @@ subroutine utilities_constitutiveResponse(F_lastInc,F,temperature,timeinc,&
|
||||||
restartWrite
|
restartWrite
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
res, &
|
res, &
|
||||||
wgt
|
wgt, &
|
||||||
|
mesh_NcpElems
|
||||||
use CPFEM, only: &
|
use CPFEM, only: &
|
||||||
CPFEM_general
|
CPFEM_general
|
||||||
|
use homogenization, only: &
|
||||||
|
materialpoint_F0, &
|
||||||
|
materialpoint_F, &
|
||||||
|
materialpoint_Temperature, &
|
||||||
|
materialpoint_P, &
|
||||||
|
materialpoint_dPdF
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), intent(inout) :: temperature !< temperature (no field)
|
real(pReal), intent(inout) :: temperature !< temperature (no field)
|
||||||
|
@ -738,28 +745,28 @@ subroutine utilities_constitutiveResponse(F_lastInc,F,temperature,timeinc,&
|
||||||
if (DebugGeneral) write(6,'(/,2(a,i1.1))') ' collect mode: ', collectMode,' calc mode: ', calcMode
|
if (DebugGeneral) write(6,'(/,2(a,i1.1))') ' collect mode: ', collectMode,' calc mode: ', calcMode
|
||||||
flush(6)
|
flush(6)
|
||||||
|
|
||||||
ielem = 0_pInt
|
call CPFEM_general(collectMode,F_lastInc(1:3,1:3,1,1,1),F(1:3,1:3,1,1,1), & ! collect mode handles Jacobian backup / restoration
|
||||||
do k = 1_pInt, res(3); do j = 1_pInt, res(2); do i = 1_pInt, res(1)
|
temperature,timeinc,1_pInt,1_pInt,sigma,dsde,P(1:3,1:3,1,1,1),dPdF)
|
||||||
ielem = ielem + 1_pInt
|
|
||||||
call CPFEM_general(collectMode,& ! collect cycle
|
materialpoint_F0 = reshape(F_lastInc, [3,3,1,mesh_NcpElems])
|
||||||
F_lastInc(1:3,1:3,i,j,k),F(1:3,1:3,i,j,k), &
|
write(6,*) 'mat_F0'
|
||||||
temperature,timeinc,ielem,1_pInt,sigma,dsde,P(1:3,1:3,i,j,k),dPdF)
|
flush(6)
|
||||||
collectMode = 3_pInt
|
materialpoint_F = reshape(F, [3,3,1,mesh_NcpElems])
|
||||||
enddo; enddo; enddo
|
write(6,*) 'mat_F'
|
||||||
|
flush(6)
|
||||||
|
materialpoint_Temperature = temperature
|
||||||
|
|
||||||
P = 0.0_pReal ! needed because of the padding for FFTW
|
|
||||||
C = 0.0_pReal
|
|
||||||
ielem = 0_pInt
|
|
||||||
call debug_reset()
|
call debug_reset()
|
||||||
do k = 1_pInt, res(3); do j = 1_pInt, res(2); do i = 1_pInt, res(1)
|
|
||||||
ielem = ielem + 1_pInt
|
call CPFEM_general(calcMode,F_lastInc(1:3,1:3,1,1,1), F(1:3,1:3,1,1,1), & ! first call calculates everything
|
||||||
call CPFEM_general(calcMode,& ! first element in first iteration retains CPFEM_mode 1,
|
temperature,timeinc,1_pInt,1_pInt,sigma,dsde,P(1:3,1:3,1,1,1),dPdF)
|
||||||
F_lastInc(1:3,1:3,i,j,k), F(1:3,1:3,i,j,k), & ! others get 2 (saves winding forward effort)
|
|
||||||
temperature,timeinc,ielem,1_pInt,sigma,dsde,P(1:3,1:3,i,j,k),dPdF)
|
P = reshape(materialpoint_P, [3,3,res(1),res(2),res(3)])
|
||||||
calcMode = 2_pInt
|
write(6,*) 'mat_P'
|
||||||
C = C + dPdF
|
flush(6)
|
||||||
enddo; enddo; enddo
|
C = sum(sum(materialpoint_dPdF,dim=6),dim=5) * wgt
|
||||||
C = C * wgt
|
write(6,*) 'mat_dPdF'
|
||||||
|
flush(6)
|
||||||
call debug_info()
|
call debug_info()
|
||||||
|
|
||||||
restartWrite = .false. ! reset restartWrite status
|
restartWrite = .false. ! reset restartWrite status
|
||||||
|
|
Loading…
Reference in New Issue