C DDSIGGC SOURCE AM 12/02/27 23:15:31 7289 SUBROUTINE ddsiggc(sigma,d2gc,ag,P2,pi2,i1,i6,fc,fb,lcp) c This subroutine calculates the second derivative of the plastic potential in compression c c Plastic potential: gc = dsqrt (3 J2) + ag I1 with J2 : 2nd invariant of the deviatoric stress c and I1 : 1st invariant of the stress IMPLICIT REAL*8 (A-B,D-H,O-Z) implicit integer (I-K,M,N) implicit logical (L) implicit character*10 (C) dimension vloc(6),vloc1(1),pi2(6),vloc2(1,6) dimension d2gc(6,6),p2(i6,i6),sigma(6),vloc6(6,6) r1 = 1. r2 = 2. do jloc=1,6 do iloc=1,6 d2gc(iloc,jloc) = 0.d0 enddo enddo call mulAB(P2,sigma,vloc,6,6,6,1) call mulATB(sigma,vloc,vloc1,6,1,6,1) rloc = 0.5d0 * vloc1(1) if (rloc.le.0.d0) then psi2 = 0.d0 else psi2 = dsqrt(rloc) endif call mulATB(sigma,P2,vloc2,6,1,6,6) call mulAB(vloc,vloc2,vloc6,6,1,1,6) test = ag*(sigma(1)+sigma(2)+sigma(3)) psi2lim=max(1.E-7*test,1.d-3) if (dabs(psi2).le.psi2lim) then continue c d2gc = 0 else do jloc=1,6 do iloc=1,6 d2gc(iloc,jloc)=(P2(iloc,jloc)/(2.0d0*psi2)) . - (vloc6(iloc,jloc)/(4.0d0*psi2*psi2*psi2)) enddo enddo endif RETURN END