mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
Affichage du diagnostic
This commit is contained in:
parent
8f0082e9d0
commit
ff873c8b10
@ -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
|
||||
#=============================================================
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user