From f79e964b7592c63818f892516f3b4936d7704397 Mon Sep 17 00:00:00 2001 From: GERALD NICOLAS Date: Wed, 17 Mar 2021 14:13:23 +0100 Subject: [PATCH] =?utf8?q?M=C3=A9nage=20dans=20les=20python=20des=20cas-te?= =?utf8?q?sts?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/Tools/blocFissure/CasTests/cubeAngle.py | 7 +- src/Tools/blocFissure/CasTests/cylindre.py | 9 +- src/Tools/blocFissure/CasTests/ellipse_1.py | 9 +- .../blocFissure/CasTests/eprouvetteCourbe.py | 9 +- .../blocFissure/CasTests/eprouvetteDroite.py | 15 +- .../CasTests/eprouvetteDroite_2.py | 9 +- .../blocFissure/CasTests/execution_Cas.py | 472 ++++++++++-------- src/Tools/blocFissure/CasTests/faceGauche.py | 13 +- .../blocFissure/CasTests/faceGauche_2.py | 11 +- .../blocFissure/CasTests/fissureCoude_1.py | 7 +- .../blocFissure/CasTests/fissureCoude_10.py | 11 +- .../blocFissure/CasTests/fissureCoude_2.py | 11 +- .../blocFissure/CasTests/fissureCoude_3.py | 7 +- .../blocFissure/CasTests/fissureCoude_4.py | 7 +- .../blocFissure/CasTests/fissureCoude_5.py | 7 +- .../blocFissure/CasTests/fissureCoude_6.py | 7 +- .../blocFissure/CasTests/fissureCoude_7.py | 9 +- .../blocFissure/CasTests/fissureCoude_8.py | 6 + .../blocFissure/CasTests/fissureCoude_9.py | 6 + .../blocFissure/CasTests/fissure_Coude.py | 22 +- .../blocFissure/CasTests/fissure_Coude_4.py | 7 +- src/Tools/blocFissure/CasTests/tube.py | 11 +- src/Tools/blocFissure/CasTests/vis_1.py | 15 +- src/Tools/blocFissure/gmu/fissureGenerique.py | 6 +- .../materielCasTests/genereMateriel.py | 24 +- 25 files changed, 422 insertions(+), 295 deletions(-) diff --git a/src/Tools/blocFissure/CasTests/cubeAngle.py b/src/Tools/blocFissure/CasTests/cubeAngle.py index 304494adc..69793faa3 100644 --- a/src/Tools/blocFissure/CasTests/cubeAngle.py +++ b/src/Tools/blocFissure/CasTests/cubeAngle.py @@ -38,6 +38,9 @@ class cubeAngle(fissureGenerique): """problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan""" nomProbleme = "cubeAngle" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): @@ -100,8 +103,8 @@ class cubeAngle(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): texte = "genereMaillageFissure pour '{}'".format(self.nomCas) diff --git a/src/Tools/blocFissure/CasTests/cylindre.py b/src/Tools/blocFissure/CasTests/cylindre.py index 2ec1daaea..39387ddac 100644 --- a/src/Tools/blocFissure/CasTests/cylindre.py +++ b/src/Tools/blocFissure/CasTests/cylindre.py @@ -38,6 +38,9 @@ class cylindre(fissureGenerique): """problème de fissure plane sur cylindre, grand fond de fissure en arc de cercle""" nomProbleme = "cylindre" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): @@ -97,9 +100,9 @@ class cylindre(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): mailleur = self.mailleur2d3d() diff --git a/src/Tools/blocFissure/CasTests/ellipse_1.py b/src/Tools/blocFissure/CasTests/ellipse_1.py index 5008debbb..d412e8d02 100644 --- a/src/Tools/blocFissure/CasTests/ellipse_1.py +++ b/src/Tools/blocFissure/CasTests/ellipse_1.py @@ -38,6 +38,9 @@ class ellipse_1(fissureGenerique): """problème de fissure non plane, débouchante non normale""" nomProbleme = "ellipse1" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # # --------------------------------------------------------------------------- # def genereGeometrieSaine(self, geomParams): @@ -108,9 +111,9 @@ class ellipse_1(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): texte = "genereMaillageFissure pour '{}'".format(self.nomCas) diff --git a/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py b/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py index 9e3dfde2d..150c15be6 100644 --- a/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py +++ b/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py @@ -38,6 +38,9 @@ class eprouvetteCourbe(fissureGenerique): """problème de fissure plane coupant 3 faces (éprouvette), faces au débouché non planes, incidence presque normale""" nomProbleme = "eprouvetteCourbe" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): @@ -102,9 +105,9 @@ class eprouvetteCourbe(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): texte = "genereMaillageFissure pour '{}'".format(self.nomCas) diff --git a/src/Tools/blocFissure/CasTests/eprouvetteDroite.py b/src/Tools/blocFissure/CasTests/eprouvetteDroite.py index c07ed26ae..117441d33 100644 --- a/src/Tools/blocFissure/CasTests/eprouvetteDroite.py +++ b/src/Tools/blocFissure/CasTests/eprouvetteDroite.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""problème de fissure plane coupant 3 faces (éprouvette), débouches normaux, objet plan""" import os from blocFissure import gmu @@ -40,11 +41,12 @@ from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale O, OX, OY, OZ = triedreBase() class eprouvetteDroite(fissureGenerique): - """ - problème de fissure plane coupant 3 faces (éprouvette), débouches normaux, objet plan - """ + """problème de fissure plane coupant 3 faces (éprouvette), débouches normaux, objet plan""" nomProbleme = "eprouvetteDroite" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): @@ -103,9 +105,9 @@ class eprouvetteDroite(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): mailleur = self.mailleur2d3d() @@ -127,4 +129,3 @@ class eprouvetteDroite(fissureGenerique): Entity_Quad_Pyramid = 376, \ Entity_Quad_Penta = 96 \ ) - diff --git a/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py b/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py index 0a2327610..e678112a0 100644 --- a/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py +++ b/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py @@ -17,27 +17,21 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""problème de fissure plane coupant 3 faces (éprouvette), débouches non normaux, objet plan""" import os from blocFissure import gmu from blocFissure.gmu.geomsmesh import geompy, smesh -import math import GEOM import SALOMEDS import SMESH -#import StdMeshers -#import GHS3DPlugin -#import NETGENPlugin import logging from .eprouvetteDroite import eprouvetteDroite -from blocFissure.gmu.triedreBase import triedreBase from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut -O, OX, OY, OZ = triedreBase() - class eprouvetteDroite_2(eprouvetteDroite): """problème de fissure plane coupant 3 faces (éprouvette), débouches non normaux, objet plan""" @@ -74,4 +68,3 @@ class eprouvetteDroite_2(eprouvetteDroite): Entity_Quad_Pyramid = 396, \ Entity_Quad_Penta = 96 \ ) - diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py index 1cc38ba06..599af209d 100644 --- a/src/Tools/blocFissure/CasTests/execution_Cas.py +++ b/src/Tools/blocFissure/CasTests/execution_Cas.py @@ -17,11 +17,14 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Lancement des cas-tests de blocFissure""" -import sys, traceback +import traceback import logging from blocFissure import gmu from blocFissure.gmu import initLog +from blocFissure.gmu import geomsmesh +from blocFissure.gmu.casStandard import casStandard # ----------------------------------------------------------------------------------------------- #initLog.setDebug() @@ -30,225 +33,262 @@ from blocFissure.gmu import initLog #initLog.setPerfTests() # ---tous les cas en séquence, ou les cas sélectionnés ... -torunOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # OK +TORUNOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # OK # 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 -runall = False -runall = True -if runall: - torun = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +#RUNALL = False +RUNALL = True +if RUNALL: + TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] # 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 else: - torunPB = list() - for iaux in torunOK: - torunPB.append((iaux+1)%2) - print ("torun = {} # OK".format(torunOK)) - print ("torun = {} # PB".format(torunPB)) - 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, 0] + TORUNPB = list() + for IAUX in TORUNOK: + TORUNPB.append((IAUX+1)%2) + print ("TORUN = {} # OK".format(TORUNOK)) + print ("TORUN = {} # PB".format(TORUNPB)) +# genereMateriel + TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # aucun + TORUN = [ 1, 1, 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] # cubeAngle + TORUN = [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # cubeFin + TORUN = [ 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # decoupeCylindre + TORUN = [ 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, 0, 0, 0] # disque_perce + ellipse_disque + TORUN = [ 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, 0, 0] # ellipse + fissureGauche2 + TORUN = [ 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, 0] # ellipse_probleme + fissureGauche2 + 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 + 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 + TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # OK # ----------------------------------------------------------------------------------------------- -from blocFissure.gmu import geomsmesh -from blocFissure.gmu.casStandard import casStandard - -d_aux = dict() -problemes = list() - -n_cas = 0 -# matériel : cubeAngle -from blocFissure.CasTests.cubeAngle import cubeAngle -problemes.append(cubeAngle(n_cas)) - -n_cas = 1 -# matériel : cubeAngle -from blocFissure.CasTests.cubeAngle2 import cubeAngle2 -problemes.append(cubeAngle2(n_cas)) - -n_cas = 2 -# matériel : cubeFin -from blocFissure.CasTests import cubeCoin -problemes.append(casStandard(cubeCoin.dicoParams, cubeCoin.referencesMaillageFissure, n_cas)) -d_aux[n_cas] = "cubeCoin" - -n_cas = 3 -# matériel : cubeFin -from blocFissure.CasTests import cubeMilieu -problemes.append(casStandard(cubeMilieu.dicoParams, cubeMilieu.referencesMaillageFissure, n_cas)) -d_aux[n_cas] = "cubeMilieu" - -n_cas = 4 -# matériel : cubeFin -from blocFissure.CasTests import cubeTransverse -problemes.append(casStandard(cubeTransverse.dicoParams, cubeTransverse.referencesMaillageFissure, n_cas)) -d_aux[n_cas] = "cubeTransverse" - -n_cas = 5 -# matériel : decoupeCylindre -from blocFissure.CasTests.cylindre import cylindre -problemes.append(cylindre(n_cas)) - -n_cas = 6 -# matériel : decoupeCylindre -from blocFissure.CasTests.cylindre_2 import cylindre_2 -problemes.append(cylindre_2(n_cas)) - -n_cas = 7 -# matériel : disque_perce -# matériel : ellipse_disque -from blocFissure.CasTests import disquePerce -problemes.append(casStandard(disquePerce.dicoParams, disquePerce.referencesMaillageFissure, n_cas)) -d_aux[n_cas] = "disquePerce" - -n_cas = 8 -from blocFissure.CasTests.ellipse_1 import ellipse_1 -problemes.append(ellipse_1(n_cas)) - -n_cas = 9 -from blocFissure.CasTests.ellipse_2 import ellipse_2 -problemes.append(ellipse_2(n_cas)) - -n_cas = 10 -from blocFissure.CasTests.eprouvetteCourbe import eprouvetteCourbe -problemes.append(eprouvetteCourbe(n_cas)) - -n_cas = 11 -from blocFissure.CasTests.eprouvetteDroite import eprouvetteDroite -problemes.append(eprouvetteDroite(n_cas)) - -n_cas = 12 -from blocFissure.CasTests.eprouvetteDroite_2 import eprouvetteDroite_2 -problemes.append(eprouvetteDroite_2(n_cas)) - -n_cas = 13 -from blocFissure.CasTests.faceGauche import faceGauche -problemes.append(faceGauche(n_cas)) - -n_cas = 14 -# matériel : fissureGauche2 -from blocFissure.CasTests.faceGauche_2 import faceGauche_2 -problemes.append(faceGauche_2(n_cas)) -#"boiteDefaut" has not been computed: -#- "algo3d_boiteDefaut" failed. Error: Algorithm failed. Presumably, the surface mesh is not compatible with the domain being processed (warning). -#An edge is unique (i.e., bounds a hole in the surface). -#The surface mesh includes at least one hole. The domain is not well defined. -#See /tmp/GHS3D_18605_10269264.log for more information -#Traceback (most recent call last): - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 222, in - #ok_maillage = cas.executeProbleme() - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 122, in executeProbleme - #self.maillageFissureParams, elementsDefaut, step) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/faceGauche_2.py", line 108, in genereMaillageFissure - #maillageFissureParams, elementsDefaut, step) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/construitFissureGenerale.py", line 330, in construitFissureGenerale - #raise Exception(text) -#Exception: Erreur au calcul du maillage. - -n_cas = 15 -from blocFissure.CasTests.fissureCoude_1 import fissureCoude_1 -problemes.append(fissureCoude_1(n_cas)) - -n_cas = 16 -from blocFissure.CasTests.fissureCoude_10 import fissureCoude_10 -problemes.append(fissureCoude_10(n_cas)) - -n_cas = 17 -from blocFissure.CasTests.fissureCoude_2 import fissureCoude_2 -problemes.append(fissureCoude_2(n_cas)) - -n_cas = 18 -from blocFissure.CasTests.fissureCoude_3 import fissureCoude_3 -problemes.append(fissureCoude_3(n_cas)) - -n_cas = 19 -from blocFissure.CasTests.fissureCoude_4 import fissureCoude_4 -problemes.append(fissureCoude_4(n_cas)) - -n_cas = 20 -from blocFissure.CasTests.fissureCoude_5 import fissureCoude_5 -problemes.append(fissureCoude_5(n_cas)) - -n_cas = 21 -from blocFissure.CasTests.fissureCoude_6 import fissureCoude_6 -problemes.append(fissureCoude_6(n_cas)) - -n_cas = 22 -from blocFissure.CasTests.fissureCoude_7 import fissureCoude_7 -problemes.append(fissureCoude_7(n_cas)) - -n_cas = 23 -# matériel : fissureGauche2 -from blocFissure.CasTests.fissureCoude_8 import fissureCoude_8 -problemes.append(fissureCoude_8(n_cas)) - -n_cas = 24 -from blocFissure.CasTests.fissureCoude_9 import fissureCoude_9 -problemes.append(fissureCoude_9(n_cas)) - -n_cas = 25 -from blocFissure.CasTests.fissure_Coude import fissure_Coude -problemes.append(fissure_Coude(n_cas)) - -n_cas = 26 -from blocFissure.CasTests.fissure_Coude_4 import fissure_Coude_4 -problemes.append(fissure_Coude_4(n_cas)) - -n_cas = 27 -from blocFissure.CasTests.vis_1 import vis_1 -problemes.append(vis_1(n_cas)) -#"Mesh_22" has not been computed: -#- "algo2d_faceFiss" failed on FACE #2. Error: Algorithm failed. NgException at Surface meshing: Problem in Surface mesh generation -#- "algo1d_edgeFissPeau" failed on EDGE #9. Error: Algorithm failed. Source elements don't cover totally the geometrical edge -#Traceback (most recent call last): - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 233, in - #ok_maillage = cas.executeProbleme() - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 122, in executeProbleme - #self.maillageFissureParams, elementsDefaut, step) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/vis_1.py", line 116, in genereMaillageFissure - #maillageFissureParams, elementsDefaut, step) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/construitFissureGenerale.py", line 282, in construitFissureGenerale - #meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/mailleFacesFissure.py", line 69, in mailleFacesFissure - #raise Exception(text) -#Exception: Erreur au calcul du maillage. - -n_cas = 28 -from blocFissure.CasTests.tube import tube -problemes.append(tube(n_cas)) -#"Mesh_13" has not been computed: -#- "algo2d_facePeau_0" failed on "FACE_12 to mesh". Error: Algorithm failed. NgException at Surface meshing: Problem in Surface mesh generation -#- "algo1d_cercle1_0" failed on EDGE #20. Error: Algorithm failed. Source elements don't cover totally the geometrical edge -#- "algo1d_cercle1_0" failed on EDGE #17. Error: Algorithm failed. Source elements don't cover totally the geometrical edge -#- "algo1d_cercle1_0" failed on EDGE #15. Error: Algorithm failed. Source elements don't cover totally the geometrical edge -#- "algo1d_cercle1_0" failed on EDGE #12. Error: Algorithm failed. Source elements don't cover totally the geometrical edge - +def caract_l_problemes (): + """Caractérisation des problèmes""" + d_aux = dict() + l_problemes = list() + + n_cas = 0 + # genereMateriel : cubeAngle + from blocFissure.CasTests.cubeAngle import cubeAngle + l_problemes.append(cubeAngle(n_cas)) + + n_cas = 1 + # genereMateriel : cubeAngle + from blocFissure.CasTests.cubeAngle2 import cubeAngle2 + l_problemes.append(cubeAngle2(n_cas)) + + n_cas = 2 + # genereMateriel : cubeFin + from blocFissure.CasTests import cubeCoin + l_problemes.append(casStandard(cubeCoin.dicoParams, cubeCoin.referencesMaillageFissure, n_cas)) + d_aux[n_cas] = "cubeCoin" + + n_cas = 3 + # genereMateriel : cubeFin + from blocFissure.CasTests import cubeMilieu + l_problemes.append(casStandard(cubeMilieu.dicoParams, cubeMilieu.referencesMaillageFissure, n_cas)) + d_aux[n_cas] = "cubeMilieu" + + n_cas = 4 + # genereMateriel : cubeFin + from blocFissure.CasTests import cubeTransverse + l_problemes.append(casStandard(cubeTransverse.dicoParams, cubeTransverse.referencesMaillageFissure, n_cas)) + d_aux[n_cas] = "cubeTransverse" + + n_cas = 5 + # genereMateriel : decoupeCylindre + from blocFissure.CasTests.cylindre import cylindre + l_problemes.append(cylindre(n_cas)) + + n_cas = 6 + # genereMateriel : decoupeCylindre + from blocFissure.CasTests.cylindre_2 import cylindre_2 + l_problemes.append(cylindre_2(n_cas)) + + n_cas = 7 + # genereMateriel : disque_perce + # genereMateriel : ellipse_disque + from blocFissure.CasTests import disquePerce + l_problemes.append(casStandard(disquePerce.dicoParams, disquePerce.referencesMaillageFissure, n_cas)) + d_aux[n_cas] = "disquePerce" + + n_cas = 8 + # genereMateriel: ellipse + # genereMateriel : fissureGauche2 + from blocFissure.CasTests.ellipse_1 import ellipse_1 + l_problemes.append(ellipse_1(n_cas)) + + n_cas = 9 + # genereMateriel: ellipse_probleme + # genereMateriel : fissureGauche2 + from blocFissure.CasTests.ellipse_2 import ellipse_2 + l_problemes.append(ellipse_2(n_cas)) + + n_cas = 10 + # genereMateriel : eprouvetteCourbe + from blocFissure.CasTests.eprouvetteCourbe import eprouvetteCourbe + l_problemes.append(eprouvetteCourbe(n_cas)) + + n_cas = 11 + # genereMateriel : eprouvetteDroite + from blocFissure.CasTests.eprouvetteDroite import eprouvetteDroite + l_problemes.append(eprouvetteDroite(n_cas)) + + n_cas = 12 + # genereMateriel : eprouvetteDroite + from blocFissure.CasTests.eprouvetteDroite_2 import eprouvetteDroite_2 + l_problemes.append(eprouvetteDroite_2(n_cas)) + + n_cas = 13 + # genereMateriel : fissureGauche + # genereMateriel : fissureGauche2 + from blocFissure.CasTests.faceGauche import faceGauche + l_problemes.append(faceGauche(n_cas)) + + n_cas = 14 + # genereMateriel : aucun + from blocFissure.CasTests.faceGauche_2 import faceGauche_2 + l_problemes.append(faceGauche_2(n_cas)) + #"boiteDefaut" has not been computed: + #- "algo3d_boiteDefaut" failed. Error: Algorithm failed. Presumably, the surface mesh is not compatible with the domain being processed (warning). + #An edge is unique (i.e., bounds a hole in the surface). + #The surface mesh includes at least one hole. The domain is not well defined. + #See /tmp/GHS3D_18605_10269264.log for more information + #Traceback (most recent call last): + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 222, in + #ok_maillage = cas.executeProbleme() + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 122, in executeProbleme + #self.maillageFissureParams, elementsDefaut, step) + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/faceGauche_2.py", line 108, in genereMaillageFissure + #maillageFissureParams, elementsDefaut, step) + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/construitFissureGenerale.py", line 330, in construitFissureGenerale + #raise Exception(text) + #Exception: Erreur au calcul du maillage. + + n_cas = 15 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_1 import fissureCoude_1 + l_problemes.append(fissureCoude_1(n_cas)) + + n_cas = 16 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_2 import fissureCoude_2 + l_problemes.append(fissureCoude_2(n_cas)) + + n_cas = 17 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_3 import fissureCoude_3 + l_problemes.append(fissureCoude_3(n_cas)) + + n_cas = 18 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_4 import fissureCoude_4 + l_problemes.append(fissureCoude_4(n_cas)) + + n_cas = 19 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_5 import fissureCoude_5 + l_problemes.append(fissureCoude_5(n_cas)) + + n_cas = 20 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_6 import fissureCoude_6 + l_problemes.append(fissureCoude_6(n_cas)) + + n_cas = 21 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_7 import fissureCoude_7 + l_problemes.append(fissureCoude_7(n_cas)) + + n_cas = 22 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_8 import fissureCoude_8 + l_problemes.append(fissureCoude_8(n_cas)) + + n_cas = 23 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_9 import fissureCoude_9 + l_problemes.append(fissureCoude_9(n_cas)) + + n_cas = 24 + # genereMateriel : aucun + from blocFissure.CasTests.fissureCoude_10 import fissureCoude_10 + l_problemes.append(fissureCoude_10(n_cas)) + + n_cas = 25 + # genereMateriel : aucun + from blocFissure.CasTests.fissure_Coude import fissure_Coude + l_problemes.append(fissure_Coude(n_cas)) + + n_cas = 26 + # genereMateriel : aucun + from blocFissure.CasTests.fissure_Coude_4 import fissure_Coude_4 + l_problemes.append(fissure_Coude_4(n_cas)) + + n_cas = 27 + # genereMateriel : vis + from blocFissure.CasTests.vis_1 import vis_1 + l_problemes.append(vis_1(n_cas)) + #"Mesh_22" has not been computed: + #- "algo2d_faceFiss" failed on FACE #2. Error: Algorithm failed. NgException at Surface meshing: Problem in Surface mesh generation + #- "algo1d_edgeFissPeau" failed on EDGE #9. Error: Algorithm failed. Source elements don't cover totally the geometrical edge + #Traceback (most recent call last): + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 233, in + #ok_maillage = cas.executeProbleme() + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 122, in executeProbleme + #self.maillageFissureParams, elementsDefaut, step) + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/vis_1.py", line 116, in genereMaillageFissure + #maillageFissureParams, elementsDefaut, step) + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/construitFissureGenerale.py", line 282, in construitFissureGenerale + #meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad) + #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/mailleFacesFissure.py", line 69, in mailleFacesFissure + #raise Exception(text) + #Exception: Erreur au calcul du maillage. + + n_cas = 28 + # genereMateriel : tube + from blocFissure.CasTests.tube import tube + l_problemes.append(tube(n_cas)) + #"Mesh_13" has not been computed: + #- "algo2d_facePeau_0" failed on "FACE_12 to mesh". Error: Algorithm failed. NgException at Surface meshing: Problem in Surface mesh generation + #- "algo1d_cercle1_0" failed on EDGE #20. Error: Algorithm failed. Source elements don't cover totally the geometrical edge + #- "algo1d_cercle1_0" failed on EDGE #17. Error: Algorithm failed. Source elements don't cover totally the geometrical edge + #- "algo1d_cercle1_0" failed on EDGE #15. Error: Algorithm failed. Source elements don't cover totally the geometrical edge + #- "algo1d_cercle1_0" failed on EDGE #12. Error: Algorithm failed. Source elements don't cover totally the geometrical edge + + return l_problemes, d_aux #============================================================= -while True: - - if ( len(problemes) != len(torun) ): - texte = "\nNombre de problèmes définis : {}\n".format(len(problemes)) - texte += "Longueur de la liste 'torun' : {}\n".format(len(torun)) - texte += "\t==> Incohérence de programmation à corriger." - print (texte) - break +def calcul_cas (n_cas, cas, d_aux, ligne): + """Calcul d'un cas""" + texte = "" + if n_cas in d_aux: + nom = d_aux[n_cas] + else: + nom = cas.nomProbleme + texte_a = "\n=== Exécution du cas n° {}, '{}'".format(n_cas,nom) + logging.critical(ligne+texte_a) + try: + ok_maillage = cas.executeProbleme() + except: + traceback.print_exc() + texte = "Problème avec le cas n° {}, '{}'\n".format(n_cas,nom) + ok_maillage = False + print(ligne) + return ok_maillage, texte +#============================================================= +def calcul_tout (l_problemes, d_aux): + """Calcul de tous les cas""" ligne = "---------------------------------------------------------------------" texte = "" nb_cas_ok = 0 nb_cas_nook = 0 - for n_cas, cas in enumerate(problemes): + for n_cas, cas in enumerate(l_problemes): #print ("Cas n° {}, '{}'".format(n_cas,cas.nomProbleme)) - if torun[n_cas]: - if n_cas in d_aux: - nom = d_aux[n_cas] - else: - nom = cas.nomProbleme - texte_a = "\n=== Exécution du cas n° {}, '{}'".format(n_cas,nom) - logging.critical(ligne+texte_a) - try: - ok_maillage = cas.executeProbleme() - except: - traceback.print_exc() - texte += "Problème avec le cas n° {}, '{}'\n".format(n_cas,nom) - ok_maillage = False + if TORUN[n_cas]: + ok_maillage, texte_a = calcul_cas (n_cas, cas, d_aux, ligne) + texte += texte_a if ok_maillage: nb_cas_ok += 1 else: @@ -264,5 +304,21 @@ while True: texte += "Les {} tests se sont bien passés.\n".format(nb_cas) print (texte+ligne) - break + return +#============================================================= +#============================================================= + +while True: + L_PROBLEMES, D_AUX = caract_l_problemes() + + if ( len(L_PROBLEMES) != len(TORUN) ): + TEXTE = "\nNombre de problèmes définis : {}\n".format(len(L_PROBLEMES)) + TEXTE += "Longueur de la liste 'TORUN' : {}\n".format(len(TORUN)) + TEXTE += "\t==> Incohérence de programmation à corriger." + print (TEXTE) + break + + calcul_tout (L_PROBLEMES, D_AUX) + + break diff --git a/src/Tools/blocFissure/CasTests/faceGauche.py b/src/Tools/blocFissure/CasTests/faceGauche.py index 20afd5c28..844ba861d 100644 --- a/src/Tools/blocFissure/CasTests/faceGauche.py +++ b/src/Tools/blocFissure/CasTests/faceGauche.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""problème de fissure non plane, débouchante non normale""" import os from blocFissure import gmu @@ -44,12 +45,15 @@ class faceGauche(fissureGenerique): """problème de fissure non plane, débouchante non normale""" nomProbleme = "faceGauche" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): logging.info("genereMaillageSain %s", self.nomCas) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med")) + ([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med")) smesh.SetName(objetSain.GetMesh(), 'objetSain') return [objetSain, True] # True : maillage hexa @@ -101,9 +105,9 @@ class faceGauche(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): mailleur = self.mailleur2d3d() @@ -125,4 +129,3 @@ class faceGauche(fissureGenerique): Entity_Quad_Pyramid = 1156, \ Entity_Quad_Penta = 856 \ ) - diff --git a/src/Tools/blocFissure/CasTests/faceGauche_2.py b/src/Tools/blocFissure/CasTests/faceGauche_2.py index 08f2bc06c..4b09404c9 100644 --- a/src/Tools/blocFissure/CasTests/faceGauche_2.py +++ b/src/Tools/blocFissure/CasTests/faceGauche_2.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""problème de fissure non plane, débouchante non normale""" import os from blocFissure import gmu @@ -44,6 +45,9 @@ class faceGauche_2(fissureGenerique): """problème de fissure non plane, débouchante non normale""" nomProbleme = "faceGauche_2" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): @@ -101,9 +105,9 @@ class faceGauche_2(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): mailleur = self.mailleur2d3d() @@ -125,4 +129,3 @@ class faceGauche_2(fissureGenerique): Entity_Quad_Pyramid = 859, \ Entity_Quad_Penta = 288 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_1.py b/src/Tools/blocFissure/CasTests/fissureCoude_1.py index 678bd1063..7cfe9f07b 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_1.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_1.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude""" import os @@ -26,6 +27,11 @@ class fissureCoude_1(fissureCoude): """problème de fissure du Coude : adaptation maillage""" nomProbleme = "fissureCoude_1" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -109,4 +115,3 @@ class fissureCoude_1(fissureCoude): Entity_Quad_Pyramid = 738, \ Entity_Quad_Penta = 672 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_10.py b/src/Tools/blocFissure/CasTests/fissureCoude_10.py index 08893f0fc..65adc7565 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_10.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_10.py @@ -17,20 +17,26 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude - cas test ASCOU17""" import os from blocFissure.gmu.fissureCoude import fissureCoude class fissureCoude_10(fissureCoude): - # cas test ASCOU17 + """Fissure dans un coude - cas test ASCOU17""" nomProbleme = "fissureCoude_10" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): """ - Paramètres géométriques du tuyau coudé sain: + Paramètres géométriques du tuyau coudé sain angleCoude r_cintr l_tube_p1 @@ -111,4 +117,3 @@ class fissureCoude_10(fissureCoude): Entity_Quad_Pyramid = 1232, \ Entity_Quad_Penta = 1136 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_2.py b/src/Tools/blocFissure/CasTests/fissureCoude_2.py index c66531a75..382c9d7b6 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_2.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_2.py @@ -17,16 +17,21 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude""" import os from blocFissure.gmu.fissureCoude import fissureCoude class fissureCoude_2(fissureCoude): - """problème de fissure du Coude : adaptation maillage - """ + """problème de fissure du Coude : adaptation maillage""" nomProbleme = "fissureCoude_2" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -110,5 +115,3 @@ class fissureCoude_2(fissureCoude): Entity_Quad_Pyramid = 1428, \ Entity_Quad_Penta = 1344 \ ) - - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_3.py b/src/Tools/blocFissure/CasTests/fissureCoude_3.py index 0f0617a43..1d6d8df99 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_3.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_3.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude""" import os @@ -26,6 +27,11 @@ class fissureCoude_3(fissureCoude): """problème de fissure du Coude - adaptation maillage""" nomProbleme = "fissureCoude_3" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -109,4 +115,3 @@ class fissureCoude_3(fissureCoude): Entity_Quad_Pyramid = 602, \ Entity_Quad_Penta = 438 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_4.py b/src/Tools/blocFissure/CasTests/fissureCoude_4.py index fa2d1964f..072c10305 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_4.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_4.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude - ASCOU09A""" import os @@ -26,6 +27,11 @@ class fissureCoude_4(fissureCoude): """problème de fissure du Coude : ASCOU09A - adaptation maillage""" nomProbleme = "fissureCoude_4" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -109,4 +115,3 @@ class fissureCoude_4(fissureCoude): Entity_Quad_Pyramid = 642, \ Entity_Quad_Penta = 426 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_5.py b/src/Tools/blocFissure/CasTests/fissureCoude_5.py index b8802d51a..5332057d4 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_5.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_5.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude""" import os @@ -26,6 +27,11 @@ class fissureCoude_5(fissureCoude): """problème de fissure du Coude : - adaptation maillage""" nomProbleme = "fissureCoude_5" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -109,4 +115,3 @@ class fissureCoude_5(fissureCoude): Entity_Quad_Pyramid = 532, \ Entity_Quad_Penta = 496 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_6.py b/src/Tools/blocFissure/CasTests/fissureCoude_6.py index 43c9ebf2e..df3810ca6 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_6.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_6.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude - ASCOU08""" import os @@ -26,6 +27,11 @@ class fissureCoude_6(fissureCoude): """ASCOU08""" nomProbleme = "fissureCoude_6" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -110,4 +116,3 @@ class fissureCoude_6(fissureCoude): Entity_Quad_Pyramid = 452, \ Entity_Quad_Penta = 408 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_7.py b/src/Tools/blocFissure/CasTests/fissureCoude_7.py index 43369a22a..bdce844ad 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_7.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_7.py @@ -17,15 +17,21 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude""" import os from blocFissure.gmu.fissureCoude import fissureCoude class fissureCoude_7(fissureCoude): - """fissureCoude_7""" + """fissure dans un coude""" nomProbleme = "fissureCoude_7" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -111,4 +117,3 @@ class fissureCoude_7(fissureCoude): Entity_Quad_Pyramid = 668, \ Entity_Quad_Penta = 612 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_8.py b/src/Tools/blocFissure/CasTests/fissureCoude_8.py index 2151fc151..dedebc3a8 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_8.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_8.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude - ASCOU16""" import os @@ -26,6 +27,11 @@ class fissureCoude_8(fissureCoude): """cas test ASCOU16""" nomProbleme = "fissureCoude_8" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_9.py b/src/Tools/blocFissure/CasTests/fissureCoude_9.py index dae917fde..bfc6b64ac 100644 --- a/src/Tools/blocFissure/CasTests/fissureCoude_9.py +++ b/src/Tools/blocFissure/CasTests/fissureCoude_9.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude - ASCOU19""" import os @@ -26,6 +27,11 @@ class fissureCoude_9(fissureCoude): """cas test ASCOU19""" nomProbleme = "fissureCoude_9" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): diff --git a/src/Tools/blocFissure/CasTests/fissure_Coude.py b/src/Tools/blocFissure/CasTests/fissure_Coude.py index f493b1ba6..7ab4a463b 100644 --- a/src/Tools/blocFissure/CasTests/fissure_Coude.py +++ b/src/Tools/blocFissure/CasTests/fissure_Coude.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude""" import os @@ -48,6 +49,13 @@ class fissure_Coude(fissureGenerique): """ nomProbleme = "fissure_Coude" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() + circonferentielle = False + longitudinale = False # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -267,7 +275,7 @@ class fissure_Coude(fissureGenerique): _ = maillageSain.GroupOnGeom(PEAUEXT,'PEAUEXT',SMESH.FACE) _ = maillageSain.GroupOnGeom(COUDE,'COUDSAIN',SMESH.VOLUME) - isDone = maillageSain.Compute() + _ = maillageSain.Compute() return [maillageSain, True] # True : maillage hexa @@ -299,10 +307,10 @@ class fissure_Coude(fissureGenerique): logging.info("genereShapeFissure %s", self.nomCas) logging.info("shapeFissureParams %s", shapeFissureParams) - angleCoude = geomParams['angleCoude'] + #angleCoude = geomParams['angleCoude'] r_cintr = geomParams['r_cintr'] l_tube_p1 = geomParams['l_tube_p1'] - l_tube_p2 = geomParams['l_tube_p2'] + #l_tube_p2 = geomParams['l_tube_p2'] epais = geomParams['epais'] de = geomParams['de'] @@ -320,13 +328,8 @@ class fissure_Coude(fissureGenerique): if not lgInfluence: lgInfluence = profondeur - if longueur > 2*profondeur: - self.fissureLongue=True - else: - self.fissureLongue=False + self.fissureLongue = bool(longueur > 2*profondeur) - self.circonferentielle = False - self.longitudinale = False if self.fissureLongue and (abs(orientation) < 45) : self.longitudinale = True elif self.fissureLongue: @@ -522,4 +525,3 @@ class fissure_Coude(fissureGenerique): Entity_Quad_Pyramid = 1232, \ Entity_Quad_Penta = 1176 \ ) - diff --git a/src/Tools/blocFissure/CasTests/fissure_Coude_4.py b/src/Tools/blocFissure/CasTests/fissure_Coude_4.py index 2df1c7abd..6753d2447 100644 --- a/src/Tools/blocFissure/CasTests/fissure_Coude_4.py +++ b/src/Tools/blocFissure/CasTests/fissure_Coude_4.py @@ -17,6 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Fissure dans un coude - ASCOU09A""" import os @@ -29,6 +30,11 @@ class fissure_Coude_4(fissure_Coude): """ nomProbleme = "fissure_Coude_4" + geomParams = dict() + meshParams = dict() + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def setParamGeometrieSaine(self): @@ -92,4 +98,3 @@ class fissure_Coude_4(fissure_Coude): Entity_Node = 133418, Entity_Quad_Tetra = 18759, Entity_Quad_Quadrangle = 11852) - diff --git a/src/Tools/blocFissure/CasTests/tube.py b/src/Tools/blocFissure/CasTests/tube.py index ec8ffdf23..a4544fd4b 100644 --- a/src/Tools/blocFissure/CasTests/tube.py +++ b/src/Tools/blocFissure/CasTests/tube.py @@ -18,7 +18,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -"""problème de fissure plane dans un tube""" +"""problème de fissure plane dans un tube ; passage par fichier xao""" import os import logging @@ -38,6 +38,9 @@ class tube(fissureGenerique): """problème de fissure plane dans un tube""" nomProbleme = "tube" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): @@ -104,9 +107,9 @@ class tube(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): texte = "genereMaillageFissure pour '{}'".format(self.nomCas) diff --git a/src/Tools/blocFissure/CasTests/vis_1.py b/src/Tools/blocFissure/CasTests/vis_1.py index cf3d56e35..bc1d7c34a 100644 --- a/src/Tools/blocFissure/CasTests/vis_1.py +++ b/src/Tools/blocFissure/CasTests/vis_1.py @@ -17,18 +17,15 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""problème de fissure non plane, débouchante non normale""" import os from blocFissure import gmu from blocFissure.gmu.geomsmesh import geompy, smesh -import math import GEOM import SALOMEDS import SMESH -#import StdMeshers -#import GHS3DPlugin -#import NETGENPlugin import logging from blocFissure.gmu.fissureGenerique import fissureGenerique @@ -44,6 +41,9 @@ class vis_1(fissureGenerique): """problème de fissure non plane, débouchante non normale""" nomProbleme = "vis_1" + shapeFissureParams = dict() + maillageFissureParams = dict() + referencesMaillageFissure = dict() # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): @@ -108,9 +108,9 @@ class vis_1(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step, \ + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): texte = "genereMaillageFissure pour '{}'".format(self.nomCas) @@ -135,4 +135,3 @@ class vis_1(fissureGenerique): Entity_Quad_Pyramid = 1284, \ Entity_Quad_Penta = 984 \ ) - diff --git a/src/Tools/blocFissure/gmu/fissureGenerique.py b/src/Tools/blocFissure/gmu/fissureGenerique.py index 7f77fa693..9d085f5e9 100644 --- a/src/Tools/blocFissure/gmu/fissureGenerique.py +++ b/src/Tools/blocFissure/gmu/fissureGenerique.py @@ -72,14 +72,14 @@ class fissureGenerique(object): """setParamMaillageFissure""" self.maillageFissureParams = dict() - def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, maillageFissureParams): + def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams): """genereZoneDefaut""" elementsDefaut = [None] return elementsDefaut def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ - shapesFissure, maillageFissureParams, \ - elementsDefaut, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ mailleur="MeshGems"): """genereMaillageFissure""" maillageFissure = None diff --git a/src/Tools/blocFissure/materielCasTests/genereMateriel.py b/src/Tools/blocFissure/materielCasTests/genereMateriel.py index a798c67ea..d6be56fc2 100644 --- a/src/Tools/blocFissure/materielCasTests/genereMateriel.py +++ b/src/Tools/blocFissure/materielCasTests/genereMateriel.py @@ -19,15 +19,15 @@ # from blocFissure.materielCasTests import cubeAngle -#from blocFissure.materielCasTests import decoupeCylindre -#from blocFissure.materielCasTests import eprouvetteCourbe -#from blocFissure.materielCasTests import eprouvetteDroite -#from blocFissure.materielCasTests import fissureGauche -#from blocFissure.materielCasTests import fissureGauche2 -#from blocFissure.materielCasTests import ellipse -#from blocFissure.materielCasTests import ellipse_probleme -#from blocFissure.materielCasTests import disque_perce -#from blocFissure.materielCasTests import ellipse_disque -#from blocFissure.materielCasTests import vis -#from blocFissure.materielCasTests import cubeFin -#from blocFissure.materielCasTests import tube +from blocFissure.materielCasTests import cubeFin +from blocFissure.materielCasTests import decoupeCylindre +from blocFissure.materielCasTests import disque_perce +from blocFissure.materielCasTests import ellipse_disque +from blocFissure.materielCasTests import ellipse +from blocFissure.materielCasTests import ellipse_probleme +from blocFissure.materielCasTests import eprouvetteCourbe +from blocFissure.materielCasTests import eprouvetteDroite +from blocFissure.materielCasTests import fissureGauche +from blocFissure.materielCasTests import fissureGauche2 +from blocFissure.materielCasTests import vis +from blocFissure.materielCasTests import tube -- 2.39.2