Salome HOME
Schémas YACS - suite
authornicolas <nicolas>
Wed, 18 Sep 2013 07:38:47 +0000 (07:38 +0000)
committernicolas <nicolas>
Wed, 18 Sep 2013 07:38:47 +0000 (07:38 +0000)
33 files changed:
doc/files/tutorial_1.py
doc/files/tutorial_2.py
doc/files/tutorial_3.py
doc/files/tutorial_4.py
doc/files/tutorial_5.py
idl/HOMARD_YACS.idl [new file with mode: 0644]
src/HOMARD/HOMARD_YACS.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_YACS.hxx [new file with mode: 0644]
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/MonCreateBoundaryAn.cxx
src/HOMARDGUI/MonCreateBoundaryDi.cxx
src/HOMARDGUI/MonCreateCase.cxx
src/HOMARDGUI/MonCreateCase.h
src/HOMARDGUI/MonCreateHypothesis.cxx
src/HOMARDGUI/MonCreateIteration.cxx
src/HOMARDGUI/MonCreateListGroup.cxx
src/HOMARDGUI/MonCreateYACS.cxx
src/HOMARDGUI/MonCreateYACS.h
src/HOMARDGUI/MonCreateZone.cxx
src/HOMARDGUI/MonCreateZone.h
src/HOMARDGUI/MonEditCase.cxx
src/HOMARDGUI/MonEditCase.h
src/HOMARDGUI/MonEditYACS.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditYACS.h [new file with mode: 0644]
src/HOMARDGUI/MonIterInfo.cxx
src/HOMARDGUI/MonMeshInfo.cxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Gen_i.hxx
src/HOMARD_I/HOMARD_YACS_i.cxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_YACS_i.hxx [new file with mode: 0644]
tests/test_1.py
tests/test_2.py
tests/test_3.py

index 3ab267751fc5df4829899cc75d8e634c3f1740b5..9f14755d91ece546ce5a0a35525569e3f65d986b 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.5"
+__revision__ = "V1.6"
 #
 import os
 #
@@ -36,6 +36,9 @@ if os.environ.has_key("LOGNAME") :
 else :
   user = "anonymous"
 dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
+dircase = os.path.join( dircase, "tutorial_1" )
 if not os.path.isdir(dircase) :
   os.mkdir (dircase)
 # ==================================
@@ -51,10 +54,10 @@ homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
 study_main = salome.myStudyManager.NewStudy("HOMARD")
 homard.SetCurrentStudy(salome.myStudy)
 #
-# Hypothesis "Hypo_0"
+# Hypothesis "Hypo_1"
 # ===================
-Hypo_0 = homard.CreateHypothesis('Hypo_0')
-Hypo_0.SetAdapRefinUnRef(-1, 1, 0)
+Hypo_1 = homard.CreateHypothesis('Hypo_1')
+Hypo_1.SetAdapRefinUnRef(-1, 1, 0)
 #
 # Case "Case_1"
 # =============
@@ -64,26 +67,26 @@ Case_1.SetConfType(1)
 #
 # Iterations
 # ==========
-# Iteration "Iter_0"
-Iter_0 = Case_1.NextIteration('Iter_0')
-Iter_0.SetMeshName('MESH')
-Iter_0.SetMeshFile(dircase+'/maill.01.med')
-Iter_0.AssociateHypo('Hypo_0')
-codret = Iter_0.Compute(1, 2)
+# Iteration "Iter_1_0"
+Iter_1_0 = Case_1.NextIteration('Iter_1_0')
+Iter_1_0.SetMeshName('MESH')
+Iter_1_0.SetMeshFile(dircase+'/maill.01.med')
+Iter_1_0.AssociateHypo('Hypo_1')
+codret = Iter_1_0.Compute(1, 2)
 
-# Iteration "Iter_1"
-Iter_1 = Iter_0.NextIteration('Iter_1')
-Iter_1.SetMeshName('MESH')
-Iter_1.SetMeshFile(dircase+'/maill.02.med')
-Iter_1.AssociateHypo('Hypo_0')
-codret = Iter_1.Compute(1, 2)
+# Iteration "Iter_1_1"
+Iter_1_1 = Iter_1_0.NextIteration('Iter_1_1')
+Iter_1_1.SetMeshName('MESH')
+Iter_1_1.SetMeshFile(dircase+'/maill.02.med')
+Iter_1_1.AssociateHypo('Hypo_1')
+codret = Iter_1_1.Compute(1, 2)
 
-# Iteration "Iter_2"
-Iter_2 = Iter_1.NextIteration('Iter_2')
-Iter_2.SetMeshName('MESH')
-Iter_2.SetMeshFile(dircase+'/maill.03.med')
-Iter_2.AssociateHypo('Hypo_0')
-codret = Iter_2.Compute(1, 2)
+# Iteration "Iter_1_2"
+Iter_1_2 = Iter_1_1.NextIteration('Iter_1_2')
+Iter_1_2.SetMeshName('MESH')
+Iter_1_2.SetMeshFile(dircase+'/maill.03.med')
+Iter_1_2.AssociateHypo('Hypo_1')
+codret = Iter_1_2.Compute(1, 2)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index 30b35ad72cdc8a892fe8c636fa1f64a7687ab33f..46375f71147dd08f7332c2405b741be960fb23b2 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.6"
+__revision__ = "V1.7"
 #
 import os
 #
@@ -36,6 +36,9 @@ if os.environ.has_key("LOGNAME") :
 else :
   user = "anonymous"
 dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
+dircase = os.path.join( dircase, "tutorial_2" )
 if not os.path.isdir(dircase) :
   os.mkdir (dircase)
 # ==================================
