import logging
-from blocFissure import gmu
from blocFissure.gmu import initLog
-from blocFissure.gmu import geomsmesh
from blocFissure.gmu.casStandard import casStandard
# -----------------------------------------------------------------------------------------------
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # eprouvetteCourbe
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # eprouvetteDroite
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche
- TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche2 fissureGauche2
+ TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche2
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0] # vis
TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] # tube
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
ok_maillage = cas.executeProbleme()
except:
traceback.print_exc()
- texte = "Problème avec le cas n° {}, '{}'\n".format(n_cas,nom)
ok_maillage = False
+ if not ok_maillage:
+ texte = "Problème avec le cas n° {}, '{}'\n".format(n_cas,nom)
print(ligne)
return ok_maillage, texte
#=============================================================
text_2 = ""
ok_maillage = True
with open(fichierStatMaillageFissure, "w") as fic_stat :
- for key in ('Entity_Quad_Quadrangle', 'Entity_Quad_Hexa'):
+
+ # Le nombre d'arêtes, de quadrangles ou d'hexaèdres doit être rigoureusement identique
+ for key in ('Entity_Quad_Edge', 'Entity_Quad_Quadrangle', 'Entity_Quad_Hexa'):
if d_resu[key] != referencesMaillageFissure[key]:
text = "Ecart"
ok_maillage = False
logging.info(text)
fic_stat.write(text+"\n")
text_2 += " {} = {}, \\\n".format(key,d_resu[key])
- tolerance = 0.05
- for key in ('Entity_Node', 'Entity_Quad_Edge', 'Entity_Quad_Triangle', 'Entity_Quad_Tetra', 'Entity_Quad_Pyramid', 'Entity_Quad_Penta'):
+
+ # Le nombre de noeuds, de triangles, de tétarèdres ou de pyramides peut varier du fait des algorithmes. On tolère 1% d'écart.
+ tolerance = 0.01
+ for key in ('Entity_Node', 'Entity_Quad_Triangle', 'Entity_Quad_Tetra', 'Entity_Quad_Pyramid', 'Entity_Quad_Penta'):
if (d_resu[key] < (1.0 - tolerance)*referencesMaillageFissure[key]) \
or (d_resu[key] > (1.0 + tolerance)*referencesMaillageFissure[key]):
text = "Ecart"
ok_maillage = False
else:
- text = "Valeur_OK"
+ text = "Valeur_OK à moins de {}%".format(tolerance*100.)
text += ": {} reference: {} calcul: {}".format(key,referencesMaillageFissure[key],d_resu[key])
logging.info(text)
fic_stat.write(text+"\n")