Salome HOME
Schémas YACS - suite
[modules/homard.git] / tests / test_2.py
index b5a10cb94304240e90d2d45f66a6aa2345ec4f0a..82c7ac8a38ebab34e0fb428b2ddf0a7b7d854483 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2013
 Test test_2
 """
-__revision__ = "V1.7"
+__revision__ = "V1.9"
 
 #========================================================================
 Test_Name = "test_2"
@@ -82,53 +82,53 @@ Copyright EDF-R&D 2010, 2013
   #
   # Creation of the hypotheses
   # ==========================
-  # Creation of the hypothesis Hypo_1
-    Hypo_1 = homard.CreateHypothesis('Hypo_1')
-    Hypo_1.SetAdapRefinUnRef(-1, 1, 0)
-    Hypo_1.AddGroup('EG')
-    Hypo_1.AddGroup('BANDE')
+  # Creation of the hypothesis Hypo_2_1
+    Hypo_2_1 = homard.CreateHypothesis('Hypo_2_1')
+    Hypo_2_1.SetAdapRefinUnRef(-1, 1, 0)
+    Hypo_2_1.AddGroup('EG')
+    Hypo_2_1.AddGroup('BANDE')
 
-  # Creation of the hypothesis Hypo_2
-    Hypo_2 = homard.CreateHypothesis('Hypo_2')
-    Hypo_2.SetAdapRefinUnRef(-1, 1, 0)
-    Hypo_2.AddGroup('M_D')
+  # Creation of the hypothesis Hypo_2_2
+    Hypo_2_2 = homard.CreateHypothesis('Hypo_2_2')
+    Hypo_2_2.SetAdapRefinUnRef(-1, 1, 0)
+    Hypo_2_2.AddGroup('M_D')
   #
   # Creation of the cases
   # =====================
-    # Creation of the case Case_1
-    Case_1 = homard.CreateCase('Case_1', 'PLAQUE_0', os.path.join(Rep_Test, Test_Name + '.00.med'))
-    Case_1.SetDirName(Rep_Test_Resu)
-    Case_1.SetConfType(1)
-    Case_1.AddBoundaryGroup('internal_boundary', '')
+    # Creation of the case Case_2
+    Case_2 = homard.CreateCase('Case_2', 'PLAQUE_0', os.path.join(Rep_Test, Test_Name + '.00.med'))
+    Case_2.SetDirName(Rep_Test_Resu)
+    Case_2.SetConfType(1)
+    Case_2.AddBoundaryGroup('internal_boundary', '')
   #
   # Creation of the iterations
   # ==========================
-  # Creation of the iteration Iter_1
-    Iter_1 = Case_1.NextIteration('Iter_1')
-    Iter_1.SetMeshName('PLAQUE_1')
-    Iter_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
-    Iter_1.AssociateHypo('Hypo_1')
-    error = Iter_1.Compute(1)
+  # Creation of the iteration Iter_2_1
+    Iter_2_1 = Case_2.NextIteration('Iter_2_1')
+    Iter_2_1.SetMeshName('PLAQUE_1')
+    Iter_2_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
+    Iter_2_1.AssociateHypo('Hypo_2_1')
+    error = Iter_2_1.Compute(1, 1)
     if error :
       error = 1
       break
 
-  # Creation of the iteration Iter_2
-    Iter_2 = Iter_1.NextIteration('Iter_2')
-    Iter_2.SetMeshName('PLAQUE_2')
-    Iter_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
-    Iter_2.AssociateHypo('Hypo_1')
-    error = Iter_2.Compute(1)
+  # Creation of the iteration Iter_2_2
+    Iter_2_2 = Iter_2_1.NextIteration('Iter_2_2')
+    Iter_2_2.SetMeshName('PLAQUE_2')
+    Iter_2_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
+    Iter_2_2.AssociateHypo('Hypo_2_1')
+    error = Iter_2_2.Compute(1, 1)
     if error :
       error = 2
       break
 
-  # Creation of the iteration Iter_3
-    Iter_3 = Iter_2.NextIteration('Iter_3')
-    Iter_3.SetMeshName('PLAQUE_3')
-    Iter_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
-    Iter_3.AssociateHypo('Hypo_2')
-    error = Iter_3.Compute(1)
+  # Creation of the iteration Iter_2_3
+    Iter_2_3 = Iter_2_2.NextIteration('Iter_2_3')
+    Iter_2_3.SetMeshName('PLAQUE_3')
+    Iter_2_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
+    Iter_2_3.AssociateHypo('Hypo_2_2')
+    error = Iter_2_3.Compute(1, 1)
     if error :
       error = 3
       break