Beispiel #1
0
def C_MESURE():
    return FACT(
        statut='d',
        max=1,
        TABLE=SIMP(statut='f', typ='TXM', defaut="NON", into=("OUI", "NON")),
        UNITE=SIMP(statut='f', typ=UnitType(), val_min=1, inout='out'),
    )
Beispiel #2
0
def C_AFFICHAGE():
    return FACT(
        statut='f',
        max=1,
        INFO_RESIDU=SIMP(statut='f',
                         typ='TXM',
                         defaut="NON",
                         into=("OUI", "NON")),
        INFO_TEMPS=SIMP(statut='f',
                        typ='TXM',
                        defaut="NON",
                        into=("OUI", "NON")),
        UNITE=SIMP(statut='f', typ=UnitType(), val_min=1, inout='out'),
        PAS=SIMP(statut='f', typ='I', val_min=1),
    )
Beispiel #3
0
def C_ARCHIVAGE():
    return FACT(
        statut='d',
        max=1,
        regles=(EXCLUS('PAS_ARCH', 'LIST_INST', 'INST'), ),
        LIST_INST=SIMP(statut='f', typ=(listr8_sdaster)),
        INST=SIMP(statut='f', typ='R', validators=NoRepeat(), max='**'),
        PAS_ARCH=SIMP(statut='f', typ='I'),
        CRITERE=SIMP(statut='f',
                     typ='TXM',
                     defaut="RELATIF",
                     into=("RELATIF", "ABSOLU")),
        b_prec_rela=BLOC(
            condition="""(equal_to("CRITERE", 'RELATIF'))""",
            PRECISION=SIMP(
                statut='f',
                typ='R',
                defaut=1.E-6,
            ),
        ),
        b_prec_abso=BLOC(
            condition="""(equal_to("CRITERE", 'ABSOLU'))""",
            PRECISION=SIMP(
                statut='o',
                typ='R',
            ),
        ),
        CHAM_EXCLU=SIMP(
            statut='f',
            typ='TXM',
            validators=NoRepeat(),
            max='**',
        ),
    )
Beispiel #4
0
def C_INCREMENT(TYPE_CMD):  #COMMUN#
    #
    assert TYPE_CMD in (
        'THERMIQUE',
        'MECANIQUE',
    )
    kwargs = {}
    statut_liste_inst = ' '

    # La liste d'instants est facultative en thermique et obligatoire en mecanique

    if TYPE_CMD in ('THERMIQUE'):
        statut_liste_inst = 'f'
    elif TYPE_CMD in ('MECANIQUE'):
        statut_liste_inst = 'o'

    kwargs['LIST_INST'] = SIMP(statut=statut_liste_inst,
                               typ=(listr8_sdaster, list_inst))
    kwargs['NUME_INST_INIT'] = SIMP(statut='f', typ='I')
    kwargs['INST_INIT'] = SIMP(statut='f', typ='R')
    kwargs['NUME_INST_FIN'] = SIMP(statut='f', typ='I')
    kwargs['INST_FIN'] = SIMP(statut='f', typ='R')
    kwargs['PRECISION'] = SIMP(statut='f', typ='R', defaut=1.0E-6)

    mcfact = FACT(statut=statut_liste_inst,
                  regles=(
                      EXCLUS('NUME_INST_INIT', 'INST_INIT'),
                      EXCLUS('NUME_INST_FIN', 'INST_FIN'),
                  ),
                  **kwargs)

    return mcfact
Beispiel #5
0
                                INTERPOL='LIN')
        dico = {}
        dico["NOEUD"] = nomnoe[ino]
        dico["DX"] = _DXT
        dico["DY"] = _DYT
        ddlimpo.append(dico)
    CharRota = AFFE_CHAR_MECA_F(MODELE=MODELE, DDL_IMPO=ddlimpo)
    return CharRota


CHAR_ROTA_cata = MACRO(
    nom="CHAR_ROTA",
    op=char_rota_ops,
    sd_prod=char_meca,
    docu="",
    reentrant='n',
    fr="creation d'une charge de rotation du cube",
    MODELE=SIMP(statut='o', typ=modele_sdaster),
    ANGLE_DEGRES=SIMP(statut='o', typ='R'),
    TINI=SIMP(statut='o', typ='R'),
    TFIN=SIMP(statut='o', typ='R'),
    RESU=SIMP(statut='o', typ=resultat_sdaster,
              fr="Résultat de STAT_NON_LINE"),
    MAIL=SIMP(
        statut='o',
        typ=maillage_sdaster,
    ),
)

