corrected indentation level of parts of the code
moved debugging output of stress and stiffness to different position in code
This commit is contained in:
parent
ac2ca43cfc
commit
728facd451
|
@ -469,7 +469,9 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
materialpoint_F(1:3,1:3,IP,cp_en) = ffn1
|
||||
endif
|
||||
|
||||
|
||||
if (iand(mode, CPFEM_CALCRESULTS) /= 0_pInt) then
|
||||
|
||||
!*** deformation gradient outdated or any actual deformation gradient differs more than relevantStrain from the stored one
|
||||
|
||||
if (terminallyIll .or. outdatedFFN1 .or. any(abs(ffn1 - materialpoint_F(1:3,1:3,IP,cp_en)) > defgradTolerance)) then
|
||||
|
@ -526,7 +528,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
CPFEM_calc_done = .true.
|
||||
endif
|
||||
|
||||
!*** map stress and stiffness (or return odd values if terminally ill)
|
||||
!* map stress and stiffness (or return odd values if terminally ill)
|
||||
|
||||
if ( terminallyIll ) then
|
||||
call random_number(rnd)
|
||||
|
@ -562,10 +564,26 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
CPFEM_dcsde(1:6,1:6,IP,cp_en) = math_Mandel3333to66(J_inverse * H_sym)
|
||||
endif
|
||||
endif
|
||||
|
||||
!* report stress and stiffness
|
||||
|
||||
if ((iand(debug_level(debug_CPFEM), debug_levelExtensive) /= 0_pInt) &
|
||||
.and. ((debug_e == cp_en .and. debug_i == IP) &
|
||||
.or. .not. iand(debug_level(debug_CPFEM), debug_levelSelective) /= 0_pInt)) then
|
||||
!$OMP CRITICAL (write2out)
|
||||
write(6,'(a,i8,1x,i2,/,12x,6(f10.3,1x)/)') '<< CPFEM >> stress/MPa at el ip ', &
|
||||
cp_en, IP, CPFEM_cs(1:6,IP,cp_en)/1.0e6_pReal
|
||||
write(6,'(a,i8,1x,i2,/,6(12x,6(f10.3,1x)/))') '<< CPFEM >> Jacobian/GPa at el ip ', &
|
||||
cp_en, IP, transpose(CPFEM_dcsdE(1:6,1:6,IP,cp_en))/1.0e9_pReal
|
||||
flush(6)
|
||||
!$OMP END CRITICAL (write2out)
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! collection of FEM input with returning of randomize odd stress and jacobian
|
||||
endif
|
||||
|
||||
|
||||
!*** collection of FEM input with returning of randomize odd stress and jacobian
|
||||
|
||||
if (iand(mode, CPFEM_BACKUPJACOBIAN) /= 0_pInt) &
|
||||
CPFEM_dcsde_knownGood = CPFEM_dcsde
|
||||
if (iand(mode, CPFEM_RESTOREJACOBIAN) /= 0_pInt) &
|
||||
|
@ -582,30 +600,23 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
CPFEM_calc_done = .false.
|
||||
endif
|
||||
|
||||
|
||||
!*** homogenized result except for potentially non-isothermal starting condition
|
||||
|
||||
if (theTime > 0.0_pReal) then
|
||||
Temperature = materialpoint_Temperature(IP,cp_en) ! homogenized result except for potentially non-isothermal starting condition.
|
||||
Temperature = materialpoint_Temperature(IP,cp_en)
|
||||
endif
|
||||
|
||||
if ((iand(mode, CPFEM_CALCRESULTS) /= 0_pInt) .and. (iand(debug_level(debug_CPFEM), debug_levelExtensive) /= 0_pInt) &
|
||||
.and. ((debug_e == cp_en .and. debug_i == IP) &
|
||||
.or. .not. iand(debug_level(debug_CPFEM), debug_levelSelective) /= 0_pInt)) then
|
||||
!$OMP CRITICAL (write2out)
|
||||
write(6,'(a,i8,1x,i2,/,12x,6(f10.3,1x)/)') '<< CPFEM >> stress/MPa at el ip ', &
|
||||
cp_en, IP, CPFEM_cs(1:6,IP,cp_en)/1.0e6_pReal
|
||||
write(6,'(a,i8,1x,i2,/,6(12x,6(f10.3,1x)/))') '<< CPFEM >> Jacobian/GPa at el ip ', &
|
||||
cp_en, IP, transpose(CPFEM_dcsdE(1:6,1:6,IP,cp_en))/1.0e9_pReal
|
||||
flush(6)
|
||||
!$OMP END CRITICAL (write2out)
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! warn if stiffness close to zero
|
||||
!*** warn if stiffness close to zero
|
||||
|
||||
if (all(abs(CPFEM_dcsdE(1:6,1:6,IP,cp_en)) < 1e-10_pReal)) then
|
||||
call IO_warning(601,cp_en,IP)
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! remember extreme values of stress and jacobian
|
||||
|
||||
!*** remember extreme values of stress and jacobian
|
||||
|
||||
if (iand(mode, CPFEM_CALCRESULTS) /= 0_pInt) then
|
||||
cauchyStress33 = math_Mandel6to33(CPFEM_cs(1:6,IP,cp_en))
|
||||
if (maxval(cauchyStress33) > debug_stressMax) then
|
||||
|
@ -627,8 +638,9 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
endif
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! copy to output if required (FEM solver)
|
||||
|
||||
!*** copy to output if required (FEM solver)
|
||||
|
||||
if(present(cauchyStress)) cauchyStress = CPFEM_cs(1:6,IP,cp_en)
|
||||
if(present(jacobian)) jacobian = CPFEM_dcsdE(1:6,1:6,IP,cp_en)
|
||||
|
||||
|
|
Loading…
Reference in New Issue