C MAT29     SOURCE    CB215821  20/07/29    21:15:44     10668          
      SUBROUTINE MAT29(WR10,WRK9,INPLAS,IFOU,MFR)
C
C   pour les materiaux endommageables de Lemaitre dependant ou non de la
C   temperature T :
C   YOG   = tableau du module d'Young
C   YNU   = tableau du coefficient de Poisson
C   YALFA = tableau du coefficient de dilatation thermique
C   YRHO  = tableau de la masse volumique
C   YN, YM, YKK, YALFA1, YBETA1, YR, YA = tableaux des parametres non
C                                         lineaires du materiau 29
C   YN, YM, YKK = tableaux des parametres non lineaires du materiau 26
C   REMARQUE : si la dimension d'un tableau vaut 1, le parametre
C              correspondant est independant de T
C              sinon il contient T1 VAL1 T2 VAL2 ....
C   YKX = fonction k(X) tabulee en fonction de T pour le materiau 29
C   NKX = tableau de pointeurs sur les courbes k(X)
C   si la dimension de NKX est 1, k(X) est independant de T,NKX contient
C   le nbr. de pts. definissant k(X) et YKX contient X1 k1 X2 k2 ....
C   sinon NKX contient pour chaque courbe k(X) le nbr. de pts. qui la
C   definit et YKX contient T1 X11 k11 X12 k12 ...T2 X21 k21 X22 k22 ...
C   T3 ...
C   Pour le materiau 26 idem mais k(X) represente la courbe de traction
C     contraintes - deformations
C
C
      IMPLICIT INTEGER(I-N)
      IMPLICIT REAL*8(A-H,O-Z)
      SEGMENT WRK9
        REAL*8 YOG(NYOG),YNU(NYNU),YALFA(NYALFA),YSMAX(NYSMAX)
        REAL*8 YN(NYN),YM(NYM),YKK(NYKK),YALFA1(NYALF1)
        REAL*8 YBETA1(NYBET1),YR(NYR),YA(NYA),YKX(NYKX),YRHO(NYRHO)
        REAL*8 SIGY(NSIGY)
        INTEGER NKX(NNKX)
      ENDSEGMENT
      SEGMENT WR10
        INTEGER IABLO1(NTABO1)
        REAL*8  TABLO2(NTABO2)
      ENDSEGMENT
C
      IF (INPLAS.EQ.26) GOTO 200
C
C   cas du materiau viscoplastique endommageable de Lemaitre
C
      DO 10 I=1,YOG(/1)
 10   YOG(I)=TABLO2(I)
      IORIG=YOG(/1)
      DO 20 I=1,YNU(/1)
 20   YNU(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YNU(/1)
      DO 30 I=1,YALFA(/1)
 30   YALFA(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YALFA(/1)
      DO 40 I=1,YSMAX(/1)
 40   YSMAX(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YSMAX(/1)
      DO 50 I=1,YN(/1)
 50   YN(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YN(/1)
      DO 60 I=1,YM(/1)
 60   YM(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YM(/1)
      DO 70 I=1,YKK(/1)
 70   YKK(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YKK(/1)
      DO 80 I=1,YALFA1(/1)
 80   YALFA1(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YALFA1(/1)
      DO 90 I=1,YBETA1(/1)
 90   YBETA1(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YBETA1(/1)
      DO 100 I=1,YR(/1)
 100   YR(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YR(/1)
      DO 110 I=1,YA(/1)
 110   YA(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YA(/1)
      NNKX=NKX(/1)
      NYKX=YKX(/1)
      IF ((MFR.EQ.1.OR.MFR.EQ.3.OR.MFR.EQ.31.OR.MFR.EQ.33.OR.MFR.EQ.5).
     +                        AND.IFOU.EQ.-2) THEN
          INTMAT=16
*+TREF
*+TALP
      ELSE
          INTMAT=15
*+TREF
*+TALP
      ENDIF
      IF (IABLO1(/1).EQ.INTMAT) THEN
                            NKX(NNKX)=NYKX/2
                            DO 120 I=1,NYKX
 120                        YKX(I)=TABLO2(IORIG+I)
      ELSE
                            DO 130 I=1,NNKX
 130                        NKX(I)=IABLO1(12+I)
                            DO 140 I=1,NYKX
 140                        YKX(I)=TABLO2(IORIG+I)
      ENDIF
      IORIG=IORIG+NYKX
      DO 150 I=1,YRHO(/1)
 150   YRHO(I)=TABLO2(IORIG+I)
      SIGY(1)=0.D0
      GOTO 500
C
C  cas du materiau plastique endommageable de Lemaitre
C
 200  CONTINUE
      DO 210 I=1,YOG(/1)
 210  YOG(I)=TABLO2(I)
      IORIG=YOG(/1)
      DO 220 I=1,YNU(/1)
 220  YNU(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YNU(/1)
      DO 230 I=1,YRHO(/1)
 230  YRHO(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YRHO(/1)
      DO 240 I=1,YALFA(/1)
 240  YALFA(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YALFA(/1)
      NNKX=NKX(/1)
      NYKX=YKX(/1)
      IF ((MFR.EQ.1.OR.MFR.EQ.3.OR.MFR.EQ.31.OR.MFR.EQ.33.OR.MFR.EQ.5).
     +                        AND.IFOU.EQ.-2) THEN
*+DC      INTMAT=9
*+TREF
*+TALP
          INTMAT=12
      ELSE
*+DC      INTMAT=8
*+TREF
*+TALP
          INTMAT=11
      ENDIF
      
      IF (IABLO1(/1).EQ.INTMAT) THEN
                            NKX(NNKX)=NYKX/2
                            DO 250 I=1,NYKX
 250                        YKX(I)=TABLO2(IORIG+I)
      ELSE
                            DO 260 I=1,NNKX
 260                        NKX(I)=IABLO1(5+I)
                            DO 270 I=1,NYKX
 270                        YKX(I)=TABLO2(IORIG+I)
      ENDIF
      IORIG=IORIG+NYKX
      DO 280 I=1,YN(/1)
 280  YN(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YN(/1)
      DO 290 I=1,YM(/1)
 290  YM(I)=TABLO2(IORIG+I)
      IORIG=IORIG+YM(/1)
      DO 300 I=1,YKK(/1)
 300  YKK(I)=TABLO2(IORIG+I)
C
 500  CONTINUE
      RETURN
      END
 
