DEBUT();

MA=DEFI_MATERIAU(ELAS=_F(E=7e9,
                         NU=0.3,),);

MA1=DEFI_MATERIAU(ELAS=_F(E=200e9,
                          NU=0.4,),);

MAIL=LIRE_MAILLAGE(FORMAT='MED',);

#MAIL=MODI_MAILLAGE(reuse=MAIL,
 #                  MAILLAGE=MAIL,
  #                 ORIE_PEAU_3D=_F(GROUP_MA=('migi',),),
   #                );

MODE=AFFE_MODELE(MAILLAGE=MAIL,
                 AFFE=_F(TOUT='OUI',
                         PHENOMENE='MECANIQUE',
                         MODELISATION='3D',),);

#MATE=AFFE_MATERIAU(MAILLAGE=MAIL,
#                   AFFE=_F(TOUT='OUI',
#                           MATER=MA,),);

MATE=AFFE_MATERIAU(MAILLAGE=MAIL,
                   AFFE=(_F(GROUP_MA='bou2',
                            MATER=MA,),
                         _F(GROUP_MA='bou1',
                            MATER=MA1,),),);

CHAR=AFFE_CHAR_MECA(MODELE=MODE,
                    DDL_IMPO=(
                        _F(GROUP_MA='hidari',
                           DX=0.0,
                           DY=0.0,
                           DZ=0.0,),
                        _F(GROUP_MA='migi',
                           DX=0.0,
                           DY=0.0,),
                        ),
                    FORCE_ARETE=(
                        _F(GROUP_MA='load',
                           FX=1000000.0,),
                        ),
                    );

RESU=MECA_STATIQUE(MODELE=MODE,
                   CHAM_MATER=MATE,
                   EXCIT=_F(CHARGE=CHAR,),);

RESU=CALC_ELEM(reuse=RESU,
               MODELE=MODE,
               CHAM_MATER=MATE,
               RESULTAT=RESU,
               OPTION=('SIGM_ELNO','SIEQ_ELNO',),
               EXCIT=_F(
               CHARGE=CHAR,),);

RESU=CALC_NO(reuse=RESU,
             RESULTAT=RESU,
             OPTION=('SIGM_NOEU', 'SIEQ_NOEU', ),);

IMPR_RESU(FORMAT='MED',
          UNITE=80,
          RESU=_F(MAILLAGE=MAIL,
                  RESULTAT=RESU,
                  NOM_CHAM=('SIGM_NOEU','SIEQ_NOEU','DEPL',),),);

FIN();
