2014-01-09 14:20:44 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2020-04-15 17:49:00 +03:00
|
|
|
# Copyright (C) 2014-2020 EDF R&D
|
2019-02-14 14:55:47 +03:00
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
|
|
|
#
|
2014-01-09 14:20:44 +00:00
|
|
|
|
|
|
|
import sys, traceback
|
2014-08-29 16:37:55 +02:00
|
|
|
import logging
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure import gmu
|
|
|
|
from blocFissure.gmu import initLog
|
2014-12-10 17:37:21 +01:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------------------------
|
2014-01-09 14:20:44 +00:00
|
|
|
#initLog.setDebug()
|
2021-01-21 18:13:50 +01:00
|
|
|
#initLog.setVerbose()
|
2014-12-10 17:37:21 +01:00
|
|
|
#initLog.setRelease()
|
2014-09-08 14:58:52 +02:00
|
|
|
#initLog.setPerfTests()
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
# ---tous les cas en séquence, ou les cas sélectionnés ...
|
2014-12-10 17:37:21 +01:00
|
|
|
runall = True
|
|
|
|
if runall:
|
2021-01-21 18:13:50 +01:00
|
|
|
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]
|
|
|
|
else: #prob 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
|
|
|
|
torun = [ 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1] # pb
|
|
|
|
torun = [ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0] # OK
|
2014-12-10 17:37:21 +01:00
|
|
|
# -----------------------------------------------------------------------------------------------
|
|
|
|
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.gmu import geomsmesh
|
2014-08-28 10:06:35 +02:00
|
|
|
from blocFissure.gmu.casStandard import casStandard
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-15 15:02:40 +01:00
|
|
|
problemes = list()
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas = 0
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests.cubeAngle import cubeAngle
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(cubeAngle(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests.cubeAngle2 import cubeAngle2
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(cubeAngle2(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests import cubeCoin
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(casStandard(cubeCoin.dicoParams, cubeCoin.referencesMaillageFissure, n_cas, "cubeCoin"))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests import cubeMilieu
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(casStandard(cubeMilieu.dicoParams, cubeMilieu.referencesMaillageFissure, n_cas, "cubeMilieu"))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests import cubeTransverse
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(casStandard(cubeTransverse.dicoParams, cubeTransverse.referencesMaillageFissure, n_cas, "cubeTransverse"))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.cylindre import cylindre
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(cylindre(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.cylindre_2 import cylindre_2
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(cylindre_2(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests import disquePerce
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(casStandard(disquePerce.dicoParams, disquePerce.referencesMaillageFissure, n_cas, "disquePerce"))
|
2021-01-15 15:02:40 +01:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests.ellipse_1 import ellipse_1
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(ellipse_1(n_cas))
|
2021-01-15 15:02:40 +01:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests.ellipse_2 import ellipse_2
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(ellipse_2(n_cas))
|
2021-01-15 15:02:40 +01:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.eprouvetteCourbe import eprouvetteCourbe
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(eprouvetteCourbe(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.eprouvetteDroite import eprouvetteDroite
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(eprouvetteDroite(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.eprouvetteDroite_2 import eprouvetteDroite_2
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(eprouvetteDroite_2(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests.faceGauche import faceGauche
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(faceGauche(n_cas))
|
2021-01-15 15:02:40 +01:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2021-01-15 15:02:40 +01:00
|
|
|
from blocFissure.CasTests.faceGauche_2 import faceGauche_2
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(faceGauche_2(n_cas))
|
2021-01-15 15:02:40 +01:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_1 import fissureCoude_1
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_1(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
|
|
|
from blocFissure.CasTests.fissureCoude_10 import fissureCoude_10
|
|
|
|
problemes.append(fissureCoude_10(n_cas))
|
|
|
|
|
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_2 import fissureCoude_2
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_2(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_3 import fissureCoude_3
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_3(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_4 import fissureCoude_4
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_4(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_5 import fissureCoude_5
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_5(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_6 import fissureCoude_6
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_6(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_7 import fissureCoude_7
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_7(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_8 import fissureCoude_8
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_8(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.fissureCoude_9 import fissureCoude_9
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(fissureCoude_9(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
|
|
|
from blocFissure.CasTests.fissure_Coude import fissure_Coude
|
|
|
|
problemes.append(fissure_Coude(n_cas))
|
2014-01-09 14:20:44 +00:00
|
|
|
|
2021-01-21 18:13:50 +01:00
|
|
|
n_cas += 1
|
|
|
|
from blocFissure.CasTests.fissure_Coude_4 import fissure_Coude_4
|
|
|
|
problemes.append(fissure_Coude_4(n_cas))
|
|
|
|
|
|
|
|
n_cas += 1
|
2014-01-09 14:20:44 +00:00
|
|
|
from blocFissure.CasTests.vis_1 import vis_1
|
2021-01-21 18:13:50 +01:00
|
|
|
problemes.append(vis_1(n_cas))
|
|
|
|
|
|
|
|
#=============================================================
|
|
|
|
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
|
|
|
|
|
|
|
|
ligne = "---------------------------------------------------------------------"
|
|
|
|
texte = ""
|
|
|
|
for iaux, cas in enumerate(problemes):
|
|
|
|
#print ("Cas n° {}, '{}'".format(iaux,cas.nomProbleme))
|
|
|
|
if torun[iaux]:
|
|
|
|
texte_a = "\n=== Exécution du cas n° {}, '{}'".format(iaux,cas.nomProbleme)
|
|
|
|
logging.critical(ligne+texte_a)
|
|
|
|
try:
|
|
|
|
cas.executeProbleme()
|
|
|
|
except:
|
|
|
|
traceback.print_exc()
|
|
|
|
texte += "Problème avec le cas n° {}, '{}'\n".format(iaux,cas.nomProbleme)
|
|
|
|
print(ligne)
|
|
|
|
|
|
|
|
if not texte:
|
|
|
|
texte = "Tous les tests se sont bien passés.\n"
|
|
|
|
print (texte+ligne)
|
|
|
|
|
|
|
|
break
|
|
|
|
|