polished debugging output

This commit is contained in:
Christoph Kords 2012-12-03 16:29:54 +00:00
parent 2d4cf7da74
commit f2dacb5f40
1 changed files with 41 additions and 36 deletions

View File

@ -807,9 +807,9 @@ do while (any(crystallite_todo(:,:,FEsolving_execELem(1):FEsolving_execElem(2)))
if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt & if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt &
.and. ((e == debug_e .and. i == debug_i .and. g == debug_g) & .and. ((e == debug_e .and. i == debug_i .and. g == debug_g) &
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then .or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then
write(6,'(a,f12.8,a,f12.8,a)') '<< CRYST >> winding forward from ', & write(6,'(a,f12.8,a,f12.8,a,i8,1x,i2,1x,i3)') '<< CRYST >> winding forward from ', &
crystallite_subFrac(g,i,e)-formerSubStep,' to current crystallite_subfrac ', & crystallite_subFrac(g,i,e)-formerSubStep,' to current crystallite_subfrac ', &
crystallite_subFrac(g,i,e),' in crystallite_stressAndItsTangent' crystallite_subFrac(g,i,e),' in crystallite_stressAndItsTangent at el ip g ',e,i,g
write(6,*) write(6,*)
endif endif
#endif #endif
@ -845,12 +845,17 @@ do while (any(crystallite_todo(:,:,FEsolving_execELem(1):FEsolving_execElem(2)))
crystallite_todo(g,i,e) = crystallite_subStep(g,i,e) > subStepMinCryst ! still on track or already done (beyond repair) crystallite_todo(g,i,e) = crystallite_subStep(g,i,e) > subStepMinCryst ! still on track or already done (beyond repair)
!$OMP FLUSH(crystallite_todo) !$OMP FLUSH(crystallite_todo)
#ifndef _OPENMP #ifndef _OPENMP
if (crystallite_todo(g,i,e) & if(iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt &
.and. iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt &
.and. ((e == debug_e .and. i == debug_i .and. g == debug_g) & .and. ((e == debug_e .and. i == debug_i .and. g == debug_g) &
.or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then .or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then
write(6,'(a,f12.8)') '<< CRYST >> cutback step in crystallite_stressAndItsTangent with new crystallite_subStep: ',& if (crystallite_todo(g,i,e)) then
crystallite_subStep(g,i,e) write(6,'(a,f12.8,a,i8,1x,i2,1x,i3)') '<< CRYST >> cutback step in crystallite_stressAndItsTangent &
&with new crystallite_subStep: ',&
crystallite_subStep(g,i,e),' at el ip g ',e,i,g
else
write(6,'(a,i8,1x,i2,1x,i3)') '<< CRYST >> reached minimum step size &
&in crystallite_stressAndItsTangent at el ip g ',e,i,g
endif
write(6,*) write(6,*)
endif endif
#endif #endif
@ -3098,8 +3103,8 @@ LpLoop: do
Fe = math_mul33x33(A,B) ! current elastic deformation tensor Fe = math_mul33x33(A,B) ! current elastic deformation tensor
call constitutive_TandItsTangent(Tstar, dT_dFe3333, Fe, g,i,e) ! call constitutive law to calculate 2nd Piola-Kirchhoff stress and its derivative call constitutive_TandItsTangent(Tstar, dT_dFe3333, Fe, g,i,e) ! call constitutive law to calculate 2nd Piola-Kirchhoff stress and its derivative
Tstar_v = math_Mandel33to6(Tstar) Tstar_v = math_Mandel33to6(Tstar)
p_hydro = sum(Tstar_v(1:3)) / 3.0_pReal ! p_hydro = sum(Tstar_v(1:3)) / 3.0_pReal
forall(n=1_pInt:3_pInt) Tstar_v(n) = Tstar_v(n) - p_hydro ! get deviatoric stress tensor ! forall(n=1_pInt:3_pInt) Tstar_v(n) = Tstar_v(n) - p_hydro ! get deviatoric stress tensor
!* calculate plastic velocity gradient and its tangent from constitutive law !* calculate plastic velocity gradient and its tangent from constitutive law
@ -3211,7 +3216,7 @@ enddo LpLoop
!* calculate new plastic and elastic deformation gradient !* calculate new plastic and elastic deformation gradient
invFp_new = math_mul33x33(invFp_current,B) invFp_new = math_mul33x33(invFp_current,B)
invFp_new = invFp_new/math_det33(invFp_new)**(1.0_pReal/3.0_pReal) ! regularize by det ! invFp_new = invFp_new/math_det33(invFp_new)**(1.0_pReal/3.0_pReal) ! regularize by det
call math_invert33(invFp_new,Fp_new,det,error) call math_invert33(invFp_new,Fp_new,det,error)
if (error .or. any(Fp_new/=Fp_new)) then if (error .or. any(Fp_new/=Fp_new)) then
#ifndef _OPENMP #ifndef _OPENMP
@ -3233,7 +3238,7 @@ Fe_new = math_mul33x33(Fg_new,invFp_new) ! calc resu
!* add volumetric component to 2nd Piola-Kirchhoff stress and calculate 1st Piola-Kirchhoff stress !* add volumetric component to 2nd Piola-Kirchhoff stress and calculate 1st Piola-Kirchhoff stress
forall (n=1_pInt:3_pInt) Tstar_v(n) = Tstar_v(n) + p_hydro ! forall (n=1_pInt:3_pInt) Tstar_v(n) = Tstar_v(n) + p_hydro
crystallite_P(1:3,1:3,g,i,e) = math_mul33x33(Fe_new, math_mul33x33(math_Mandel6to33(Tstar_v), math_transpose33(invFp_new))) crystallite_P(1:3,1:3,g,i,e) = math_mul33x33(Fe_new, math_mul33x33(math_Mandel6to33(Tstar_v), math_transpose33(invFp_new)))