Salome HOME
Update copyrights
[modules/smesh.git] / src / Tools / blocFissure / CasTests / execution_Cas.py
index 2d7b80dbe428499d89d1a03e89af720c66166086..de4bab4e734299498ee940a107ab5d5c318c73b2 100644 (file)
@@ -1,13 +1,44 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# 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
+#
 
 import sys, traceback
+import logging
 from blocFissure import gmu
 from blocFissure.gmu import initLog
+
+# -----------------------------------------------------------------------------------------------
 #initLog.setDebug()
 initLog.setVerbose()
+#initLog.setRelease()
+#initLog.setPerfTests()
+
+# ---tous les cas en sequence, ou les cas selectionnés ...
+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,]
+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, 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, 0,]
+# -----------------------------------------------------------------------------------------------
 
 from blocFissure.gmu import geomsmesh
-from blocFissure.casStandard import casStandard
+from blocFissure.gmu.casStandard import casStandard
 
 problemes = []
 
@@ -111,17 +142,24 @@ cas=24
 from blocFissure.CasTests.vis_1 import vis_1
 problemes.append(vis_1(cas))
 
-# ---tous les cas en sequence, ou les cas selectionnés ...
-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,]
-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   
-  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,]
+cas=25
+from blocFissure.CasTests import cubeCoin
+problemes.append(casStandard(cubeCoin.dicoParams, cubeCoin.referencesMaillageFissure, cas))
+
+cas=26
+from blocFissure.CasTests import cubeMilieu
+problemes.append(casStandard(cubeMilieu.dicoParams, cubeMilieu.referencesMaillageFissure, cas))
+
+cas=27
+from blocFissure.CasTests import cubeTransverse
+problemes.append(casStandard(cubeTransverse.dicoParams, cubeTransverse.referencesMaillageFissure, cas))
+
   
 for i in range(len(problemes)):
   if torun[i]:
+    logging.critical("=== Execution cas %s", i)
     try:
       problemes[i].executeProbleme()
     except:
       traceback.print_exc()
-    print "---------------------------------------------------------------------"
+    print("---------------------------------------------------------------------")