CHAR_ROTA = UserMacro("CHAR_ROTA", CHAR_ROTA_cata, char_rota_ops)
Beispiel #6
0
            SIYZ=SIYZ_INI,
            SIXZ=SIXZ_INI,
        ),
        EPSI_INIT=_F(
            EPXX=EPXX_INI,
            EPYY=EPYY_INI,
            EPZZ=EPZZ_INI,
            EPXY=EPXY_INI,
            EPXZ=EPXZ_INI,
            EPYZ=EPYZ_INI,
        ),
    )
    return SPM


TEST_INIT_cata = MACRO(
    nom="TEST_INIT",
    op=test_init_ops,
    sd_prod=table_sdaster,
    docu="",
    reentrant='n',
    fr="creation d'une charge de rotation du cube",
    TINI=SIMP(statut='o', typ='R'),
    TMIL=SIMP(statut='o', typ='R'),
    TFIN=SIMP(statut='o', typ='R'),
    LIST_INST=SIMP(statut='o', typ=(listr8_sdaster)),
    MATER=SIMP(statut='o', typ=mater_sdaster, max=30),
)

TEST_INIT = UserMacro("TEST_INIT", TEST_INIT_cata, test_init_ops)
Beispiel #7
0
# COPYRIGHT (C) 1991 - 2017  EDF R&D                  WWW.CODE-ASTER.ORG
# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
# (AT YOUR OPTION) ANY LATER VERSION.
#
# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
#
# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
#    1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
# ======================================================================
# person_in_charge: samuel.geniaut at edf.fr

from code_aster.Cata.Syntax import OPER, SIMP
from code_aster.Cata.DataStructure import table_sdaster, evol_noli, fiss_xfem

DETEC_FRONT = OPER(
    nom="DETEC_FRONT",
    op=139,
    sd_prod=table_sdaster,
    reentrant='n',
    fr="Detection de front cohesif avec X-FEM",
    FISSURE=SIMP(statut='o', typ=fiss_xfem),
    NB_POINT_FOND=SIMP(statut='f', typ='I', val_min=2),
    RESULTAT=SIMP(statut='o', typ=evol_noli),
)
Beispiel #8
0
        PRECISION=len(previous_errors),
        NOM_PARA='NBWARN',
        TABLE=__tabw,
    )
    return


if __name__ != '__main__':
    from code_aster.Cata.Syntax import MACRO, SIMP
    from code_aster.Supervis.ExecuteCommand import UserMacro
    supv_cata = MACRO(
        nom='SUPV002',
        op=supv002_ops,
        ERREUR=SIMP(
            statut='o',
            typ='TXM',
            max='**',
        ),
        INFO=SIMP(
            statut='f',
            typ='I',
            defaut=1,
            into=(1, 2),
        ),
    )
    SUPV002 = UserMacro("SUPV002", supv_cata, supv002_ops)
else:
    # run as unittest
    # PYTHONPATH=$PYTHONPATH:/home/courtois/dev/codeaster/install/std/lib/python3.6/site-packages
    # ASTER_ROOT=/opt/aster
    # python -i astest/supv002a.33
Beispiel #9
0
# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
# (AT YOUR OPTION) ANY LATER VERSION.
#
# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
#
# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
#    1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
# ======================================================================
# person_in_charge: sam.cuvilliez at edf.fr

from code_aster.Cata.Syntax import OPER, SIMP
from code_aster.Cata.DataStructure import cham_no_sdaster, evol_noli, evol_elas

POST_K_VARC = OPER(
    nom="POST_K_VARC",
    op=48,
    sd_prod=cham_no_sdaster,
    reentrant='n',
    fr=
    "Récuperation d'un champ de variable de commande a un instant donné à partir d'un résultat",
    RESULTAT=SIMP(statut='o', typ=(evol_elas, evol_noli)),
    INST=SIMP(statut='o', typ='R'),
    NOM_VARC=SIMP(statut='o', typ='TXM', into=("TEMP", "NEUT1")),
)