diff --git a/trunk/CPFEM.f90 b/trunk/CPFEM.f90 index 25d30b343..9af619596 100644 --- a/trunk/CPFEM.f90 +++ b/trunk/CPFEM.f90 @@ -504,7 +504,7 @@ real(pReal), parameter :: tol_outer = 1.0e-4_pReal integer(pInt), parameter :: ninner = 2000_pInt real(pReal), parameter :: tol_inner = 1.0e-3_pReal - real(pReal), parameter :: crite = 0.3_pReal + real(pReal), parameter :: crite = 1.0e-1_pReal ! crite=eta*constitutive_s0_slip/constitutive_n_slip !ÄÄÄ ! @@ -526,10 +526,11 @@ endif ! ! *** Calculation of A and T*0 (see Kalidindi) *** - A = matmul(Fg_new,invFp_old) + A = matmul(Fg_new,invFp_old) ! actually Fe A = matmul(transpose(A), A) C_66=constitutive_HomogenizedC(iori, CPFEM_in, cp_en) !ÄÄÄ - Tstar_v=matmul(C_66, math_Mandel33to6(A-math_I3)) + Tstar_v=matmul(C_66, math_Mandel33to6(A-math_I3)) ! fully elastic guess +! QUESTION follow former plastic slope to guess better? ! ! *** Second level of iterative procedure: Resistences *** do iouter=1,nouter @@ -542,14 +543,10 @@ help=matmul(transpose(I3tLp),matmul(A, I3tLp))-math_I3 Tstar0_v = 0.5_pReal * matmul(C_66, math_Mandel33to6(help)) R1=Tstar_v-Tstar0_v - R1s=0 - forall(i=1:6, Tstar_v(i)/=0) R1s(i)=R1(i)/Tstar_v(i) - norm1=maxval(abs(R1s)) - if (norm1 crite*Tstar_v(i).AND. Tstar_v(i)/=0)& -! do i=1,6 -! if (abs(dTstar_v(i))> crite*Tstar_v(i)) then - dTstar_v(i)=sign(crite*Tstar_v(i),dTstar_v(i)) -! endif -! enddo + forall(i=1:6, abs(dTstar_v(i)) > crite*maxval(abs(Tstar_v))) & + dTstar_v(i) = sign(crite*maxval(abs(Tstar_v)),dTstar_v(i)) + Tstar_v=Tstar_v-dTstar_v ! enddo @@ -583,10 +577,9 @@ 100 dstate=dt*constitutive_dotState(Tstar_v, iori, CPFEM_in, cp_en) ! *** Arrays of residuals *** R2=state_new-state_old-dstate - R2s=0 - forall(i=1:constitutive_Nstatevars(iori, CPFEM_in, cp_en), state_new(i)/=0) R2s(i)=R2(i)/state_new(i) - norm2=maxval(abs(R2s)) - if (norm2