DEBUT(LANG='EN')

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

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

mater = DEFI_MATERIAU(ELAS=_F(E=206000.0,
                              NU=0.3))

fieldmat = AFFE_MATERIAU(AFFE=_F(MATER=(mater, ),
                                 TOUT='OUI'),
                         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(FZ=37.037,
                                    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.0001))

unnamed = CREA_CHAMP(NOM_CHAM='SIEF_ELGA',
                     NUME_ORDRE=(1, ),
                     OPERATION='EXTR',
                     RESULTAT=reslin,
                     TYPE_CHAM='ELGA_SIEF_R',
                     TYPE_MAXI='MINI',
                     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=unnamed)),
           MODELE=model,
           NUME_DDL=CO('nddl'))

IMPR_RESU(FORMAT='MED',
          RESU=_F(NOM_CHAM=('DEPL', ),
                  RESULTAT=reslin),
          UNITE=80)

modes = CALC_MODES(CALC_CHAR_CRIT=_F(CHAR_CRIT=(-0.5, 90.0)),
                   MATR_RIGI=SAmech,
                   MATR_RIGI_GEOM=SAmech,
                   OPTION='BANDE',
                   SOLVEUR_MODAL=_F(DIM_SOUS_ESPACE=400,
                                    METHODE='SORENSEN',
                                    NMAX_ITER_SOREN=100),
                   TYPE_RESU='MODE_FLAMB',
                   VERI_MODE=_F(SEUIL=1e-06,
                                STOP_ERREUR='NON'))

IMPR_RESU(FORMAT='MED',
          RESU=_F(RESULTAT=modes),
          UNITE=2)

FIN()
