improved debug statements

This commit is contained in:
Tias Maiti 2015-08-04 21:26:22 +00:00
parent dfe0991134
commit 65d114e4f0
2 changed files with 36 additions and 8 deletions

View File

@ -709,7 +709,7 @@ subroutine constitutive_LiAndItsTangent(Li, dLi_dTstar3333, dLi_dFi3333, Tstar_v
end select
Li = Li + my_Li
dLi_dTstar3333 = dLi_dTstar3333 + my_dLi_dTstar
enddo
enddo
FiInv = math_inv33(Fi)
detFi = math_det33(Fi)

View File

@ -709,6 +709,10 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
NiterationCrystallite = 0_pInt
numerics_integrationMode = 1_pInt
cutbackLooping: do while (any(crystallite_todo(:,startIP:endIP,FEsolving_execELem(1):FEsolving_execElem(2))))
if (iand(debug_level(debug_crystallite),debug_levelExtensive) /= 0_pInt) &
write(6,'(a,i6)') '<< CRYST >> crystallite iteration ',NiterationCrystallite
timeSyncing1: if (any(.not. crystallite_localPlasticity) .and. numerics_timeSyncing) then
! Time synchronization can only be used for nonlocal calculations, and only there it makes sense.
@ -719,9 +723,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
! However, some synchronization of the time step has to be done at the border between "bad" ips
! and the ones that immediately converged.
if (iand(debug_level(debug_crystallite),debug_levelExtensive) /= 0_pInt) &
write(6,'(a,i6)') '<< CRYST >> crystallite iteration ',NiterationCrystallite
if (any(crystallite_syncSubFrac)) then
! Just did a time synchronization.
@ -937,6 +938,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
!$OMP END PARALLEL DO
endif timeSyncing1
!$OMP PARALLEL DO PRIVATE(myNgrains,formerSubStep)
elementLooping3: do e = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Ngrains(mesh_element(3,e))
@ -3686,7 +3688,7 @@ logical function crystallite_integrateStress(&
if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt &
.and. ((e == debug_e .and. i == debug_i .and. g == debug_g) &
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then
write(6,'(a,i3,/)') '<< CRYST >> iteration ', NiterationStressLp
write(6,'(a,i3,/)') '<< CRYST >> stress iteration ', NiterationStressLp
write(6,'(a,/,3(12x,3(e20.7,1x)/))') '<< CRYST >> Lp_constitutive', math_transpose33(Lp_constitutive)
write(6,'(a,/,3(12x,3(e20.7,1x)/))') '<< CRYST >> Lpguess', math_transpose33(Lpguess)
endif
@ -3780,6 +3782,14 @@ logical function crystallite_integrateStress(&
call constitutive_LiAndItsTangent(Li_constitutive, dLi_dT3333, dLi_dFi3333, &
Tstar_v, Fi_new, g, i, e)
#ifndef _OPENMP
if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt &
.and. ((e == debug_e .and. i == debug_i .and. g == debug_g) &
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then
write(6,'(a,/,3(12x,3(e20.7,1x)/))') '<< CRYST >> Li_constitutive', math_transpose33(Li_constitutive)
write(6,'(a,/,3(12x,3(e20.7,1x)/))') '<< CRYST >> Liguess', math_transpose33(Liguess)
endif
#endif
!* update current residuum and check for convergence of loop
aTolLi = max(rTol_crystalliteStress * max(math_norm33(Liguess),math_norm33(Li_constitutive)), & ! absolute tolerance from largest acceptable relative error
@ -3823,9 +3833,27 @@ logical function crystallite_integrateStress(&
#elif(FLOAT==4)
call sgesv(9,1,dRLi_dLi,9,ipiv,work,9,ierr) ! solve dRLi/dLp * delta Li = -res for delta Li
#endif
if (ierr /= 0_pInt) then
return
endif
if (ierr /= 0_pInt) then
#ifndef _OPENMP
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
write(6,'(a,i8,1x,a,i8,a,1x,i2,1x,i3,a,i3)') '<< CRYST >> integrateStress failed on dR/dLi inversion at el ip g ', &
e,mesh_element(1,e),i,g
if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt &
.and. ((e == debug_e .and. i == debug_i .and. g == debug_g)&
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then
write(6,*)
write(6,'(a,/,9(12x,9(e15.3,1x)/))') '<< CRYST >> dR_dLi',transpose(dRLi_dLi)
write(6,'(a,/,9(12x,9(e15.3,1x)/))') '<< CRYST >> dFe_dLi',transpose(math_Plain3333to99(dFe_dLi3333))
write(6,'(a,/,9(12x,9(e15.3,1x)/))') '<< CRYST >> dT_dFi_constitutive',transpose(math_Plain3333to99(dT_dFi3333))
write(6,'(a,/,9(12x,9(e15.3,1x)/))') '<< CRYST >> dLi_dT_constitutive',transpose(math_Plain3333to99(dLi_dT3333))
write(6,'(a,/,3(12x,3(e20.7,1x)/))') '<< CRYST >> Li_constitutive',math_transpose33(Li_constitutive)
write(6,'(a,/,3(12x,3(e20.7,1x)/))') '<< CRYST >> Liguess',math_transpose33(Liguess)
endif
endif
#endif
return
endif
deltaLi = - math_plain9to33(work)
endif
jacoCounterLi = jacoCounterLi + 1_pInt ! increase counter for jaco update