From: GERALD NICOLAS Date: Thu, 15 Apr 2021 11:40:29 +0000 (+0200) Subject: Affichage du diagnostic X-Git-Tag: V9_7_0a1~3^2~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ff873c8b10f4cc15316f4ee7e1331ec1b4e0c1ab;p=modules%2Fsmesh.git Affichage du diagnostic --- diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py index 3ca435e59..553e3b103 100644 --- a/src/Tools/blocFissure/CasTests/execution_Cas.py +++ b/src/Tools/blocFissure/CasTests/execution_Cas.py @@ -23,9 +23,7 @@ import traceback import logging -from blocFissure import gmu from blocFissure.gmu import initLog -from blocFissure.gmu import geomsmesh from blocFissure.gmu.casStandard import casStandard # ----------------------------------------------------------------------------------------------- @@ -59,7 +57,7 @@ else: 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 @@ -244,8 +242,9 @@ def calcul_cas (n_cas, cas, d_aux, ligne): 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 #============================================================= diff --git a/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py b/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py index 317b6c935..49a93052f 100644 --- a/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py +++ b/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py @@ -51,7 +51,9 @@ def getStatsMaillageFissure(maillage, referencesMaillageFissure, maillageFissure 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 @@ -61,14 +63,16 @@ def getStatsMaillageFissure(maillage, referencesMaillageFissure, maillageFissure 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")