Skip to content

Instantly share code, notes, and snippets.

@KristofferC
Created June 1, 2015 16:30
Show Gist options
  • Save KristofferC/dd246dd6171e098e1dee to your computer and use it in GitHub Desktop.
Save KristofferC/dd246dd6171e098e1dee to your computer and use it in GitHub Desktop.
do ii=1,nslip
!
k_alpha(ii)=n_k_alpha(ii)-XX(ii)
phi(ii)=(sum( Mbar*s_x_m(1:9,ii) ) )-&
( -para(8)*k_alpha(ii)+kappa_nl(ii) )-para(11)
if ( phi(ii).gt.0.d0 ) then
mclaur=phi(ii)
else
mclaur=0.d0
endif
!Computation of R_\Delta_\lambda_\alpha
R(ii)= para(12)*XX(ii)-dt*( mclaur )**para(3) ! Eq.(40) Diss Mikkel
enddo
.
.
.
do ii=1,nslip
do jj=1,nslip
if (phi(ii).gt.0.d0) then
if (ii.eq.jj) then
Jakob(ii,jj)=Jakob(ii,jj)-para(8)
Jakob(ii,jj)=para(12)-dt*para(3)*( mclaur )**(para(3)-1.d0)*Jakob(ii,jj)
else
!Jakob(ii,jj)=Jakob(ii,jj)*( XX(ii)/(1.d0-damage)*2.d0/lambda_0**2*(XX(jj)-n_k_alpha(jj)) )
Jakob(ii,jj)=-dt*para(3)*( mclaur )**(para(3)-1.d0)*Jakob(ii,jj)
endif
else
Jakob(ii,jj)=0.d0
if (ii.eq.jj) then
Jakob(ii,jj)=para(12)
endif
endif
enddo
enddo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment