DEBUT(LANG='EN')

mesh = LIRE_MAILLAGE(FORMAT='MED',
                     UNITE=3)

model = AFFE_MODELE(AFFE=_F(MODELISATION=('3D', ),
                            PHENOMENE='MECANIQUE',
                            TOUT='OUI'),
                    MAILLAGE=mesh)

kou = DEFI_MATERIAU(ELAS=_F(E=205000.0,
                            NU=0.3))

moku = DEFI_MATERIAU(ELAS_ORTH=_F(E_L=280.0,
                                  E_N=7000.0,
                                  E_T=280.0,
                                  G_LN=466.7,
                                  G_LT=466.7,
                                  G_TN=466.7,
                                  NU_LN=0.016,
                                  NU_LT=0.016,
                                  NU_TN=0.016))

#comment: DEFI_MATERIAU(ELAS=_F(E=7000.0,
#comment:                       NU=0.4))

fieldmat = AFFE_MATERIAU(AFFE=(_F(GROUP_MA=('kou', ),
                                  MATER=(kou, )),
                               _F(GROUP_MA=('moku', ),
                                  MATER=(moku, ))),
                         MAILLAGE=mesh,
                         MODELE=model)

load = AFFE_CHAR_MECA(DDL_IMPO=_F(DX=0.0,
                                  DY=0.0,
                                  DZ=0.0,
                                  GROUP_MA=('kotei', )),
                      FORCE_FACE=_F(FY=1.0,
                                    GROUP_MA=('saika', )),
                      MODELE=model)

reslin = MECA_STATIQUE(CHAM_MATER=fieldmat,
                       EXCIT=_F(CHARGE=load),
                       MODELE=model,
                       OPTION='SIEF_ELGA',
                       SOLVEUR=_F(METHODE='MUMPS',
                                  RESI_RELA=0.001))

unnamed0 = CREA_CHAMP(NOM_CHAM='SIEF_ELGA',
                      NUME_ORDRE=(1, ),
                      OPERATION='EXTR',
                      RESULTAT=reslin,
                      TYPE_CHAM='ELGA_SIEF_R',
                      TYPE_MAXI='MAXI',
                      TYPE_RESU='VALE')

ASSEMBLAGE(CHAM_MATER=fieldmat,
           CHARGE=(load, ),
           MATR_ASSE=(_F(MATRICE=CO('SAmech'),
                         OPTION='RIGI_MECA'),
                      _F(MATRICE=CO('SAgeom'),
                         OPTION='RIGI_GEOM',
                         SIEF_ELGA=unnamed0)),
           MODELE=model,
           NUME_DDL=CO('nddl'))

#comment: IMPR_RESU(FORMAT='MED',
#comment:           RESU=_F(MAILLAGE=mesh,
#comment:                   NOM_CHAM=('DEPL', ),
#comment:                   RESULTAT=reslin),
#comment:           UNITE=2)

table = INFO_MODE(CHAR_CRIT=(0.0, 500.0),
                  MATR_RIGI=SAmech,
                  MATR_RIGI_GEOM=SAmech,
                  TYPE_MODE='MODE_FLAMB')

modes = CALC_MODES(CALC_CHAR_CRIT=_F(CHAR_CRIT=(0.0, 500.0)),
                   MATR_RIGI=SAmech,
                   MATR_RIGI_GEOM=SAgeom,
                   OPTION='BANDE',
                   SOLVEUR_MODAL=_F(DIM_SOUS_ESPACE=80,
                                    METHODE='SORENSEN',
                                    NMAX_ITER_SOREN=80),
                   TYPE_RESU='MODE_FLAMB',
                   VERI_MODE=_F(SEUIL=1e-06,
                                STOP_ERREUR='NON'))

IMPR_RESU(FORMAT='MED',
          RESU=_F(MAILLAGE=mesh,
                  RESULTAT=modes),
          UNITE=80)

FIN()
