4. Examples#
4.1. Checking a tablecloth#
VALE = (0.,0.,1.,1.,1.,1.,2.,2.,2.,3.,4.,4.)) df2 = DEFI_FONCTION (NOM_PARA = “INST”, NOM_RESU = “DEPL”, VALE = (3., 3., 4., 4., 4., 5., 5.)) dn1 = DEFI_NAPPE (NOM_PARA = “AMOR”, NOM_RESU = “DEPL”, VALE = (0.01, 0.02), FONCTION = (df1, df2)
# we check the attribute “NOM_PARA” of the df1 function in the dn1 tablecloth
ATTRIBUT = (_F (FONCTION = dn1,
PARA = 0.01, # 0.01 reached df1 ATTR = “NOM_PARA_FONC”, ATTR_REFE = “INST”),
# we check the attribute “NOM_PARA” of the dn1 cable
_F (FONCTION = dn1,
ATTR = “NOM_PARA”, ATTR_REFE = “AMOR”))),
# we check a value of the array dn1 (in practice on the function df1)
VALEUR = _F (FONCTION = dn1,
NOM_PARA = (“AMOR”, “INST”), VALE_PARA = (0.01, 1.), VALE_REFE = 1.) )
4.2. Checking a function#
li1= DEFI_LIST_REEL (DEBUT =0. ,
INTERVALLE =_F (JUSQU_A =2*pi, PAS =2*ft/20),)
f1= FORMULE (NOM_PARA =” INST “,
VALE =”sin (INST) + cos (INST) “,)
funk= CALC_FONC_INTERP (FONCTION =f1,
LIST_PARA =li1, NOM_RESU =” DEPL “, INTERPOL =” LIN “,)
TEST_FONCTION (
# we test an attribute of the function
ATTRIBUT =_F (FONCTION =background, ATTR =” INTERPOL “, ATTR_REFE =” LIN LIN “,),
# we test a value of the function
VALEUR =_F (FONCTION =background, VALE_PARA =pi, REFERENCE =” ANALYTIQUE “, VALE_CALC =-1. , VALE_REFE =sin (pi) +cos (pi),)