diff --git a/code/CPFEM.f90 b/code/CPFEM.f90 index b273518ce..effa2b4a1 100644 --- a/code/CPFEM.f90 +++ b/code/CPFEM.f90 @@ -266,7 +266,8 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt materialpoint_Temperature, & materialpoint_stressAndItsTangent, & materialpoint_postResults - use IO, only: IO_write_jobBinaryFile + use IO, only: IO_write_jobBinaryFile, & + IO_warning use mpie_interface implicit none @@ -537,6 +538,11 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt pstress(:,:) = materialpoint_P(:,:,IP,cp_en) dPdF(:,:,:,:) = materialpoint_dPdF(:,:,:,:,IP,cp_en) + ! warning for zero stiffness + if (all(abs(jacobian) < 1e-10_pReal)) then + call IO_warning(601,cp_en,IP) + endif + if (selectiveDebugger .and. cp_en == debug_e .and. IP == debug_i .and. mode < 6) then !$OMP CRITICAL (write2out) write(6,'(a,x,i2,x,a,x,i4,/,6(f10.3,x)/)') 'stress/MPa at ip', IP, 'el', cp_en, cauchyStress/1e6 diff --git a/code/IO.f90 b/code/IO.f90 index 3202f1772..104674bb1 100644 --- a/code/IO.f90 +++ b/code/IO.f90 @@ -1377,6 +1377,8 @@ endfunction msg = '+ crystallite debugging off... +' case (600) msg = '+ crystallite responds elastically +' + case (601) + msg = '+ stiffness close to zero +' case (650) msg = '+ polar decomposition failed +' case (700) @@ -1393,10 +1395,14 @@ endfunction write(6,'(a38)') msg if (present(ext_msg)) write(6,*) '+ ',ext_msg if (present(e)) then - if (present(i) .and. present(g)) then - write(6,'(a12,x,i6,x,a2,x,i2,x,a5,x,i4,a2)') '+ at element',e,'IP',i,'grain',g,' +' + if (present(i)) then + if (present(g)) then + write(6,'(a12,x,i6,x,a2,x,i2,x,a5,x,i4,a2)') '+ at element',e,'IP',i,'grain',g,' +' + else + write(6,'(a12,x,i6,x,a2,x,i2,a13)') '+ at element',e,'IP',i,' +' + endif else - write(6,'(a17,i6,a14)') '+ at ',e,' +' + write(6,'(a12,x,i6,a19)') '+ at element',e,' +' endif endif write(6,'(a38)') '+------------------------------------+'