@@ -62,40 +65,40 @@ Zone_1 = homard.CreateZoneSphere ('Zone_1', 0., 0., 0., 1.05)
 # Box "Zone_2"
 Zone_2 = homard.CreateZoneBox ('Zone_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
 #
-# Hypothesis "Hypo_0"
+# Hypothesis "Hypo_2"
 # ===================
-Hypo_0 = homard.CreateHypothesis('Hypo_0')
-Hypo_0.SetAdapRefinUnRef(0, 1, 0)
-Hypo_0.AddZone('Zone_1', 1)
-Hypo_0.AddZone('Zone_0', 1)
+Hypo_2 = homard.CreateHypothesis('Hypo_2')
+Hypo_2.SetAdapRefinUnRef(0, 1, 0)
+Hypo_2.AddZone('Zone_1', 1)
+Hypo_2.AddZone('Zone_0', 1)
 #
-# Hypothesis "Hypo_1"
+# Hypothesis "Hypo_2_bis"
 # ===================
-Hypo_1 = homard.CreateHypothesis('Hypo_1')
-Hypo_1.SetAdapRefinUnRef(0, 1, 0)
-Hypo_1.AddZone('Zone_0', 1)
-Hypo_1.AddZone('Zone_2', 1)
+Hypo_2_bis = homard.CreateHypothesis('Hypo_2_bis')
+Hypo_2_bis.SetAdapRefinUnRef(0, 1, 0)
+Hypo_2_bis.AddZone('Zone_0', 1)
+Hypo_2_bis.AddZone('Zone_2', 1)
 #
-# Case "Case_1"
+# Case "Case_2"
 # =============
-Case_1 = homard.CreateCase('Case_1', 'MZERO', data_dir+'/tutorial_2.00.med')
-Case_1.SetDirName(dircase)
+Case_2 = homard.CreateCase('Case_2', 'MZERO', data_dir+'/tutorial_2.00.med')
+Case_2.SetDirName(dircase)
 #
-# Iteration "Iter_0"
+# Iteration "Iter_2_0"
 # ==================
-Iter_0 = Case_1.NextIteration('Iter_0')
-Iter_0.SetMeshName('M_1')
-Iter_0.SetMeshFile(dircase+'/maill.01.med')
-Iter_0.AssociateHypo('Hypo_0')
-codret = Iter_0.Compute(1, 2)
+Iter_2_0 = Case_2.NextIteration('Iter_2_0')
+Iter_2_0.SetMeshName('M_1')
+Iter_2_0.SetMeshFile(dircase+'/maill.01.med')
+Iter_2_0.AssociateHypo('Hypo_2')
+codret = Iter_2_0.Compute(1, 2)
 #
-# Iteration "Iter_1"
+# Iteration "Iter_2_1"
 # ==================
-Iter_1 = Iter_0.NextIteration('Iter_1')
-Iter_1.SetMeshName('M_2')
-Iter_1.SetMeshFile(dircase+'/maill.02.med')
-Iter_1.AssociateHypo('Hypo_1')
-codret = Iter_1.Compute(1, 2)
+Iter_2_1 = Iter_2_0.NextIteration('Iter_2_1')
+Iter_2_1.SetMeshName('M_2')
+Iter_2_1.SetMeshFile(dircase+'/maill.02.med')
+Iter_2_1.AssociateHypo('Hypo_2_bis')
+codret = Iter_2_1.Compute(1, 2)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index ac9e91ec7889756c55185bcd5af3f0c2c6dcf54f..86ba7bb998531d172a7e675c35e6493f62e9e877 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.6"
+__revision__ = "V1.7"
 #
 import os
 #
@@ -36,6 +36,9 @@ if os.environ.has_key("LOGNAME") :
 else :
   user = "anonymous"
 dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
+dircase = os.path.join( dircase, "tutorial_3" )
 if not os.path.isdir(dircase) :
   os.mkdir (dircase)
 # ==================================
@@ -92,40 +95,40 @@ Hypo_1vers2_bis.SetRefinThr(1, 0.0001)
 Hypo_1vers2_bis.SetUnRefThr(1, 0.000001)
 Hypo_1vers2_bis.SetTypeFieldInterp(0)
 #
-# Case "Case_1"
+# Case "Case_3"
 # =============
-Case_1 = homard.CreateCase('Case_1', 'G_0', data_dir+'/tutorial_3.00.med')
-Case_1.SetDirName(dircase)
+Case_3 = homard.CreateCase('Case_3', 'G_0', data_dir+'/tutorial_3.00.med')
+Case_3.SetDirName(dircase)
 #
-# Iteration "Iter_1"
+# Iteration "Iter_3_1"
 # ==================
-Iter_1 = Case_1.NextIteration('Iter_1')
-Iter_1.SetMeshName('H_1')
-Iter_1.SetMeshFile(dircase+'/maill.01.med')
-Iter_1.SetFieldFile(data_dir+'/tutorial_3.00.med')
-Iter_1.SetTimeStepRank( 1, 1)
-Iter_1.AssociateHypo('Hypo_0vers1')
-codret = Iter_1.Compute(1, 2)
-#
-# Iteration "Iter_2"
+Iter_3_1 = Case_3.NextIteration('Iter_3_1')
+Iter_3_1.SetMeshName('H_1')
+Iter_3_1.SetMeshFile(dircase+'/maill.01.med')
+Iter_3_1.SetFieldFile(data_dir+'/tutorial_3.00.med')
+Iter_3_1.SetTimeStepRank( 1, 1)
+Iter_3_1.AssociateHypo('Hypo_0vers1')
+codret = Iter_3_1.Compute(1, 2)
+#
+# Iteration "Iter_3_2"
 # ==================
-Iter_2 = Iter_1.NextIteration('Iter_2')
-Iter_2.SetMeshName('H_2')
-Iter_2.SetMeshFile(dircase+'/maill.02.med')
-Iter_2.SetFieldFile(data_dir+'/tutorial_3.01.med')
-Iter_2.SetTimeStepRank(1, 1)
-Iter_2.AssociateHypo('Hypo_1vers2')
-codret = Iter_2.Compute(1, 2)
-#
-# Iteration "Iter_2_bis"
+Iter_3_2 = Iter_3_1.NextIteration('Iter_3_2')
+Iter_3_2.SetMeshName('H_2')
+Iter_3_2.SetMeshFile(dircase+'/maill.02.med')
+Iter_3_2.SetFieldFile(data_dir+'/tutorial_3.01.med')
+Iter_3_2.SetTimeStepRank(1, 1)
+Iter_3_2.AssociateHypo('Hypo_1vers2')
+codret = Iter_3_2.Compute(1, 2)
+#
+# Iteration "Iter_3_2_bis"
 # ======================
-Iter_2_bis = Iter_1.NextIteration('Iter_2_bis')
-Iter_2_bis.SetMeshName('H_2_bis')
-Iter_2_bis.SetMeshFile(dircase+'/maill.02.bis.med')
-Iter_2_bis.SetFieldFile(data_dir+'/tutorial_3.01.med')
-Iter_2_bis.SetTimeStepRank(1, 1)
-Iter_2_bis.AssociateHypo('Hypo_1vers2_bis')
-codret = Iter_2_bis.Compute(1, 2)
+Iter_3_2_bis = Iter_3_1.NextIteration('Iter_3_2_bis')
+Iter_3_2_bis.SetMeshName('H_2_bis')
+Iter_3_2_bis.SetMeshFile(dircase+'/maill.02.bis.med')
+Iter_3_2_bis.SetFieldFile(data_dir+'/tutorial_3.01.med')
+Iter_3_2_bis.SetTimeStepRank(1, 1)
+Iter_3_2_bis.AssociateHypo('Hypo_1vers2_bis')
+codret = Iter_3_2_bis.Compute(1, 2)
 #
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index 59467a9fd54777dfba8bdc7afa4655ad2d10a0fd..73b10b77fcd22051d2347ccb27145af3693e3b90 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2011, 2013
 """
-__revision__ = "V2.2"
+__revision__ = "V2.3"
 #
 import os
 #
@@ -38,6 +38,9 @@ else :
 dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
 if not os.path.isdir(dircase) :
     os.mkdir (dircase)
+dircase = os.path.join( dircase, "tutorial_4" )
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
 # ==================================
 # Ce repertoire contient les fichiers de donnees : tutorial_4.00.med, tutorial_4.fr.med
 pathHomard = os.getenv('HOMARD_ROOT_DIR')
@@ -53,63 +56,63 @@ homard.SetCurrentStudy(salome.myStudy)
 #
 # Creation of the boundaries
 # ==========================
-Boundary_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', data_dir+'/tutorial_4.fr.med')
+Boun_4_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', data_dir+'/tutorial_4.fr.med')
 #
-Boundary_2 = homard.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.)
+Boun_4_2 = homard.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.)
 #
-Boundary_3 = homard.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
+Boun_4_3 = homard.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
 #
-Boundary_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
+Boun_4_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
 #
-Boundary_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
+Boun_4_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
 #
 # Hypothesis
 # ==========
-# Creation of the hypothesis Hypo_1
-Hypo_1 = homard.CreateHypothesis('Hypo_1')
-Hypo_1.SetAdapRefinUnRef(-1, 1, 0)
-Hypo_1.AddGroup('T1_INT_I')
-Hypo_1.AddGroup('T1_INT_O')
-Hypo_1.AddGroup('T2_INT')
-# Creation of the hypothesis Hypo_2
-Hypo_2 = homard.CreateHypothesis('Hypo_2')
-Hypo_2.SetAdapRefinUnRef(-1, 1, 0)
-Hypo_2.AddGroup('T1_EXT_I')
-Hypo_2.AddGroup('T1_EXT_O')
-Hypo_2.AddGroup('T2_EXT')
-#
-# Case "Case"
+# Creation of the hypothesis Hypo_4
+Hypo_4 = homard.CreateHypothesis('Hypo_4')
+Hypo_4.SetAdapRefinUnRef(-1, 1, 0)
+Hypo_4.AddGroup('T1_INT_I')
+Hypo_4.AddGroup('T1_INT_O')
+Hypo_4.AddGroup('T2_INT')
+# Creation of the hypothesis Hypo_4_bis
+Hypo_4_bis = homard.CreateHypothesis('Hypo_4_bis')
+Hypo_4_bis.SetAdapRefinUnRef(-1, 1, 0)
+Hypo_4_bis.AddGroup('T1_EXT_I')
+Hypo_4_bis.AddGroup('T1_EXT_O')
+Hypo_4_bis.AddGroup('T2_EXT')
+#
+# Case "Case_4"
 # =============
-Case = homard.CreateCase('Case', 'PIQUAGE', data_dir+'/tutorial_4.00.med')
-Case.SetDirName(dircase)
-Case.AddBoundaryGroup( 'intersection', '' )
-Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' )
-Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
-Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' )
-Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
-Case.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' )
-Case.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
+Case_4 = homard.CreateCase('Case_4', 'PIQUAGE', data_dir+'/tutorial_4.00.med')
+Case_4.SetDirName(dircase)
+Case_4.AddBoundaryGroup( 'intersection', '' )
+Case_4.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' )
+Case_4.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
+Case_4.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' )
+Case_4.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
+Case_4.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' )
+Case_4.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
 #
 # Creation of the iterations
 # ==========================
-# Creation of the iteration Iter_1 : raffinement selon les faces internes
-Iter_1 = Case.NextIteration('Iter_1')
-Iter_1.SetMeshName('PIQUAGE_1')
-Iter_1.SetMeshFile(dircase+'/maill.01.med')
-Iter_1.AssociateHypo('Hypo_1')
-codret = Iter_1.Compute(1, 2)
-# Creation of the iteration Iter_2 : raffinement selon les faces externes
-Iter_2 = Iter_1.NextIteration('Iter_2')
-Iter_2.SetMeshName('PIQUAGE_2')
-Iter_2.SetMeshFile(dircase+'/maill.02.med')
-Iter_2.AssociateHypo('Hypo_2')
-codret = Iter_2.Compute(1, 2)
-# Creation of the iteration Iter_3 : second raffinement selon les faces externes
-Iter_3 = Iter_2.NextIteration('Iter_3')
-Iter_3.SetMeshName('PIQUAGE_3')
-Iter_3.SetMeshFile(dircase+'/maill.03.med')
-Iter_3.AssociateHypo('Hypo_2')
-codret = Iter_3.Compute(1, 2)
+# Creation of the iteration Iter_4_1 : raffinement selon les faces internes
+Iter_4_1 = Case_4.NextIteration('Iter_4_1')
+Iter_4_1.SetMeshName('PIQUAGE_1')
+Iter_4_1.SetMeshFile(dircase+'/maill.01.med')
+Iter_4_1.AssociateHypo('Hypo_4')
+codret = Iter_4_1.Compute(1, 2)
+# Creation of the iteration Iter_4_2 : raffinement selon les faces externes
+Iter_4_2 = Iter_4_1.NextIteration('Iter_4_2')
+Iter_4_2.SetMeshName('PIQUAGE_2')
+Iter_4_2.SetMeshFile(dircase+'/maill.02.med')
+Iter_4_2.AssociateHypo('Hypo_4_bis')
+codret = Iter_4_2.Compute(1, 2)
+# Creation of the iteration Iter_4_3 : second raffinement selon les faces externes
+Iter_4_3 = Iter_4_2.NextIteration('Iter_4_3')
+Iter_4_3.SetMeshName('PIQUAGE_3')
+Iter_4_3.SetMeshFile(dircase+'/maill.03.med')
+Iter_4_3.AssociateHypo('Hypo_4_bis')
+codret = Iter_4_3.Compute(1, 2)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index 58908a3308c42c87f371ef04d8989b7fc58f7368..03da77fe617370d1dfd72158e5acf9cf10d5813a 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.5"
+__revision__ = "V1.6"
 #
 import os
 #
@@ -36,6 +36,9 @@ if os.environ.has_key("LOGNAME") :
 else :
   user = "anonymous"
 dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
+dircase = os.path.join( dircase, "tutorial_5" )
 if not os.path.isdir(dircase) :
   os.mkdir (dircase)
 # ==================================
@@ -53,8 +56,8 @@ homard.SetCurrentStudy(salome.myStudy)
 #
 # Creation of the boundaries
 # ==========================
-# Creation of the discrete boundary Boun_1
-Boun_1 = homard.CreateBoundaryDi('Boun_1', 'MAIL_EXT', data_dir+'/tutorial_5.fr.med')
+# Creation of the discrete boundary Boun_5_1
+Boun_5_1 = homard.CreateBoundaryDi('Boun_5_1', 'MAIL_EXT', data_dir+'/tutorial_5.fr.med')
 #
 # Creation of the zones
 # =====================
@@ -65,37 +68,37 @@ quart_sup = homard.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 )
 #
 # Hypothesis
 # ==========
-# Creation of the hypothesis Hypo_1
-Hypo_1 = homard.CreateHypothesis('Hypo_1')
-Hypo_1.SetAdapRefinUnRef(0, 1, 0)
-Hypo_1.AddZone('enveloppe', 1)
-# Creation of the hypothesis Hypo_2
-Hypo_2 = homard.CreateHypothesis('Hypo_2')
-Hypo_2.SetAdapRefinUnRef(0, 1, 0)
-Hypo_2.AddZone('quart_sup', 1)
+# Creation of the hypothesis Hypo_5
+Hypo_5 = homard.CreateHypothesis('Hypo_5')
+Hypo_5.SetAdapRefinUnRef(0, 1, 0)
+Hypo_5.AddZone('enveloppe', 1)
+# Creation of the hypothesis Hypo_5_bis
+Hypo_5_bis = homard.CreateHypothesis('Hypo_5_bis')
+Hypo_5_bis.SetAdapRefinUnRef(0, 1, 0)
+Hypo_5_bis.AddZone('quart_sup', 1)
 #
-# Case "Case_1"
+# Case "Case_5"
 # =============
-Case_1 = homard.CreateCase('Case_1', 'COEUR_2D', data_dir+'/tutorial_5.00.med')
-Case_1.SetDirName(dircase)
-Case_1.SetConfType(3)
-Case_1.AddBoundaryGroup('Boun_1', '')
+Case_5 = homard.CreateCase('Case_5', 'COEUR_2D', data_dir+'/tutorial_5.00.med')
+Case_5.SetDirName(dircase)
+Case_5.SetConfType(3)
+Case_5.AddBoundaryGroup('Boun_5_1', '')
 #
-# Iteration "Iter_1"
+# Iteration "Iter_5_1"
 # ==================
-Iter_1 = Case_1.NextIteration('Iter_1')
-Iter_1.SetMeshName('COEUR_2D_01')
-Iter_1.SetMeshFile(dircase+'/maill.01.med')
-Iter_1.AssociateHypo('Hypo_1')
-codret = Iter_1.Compute(1, 2)
+Iter_5_1 = Case_5.NextIteration('Iter_5_1')
+Iter_5_1.SetMeshName('COEUR_2D_01')
+Iter_5_1.SetMeshFile(dircase+'/maill.01.med')
+Iter_5_1.AssociateHypo('Hypo_5')
+codret = Iter_5_1.Compute(1, 2)
 #
-# Iteration "Iter_2"
+# Iteration "Iter_5_2"
 # ==================
-Iter_2 = Iter_1.NextIteration('Iter_2')
-Iter_2.SetMeshName('COEUR_2D_02')
-Iter_2.SetMeshFile(dircase+'/maill.02.med')
-Iter_2.AssociateHypo('Hypo_2')
-codret = Iter_2.Compute(1, 2)
+Iter_5_2 = Iter_5_1.NextIteration('Iter_5_2')
+Iter_5_2.SetMeshName('COEUR_2D_02')
+Iter_5_2.SetMeshFile(dircase+'/maill.02.med')
+Iter_5_2.AssociateHypo('Hypo_5_bis')
+codret = Iter_5_2.Compute(1, 2)
 
 
 if salome.sg.hasDesktop():
diff --git a/idl/HOMARD_YACS.idl b/idl/HOMARD_YACS.idl
new file mode 100644 (file)
index 0000000..60574ac
--- /dev/null
@@ -0,0 +1,71 @@
+// Copyright (C) 2011-2013  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.
+//
+// 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
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
+
+#ifndef _HOMARD_YACS_IDL
+#define _HOMARD_YACS_IDL
+
+#include "SALOME_Component.idl"
+#include "SALOME_Exception.idl"
+#include "SALOMEDS.idl"
+
+module HOMARD
+{
+  interface HOMARD_YACS : Engines::EngineComponent
+  {
+// Generalites
+    void     SetName(in string Name)                       raises (SALOME::SALOME_Exception);
+    string   GetName()                                     raises (SALOME::SALOME_Exception);
+
+    long     Delete(in long Option)                        raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+
+// Caracteristiques
+    void     SetType (in long Type)                        raises (SALOME::SALOME_Exception);
+    long     GetType()                                     raises (SALOME::SALOME_Exception);
+
+    void     SetDirName(in string NomDir)                  raises (SALOME::SALOME_Exception);
+    string   GetDirName()                                  raises (SALOME::SALOME_Exception);
+
+    void     SetMeshFile(in string MeshFile)               raises (SALOME::SALOME_Exception);
+    string   GetMeshFile()                                 raises (SALOME::SALOME_Exception);
+
+    void     SetScriptFile(in string ScriptFile)           raises (SALOME::SALOME_Exception);
+    string   GetScriptFile()                               raises (SALOME::SALOME_Exception);
+
+    long     Write()                                       raises (SALOME::SALOME_Exception);
+    long     WriteOnFile( in string YACSFile )             raises (SALOME::SALOME_Exception);
+
+// Liens avec les autres structures
+    void     SetCaseName(in string NomCas)                 raises (SALOME::SALOME_Exception);
+    string   GetCaseName()                                 raises (SALOME::SALOME_Exception);
+
+// Divers
+  };
+};
+#endif
diff --git a/src/HOMARD/HOMARD_YACS.cxx b/src/HOMARD/HOMARD_YACS.cxx
new file mode 100644 (file)
index 0000000..0e23880
--- /dev/null
@@ -0,0 +1,149 @@
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
+//
+// Copyright (C) 2011-2013  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.
+//
+// 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
+//
+//  File   : HOMARD_YACS.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+
+#include "HOMARD_YACS.hxx"
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  default constructor:
+ */
+//=============================================================================
+HOMARD_YACS::HOMARD_YACS():
+  _Name( "" ),
+  _NomCas( "" ),
+  _NomDir( "" ),
+  _MeshFile( "" ),
+  _ScriptFile( "" ),
+  _Type( 1 )
+{
+  MESSAGE("HOMARD_YACS");
+}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+HOMARD_YACS::~HOMARD_YACS()
+{
+  MESSAGE("~HOMARD_YACS");
+}
+//=============================================================================
+//=============================================================================
+// Generalites
+//=============================================================================
+//=============================================================================
+void HOMARD_YACS::SetName( const char* Name )
+{
+  _Name = std::string( Name );
+}
+//=============================================================================
+std::string HOMARD_YACS::GetName() const
+{
+  return _Name;
+}
+//=============================================================================
+std::string HOMARD_YACS::GetDumpPython() const
+{
+  MESSAGE (". Ecriture du schema " << _Name );
+  std::ostringstream aScript;
+  aScript << "\n# Creation of the schema " << _Name << "\n";
+// Le fichier du maillage initial
+  aScript << "\t" << _Name << ".SetMeshFile(\"" << _MeshFile << "\")\n";
+
+//   MESSAGE (". Fin de l ecriture du schema " << _Name );
+
+  return aScript.str();
+}
+//=============================================================================
+//=============================================================================
+// Caracteristiques
+//=============================================================================
+//=============================================================================
+void HOMARD_YACS::SetType( int Type )
+{
+  _Type = Type;
+}
+//=============================================================================
+int HOMARD_YACS::GetType() const
+{
+  return _Type;
+}
+void HOMARD_YACS::SetDirName( const char* NomDir )
+{
+  _NomDir = std::string( NomDir );
+}
+//=============================================================================
+std::string HOMARD_YACS::GetDirName() const
+{
+   return _NomDir;
+}
+//=============================================================================
+void HOMARD_YACS::SetMeshFile( const char* MeshFile )
+{
+  _MeshFile = std::string( MeshFile );
+}
+//=============================================================================
+std::string HOMARD_YACS::GetMeshFile() const
+{
+  return _MeshFile;
+}
+//=============================================================================
+void HOMARD_YACS::SetScriptFile( const char* ScriptFile )
+{
+  _ScriptFile = std::string( ScriptFile );
+}
+//=============================================================================
+std::string HOMARD_YACS::GetScriptFile() const
+{
+  return _ScriptFile;
+}
+//=============================================================================
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+void HOMARD_YACS::SetCaseName( const char* NomCas )
+{
+  _NomCas = std::string( NomCas );
+}
+//=============================================================================
+std::string HOMARD_YACS::GetCaseName() const
+{
+  return _NomCas;
+}
+//=============================================================================
+//=============================================================================
+// Divers
+//=============================================================================
+//=============================================================================
diff --git a/src/HOMARD/HOMARD_YACS.hxx b/src/HOMARD/HOMARD_YACS.hxx
new file mode 100644 (file)
index 0000000..af33172
--- /dev/null
@@ -0,0 +1,81 @@
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
+//
+// Copyright (C) 2011-2013  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.
+//
+// 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
+//
+//  File   : HOMARD_YACS.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+
+#ifndef _HOMARD_YACS_HXX_
+#define _HOMARD_YACS_HXX_
+
+#include <string>
+#include <list>
+
+class  HOMARD_YACS
+{
+public:
+  HOMARD_YACS();
+  ~HOMARD_YACS();
+
+// Generalites
+  void                          SetName( const char* Name );
+  std::string                   GetName() const;
+
+  std::string                   GetDumpPython() const;
+
+// Caracteristiques
+  void                          SetType( int Type );
+  int                           GetType() const;
+
+  void                          SetDirName( const char* NomDir );
+  std::string                   GetDirName() const;
+
+  void                          SetMeshFile( const char* MeshFile );
+  std::string                   GetMeshFile() const;
+
+  void                          SetScriptFile( const char* ScriptFile );
+  std::string                   GetScriptFile() const;
+
+// Liens avec les autres structures
+  void                          SetCaseName( const char* NomCas );
+  std::string                   GetCaseName() const;
+
+
+// Divers
+
+private:
+  std::string                   _Name;
+  std::string                   _NomCas;
+  std::string                   _NomDir;
+  std::string                   _MeshFile;
+  std::string                   _ScriptFile;
+  int                           _Type;
+};
+
+#endif
index eaa72df3509f6fe0d2bd96ff954ac4fc401fd20f..56949368d15340a2ec1963891b1759fd9264e32c 100644 (file)
@@ -60,16 +60,17 @@ using namespace std;
 #include "MonCreateCase.h"
 #include "MonCreateIteration.h"
 #include "MonPursueIteration.h"
-#include "MonEditFile.h"
+#include "MonCreateYACS.h"
+#include "MonEditBoundaryAn.h"
+#include "MonEditBoundaryDi.h"
 #include "MonEditCase.h"
-#include "MonEditIteration.h"
 #include "MonEditHypothesis.h"
+#include "MonEditIteration.h"
+#include "MonEditYACS.h"
 #include "MonEditZone.h"
-#include "MonEditBoundaryAn.h"
-#include "MonEditBoundaryDi.h"
 #include "MonMeshInfo.h"
-#include "MonCreateYACS.h"
 #include "MonIterInfo.h"
+#include "MonEditFile.h"
 #include "HomardQtCommun.h"
 
 // BOOST Includes
@@ -272,7 +273,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
     case 1101: // Creation d un Cas
     {
       MESSAGE("command " << theCommandID << " activated");
-      MonCreateCase *aDlg = new MonCreateCase( parent, true,
+      MonCreateCase *aDlg = new MonCreateCase( true,
                             HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ;
       aDlg->show();
       break;
@@ -335,16 +336,22 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       _PTR(SObject) obj = chercheMonObjet();
       if (obj)
       {
-        // Edition d'un cas
-        if (HOMARD_UTILS::isCase(obj))
+        // Edition d'une frontiere discrete
+        if (HOMARD_UTILS::isBoundaryDi(obj))
         {
-          MonEditCase *aDlg = new MonEditCase(parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName ) ;
+          MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
           aDlg->show();
         }
-        // Edition d'une iteration
-        else if (HOMARD_UTILS::isIter(obj))
+        // Edition d'une frontiere analytique
+        else if (HOMARD_UTILS::isBoundaryAn(obj))
         {
-          MonEditIteration *aDlg = new MonEditIteration(parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          MonEditBoundaryAn *aDlg = new MonEditBoundaryAn(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          aDlg->show();
+        }
+        // Edition d'un cas
+        else if (HOMARD_UTILS::isCase(obj))
+        {
+          MonEditCase *aDlg = new MonEditCase(true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName ) ;
           aDlg->show();
         }
         // Edition d'une hypothese
@@ -353,25 +360,23 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
           MonEditHypothesis *aDlg = new MonEditHypothesis(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen),  _ObjectName, QString(""), QString("")) ;
           aDlg->show();
         }
-        // Edition d'une zone
-        else if (HOMARD_UTILS::isZone(obj))
+        // Edition d'une iteration
+        else if (HOMARD_UTILS::isIter(obj))
         {
-          MonEditZone *aDlg = new MonEditZone(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          MonEditIteration *aDlg = new MonEditIteration(parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
           aDlg->show();
         }
-        // Edition d'une frontiere discrete
-        else if (HOMARD_UTILS::isBoundaryDi(obj))
+        // Edition d'un schema YACS
+        else if (HOMARD_UTILS::isYACS(obj))
         {
-            MESSAGE(".. Lancement de MonEditBoundaryDi" );
-            MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
-            aDlg->show();
+          MonEditYACS *aDlg = new MonEditYACS(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName) ;
+          aDlg->show();
         }
-        // Edition d'une frontiere analytique
-        else if (HOMARD_UTILS::isBoundaryAn(obj))
+        // Edition d'une zone
+        else if (HOMARD_UTILS::isZone(obj))
         {
-            MESSAGE(".. Lancement de MonEditBoundaryAn" );
-            MonEditBoundaryAn *aDlg = new MonEditBoundaryAn(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
-            aDlg->show();
+          MonEditZone *aDlg = new MonEditZone(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          aDlg->show();
         }
       }
       break;
index 701e8100ae390d49b245179b6d81fd14e02380b2..21a0b2fab9b0d5169b5dd6c077af3d078113fd0b 100644 (file)
@@ -40,7 +40,7 @@ using namespace std;
 #define PI 3.141592653589793
 // ------------------------------------------------------------------------------------------------------------------------
 MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal,
-                             HOMARD::HOMARD_Gen_var myHomardGen,
+                             HOMARD::HOMARD_Gen_var myHomardGen0,
                              QString caseName) :
 // ------------------------------------------------------------------------------------------------------------------------------
 /* Constructs a MonCreateBoundaryAn
@@ -63,7 +63,7 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal,
     Chgt (false)
     {
       MESSAGE("Constructeur") ;
-      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
       setupUi(this);
       setModal(modal);
 
@@ -94,13 +94,13 @@ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal,
     }
 // --------------------------------------------------------------------------------------------------------------
 MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent,
-                             HOMARD::HOMARD_Gen_var myHomardGen,
+                             HOMARD::HOMARD_Gen_var myHomardGen0,
                              QString caseName):
 // --------------------------------------------------------------------------------------------------------------
 // Constructeur appele par MonEditBoundaryAn
 //
     QDialog(0), Ui_CreateBoundaryAn(),
-     myHomardGen(myHomardGen),
+     myHomardGen(myHomardGen0),
     _parent(parent),
     _aName (""),
     _aCaseName(caseName),
index 7ba675484576566355274565c2732ad1eafc4e00..0a40cd2bdfdb07ee3002377571d8f42d3b3c5d45 100644 (file)
@@ -33,14 +33,14 @@ using namespace std;
 
 // -------------------------------------------------------------------------------
 MonCreateBoundaryDi::MonCreateBoundaryDi(MonCreateCase* parent, bool modal,
-                                         HOMARD::HOMARD_Gen_var myHomardGen,
+                                         HOMARD::HOMARD_Gen_var myHomardGen0,
                                          QString caseName, QString aName)
 // ---------------------------------------------------------------------------------
 /* Constructs a MonCreateBoundaryDi */
     :
     QDialog(0), Ui_CreateBoundaryDi(),
     _parent(parent), _aName(aName),
-    myHomardGen(HOMARD::HOMARD_Gen::_duplicate(myHomardGen)),
+    myHomardGen(HOMARD::HOMARD_Gen::_duplicate(myHomardGen0)),
     _aCaseName(caseName)
     {
       MESSAGE("Constructeur") ;
index af10a2309ef6b5a6ce8d52fe0cc1f853c241c983..7a71d11e07afd31fcdd66043d958cd045bdc7cbb 100644 (file)
@@ -40,7 +40,7 @@ using namespace std;
  * Sets attributes to default values
  */
 // -----------------------------------------------------------------------------------------
-MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen)
+MonCreateCase::MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen0)
     :
     Ui_CreateCase(),
     _aCaseName(""),_aDirName(""),
@@ -48,7 +48,7 @@ MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var
     _Pyram(0)
 {
   MESSAGE("Debut du constructeur de MonCreateCase");
-  myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+  myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
   setupUi(this);
   setModal(modal);
   InitConnect();
index 00fa925fe22f3bbce0361409006177519bad0ddd..6fbbfb0126c02f28de7207108c1516e3908ab7be 100644 (file)
@@ -35,7 +35,7 @@ class MonCreateCase : public QDialog, public Ui_CreateCase
     Q_OBJECT
 
 public:
-    MonCreateCase( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen);
+    MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen);
     ~MonCreateCase();
 
     void AddBoundaryAn(QString newBoundary);
index a29acebfbcde357ef099219ab6b5db1b0f4a2a5d..a754df6ac0d3ef53bb8d479c633179e738cee93f 100644 (file)
@@ -35,7 +35,7 @@ using namespace std;
 
 // -------------------------------------------------------------------------------
 MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal,
-                                         HOMARD::HOMARD_Gen_var myHomardGen,
+                                         HOMARD::HOMARD_Gen_var myHomardGen0,
                                          QString Name,
                                          QString caseName, QString aFieldFile)
 // ---------------------------------------------------------------------------------
@@ -56,7 +56,7 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal,
 
 {
       MESSAGE("Constructeur") ;
-      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
       setupUi(this);
       setModal(modal);
       InitConnect();
index 5325bf05909c4ee0f4988961534f88fadf3f8076..ba7ece292530f34a8ff24d5909902b74cbb373ed 100644 (file)
@@ -33,7 +33,7 @@ using namespace std;
 
 // -----------------------------------------------------------------------------------------------------
 MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal,
-                                       HOMARD::HOMARD_Gen_var myHomardGen, QString IterParentName ):
+                                       HOMARD::HOMARD_Gen_var myHomardGen0, QString IterParentName ):
 // -----------------------------------------------------------------------------------------------------
 /* Constructs a MonCreateIteration
  * Inherits from CasHomard
@@ -46,7 +46,7 @@ MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal,
     _CaseName("")
     {
       MESSAGE("Constructeur");
-      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
       setupUi(this);
       setModal(modal);
       InitConnect();
index 75e869921d20ff99aaaa9e945c6e6fa5d0e9539b..7bd45e565f56f8fd56a917d641b39656fca3fa78 100644 (file)
@@ -38,7 +38,7 @@ using namespace std;
 
 // --------------------------------------------------------------------------------------------------------------
 MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal,
-                                       HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo) :
+                                       HOMARD::HOMARD_Gen_var myHomardGen0, QString aCaseName,  QStringList listeGroupesHypo) :
 // --------------------------------------------------------------------------------------------------------------
 //
     QDialog(0), Ui_CreateListGroup(),
@@ -48,7 +48,7 @@ MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreate
     _parentBound(parentBound)
 {
     MESSAGE("Debut de  MonCreateListGroup")
-     myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+     myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
     setupUi(this);
     setModal(modal);
     InitConnect();
index 3c94b5c0079b124c44e04f01e3ac9d816c0491b5..74538e816588d7d207e9c80616e6eb6795dfd5fa 100644 (file)
@@ -30,12 +30,12 @@ using namespace std;
 #include <utilities.h>
 
 
-// -----------------------------------------------------------------------------------------
+// ----------------------------------------------------------------------
 /* Constructs a MonCreateYACS
  * Sets attributes to default values
  */
-// -----------------------------------------------------------------------------------------
-MonCreateYACS::MonCreateYACS (QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString CaseName )
+// ----------------------------------------------------------------------
+MonCreateYACS::MonCreateYACS (QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, QString CaseName )
     :
     Ui_CreateYACS(),
     _aCaseName(CaseName),
@@ -44,7 +44,7 @@ MonCreateYACS::MonCreateYACS (QWidget* parent, bool modal, HOMARD::HOMARD_Gen_va
     _aMeshFile("")
 {
   MESSAGE("Debut du constructeur de MonCreateYACS");
-  myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+  myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
   setupUi(this);
   setModal(modal);
 
@@ -61,6 +61,24 @@ MonCreateYACS::MonCreateYACS (QWidget* parent, bool modal, HOMARD::HOMARD_Gen_va
   MESSAGE("Fin du constructeur de MonCreateYACS");
 }
 
+// ----------------------------------------------------------------------
+MonCreateYACS::MonCreateYACS(QWidget* parent,
+                             HOMARD::HOMARD_Gen_var myHomardGen0,
+                             QString caseName):
+// ----------------------------------------------------------------------
+// Constructeur appele par MonEditYACS
+//
+    myHomardGen(myHomardGen0),
+    _Name (""),
+    Chgt (false)
+    {
+  //  MESSAGE("Debut de  MonCreateYACS")
+      setupUi(this) ;
+
+      setModal(true) ;
+      InitConnect() ;
+    }
+
 // ------------------------------------------------------------------------
 MonCreateYACS::~MonCreateYACS()
 // ------------------------------------------------------------------------
index c7cf5bdd6fac5e6b60c4f3a0860edba839471111..39043f207213c7b064efdcd30c65f47e19327f01 100644 (file)
@@ -39,6 +39,8 @@ class MonCreateYACS : public QDialog, public Ui_CreateYACS
     virtual ~MonCreateYACS();
 
   protected :
+    MonCreateYACS( QWidget* parent, HOMARD::HOMARD_Gen_var myHomardGen, QString CaseName);
+
     QString _Name;
     QString _aCaseName;
     QString _aScriptFile;
@@ -47,6 +49,8 @@ class MonCreateYACS : public QDialog, public Ui_CreateYACS
 
     int _Type;
 
+    bool Chgt;
+
     HOMARD::HOMARD_YACS_var aYACS;
     HOMARD::HOMARD_Cas_var aCase ;
     HOMARD::HOMARD_Gen_var myHomardGen;
index c279af1ee7129273dce415b6e908863169397b28..7a01d9c7558e27531b5498c9329057ae966fb58b 100644 (file)
@@ -36,11 +36,11 @@ using namespace std;
 #include <SUIT_Session.h>
 #include <SUIT_ViewManager.h>
 
-// ------------------------------------------------------------------------------------------------------------------------
+// ----------------------------------------------------------------------
 MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, bool modal,
-                             HOMARD::HOMARD_Gen_var myHomardGen,
+                             HOMARD::HOMARD_Gen_var myHomardGen0,
                              QString caseName) :
-// ------------------------------------------------------------------------------------------------------------------------------
+// ----------------------------------------------------------------------
 /* Constructs a MonCreateZone
    appele pour une vraie creation
    initialise une boite et non une sphere
@@ -61,7 +61,7 @@ MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, bool modal,
     Chgt (false)
     {
       MESSAGE("Constructeur") ;
-      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen) ;
+      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0) ;
       setupUi(this) ;
       setModal(modal) ;
       InitConnect( ) ;
@@ -72,15 +72,15 @@ MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, bool modal,
       SetBox() ;                // Propose une boite en premier choix
 
     }
-// --------------------------------------------------------------------------------------------------------------
+// ----------------------------------------------------------------------
 MonCreateZone::MonCreateZone(MonCreateHypothesis* parent,
-                             HOMARD::HOMARD_Gen_var myHomardGen,
+                             HOMARD::HOMARD_Gen_var myHomardGen0,
                              QString caseName):
-// --------------------------------------------------------------------------------------------------------------
+// ----------------------------------------------------------------------
 // Constructeur appele par MonEditZone
 //
     QDialog(0), Ui_CreateZone(),
-     myHomardGen(myHomardGen),
+     myHomardGen(myHomardGen0),
     _parent(parent),
     _Name (""),
     _aCaseName(caseName),
index a7c4f49d195c5274f66e422148e8c4dea7b15c6f..0d0419cf0acf229c7bd70d9e39b0698832eec1a5 100644 (file)
@@ -61,7 +61,6 @@ protected :
     double _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayonInt, _ZoneHaut ;
     double _DMax ;
 
-
     bool Chgt;
 
     HOMARD::HOMARD_Zone_var aZone ;
index 7017bbf7e51c922dce3efc136a8de54da3d6e7d7..46de00a9449fc758534223c2b13bc715fe3a6271 100644 (file)
@@ -32,10 +32,10 @@ using namespace std;
     herite de MonCreateCase
 */
 // -------------------------------------------------------------
-MonEditCase::MonEditCase ( QWidget* parent, bool modal,
+MonEditCase::MonEditCase ( bool modal,
                            HOMARD::HOMARD_Gen_var myHomardGen,
                            QString CaseName ):
-   MonCreateCase(parent, modal, myHomardGen)
+   MonCreateCase(modal, myHomardGen)
 {
     MESSAGE("Debut de MonEditCase" << CaseName.toStdString().c_str());
     setWindowTitle(QObject::tr("HOM_CASE_EDIT_WINDOW_TITLE"));
index 2e7692ff4e925e8fa39b368f25cb40427ad65929..2fcd0baf66fd6ee1d08feea14a42cd56a0646ae3 100644 (file)
@@ -32,7 +32,7 @@ class MonEditCase : public MonCreateCase
 {
     Q_OBJECT
 public:
-    MonEditCase( QWidget* parent, bool modal,
+    MonEditCase( bool modal,
                  HOMARD::HOMARD_Gen_var myHomardGen,
                  QString Name );
     virtual ~MonEditCase();
diff --git a/src/HOMARDGUI/MonEditYACS.cxx b/src/HOMARDGUI/MonEditYACS.cxx
new file mode 100644 (file)
index 0000000..9986a30
--- /dev/null
@@ -0,0 +1,93 @@
+// Copyright (C) 2011-2013  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.
+//
+// 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
+//
+
+using namespace std;
+
+#include "MonEditYACS.h"
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -------------------------------------------------------------
+/* Constructs a MonEditYACS
+    herite de MonCreateYACS
+*/
+// -------------------------------------------------------------
+MonEditYACS::MonEditYACS ( QWidget* parent, bool modal,
+                           HOMARD::HOMARD_Gen_var myHomardGen,
+                           QString Name ):
+   MonCreateYACS(parent, modal, myHomardGen, Name)
+{
+    MESSAGE("Debut de MonEditYACS" << Name.toStdString().c_str());
+    setWindowTitle(QObject::tr("HOM_YACS_EDIT_WINDOW_TITLE"));
+    _Name = Name;
+    aYACS = myHomardGen->GetYACS(_Name.toStdString().c_str());
+    InitValEdit();
+}
+// ------------------------------
+MonEditYACS::~MonEditYACS()
+// ------------------------------
+{
+}
+// ------------------------------
+void MonEditYACS::InitValEdit()
+// ------------------------------
+{
+  MESSAGE("InitValEdit");
+  LEName->setText(_Name);
+  LEName->setReadOnly(true);
+
+  QString aCaseName = aYACS->GetCaseName();
+  LECaseName->setText(aCaseName);
+  LECaseName->setReadOnly(true);
+  PushDir->setVisible(0);
+
+  QString aScriptFile = aYACS->GetScriptFile();
+  LEScriptFile->setText(aScriptFile);
+  LEScriptFile->setReadOnly(true);
+  PushDir->setVisible(0);
+
+  QString aDirName = aYACS->GetDirName();
+  LEDirName->setText(aDirName);
+  LEDirName->setReadOnly(true);
+  PushDir->setVisible(0);
+
+  QString aMeshFile = aYACS->GetMeshFile();
+  LEMeshFile->setText(aMeshFile);
+  LEMeshFile->setReadOnly(true);
+  PushDir->setVisible(0);
+
+  int Type=aYACS->GetType();
+  if(Type==1) { RBStatic->setChecked(true); }
+  else        { RBTransient->setChecked(true); };
+  RBStatic->setEnabled(false);
+  RBTransient->setEnabled(false);
+//
+  adjustSize();
+}
+
+// -------------------------------------
+bool MonEditYACS::PushOnApply()
+// -------------------------------------
+{
+  return true ;
+};
diff --git a/src/HOMARDGUI/MonEditYACS.h b/src/HOMARDGUI/MonEditYACS.h
new file mode 100644 (file)
index 0000000..232e496
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 2011-2013  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.
+//
+// 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
+//
+
+#ifndef MON_EDITYACS_H
+#define MON_EDITYACS_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateYACS.h>
+
+class MonEditYACS : public MonCreateYACS
+{
+    Q_OBJECT
+public:
+    MonEditYACS( QWidget* parent, bool modal,
+                 HOMARD::HOMARD_Gen_var myHomardGen,
+                 QString Name );
+    virtual ~MonEditYACS();
+
+protected :
+    virtual void InitValEdit();
+    virtual bool PushOnApply();
+
+public slots:
+
+};
+
+#endif
index 2f0a3e906cd172f7154db068b8b3bbee16aa88dc..7442bd5a1519414562116b4bd0443ceff958726f 100644 (file)
@@ -34,7 +34,7 @@ using namespace std;
 
 
 // -----------------------------------------------------------------------------------------
-MonIterInfo::MonIterInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString IterName)
+MonIterInfo::MonIterInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, QString IterName)
 // -----------------------------------------------------------------------------------------
 /* Constructs a MonIterInfo
  * Inherits from CasHomard
@@ -52,7 +52,7 @@ MonIterInfo::MonIterInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myH
     _Option(-1)
 {
     MESSAGE("appel de _duplicate");
-      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
       setupUi(this);
       setModal(modal);
       InitConnect();
index 7d136774eb00d1a97ce03047621526bf3085f857..a1af7d20d8fd3caa4bf3c3f1ed5fc8266a29afcc 100644 (file)
@@ -32,7 +32,7 @@ using namespace std;
 
 
 // -----------------------------------------------------------------------------------------
-MonMeshInfo::MonMeshInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen)
+MonMeshInfo::MonMeshInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0)
 // -----------------------------------------------------------------------------------------
 /* Constructs a MonMeshInfo
  * Inherits from CasHomard
@@ -47,7 +47,7 @@ MonMeshInfo::MonMeshInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myH
     _Entanglement(0),
     _Quality(0)
 {
-      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
       setupUi(this);
       setModal(modal);
       InitConnect();
index 39673c019a30d00e1a72f9b5df2bb741b475add9..5629b019314dc083098c4035541bddcff53d6dbe 100755 (executable)
@@ -91,6 +91,12 @@ Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
   _NS = SINGLETON_<SALOME_NamingService>::Instance();
   ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting());
   _NS->init_orb(_orb);
+
+  _tag_gene = 0 ;
+  _tag_boun = 0 ;
+  _tag_hypo = 0 ;
+  _tag_yacs = 0 ;
+  _tag_zone = 0 ;
 }
 //=================================
 /*!
@@ -3038,7 +3044,6 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr t
 {
   MESSAGE("PublishBoundaryStudy pour "<<theName);
   SALOMEDS::SObject_var aResultSO;
-  SALOMEDS::GenericAttribute_var anAttr;
 
   // Caracteristique de la Boundary
   HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[theName];
@@ -3052,11 +3057,17 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr t
   }
 
   // On ajoute la categorie des boundarys dans l etude si necessaire
+  if ( _tag_boun == 0 )
+  {
+    _tag_gene += 1 ;
+    _tag_boun = _tag_gene ;
+  }
+  MESSAGE("PublishBoundaryInStudy _tag_gene = "<<_tag_gene << ", _tag_boun = "<<_tag_boun );
   SALOMEDS::SObject_var aSObject;
-  if (!theFatherHomard->FindSubObject(101, aSObject))
+  if (!theFatherHomard->FindSubObject(_tag_boun, aSObject))
   {
     MESSAGE("Ajout de la categorie des boundarys");
-    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, 101);
+    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, _tag_boun);
     PublishInStudyAttr(aStudyBuilder, aSObject, "Boundaries", "BoundList", "zone_icone_2.png", NULL ) ;
   }
   else { MESSAGE("La categorie des boundarys existe deja."); }
@@ -3104,7 +3115,6 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishCaseInStudy(SALOMEDS::Study_ptr theSt
 {
   MESSAGE("PublishCaseInStudy pour "<<theName);
   SALOMEDS::SObject_var aResultSO;
-  SALOMEDS::GenericAttribute_var anAttr;
 
   if (CORBA::is_nil(theObject)) {
     MESSAGE("HOMARD_Gen_i::theObject->_is_nil()");
@@ -3115,6 +3125,7 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishCaseInStudy(SALOMEDS::Study_ptr theSt
     return aResultSO._retn();
   }
 
+  // On recupere le module pere dans l etude
   SALOMEDS::SComponent_var theFatherHomard = theStudy->FindComponent(ComponentDataType());
   if (theFatherHomard->_is_nil())
   {
@@ -3122,9 +3133,12 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishCaseInStudy(SALOMEDS::Study_ptr theSt
     return aResultSO._retn();
   }
 
+  _tag_gene += 1 ;
+  MESSAGE("PublishCaseInStudy _tag_gene = "<<_tag_gene );
   aResultSO = aStudyBuilder->NewObject(theFatherHomard);
   PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "CasHomard", "cas_calcule.png",
                      _orb->object_to_string(theObject) ) ;
+
   return aResultSO._retn();
 }
 //=============================================================================
@@ -3134,7 +3148,6 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr
 {
   MESSAGE("PublishHypotheseInStudy pour "<<theName);
   SALOMEDS::SObject_var aResultSO;
-  SALOMEDS::GenericAttribute_var anAttr;
 
   // On recupere le module pere dans l etude
   // On ajoute la categorie des hypotheses dans l etude si necessaire
@@ -3144,11 +3157,19 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr
     MESSAGE("theFatherHomard->_is_nil()");
     return aResultSO._retn();
   }
+
+  // On ajoute la categorie des hypotheses dans l etude si necessaire
   SALOMEDS::SObject_var aSObject;
-  if (!theFatherHomard->FindSubObject(0, aSObject))
+  if ( _tag_hypo == 0 )
+  {
+    _tag_gene += 1 ;
+    _tag_hypo = _tag_gene ;
+  }
+  MESSAGE("PublishHypotheseInStudy _tag_gene = "<<_tag_gene << ", _tag_hypo = "<<_tag_hypo );
+  if (!theFatherHomard->FindSubObject(_tag_hypo, aSObject))
   {
     MESSAGE("Ajout de la categorie des hypotheses");
-    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, 0);
+    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, _tag_hypo);
     PublishInStudyAttr(aStudyBuilder, aSObject, "Hypothesis", "HypoList", "hypotheses.png", NULL);
   }
   else { MESSAGE("La categorie des hypotheses existe deja."); }
@@ -3166,7 +3187,6 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishYACSInStudy(SALOMEDS::Study_ptr theSt
 {
   MESSAGE("PublishYACSInStudy pour "<<theName);
   SALOMEDS::SObject_var aResultSO;
-  SALOMEDS::GenericAttribute_var anAttr;
 
   // On recupere le module pere dans l etude
   // On ajoute la categorie des schemas YACS dans l etude si necessaire
@@ -3176,11 +3196,18 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishYACSInStudy(SALOMEDS::Study_ptr theSt
     MESSAGE("theFatherHomard->_is_nil()");
     return aResultSO._retn();
   }
+  // On ajoute la categorie des schemas YACS dans l etude si necessaire
+  if ( _tag_yacs == 0 )
+  {
+    _tag_gene += 1 ;
+    _tag_yacs = _tag_gene ;
+  }
+  MESSAGE("PublishZoneStudy _tag_gene = "<<_tag_gene << ", _tag_yacs = "<<_tag_yacs );
   SALOMEDS::SObject_var aSObject;
-  if (!theFatherHomard->FindSubObject(102, aSObject))
+  if (!theFatherHomard->FindSubObject(_tag_yacs, aSObject))
   {
     MESSAGE("Ajout de la categorie des schemas YACS");
-    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, 102);
+    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, _tag_yacs);
     PublishInStudyAttr(aStudyBuilder, aSObject, "YACS", "YACSList", "full_view.png", NULL);
   }
   else { MESSAGE("La categorie des schemas YACS existe deja."); }
@@ -3199,8 +3226,6 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theSt
 {
   MESSAGE("PublishZoneStudy pour "<<theName);
   SALOMEDS::SObject_var aResultSO;
-  SALOMEDS::GenericAttribute_var anAttr;
-
   if (CORBA::is_nil(theObject))
   {
     MESSAGE("PublishZoneInStudy : theObject->_is_nil()");
@@ -3223,11 +3248,17 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theSt
   CORBA::Long ZoneType = myZone->GetType();
 
   // On ajoute la categorie des zones dans l etude si necessaire
+  if ( _tag_zone == 0 )
+  {
+    _tag_gene += 1 ;
+    _tag_zone = _tag_gene ;
+  }
+  MESSAGE("PublishZoneStudy _tag_gene = "<<_tag_gene << ", _tag_zone = "<<_tag_zone );
   SALOMEDS::SObject_var aSObject;
-  if (!theFatherHomard->FindSubObject(100, aSObject))
+  if (!theFatherHomard->FindSubObject(_tag_zone, aSObject))
   {
     MESSAGE("Ajout de la categorie des zones");
-    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, 100);
+    aSObject = aStudyBuilder->NewObjectToTag(theFatherHomard, _tag_zone);
     PublishInStudyAttr(aStudyBuilder, aSObject, "Zones", "ZoneList", "zone_icone_2.png", NULL ) ;
   }
   else { MESSAGE("La categorie des zones existe deja."); }
@@ -3277,6 +3308,7 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theSt
       break ;
     }
   }
+  MESSAGE("Appel de PublishInStudyAttr pour name = "<<theName);
   PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", icone.c_str(), _orb->object_to_string(theObject) ) ;
 
   return aResultSO._retn();
index 3eff7e8b06030399f74c7cdbe67a486325729da3..1af594b5efedbe1676718736d07b496500e628e7 100644 (file)
@@ -304,6 +304,12 @@ private:
   ContextMap                    myContextMap;
   SALOME_NamingService*         _NS;
 
+  int _tag_gene ;
+  int _tag_boun ;
+  int _tag_hypo ;
+  int _tag_yacs ;
+  int _tag_zone ;
+
 };
 
 #endif
diff --git a/src/HOMARD_I/HOMARD_YACS_i.cxx b/src/HOMARD_I/HOMARD_YACS_i.cxx
new file mode 100644 (file)
index 0000000..b5928a7
--- /dev/null
@@ -0,0 +1,209 @@
+// Copyright (C) 2011-2013  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.
+//
+// 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
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
+
+#include "HOMARD_YACS_i.hxx"
+#include "HOMARD_Gen_i.hxx"
+#include "HOMARD_YACS.hxx"
+#include "HOMARD_DriverTools.hxx"
+
+#include "SALOMEDS_Tool.hxx"
+
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_YACS_i::HOMARD_YACS_i()
+{
+  MESSAGE( "Default constructor, not for use" );
+  ASSERT( 0 );
+}
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_YACS_i::HOMARD_YACS_i( CORBA::ORB_ptr orb,
+                                        HOMARD::HOMARD_Gen_var engine )
+{
+  MESSAGE("constructor");
+  _gen_i = engine;
+  _orb = orb;
+  myHomardYACS = new ::HOMARD_YACS();
+  ASSERT( myHomardYACS );
+}
+//=============================================================================
+/*!
+ *  standard destructor
+ */
+//=============================================================================
+HOMARD_YACS_i::~HOMARD_YACS_i()
+{
+}
+//=============================================================================
+//=============================================================================
+// Generalites
+//=============================================================================
+//=============================================================================
+void HOMARD_YACS_i::SetName( const char* Name )
+{
+  ASSERT( myHomardYACS );
+  myHomardYACS->SetName( Name );
+}
+//=============================================================================
+char* HOMARD_YACS_i::GetName()
+{
+  ASSERT( myHomardYACS );
+  return CORBA::string_dup( myHomardYACS->GetName().c_str() );
+}
+//=============================================================================
+CORBA::Long HOMARD_YACS_i::Delete( CORBA::Long Option )
+{
+  ASSERT( myHomardYACS );
+  char* YACSName = GetName() ;
+  MESSAGE ( "Delete : destruction du schema " << YACSName << ", Option = " << Option );
+  return _gen_i->DeleteYACS(YACSName, Option) ;
+}
+//=============================================================================
+char* HOMARD_YACS_i::GetDumpPython()
+{
+  ASSERT( myHomardYACS );
+  return CORBA::string_dup( myHomardYACS->GetDumpPython().c_str() );
+}
+//=============================================================================
+std::string HOMARD_YACS_i::Dump() const
+{
+  return HOMARD::Dump( *myHomardYACS );
+}
+//=============================================================================
+bool HOMARD_YACS_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardYACS, stream );
+}
+//=============================================================================
+//=============================================================================
+// Caracteristiques
+//=============================================================================
+//=============================================================================
+void HOMARD_YACS_i::SetType( CORBA::Long Type )
+{
+  ASSERT( myHomardYACS );
+  myHomardYACS->SetType( Type );
+}
+//=============================================================================
+CORBA::Long HOMARD_YACS_i::GetType()
+{
+  ASSERT( myHomardYACS );
+  return  CORBA::Long( myHomardYACS->GetType() );
+}
+void HOMARD_YACS_i::SetDirName( const char* NomDir )
+{
+  ASSERT( myHomardYACS );
+  myHomardYACS->SetDirName( NomDir );
+}
+//=============================================================================
+char* HOMARD_YACS_i::GetDirName()
+{
+  ASSERT( myHomardYACS );
+  return CORBA::string_dup( myHomardYACS->GetDirName().c_str() );
+}
+//=============================================================================
+void HOMARD_YACS_i::SetMeshFile( const char* MeshFile )
+{
+  ASSERT( myHomardYACS );
+  myHomardYACS->SetMeshFile( MeshFile );
+}
+//=============================================================================
+char* HOMARD_YACS_i::GetMeshFile()
+{
+  ASSERT( myHomardYACS );
+  return CORBA::string_dup( myHomardYACS->GetMeshFile().c_str() );
+}
+//=============================================================================
+void HOMARD_YACS_i::SetScriptFile( const char* ScriptFile )
+{
+  ASSERT( myHomardYACS );
+  myHomardYACS->SetScriptFile( ScriptFile );
+}
+//=============================================================================
+char* HOMARD_YACS_i::GetScriptFile()
+{
+  ASSERT( myHomardYACS );
+  return CORBA::string_dup( myHomardYACS->GetScriptFile().c_str() );
+}
+//=============================================================================
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+void HOMARD_YACS_i::SetCaseName( const char* NomCas )
+{
+  ASSERT( myHomardYACS );
+  myHomardYACS->SetCaseName( NomCas );
+}
+//=============================================================================
+char* HOMARD_YACS_i::GetCaseName()
+{
+  ASSERT( myHomardYACS );
+  return CORBA::string_dup( myHomardYACS->GetCaseName().c_str() );
+}
+//=============================================================================
+CORBA::Long HOMARD_YACS_i::Write()
+{
+  MESSAGE ( "Write : ecriture du schema");
+  ASSERT( myHomardYACS );
+//
+// Le repertoire du cas
+  std::string casename = GetCaseName() ;
+  HOMARD::HOMARD_Cas_ptr caseyacs = _gen_i->GetCase(casename.c_str()) ;
+  std::string dirnamecase = caseyacs->GetDirName() ;
+// Le nom par defaut du fichier du schema
+  std::string YACSFile ;
+  YACSFile = dirnamecase + "/schema.xml" ;
+//
+  return WriteOnFile(YACSFile.c_str()) ;
+}
+//=============================================================================
+CORBA::Long HOMARD_YACS_i::WriteOnFile( const char* YACSFile )
+{
+  MESSAGE ( "WriteOnFile : ecriture du schema sur " << YACSFile );
+  ASSERT( myHomardYACS );
+//
+// Nom du schema
+  char* nomYACS = GetName() ;
+  MESSAGE ( "WriteOnFile : ecriture du schema " << nomYACS);
+  return _gen_i->YACSWriteOnFile(nomYACS, YACSFile) ;
+}
+//=============================================================================
+//=============================================================================
+//=============================================================================
+// Divers
+//=============================================================================
+//=============================================================================
diff --git a/src/HOMARD_I/HOMARD_YACS_i.hxx b/src/HOMARD_I/HOMARD_YACS_i.hxx
new file mode 100644 (file)
index 0000000..4a26544
--- /dev/null
@@ -0,0 +1,97 @@
+// Copyright (C) 2011-2013  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.
+//
+// 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
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
+
+#ifndef _HOMARD_YACS_I_HXX_
+#define _HOMARD_YACS_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HOMARD_Gen)
+#include CORBA_SERVER_HEADER(HOMARD_YACS)
+
+#include "SALOME_Component_i.hxx"
+#include "SALOME_NamingService.hxx"
+#include "Utils_CorbaException.hxx"
+
+#include <string>
+
+class HOMARD_YACS;
+
+class HOMARD_YACS_i:
+  public virtual Engines_Component_i,
+  public virtual POA_HOMARD::HOMARD_YACS,
+  public virtual PortableServer::ServantBase
+{
+public:
+  HOMARD_YACS_i( CORBA::ORB_ptr orb,
+                      HOMARD::HOMARD_Gen_var gen_i );
+  HOMARD_YACS_i();
+
+  virtual ~HOMARD_YACS_i();
+
+// Generalites
+  void                   SetName( const char* Name );
+  char*                  GetName();
+
+  CORBA::Long            Delete( CORBA::Long Option );
+
+  char*                  GetDumpPython();
+
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
+
+// Caracteristiques
+  void                   SetType( CORBA::Long Type );
+  CORBA::Long            GetType();
+
+  void                   SetDirName( const char* NomDir );
+  char*                  GetDirName();
+
+  void                   SetMeshFile( const char* MeshFile );
+  char*                  GetMeshFile();
+
+  void                   SetScriptFile( const char* ScriptFile );
+  char*                  GetScriptFile();
+
+
+  CORBA::Long            Write() ;
+  CORBA::Long            WriteOnFile( const char* YACSFile ) ;
+
+  // Liens avec les autres structures
+  void                   SetCaseName( const char* NomCas );
+  char*                  GetCaseName();
+
+// Divers
+
+private:
+  ::HOMARD_YACS*    myHomardYACS;
+
+  CORBA::ORB_ptr         _orb;
+  HOMARD::HOMARD_Gen_var _gen_i;
+};
+
+#endif
index 08307af09601593aa4c19f607c41e170c9ef6b1d..3d9f9d84ed2349404a4e998c6cb260929d175b29 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2013
 Test test_1
 """
-__revision__ = "V1.9"
+__revision__ = "V1.10"
 
 #========================================================================
 Test_Name = "test_1"
@@ -77,11 +77,11 @@ Copyright EDF-R&D 2010, 2013
   #
   # Creation of the zones
   # =====================
-  # Creation of the box Zone_1
-    Zone_1 = homard.CreateZoneBox('Zone_1', -0.01, 1.01, -0.01, 0.4, -0.01, 0.6)
+  # Creation of the box Zone_1_1
+    Zone_1_1 = homard.CreateZoneBox('Zone_1_1', -0.01, 1.01, -0.01, 0.4, -0.01, 0.6)
 
-  # Creation of the sphere Zone_2
-    Zone_2 = homard.CreateZoneSphere('Zone_2', 0.5, 0.6, 0.7, 0.75)
+  # Creation of the sphere Zone_1_2
+    Zone_1_2 = homard.CreateZoneSphere('Zone_1_2', 0.5, 0.6, 0.7, 0.75)
   #
   # Creation of the hypotheses
   # ==========================
@@ -98,48 +98,48 @@ Copyright EDF-R&D 2010, 2013
   # Creation of the hypothesis Zones_1_et_2
     Zones_1_et_2 = homard.CreateHypothesis('Zones_1_et_2')
     Zones_1_et_2.SetAdapRefinUnRef(0, 1, 0)
-    Zones_1_et_2.AddZone('Zone_1', 1)
-    Zones_1_et_2.AddZone('Zone_2', 1)
+    Zones_1_et_2.AddZone('Zone_1_1', 1)
+    Zones_1_et_2.AddZone('Zone_1_2', 1)
   #
   # Creation of the cases
   # =====================
-    # Creation of the case zzzz121b
-    Case_1 = homard.CreateCase('zzzz121b', 'MAILL', os.path.join(Rep_Test, Test_Name + '.00.med'))
+    # Creation of the case Case_1
+    Case_1 = homard.CreateCase('Case_1', 'MAILL', os.path.join(Rep_Test, Test_Name + '.00.med'))
     Case_1.SetDirName(Rep_Test_Resu)
     Case_1.SetConfType(1)
   #
   # Creation of the iterations
   # ==========================
-  # Creation of the iteration I1
-    I1 = Case_1.NextIteration('I1')
-    I1.SetMeshName('M1')
-    I1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
-    I1.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.00.med'))
-    I1.SetTimeStepRank(1, 1)
-    I1.AssociateHypo('a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
-    error = I1.Compute(1, 1)
+  # Creation of the iteration I1_1
+    I1_1 = Case_1.NextIteration('I1_1')
+    I1_1.SetMeshName('M1')
+    I1_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
+    I1_1.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.00.med'))
+    I1_1.SetTimeStepRank(1, 1)
+    I1_1.AssociateHypo('a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
+    error = I1_1.Compute(1, 1)
     if error :
       error = 1
       break
 
-  # Creation of the iteration I2
-    I2 = I1.NextIteration('I2')
-    I2.SetMeshName('M2')
-    I2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
-    I2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.01.med'))
-    I2.SetTimeStepRank(1, 1)
-    I2.AssociateHypo('a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
-    error = I2.Compute(1, 1)
+  # Creation of the iteration I1_2
+    I1_2 = I1_1.NextIteration('I1_2')
+    I1_2.SetMeshName('M2')
+    I1_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
+    I1_2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.01.med'))
+    I1_2.SetTimeStepRank(1, 1)
+    I1_2.AssociateHypo('a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
+    error = I1_2.Compute(1, 1)
     if error :
       error = 2
       break
 
-  # Creation of the iteration I3
-    I3 = I2.NextIteration('I3')
-    I3.SetMeshName('M3')
-    I3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
-    I3.AssociateHypo('Zones_1_et_2')
-    error = I3.Compute(1, 1)
+  # Creation of the iteration I1_3
+    I1_3 = I1_2.NextIteration('I1_3')
+    I1_3.SetMeshName('M3')
+    I1_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
+    I1_3.AssociateHypo('Zones_1_et_2')
+    error = I1_3.Compute(1, 1)
     if error :
       error = 3
       break
index 20fc41ab9d4b85e939d0dcf502a3231946bd0619..82c7ac8a38ebab34e0fb428b2ddf0a7b7d854483 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2013
 Test test_2
 """
-__revision__ = "V1.8"
+__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, 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, 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, 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
index 390d35e30d0f8d213fa76d0163feb622b5cb7ba1..7e06ec5cb7ccac99bc606c54801af11e64fb514c 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2011, 2013
 Test test_3
 """
-__revision__ = "V1.7"
+__revision__ = "V1.8"
 
 #========================================================================
 Test_Name = "test_3"
@@ -79,59 +79,59 @@ Copyright EDF-R&D 2010, 2013
 # Creation of the boundaries
 # ==========================
 # Creation of the discrete boundary
-    Boundary_1 = homard.CreateBoundaryDi('courbes', 'COURBES', os.path.join(Rep_Test, Test_Name + '.fr.med'))
+    Boundary_3_1 = homard.CreateBoundaryDi('courbes', 'COURBES', os.path.join(Rep_Test, Test_Name + '.fr.med'))
 #
 # Creation of the external cylinder
-    Boundary_2 = homard.CreateBoundaryCylinder('cyl_ext', 50.0, 25., -25., 1., 0., 0., 100.)
+    Boundary_3_2 = homard.CreateBoundaryCylinder('cyl_ext', 50.0, 25., -25., 1., 0., 0., 100.)
 #
 # Creation of the internal cylinder
-    Boundary_3 = homard.CreateBoundaryCylinder('cyl_int', 50.0, 25., -25., 1., 0., 0., 50.)
+    Boundary_3_3 = homard.CreateBoundaryCylinder('cyl_int', 50.0, 25., -25., 1., 0., 0., 50.)
 #
 # Creation of the first sphere
-    Boundary_4 = homard.CreateBoundarySphere('sphere_1', 50.0, 25., -25., 100.)
+    Boundary_3_4 = homard.CreateBoundarySphere('sphere_1', 50.0, 25., -25., 100.)
 #
 # Creation of the second sphere
-    Boundary_5 = homard.CreateBoundarySphere('sphere_2', 450.0, 25., -25., 100.)
+    Boundary_3_5 = homard.CreateBoundarySphere('sphere_2', 450.0, 25., -25., 100.)
 #
 # Creation of the hypotheses
 # ==========================
 # Uniform refinement
-    Hypo = homard.CreateHypothesis('Hypo')
-    Hypo.SetAdapRefinUnRef(-1, 1, 0)
+    Hypo_3_ = homard.CreateHypothesis('Hypo_3_')
+    Hypo_3_.SetAdapRefinUnRef(-1, 1, 0)
 #
     for iaux in range (n_boucle+1) :
 #
-# Creation of the case Case_1
+# Creation of the case Case_3
 # ===========================
       if ( iaux <= 1 ) :
-        Case_1 = homard.CreateCase('Case_1', 'MOYEU', os.path.join(Rep_Test, Test_Name + '.00.med'))
-        Case_1.SetDirName(Rep_Test_Resu)
-        Case_1.SetConfType(1)
-        Case_1.AddBoundaryGroup('courbes', '')
-        Case_1.AddBoundaryGroup('cyl_ext', 'EXT')
-        Case_1.AddBoundaryGroup('cyl_int', 'INT')
-        Case_1.AddBoundaryGroup('sphere_1', 'END_1')
-        Case_1.AddBoundaryGroup('sphere_2', 'END_2')
+        Case_3 = homard.CreateCase('Case_3', 'MOYEU', os.path.join(Rep_Test, Test_Name + '.00.med'))
+        Case_3.SetDirName(Rep_Test_Resu)
+        Case_3.SetConfType(1)
+        Case_3.AddBoundaryGroup('courbes', '')
+        Case_3.AddBoundaryGroup('cyl_ext', 'EXT')
+        Case_3.AddBoundaryGroup('cyl_int', 'INT')
+        Case_3.AddBoundaryGroup('sphere_1', 'END_1')
+        Case_3.AddBoundaryGroup('sphere_2', 'END_2')
 #
 # Creation and destruction of the iterations
 # ==========================================
 #
-  # Creation of the iteration Iter_1
-      Iter_1 = Case_1.NextIteration('Iter_1')
-      Iter_1.SetMeshName('MOYEU_1')
-      Iter_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
-      Iter_1.AssociateHypo('Hypo')
-      error = Iter_1.Compute(1, 1)
+  # Creation of the iteration Iter_3_1
+      Iter_3_1 = Case_3.NextIteration('Iter_3_1')
+      Iter_3_1.SetMeshName('MOYEU_1')
+      Iter_3_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
+      Iter_3_1.AssociateHypo('Hypo_3_')
+      error = Iter_3_1.Compute(1, 1)
       if error :
         error = 10*iaux + 1
         break
 
-  # Creation of the iteration Iter_2
-      Iter_2 = Iter_1.NextIteration('Iter_2')
-      Iter_2.SetMeshName('MOYEU_2')
-      Iter_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
-      Iter_2.AssociateHypo('Hypo')
-      error = Iter_2.Compute(1, 1)
+  # Creation of the iteration Iter_3_2
+      Iter_3_2 = Iter_3_1.NextIteration('Iter_3_2')
+      Iter_3_2.SetMeshName('MOYEU_2')
+      Iter_3_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
+      Iter_3_2.AssociateHypo('Hypo_3_')
+      error = Iter_3_2.Compute(1, 1)
       if error :
         error = 10*iaux + 2
         break
@@ -139,24 +139,24 @@ Copyright EDF-R&D 2010, 2013
   # Destruction
   # After the first loop, the case is deleted, except the final mesh files
       if ( iaux == 0 ) :
-        error = Case_1.Delete(0)
+        error = Case_3.Delete(0)
         if error :
           break
   # After the second loop, the iterations are deleted, with the final mesh files
       elif ( iaux == 1 ) :
   # Recursive destruction of the iterations
-        error = Iter_1.Delete(1)
+        error = Iter_3_1.Delete(1)
         if error :
           error = 10*iaux + 3
           break
   # Destruction and creation of the hypothese
         if ( iaux == 1 ) :
-          error = Hypo.Delete()
+          error = Hypo_3_.Delete()
           if error :
             error = 10*iaux + 4
             break
-          Hypo = homard.CreateHypothesis('Hypo')
-          Hypo.SetAdapRefinUnRef(-1, 1, 0)
+          Hypo_3_ = homard.CreateHypothesis('Hypo_3_')
+          Hypo_3_.SetAdapRefinUnRef(-1, 1, 0)
 #
     break
 #