]> SALOME platform Git repositories - modules/homard.git/commitdiff
Salome HOME
Merge branch 'gn/evol' into V9_dev V9_dev V9_0_0
authorGerald NICOLAS <gerald.nicolas@edf.fr>
Mon, 15 Jan 2018 10:42:38 +0000 (11:42 +0100)
committerGerald NICOLAS <gerald.nicolas@edf.fr>
Mon, 15 Jan 2018 10:42:38 +0000 (11:42 +0100)
Introduction du suivi de frontière définie par une CAO

116 files changed:
CMakeLists.txt
SalomeHOMARDConfig.cmake.in
doc/en/demarrage_rapide.rst
doc/en/gui_create_boundary.rst
doc/en/gui_create_case.rst
doc/en/images/create_boundary.png [new file with mode: 0755]
doc/en/images/create_boundary_1.png
doc/en/images/create_boundary_an_1.png
doc/en/images/create_boundary_cao_1.png [new file with mode: 0755]
doc/en/images/create_boundary_cao_2.png [new file with mode: 0755]
doc/en/images/create_boundary_di_1.png
doc/en/images/create_boundary_di_2.png
doc/en/images/create_boundary_di_3.png
doc/en/images/create_case_5.png [deleted file]
doc/en/images/intro_31.png
doc/en/images/intro_32.png
doc/en/tui_create_boundary.rst
doc/en/tutorials.rst
doc/files/tutorial_1.py
doc/files/tutorial_2.py
doc/files/tutorial_3.py
doc/files/tutorial_4.00.med.gz
doc/files/tutorial_4.fr.med.gz [deleted file]
doc/files/tutorial_4.py
doc/files/tutorial_4.xao.gz [new file with mode: 0755]
doc/files/tutorial_4.xml
doc/files/tutorial_5.py
doc/files/tutorial_6.fr.med.gz [new file with mode: 0755]
doc/files/tutorial_6.py [new file with mode: 0755]
doc/files/tutorial_6.xml [new file with mode: 0755]
doc/files/tutorial_util.py
doc/files/yacs_script.py
doc/files/yacs_script_test.py
doc/fr/gui_create_boundary.rst
doc/fr/gui_create_case.rst
doc/fr/images/create_boundary.png [new file with mode: 0755]
doc/fr/images/create_boundary_1.png
doc/fr/images/create_boundary_an_1.png
doc/fr/images/create_boundary_cao_1.png [new file with mode: 0755]
doc/fr/images/create_boundary_cao_2.png [new file with mode: 0755]
doc/fr/images/create_boundary_di_1.png
doc/fr/images/create_case_5.png [deleted file]
doc/fr/images/intro_31.png
doc/fr/images/intro_32.png
doc/fr/images/intro_33.png
doc/fr/images/intro_34.png
doc/fr/images/intro_39.png
doc/fr/tui_create_boundary.rst
doc/fr/tui_create_case.rst
doc/fr/tui_create_hypothese.rst
doc/fr/tui_create_iteration.rst
doc/fr/tutorials.rst
idl/Gen.xml
idl/HOMARD_Boundary.idl
idl/HOMARD_Cas.idl
idl/HOMARD_Gen.idl
resources/CMakeLists.txt
resources/HOMARDCatalog.xml.in
resources/geometry.png [new file with mode: 0755]
src/FrontTrack/FrontTrack.cxx
src/FrontTrack/FrontTrack.hxx
src/FrontTrack/FrontTrack_NodesOnGeom.cxx
src/FrontTrack/FrontTrack_Projector.cxx
src/HOMARD/HOMARD_Boundary.cxx
src/HOMARD/HOMARD_Boundary.hxx
src/HOMARD/HOMARD_Cas.cxx
src/HOMARD/HOMARD_Cas.hxx
src/HOMARD/HOMARD_DriverTools.cxx
src/HOMARD/HomardDriver.cxx
src/HOMARD/HomardDriver.hxx
src/HOMARD/YACSDriver.cxx
src/HOMARDGUI/CMakeLists.txt
src/HOMARDGUI/CreateBoundaryCAO.ui [new file with mode: 0755]
src/HOMARDGUI/CreateCase.ui
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/HOMARDGUI_Utils.cxx
src/HOMARDGUI/HOMARDGUI_Utils.h
src/HOMARDGUI/HOMARD_msg_en.ts
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/MonCreateBoundaryCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonCreateBoundaryCAO.h [new file with mode: 0755]
src/HOMARDGUI/MonCreateCase.cxx
src/HOMARDGUI/MonCreateCase.h
src/HOMARDGUI/MonCreateListGroupCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonCreateListGroupCAO.h [new file with mode: 0755]
src/HOMARDGUI/MonEditBoundaryCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonEditBoundaryCAO.h [new file with mode: 0755]
src/HOMARDGUI/MonEditBoundaryDi.cxx
src/HOMARDGUI/MonEditCase.cxx
src/HOMARDGUI/MonEditListGroupCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonEditListGroupCAO.h [new file with mode: 0755]
src/HOMARD_I/CMakeLists.txt
src/HOMARD_I/HOMARD_Boundary_i.cxx
src/HOMARD_I/HOMARD_Boundary_i.hxx
src/HOMARD_I/HOMARD_Cas_i.cxx
src/HOMARD_I/HOMARD_Cas_i.hxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Gen_i.hxx
src/tests/Test/CMakeLists.txt
src/tests/Test/CTestTestfileInstall.cmake
src/tests/Test/test_1.py
src/tests/Test/test_2.py
src/tests/Test/test_3.py
src/tests/Test/test_4.py
src/tests/Test/test_5.py
src/tests/Test/test_6.py [new file with mode: 0755]
src/tests/Test/test_util.py
src/tests/Test/tutorial_1.py
src/tests/Test/tutorial_2.py
src/tests/Test/tutorial_3.py
src/tests/Test/tutorial_4.py
src/tests/Test/tutorial_5.py
src/tests/Test/tutorial_6.py [new file with mode: 0755]
src/tests/samples/test_6.apad.03.bilan [new file with mode: 0755]
src/tests/samples/tutorial_4.apad.03.bilan
src/tests/samples/tutorial_6.apad.03.bilan [new file with mode: 0755]

index 2267228fbf4e6bd0f3cbe906a3da2441a608156f..bf7e5bc345c0774367cbe53ecd1016737787ebcb 100755 (executable)
@@ -287,7 +287,7 @@ INCLUDE(CMakePackageConfigHelpers)
 # List of targets in this project we want to make visible to the rest of the world.
 # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
 SET(_${PROJECT_NAME}_exposed_targets
-  HOMARDImpl HOMARDEngine HOMARD SalomeIDLHOMARD
+  HOMARDImpl HOMARDEngine HOMARD SalomeIDLHOMARD FrontTrack
 )
 
 # Add all targets to the build-tree export set
index 7ad0e808c2e062daa1a74c630108cb5e30d440bc..83ab5bf36dac07996f2272debd4eaabb1d7bb808 100644 (file)
@@ -18,7 +18,7 @@
 #
 
 # - Config file for the @PROJECT_NAME@ package
-# It defines the following variables. 
+# It defines the following variables.
 # Specific to the pacakge @PROJECT_NAME@ itself:
 #  @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
 #
 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
 @PACKAGE_INIT@
 
-# Load the dependencies for the libraries of @PROJECT_NAME@ 
-# (contains definitions for IMPORTED targets). This is only 
+# Load the dependencies for the libraries of @PROJECT_NAME@
+# (contains definitions for IMPORTED targets). This is only
 # imported if we are not built as a subproject (in this case targets are already there)
 IF(NOT TARGET HOMARDEngine AND NOT @PROJECT_NAME@_BINARY_DIR)
   INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
-ENDIF()   
+ENDIF()
 
 # Package root dir:
 SET_AND_CHECK(HOMARD_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
@@ -94,7 +94,7 @@ SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
-SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
+SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@")
 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
@@ -103,12 +103,13 @@ SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
 
 # Include SMESH targets if they were not already loaded:
-IF(NOT (TARGET SMESHEngine)) 
+IF(NOT (TARGET SMESHEngine))
   INCLUDE("${SMESH_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeSMESHTargets.cmake")
 ENDIF()
 
 # Exposed HOMARD targets:
 SET(HOMARD_HOMARDImpl HOMARDImpl)
+SET(HOMARD_FrontTrack FrontTrack)
 SET(HOMARD_HOMARDEngine HOMARDEngine)
 SET(HOMARD_HOMARD HOMARD)
 SET(HOMARD_SalomeIDLHOMARD SalomeIDLHOMARD)
index 3fed844e5b1c3e6bf3ed7f1c43c7e09df8e69eba..668dd81c55f672b2f8fb7eb53b1475c45454156c 100644 (file)
@@ -24,7 +24,7 @@ This window appears:
 .. image:: images/intro_31.png
    :align: center
 
-Two answers must be given: the directory that will contain the files produced by the further adaptations and the MED file from the initial calculation. In this case, the default options are left unchanged: conformity of the mesh and no curved boundaries. Validate by "Apply and close".
+Two answers must be given: the directory that will contain the files produced by the further adaptations and the MED file from the initial calculation. In this case, the default options are left unchanged: conformity of the mesh and no curved boundaries. Validate by "OK".
 
 .. image:: images/intro_32.png
    :align: center
@@ -54,7 +54,7 @@ The default options are modified to respect our choice for the driving of the ad
 .. image:: images/intro_36.png
    :align: center
 
-The creation of the hypothesis is validated by "Apply and close"; the creation of the new iteration is validated too. The object browser is enriched by the description of this hypothesis and this iteration. The iteration can be seen with a specific icon "waiting".
+The creation of the hypothesis is validated by "OK"; the creation of the new iteration is validated too. The object browser is enriched by the description of this hypothesis and this iteration. The iteration can be seen with a specific icon "waiting".
 
 The adaptation is launched by the selection of the iteration. "*Compute*" is choosen either in the menu, or with the mouse. The MED file of the new mesh, ``maill.01.med``, and some files for information are included into the object browser. Note that the MED file of the new mesh is located into the directory of the case.
 
index f65066631e915eae78849ff5547c094c68b5099e..e6d53e6cd7966a463d35a347f7261a16dcd3fffe 100644 (file)
@@ -4,26 +4,52 @@ The boundary
 ############
 .. index:: single: boundary
 .. index:: single: frontière
+.. index:: single: CAO
 
 The object boundary contains all the geometrical definitions allowing to describe a curved boundary to be followed.
 
 There are two modes of description of a boundary:
 
-  - Discrete: this mode is used to describe a curve 1D
-  - Analytics: this mode is used to describe a surface
+  - CAO: the boundary comes from the geometry of the domain
+  - Non CAO: if the CAO is not available, the boundary can be approxaimted by its descriptions:
 
+    * Discrete: to describe the set of 1D curves that defines the boundary
+    * Analytics: to describe every surface that defines the boundary
+
+This choice is:
+
+.. image:: images/create_boundary_1.png
+   :align: center
+
+CAO boundary
+************
+
+The follow-up of a CAO boundary will be made by selecting a boundary chosen in the list of the existing CAO boundaries.
+
+In the starting up, the list is empty. It is necessary to create a first CAO boundary by activation of the button "*New*":
+
+.. image:: images/create_boundary_cao_1.png
+   :align: center
+
+The window invites in the choice of a file that contains the CAO with XAO format. This CAO is the one that is the basis for the initial mesh. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
+
+.. image:: images/create_boundary_cao_2.png
+   :align: center
+
+.. note::
+  The coherence between this CAO and the initial mesh is not checked.
 
 Discrete boundary
 *****************
 
 The follow-up of a discrete boundary will be made by selecting a boundary chosen in the list of the existing discrete boundaries.
 
-In the starting up, the list is empty. It is necessary to create a first discrete boundary by activation of the button "*New*" :
+In the starting up, the list is empty. It is necessary to create a first discrete boundary by activation of the button "*New*":
 
 .. image:: images/create_boundary_di_1.png
    :align: center
 
-The window invites in the choice of a file of mesh. This mesh is the one of all the lines constituting the boundary. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary.
+The window invites in the choice of a file of mesh. This mesh is the one of all the lines constituting the boundary. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
 
 .. image:: images/create_boundary_di_2.png
    :align: center
@@ -86,7 +112,7 @@ Cylindre
 ========
 .. index:: single: cylindre
 
-The cylinder is defined by a point of the axis, its axis and its radius. The axis is defined by a vector. The standard of this vector is not inevitably equal to 1; also, its orientation has no importance. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary.
+The cylinder is defined by a point of the axis, its axis and its radius. The axis is defined by a vector. The standard of this vector is not inevitably equal to 1; also, its orientation has no importance. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
 
 .. image:: images/create_boundary_an_cy.png
    :align: center
@@ -95,7 +121,7 @@ Sphere
 ======
 .. index:: single: sphere
 
-The sphere is defined by its center and its radius. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary.
+The sphere is defined by its center and its radius. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
 
 .. image:: images/create_boundary_an_sp.png
    :align: center
@@ -104,7 +130,7 @@ Cone
 ====
 .. index:: single: cone
 
-A cone is defined by two different manners: the center, the axis and the angle of opening in degree or by two points centered on the axis and the associated radius. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary.
+A cone is defined by two different manners: the center, the axis and the angle of opening in degree or by two points centered on the axis and the associated radius. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
 
 Creation by an origin, an axis and an angle of opening:
 
@@ -122,7 +148,7 @@ Torus
 =====
 .. index:: single: torus
 
-The torus is defined by its centre, its axis, the revolution radius and the primary radius. The axis is defined by a vector. The standard of this vector is not inevitably equal to 1; also, its orientation has no importance. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary.
+The torus is defined by its centre, its axis, the revolution radius and the primary radius. The axis is defined by a vector. The standard of this vector is not inevitably equal to 1; also, its orientation has no importance. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
 
 .. image:: images/create_boundary_an_to.png
    :align: center
@@ -131,7 +157,7 @@ Object browser
 **************
 At the end of this creation of boundaries, the object browser was enriched. We find all the boundaries created, identified there by their name, with the possibility of editing them.
 
-.. image:: images/create_boundary_1.png
+.. image:: images/create_boundary.png
    :align: center
 
 Corresponding python functions
index 43c6fa36357022ea94b4a62b11023c0f67345032..268db819bf6339dc8e9408a72e73322750c07874 100644 (file)
@@ -68,12 +68,15 @@ If the limit of the domain is curved, HOMARD can put the new nodes onto these cu
 
 Two situations:
 
-* 1D curve: this curve may be defined into a plane, for example for a 2D calculation. It can also be defined into the 3D space, for example to describe the intersection of two surfaces. Such a line is defined with a discrete desription.
-* a surface: such a surface is defined with an analytical description.
+- CAO: the CAO of the domain is available. The computtion will rely on it to project the nodes.
+- No CAO: if no CAO is available, an approximative approach is possible:
+
+  * 1D curve: this curve may be defined into a plane, for example for a 2D calculation. It can also be defined into the 3D space, for example to describe the intersection of two surfaces. Such a line is defined with a discrete desription.
+  * a surface: such a surface is defined with an analytical description.
 
 Check the button:
 
-.. image:: images/create_case_5.png
+.. image:: images/create_boundary_1.png
    :align: center
 
 The definition of the boundaries is described in :doc:`gui_create_boundary`.
diff --git a/doc/en/images/create_boundary.png b/doc/en/images/create_boundary.png
new file mode 100755 (executable)
index 0000000..0460d48
Binary files /dev/null and b/doc/en/images/create_boundary.png differ
index 0460d48594962c3081f8f2aef2c5836eaec2cace..f6e34b625b6fa772f078ecba496764dc1932f418 100644 (file)
Binary files a/doc/en/images/create_boundary_1.png and b/doc/en/images/create_boundary_1.png differ
index 09630eb80cc79814445d61b35b52d09c9c844167..2e634da03bec28182d613d07126d63b5f4cf8955 100644 (file)
Binary files a/doc/en/images/create_boundary_an_1.png and b/doc/en/images/create_boundary_an_1.png differ
diff --git a/doc/en/images/create_boundary_cao_1.png b/doc/en/images/create_boundary_cao_1.png
new file mode 100755 (executable)
index 0000000..96c2382
Binary files /dev/null and b/doc/en/images/create_boundary_cao_1.png differ
diff --git a/doc/en/images/create_boundary_cao_2.png b/doc/en/images/create_boundary_cao_2.png
new file mode 100755 (executable)
index 0000000..94da749
Binary files /dev/null and b/doc/en/images/create_boundary_cao_2.png differ
index 8f80605d8f067606655906f2bccf10a61b842c70..8f5770be14f7e7d5db28c4d51e0b1be37efd4b97 100644 (file)
Binary files a/doc/en/images/create_boundary_di_1.png and b/doc/en/images/create_boundary_di_1.png differ
index d952edabbbf7af799ceca14405f461cae2d6e401..33ed85f340c3dab2fca4772954d445f5fdb1b479 100644 (file)
Binary files a/doc/en/images/create_boundary_di_2.png and b/doc/en/images/create_boundary_di_2.png differ
index 01195a123471898703eb230acfed14b28bf660cd..e682a39742251c2639f51dca6a49fb774eeb4abb 100644 (file)
Binary files a/doc/en/images/create_boundary_di_3.png and b/doc/en/images/create_boundary_di_3.png differ
diff --git a/doc/en/images/create_case_5.png b/doc/en/images/create_case_5.png
deleted file mode 100644 (file)
index 9424c9c..0000000
Binary files a/doc/en/images/create_case_5.png and /dev/null differ
index b9a3dbca1e1da10e1ee48e83d3145367abd5385c..6895b697457ed180a0a04300215665564529afa8 100644 (file)
Binary files a/doc/en/images/intro_31.png and b/doc/en/images/intro_31.png differ
index ada710fb6c0bc69812f28d9575798b893044753d..0dc3d37ba5e45a095a59b23069f6c42f71646b24 100644 (file)
Binary files a/doc/en/images/intro_32.png and b/doc/en/images/intro_32.png differ
index 1a33efc005b9f714bd336c613e41ef52705389a1..7807e2cdabd9f7475789b43202aec76a62fbc30c 100644 (file)
@@ -15,6 +15,14 @@ These methods returns an instance of the class boundary.
 
 +----------------------------------------------------------------------------------------+
 +----------------------------------------------------------------------------------------+
+| .. module:: CreateBoundaryCAO                                                          |
+|                                                                                        |
+| **CreateBoundaryCAO(boundary_name, xao_file)**                                         |
+|     Returns an instance of the class ``boundary``, type CAO after its creation         |
+|                                                                                        |
+|     - ``boundary_name``: the name of the CAO boundary                                  |
+|     - ``xao_file``: the name of the file for this CAO, with format XAO                 |
++----------------------------------------------------------------------------------------+
 | .. module:: CreateBoundaryDi                                                           |
 |                                                                                        |
 | **CreateBoundaryDi(boundary_name, mesh_name, mesh_file)**                              |
@@ -22,7 +30,7 @@ These methods returns an instance of the class boundary.
 |                                                                                        |
 |     - ``boundary_name``: the name of the discrete boundary                             |
 |     - ``mesh_name``: the name of the mesh of the boundary                              |
-|     - ``mesh_file``: the name of the file for this mesh                                |
+|     - ``mesh_file``: the name of the file for this mesh, with format MED               |
 +----------------------------------------------------------------------------------------+
 | .. module:: CreateBoundaryCylinder                                                     |
 |                                                                                        |
@@ -105,24 +113,28 @@ See also in :doc:`tui_create_case`.
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
-| .. module:: AddBoundaryGroup                                  |
+| .. module:: AddBoundary                                       |
 |                                                               |
-| **AddBoundaryGroup(boundary, group)**                         |
+| **AddBoundary(boundary)**                                     |
 |     Add a boundary to the definition of a case                |
 |                                                               |
 |     - ``boundary``: name of the curved boundary               |
++---------------------------------------------------------------+
+| .. module:: AddBoundaryGroup                                  |
+|                                                               |
+| **AddBoundaryGroup(boundary, group)**                         |
+|     Add a boundary to the definition of a case with a         |
+|     filtering by groups                                       |
 |                                                               |
-|     Discrete boundary:                                        |
+|     - ``boundary``: name of the curved boundary               |
 |                                                               |
-|     . if all the curved lines are involved, the second        |
-|     argument is an empty string.                              |
+|     Discrete or CAO boundary:                                 |
 |                                                               |
-|     . if only some curved lines are involved, ``group`` is    |
-|     the name of the group of segments                         |
+|     - ``group``: the name of a group of meshes                |
 |                                                               |
 |     Analytical boundary:                                      |
 |                                                               |
-|     - ``group``: name of the groupe of faces located on the   |
+|     - ``group``: name of the groups of faces located on the   |
 |       boundary                                                |
 +---------------------------------------------------------------+
 
@@ -141,6 +153,7 @@ Methods of the class boundary
 | **GetType()**                                                 |
 |     Returns the type of the boundary:                         |
 |                                                               |
+|         * -1: CAO                                             |
 |         * 0: discrete                                         |
 |         * 1: cylinder                                         |
 |         * 2: sphere                                           |
@@ -160,6 +173,8 @@ Methods of the class boundary
 | **Delete()**                                                  |
 |     Deletes the boundary.                                     |
 |     If the boundary is discrete, the file of the mesh is kept.|
+|     If the boundary is CAO, the xao file of the geometry is   |
+|     kept.                                                     |
 |                                                               |
 |     Returns an integer:                                       |
 |         * 0: the destruction is done                          |
@@ -169,6 +184,10 @@ Methods of the class boundary
 
 Example
 *******
+Creation of a CAO boundary: ::
+
+    la_cao = homard.CreateBoundaryCAO("BLOC", dircase+'/tutorial_6.xao')
+
 Creation of a discrete boundary, a spherical boundary, and a cylindrical boundary:
 ::
 
index 587a893d899974d261be7f39713a4ca355c57cd7..983d67ccb98df08bb8de5aa426d14d770a829482 100644 (file)
@@ -16,6 +16,7 @@ The loading of the module HOMARD is done in a way similar to the other modules.
 
   import HOMARD
   homard = salome.lcc.FindOrLoadComponent('FactoryServer','HOMARD')
+  homard.UpdateStudy()
 
 To use the module HOMARD within a distributed scheme YACS, the loading is made as follows:
 
@@ -24,6 +25,7 @@ To use the module HOMARD within a distributed scheme YACS, the loading is made a
   import HOMARD
   my_container.load_component_Library('HOMARD')
   homard = my_container.create_component_instance('HOMARD',0)
+  homard.UpdateStudy()
 
 Uniform refinement
 ******************
@@ -35,7 +37,8 @@ One will make here three successive uniform refinements of the mesh contained in
 
 
 .. literalinclude:: ../files/tutorial_1.py
-   :lines: 52-85
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Download the files
@@ -53,7 +56,8 @@ Refinement by zones
 One proceeds here to refinement according to zones. To pass from the initial mesh to the mesh 'M_1', one uses a box framing the z=1 plane and a sphere centered on the origin with radius 1.05. Then to pass from the mesh 'M_1' to the mesh 'M_2', one replaces the sphere by a box framing the cube on side 0.5, pointing on the origin and the meshes in the very first zone are unrefined.
 
 .. literalinclude:: ../files/tutorial_2.py
-   :lines: 52-95
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Download the files
@@ -71,7 +75,8 @@ One proceeds here to refinement according to a field. The hypotheses are used to
 To adapt the H_1 mesh resulting from the Iter_1 iteration, two alternatives are applied. In the first, Iter_2, the field is a scalar field of indicators of error and one cuts out the 1.5% of elements where the error is largest. In the second alternative, Iter_2_bis, one is based on a vector field and one examines the jump of this vector between an element and its neighbors: one will cut out where the infinite standard of this jump is higher than the absolute threshold of 0.0001.
 
 .. literalinclude:: ../files/tutorial_3.py
-   :lines: 52-124
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Download the files
@@ -84,24 +89,42 @@ To adapt the H_1 mesh resulting from the Iter_1 iteration, two alternatives are
 
 Non plane boundaries
 ********************
-.. index:: single: field
+.. index:: single: boundary
+.. index:: single: CAO
 .. index:: single: YACS
 
-One tests the follow-up of the curved borders here: analytical borders to describe various surfaces of the pipes and a discrete border to describe the intersecting lines of the two pipes. The driving of refinement is the following: uniform refinement of all the elements contained in indicated groups. One starts by refining the inner faces with the pipes; then, one refines continuation twice the external faces with the pipes.
+One tests the follow-up of the curved borders here, giving the representation of the domain by its CAO. That CAO is given in a XAO format file.
+The driving of refinement is the following: uniform refinement of all the elements contained in indicated groups. One starts by refining the inner faces with the pipes; then, one refines continuation twice the external faces with the pipes.
 Scheme YACS carrying out this adaptation is downloadable.
 
 .. literalinclude:: ../files/tutorial_4.py
-   :lines: 52-111
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
-  Download the files
+  Téléchargement des fichiers
 
   * :download:`initial mesh<../files/tutorial_4.00.med.gz>`
-  * :download:`mesh of the discrete boundary<../files/tutorial_4.fr.med.gz>`
-  * :download:`python script<../files/tutorial_4.py>`
+  * :download:`CAO<../files/tutorial_4.xao.gz>`
+  * :download:`python scrip<../files/tutorial_4.py>`
   * :download:`python script for the compression<../files/tutorial_util.py>`
   * :download:`YACS scheme<../files/tutorial_4.xml>`
 
+If the CAO is not available, the boundaries can be approximated: analytical borders to describe various surfaces of the pipes and a discrete border to describe the intersecting lines of the two pipes. Only the definition of the boundaries has to be modified.
+
+.. literalinclude:: ../files/tutorial_6.py
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
+
+.. note::
+  Download the files
+
+  * :download:`initial mesh<../files/tutorial_4.00.med.gz>`
+  * :download:`mesh of the discrete boundary<../files/tutorial_6.fr.med.gz>`
+  * :download:`python script<../files/tutorial_6.py>`
+  * :download:`python script for the compression<../files/tutorial_util.py>`
+  * :download:`YACS scheme<../files/tutorial_6.xml>`
+
 
 Specific instructions for a 2D mesh
 ***********************************
@@ -111,7 +134,8 @@ The instructions to adapt a 2D mesh are exactly identical to those necessary to
 In the case presented here, one for the first time refines all the elements contained in a bored disk, then in one second iteration, all the elements contained in a rectangle. One will note the use of the follow-up of the circular borders of the field.
 
 .. literalinclude:: ../files/tutorial_5.py
-   :lines: 52-95
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Download the files
@@ -124,3 +148,4 @@ In the case presented here, one for the first time refines all the elements cont
 
 .. toctree::
    :maxdepth: 2
+
index 51b46e37e0794402b3b00dcef14a04a7d5f0faab..b02c56ec555357029ae10d572992a8bf9f6088d5 100755 (executable)
 
 """
 Exemple de couplage HOMARD-Salome
-Copyright EDF-R&D 1996, 2010, 2014
+Copyright EDF 1996, 2010, 2018
 """
-__revision__ = "V2.1"
+__revision__ = "V3.1"
 #
 import os
 import sys
 #
 # ==================================
-PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv("HOMARD_ROOT_DIR")
 # Repertoire des donnees du tutorial
 DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
@@ -47,40 +47,44 @@ salome.salome_init()
 import HOMARD
 #
 homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+homard.UpdateStudy()
+#
+#============================= Début des commandes =============================
 #
 # Hypotheses
 # ==========
-hypo_1 = homard.CreateHypothesis('hypo_1')
-hypo_1.SetUnifRefinUnRef(1)
+l_hypothese = homard.CreateHypothesis('hypo_1')
+l_hypothese.SetUnifRefinUnRef(1)
 #
 # Cas
 # ===
-case_1 = homard.CreateCase('Case_1', 'MAILL', DATA_TUTORIAL+'/tutorial_1.00.med')
-case_1.SetDirName(DIRCASE)
-case_1.SetConfType(1)
+le_cas = homard.CreateCase('Case_1', 'MAILL', os.path.join(DATA_TUTORIAL, "tutorial_1.00.med"))
+le_cas.SetDirName(DIRCASE)
 #
 # Iterations
 # ==========
 # Iteration "iter_1_1"
-iter_1_1 = case_1.NextIteration('iter_1_1')
+iter_1_1 = le_cas.NextIteration('iter_1_1')
 iter_1_1.SetMeshName('MESH')
-iter_1_1.SetMeshFile(DIRCASE+'/maill.01.med')
+iter_1_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
 iter_1_1.AssociateHypo('hypo_1')
-error = iter_1_1.Compute(1, 2)
+erreur = iter_1_1.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.02.med')
+iter_1_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
 iter_1_2.AssociateHypo('hypo_1')
-error = iter_1_2.Compute(1, 2)
+erreur = iter_1_2.Compute(1, 2)
 
 # Iteration "iter_1_3"
 iter_1_3 = iter_1_2.NextIteration('iter_1_3')
 iter_1_3.SetMeshName('MESH')
-iter_1_3.SetMeshFile(DIRCASE+'/maill.03.med')
+iter_1_3.SetMeshFile(os.path.join(DIRCASE, "maill.03.med"))
 iter_1_3.AssociateHypo('hypo_1')
-error = iter_1_3.Compute(1, 2)
+erreur = iter_1_3.Compute(1, 2)
+#
+#============================== Fin des commandes ==============================
 #
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 1, 1)
index 8fe7b6a9e92e643581ef9753ba3197a0d8f47415..9a3513572b197ffc5439af10e7315f1a079272c6 100755 (executable)
 
 """
 Exemple de couplage HOMARD-Salome
-Copyright EDF-R&D 1996, 2010, 2014
+Copyright EDF 1996, 2010, 2018
 """
-__revision__ = "V2.10"
+__revision__ = "V3.01"
 #
 import os
 import sys
 #
 # ==================================
-PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv("HOMARD_ROOT_DIR")
 # Repertoire des donnees du tutorial
 DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
@@ -47,6 +47,9 @@ salome.salome_init()
 import HOMARD
 #
 homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+homard.UpdateStudy()
+#
+#============================= Début des commandes =============================
 #
 # Creation des zones
 # ==================
@@ -61,37 +64,39 @@ Zone_2 = homard.CreateZoneBox ('Zone_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
 #
 # Hypothese "hypo_2"
 # ==================
-hypo_2 = homard.CreateHypothesis('hypo_2')
-hypo_2.AddZone('Zone_1', 1)
-hypo_2.AddZone('Zone_0', 1)
+l_hypothese = homard.CreateHypothesis('hypo_2')
+l_hypothese.AddZone('Zone_1', 1)
+l_hypothese.AddZone('Zone_0', 1)
 #
 # Hypothese "hypo_2_bis"
 # ======================
-hypo_2_bis = homard.CreateHypothesis('hypo_2_bis')
-hypo_2_bis.AddZone('Zone_0', -1)
-hypo_2_bis.AddZone('Zone_2', 1)
+l_hypothese_bis = homard.CreateHypothesis('hypo_2_bis')
+l_hypothese_bis.AddZone('Zone_0', -1)
+l_hypothese_bis.AddZone('Zone_2', 1)
 #
 # Cas
 # ===
-case_2 = homard.CreateCase('Case_2', 'MZERO', DATA_TUTORIAL+'/tutorial_2.00.med')
-case_2.SetDirName(DIRCASE)
+le_cas = homard.CreateCase('Case_2', 'MZERO', os.path.join(DATA_TUTORIAL, "tutorial_2.00.med"))
+le_cas.SetDirName(DIRCASE)
 #
 # Iteration "iter_2_1"
 # ====================
-iter_2_1 = case_2.NextIteration('iter_2_1')
+iter_2_1 = le_cas.NextIteration('iter_2_1')
 iter_2_1.SetMeshName('M_1')
-iter_2_1.SetMeshFile(DIRCASE+'/maill.01.med')
+iter_2_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
 iter_2_1.AssociateHypo('hypo_2')
-error = iter_2_1.Compute(1, 2)
+erreur = iter_2_1.Compute(1, 2)
 #
 # Iteration "iter_2_2"
 # ====================
 iter_2_2 = iter_2_1.NextIteration('iter_2_2')
 iter_2_2.SetMeshName('M_2')
-iter_2_2.SetMeshFile(DIRCASE+'/maill.02.med')
+iter_2_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
 iter_2_2.AssociateHypo('hypo_2_bis')
-error = iter_2_2.Compute(1, 2)
-
+erreur = iter_2_2.Compute(1, 2)
+#
+#============================== Fin des commandes ==============================
+#
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 2, 1)
 # ==================================
index 61ffaae60fd68bca483d9251368296bf86935209..22eba2b1f6d31d5c82961109548ab7281d2173ed 100755 (executable)
 
 """
 Exemple de couplage HOMARD-Salome
-Copyright EDF-R&D 1996, 2010, 2014
+Copyright EDF 1996, 2010, 2018
 """
-__revision__ = "V2.1"
+__revision__ = "V3.1"
 #
 import os
 import sys
 #
 # ==================================
-PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv("HOMARD_ROOT_DIR")
 # Repertoire des donnees du tutorial
 DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
@@ -47,6 +47,9 @@ salome.salome_init()
 import HOMARD
 #
 homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+homard.UpdateStudy()
+#
+#============================= Début des commandes =============================
 #
 # Hypothese "hypo_0vers1"
 # =======================
@@ -88,39 +91,41 @@ hypo_1vers2_bis.SetTypeFieldInterp(0)
 #
 # Cas
 # ===
-case_3 = homard.CreateCase('Case_3', 'G_0', DATA_TUTORIAL+'/tutorial_3.00.med')
-case_3.SetDirName(DIRCASE)
+le_cas = homard.CreateCase('Case_3', 'G_0', os.path.join(DATA_TUTORIAL, "tutorial_3.00.med"))
+le_cas.SetDirName(DIRCASE)
 #
 # Iteration "iter_3_1"
 # ====================
-iter_3_1 = case_3.NextIteration('iter_3_1')
+iter_3_1 = le_cas.NextIteration('iter_3_1')
 iter_3_1.SetMeshName('H_1')
-iter_3_1.SetMeshFile(DIRCASE+'/maill.01.med')
-iter_3_1.SetFieldFile(DATA_TUTORIAL+'/tutorial_3.00.med')
+iter_3_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+iter_3_1.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.00.med"))
 iter_3_1.SetTimeStepRank( 1, 1)
 iter_3_1.AssociateHypo('hypo_0vers1')
-error = iter_3_1.Compute(1, 2)
+erreur = iter_3_1.Compute(1, 2)
 #
 # Iteration "iter_3_2"
 # ====================
 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_TUTORIAL+'/tutorial_3.01.med')
+iter_3_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
+iter_3_2.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.01.med"))
 iter_3_2.SetTimeStepRank(1, 1)
 iter_3_2.AssociateHypo('hypo_1vers2')
-error = iter_3_2.Compute(1, 2)
+erreur = iter_3_2.Compute(1, 2)
 #
 # Iteration "iter_3_2_bis"
 # ========================
 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_TUTORIAL+'/tutorial_3.01.med')
+iter_3_2_bis.SetMeshFile(os.path.join(DIRCASE, "maill.02.bis.med"))
+iter_3_2_bis.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.01.med"))
 iter_3_2_bis.SetTimeStepRank(1, 1)
 iter_3_2_bis.AssociateHypo('hypo_1vers2_bis')
-error = iter_3_2_bis.Compute(1, 2)
-
+erreur = iter_3_2_bis.Compute(1, 2)
+#
+#============================== Fin des commandes ==============================
+#
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 3, 1)
 # ==================================
index b0bc427354a4c1453f07751be52cc802a2a56f5c..d023424b4b6b2caf65f2fc766f8afd64a3a2edea 100644 (file)
Binary files a/doc/files/tutorial_4.00.med.gz and b/doc/files/tutorial_4.00.med.gz differ
diff --git a/doc/files/tutorial_4.fr.med.gz b/doc/files/tutorial_4.fr.med.gz
deleted file mode 100644 (file)
index 171bc3a..0000000
Binary files a/doc/files/tutorial_4.fr.med.gz and /dev/null differ
index 9b4751f168c044bc29f9bcc8f4fc6c5e7608caa2..02b05e2aa00d752cd784f6e9761b2226e302d8f2 100755 (executable)
 
 """
 Exemple de couplage HOMARD-Salome
-Copyright EDF-R&D 1996, 2011, 2014
+Copyright EDF 1996, 2011, 2018
 """
-__revision__ = "V3.1"
+__revision__ = "V4.2"
 #
 import os
 import sys
 #
 # ==================================
-PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv("HOMARD_ROOT_DIR")
 # Repertoire des donnees du tutorial
 DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
@@ -47,67 +47,58 @@ salome.salome_init()
 import HOMARD
 #
 homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+homard.UpdateStudy()
 #
-# Frontieres
-# ==========
-boun_4_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', DATA_TUTORIAL+'/tutorial_4.fr.med')
-#
-boun_4_2 = homard.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.)
-#
-boun_4_3 = homard.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
+#============================= Début des commandes =============================
 #
-boun_4_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
+# Frontières
+# ==========
+boun_4 = homard.CreateBoundaryCAO("PIQUAGE", os.path.join(DATA_TUTORIAL, "tutorial_4.xao"))
 #
-boun_4_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
+# Cas
+# ===
+le_cas = homard.CreateCase('Case_4', "PIQUAGE", os.path.join(DATA_TUTORIAL, "tutorial_4.00.med"))
+le_cas.SetDirName(DIRCASE)
+le_cas.AddBoundary( "PIQUAGE" )
 #
 # Hypotheses
 # ==========
 # Creation of the hypothesis hypo_4
-hypo_4 = homard.CreateHypothesis('hypo_4')
-hypo_4.SetUnifRefinUnRef(1)
-hypo_4.AddGroup('T1_INT_I')
-hypo_4.AddGroup('T1_INT_O')
-hypo_4.AddGroup('T2_INT')
+l_hypothese = homard.CreateHypothesis('hypo_4')
+l_hypothese.SetUnifRefinUnRef(1)
+l_hypothese.AddGroup('T1_INT_I')
+l_hypothese.AddGroup('T1_INT_O')
+l_hypothese.AddGroup('T2_INT')
 # Creation of the hypothesis hypo_4_bis
-hypo_4_bis = homard.CreateHypothesis('hypo_4_bis')
-hypo_4_bis.SetUnifRefinUnRef(1)
-hypo_4_bis.AddGroup('T1_EXT_I')
-hypo_4_bis.AddGroup('T1_EXT_O')
-hypo_4_bis.AddGroup('T2_EXT')
-#
-# Cas
-# ===
-case_4 = homard.CreateCase('Case_4', 'PIQUAGE', DATA_TUTORIAL+'/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' )
+l_hypothese_bis = homard.CreateHypothesis('hypo_4_bis')
+l_hypothese_bis.SetUnifRefinUnRef(1)
+l_hypothese_bis.AddGroup('T1_EXT_I')
+l_hypothese_bis.AddGroup('T1_EXT_O')
+l_hypothese_bis.AddGroup('T2_EXT')
 #
 # Iterations
 # ==========
 # Iteration iter_4_1 : raffinement selon les faces internes
-iter_4_1 = case_4.NextIteration('iter_4_1')
+iter_4_1 = le_cas.NextIteration('iter_4_1')
 iter_4_1.SetMeshName('PIQUAGE_1')
-iter_4_1.SetMeshFile(DIRCASE+'/maill.01.med')
+iter_4_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
 iter_4_1.AssociateHypo('hypo_4')
-error = iter_4_1.Compute(1, 2)
+erreur = iter_4_1.Compute(1, 2)
 # 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.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
 iter_4_2.AssociateHypo('hypo_4_bis')
-error = iter_4_2.Compute(1, 2)
+erreur = iter_4_2.Compute(1, 2)
 # 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.SetMeshFile(os.path.join(DIRCASE, "maill.03.med"))
 iter_4_3.AssociateHypo('hypo_4_bis')
-error = iter_4_3.Compute(1, 2)
-
+erreur = iter_4_3.Compute(1, 2)
+#
+#============================== Fin des commandes ==============================
+#
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 4, 1)
 # ==================================
diff --git a/doc/files/tutorial_4.xao.gz b/doc/files/tutorial_4.xao.gz
new file mode 100755 (executable)
index 0000000..ecb87d3
Binary files /dev/null and b/doc/files/tutorial_4.xao.gz differ
index 0fadf72f6dfb70720f1e5977a58f6f207c73939e..2ccdb22c8a28a79f934009bfd1ef595d440c6efc 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version='1.0' encoding='iso-8859-1' ?>
 <proc name="tutorial_4">
+   <property name="DefaultStudyID" value="1"/>
    <objref name="CALCIUM_real" id="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"/>
    <type name="string" kind="string"/>
    <struct name="Engines/dataref">
    <sequence name="seqdblevec" content="dblevec"/>
    <sequence name="seqint" content="int"/>
    <sequence name="seqintvec" content="intvec"/>
+   <sequence name="seqpyobj" content="pyobj"/>
    <sequence name="stringvec" content="string"/>
    <sequence name="seqstringvec" content="stringvec"/>
    <container name="DefaultContainer">
+      <property name="container_kind" value="Salome"/>
+      <property name="attached_on_cloning" value="0"/>
       <property name="container_name" value="FactoryServer"/>
       <property name="name" value="localhost"/>
    </container>
@@ -51,6 +55,7 @@ import HOMARD_Boundary_idl
 clt = orbmodule.client()
 CurrentStudy = clt.Resolve("/Study")
 ]]></code></script>
+         <load container="DefaultContainer"/>
          <outport name="CurrentStudy" type="Study"/>
       </inline>
       <service name="SetCurrentStudy">
@@ -59,45 +64,6 @@ CurrentStudy = clt.Resolve("/Study")
          <method>SetCurrentStudy</method>
          <inport name="theStudy" type="Study"/>
       </service>
-      <service name="CreateBoundarycyl_1_int">
-         <node>Etude_Initialisation.SetCurrentStudy</node>
-         <method>CreateBoundaryCylinder</method>
-         <inport name="BoundaryName" type="string"/>
-         <inport name="Xcentre" type="double"/>
-         <inport name="Ycentre" type="double"/>
-         <inport name="Zcentre" type="double"/>
-         <inport name="Xaxis" type="double"/>
-         <inport name="Yaxis" type="double"/>
-         <inport name="Zaxis" type="double"/>
-         <inport name="Radius" type="double"/>
-         <outport name="return" type="HOMARD_Boundary"/>
-      </service>
-      <service name="CreateBoundarycyl_1_ext">
-         <node>Etude_Initialisation.SetCurrentStudy</node>
-         <method>CreateBoundaryCylinder</method>
-         <inport name="BoundaryName" type="string"/>
-         <inport name="Xcentre" type="double"/>
-         <inport name="Ycentre" type="double"/>
-         <inport name="Zcentre" type="double"/>
-         <inport name="Xaxis" type="double"/>
-         <inport name="Yaxis" type="double"/>
-         <inport name="Zaxis" type="double"/>
-         <inport name="Radius" type="double"/>
-         <outport name="return" type="HOMARD_Boundary"/>
-      </service>
-      <service name="CreateBoundarycyl_2_int">
-         <node>Etude_Initialisation.SetCurrentStudy</node>
-         <method>CreateBoundaryCylinder</method>
-         <inport name="BoundaryName" type="string"/>
-         <inport name="Xcentre" type="double"/>
-         <inport name="Ycentre" type="double"/>
-         <inport name="Zcentre" type="double"/>
-         <inport name="Xaxis" type="double"/>
-         <inport name="Yaxis" type="double"/>
-         <inport name="Zaxis" type="double"/>
-         <inport name="Radius" type="double"/>
-         <outport name="return" type="HOMARD_Boundary"/>
-      </service>
       <service name="CreateHypothesis_1">
          <node>Etude_Initialisation.SetCurrentStudy</node>
          <method>CreateHypothesis</method>
@@ -114,12 +80,13 @@ CurrentStudy = clt.Resolve("/Study")
       </service>
       <inline name="Hypo_Options_1">
          <script><code><![CDATA[# Raffinement uniforme
-Hypo.SetAdapRefinUnRef(-1, 1, 0)
+Hypo.SetUnifRefinUnRef(1)
 # Filtrage par des groupes
 Hypo.AddGroup('T1_INT_I')
 Hypo.AddGroup('T1_INT_O')
 Hypo.AddGroup('T2_INT')
 ]]></code></script>
+         <load container="DefaultContainer"/>
          <inport name="Hypo" type="HOMARD_Hypothesis"/>
       </inline>
       <inline name="Case_Options">
@@ -127,43 +94,23 @@ Hypo.AddGroup('T2_INT')
 # =========
 # Repertoire d'execution
 Case.SetDirName(DirName)
-# Options de conformite
-Case.SetConfType(1)
 # Liens avec les frontieres
-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.AddBoundary(CAO.GetName())
 # Resultats
 # =========
 # Iteration 0 associee
 Iter0 = Case.GetIter0()
 ]]></code></script>
+         <load container="DefaultContainer"/>
          <inport name="Case" type="HOMARD_Cas"/>
          <inport name="DirName" type="string"/>
+         <inport name="CAO" type="HOMARD_Boundary"/>
          <outport name="Iter0" type="HOMARD_Iteration"/>
       </inline>
-      <service name="CreateBoundarycyl_2_ext">
+      <service name="CreateBoundaryCAO">
          <node>Etude_Initialisation.SetCurrentStudy</node>
-         <method>CreateBoundaryCylinder</method>
+         <method>CreateBoundaryCAO</method>
          <inport name="BoundaryName" type="string"/>
-         <inport name="Xcentre" type="double"/>
-         <inport name="Ycentre" type="double"/>
-         <inport name="Zcentre" type="double"/>
-         <inport name="Xaxis" type="double"/>
-         <inport name="Yaxis" type="double"/>
-         <inport name="Zaxis" type="double"/>
-         <inport name="Radius" type="double"/>
-         <outport name="return" type="HOMARD_Boundary"/>
-      </service>
-      <service name="CreateBoundaryintersection">
-         <node>Etude_Initialisation.SetCurrentStudy</node>
-         <method>CreateBoundaryDi</method>
-         <inport name="BoundaryName" type="string"/>
-         <inport name="MeshName" type="string"/>
          <inport name="FileName" type="string"/>
          <outport name="return" type="HOMARD_Boundary"/>
       </service>
@@ -175,25 +122,23 @@ Iter0 = Case.GetIter0()
       </service>
       <inline name="Hypo_Options_2">
          <script><code><![CDATA[# Raffinement uniforme
-Hypo.SetAdapRefinUnRef(-1, 1, 0)
+Hypo.SetUnifRefinUnRef(1)
 # Filtrage par des groupes
 Hypo.AddGroup('T1_EXT_I')
 Hypo.AddGroup('T1_EXT_O')
 Hypo.AddGroup('T2_EXT')
 ]]></code></script>
+         <load container="DefaultContainer"/>
          <inport name="Hypo" type="HOMARD_Hypothesis"/>
       </inline>
       <control> <fromnode>StudyCreation</fromnode> <tonode>SetCurrentStudy</tonode> </control>
-      <control> <fromnode>SetCurrentStudy</fromnode> <tonode>CreateBoundarycyl_1_int</tonode> </control>
-      <control> <fromnode>CreateBoundarycyl_1_int</fromnode> <tonode>CreateBoundarycyl_1_ext</tonode> </control>
-      <control> <fromnode>CreateBoundarycyl_1_ext</fromnode> <tonode>CreateBoundarycyl_2_int</tonode> </control>
-      <control> <fromnode>CreateBoundarycyl_2_int</fromnode> <tonode>CreateBoundarycyl_2_ext</tonode> </control>
+      <control> <fromnode>SetCurrentStudy</fromnode> <tonode>CreateBoundaryCAO</tonode> </control>
       <control> <fromnode>CreateHypothesis_1</fromnode> <tonode>Hypo_Options_1</tonode> </control>
       <control> <fromnode>CreateCase</fromnode> <tonode>Case_Options</tonode> </control>
       <control> <fromnode>Hypo_Options_1</fromnode> <tonode>CreateHypothesis_2</tonode> </control>
       <control> <fromnode>Case_Options</fromnode> <tonode>CreateHypothesis_1</tonode> </control>
-      <control> <fromnode>CreateBoundarycyl_2_ext</fromnode> <tonode>CreateBoundaryintersection</tonode> </control>
-      <control> <fromnode>CreateBoundaryintersection</fromnode> <tonode>CreateCase</tonode> </control>
+      <control> <fromnode>CreateBoundaryCAO</fromnode> <tonode>CreateCase</tonode> </control>
+      <control> <fromnode>CreateBoundaryCAO</fromnode> <tonode>Case_Options</tonode> </control>
       <control> <fromnode>CreateHypothesis_2</fromnode> <tonode>Hypo_Options_2</tonode> </control>
       <datalink control="false">
          <fromnode>StudyCreation</fromnode> <fromport>CurrentStudy</fromport>
@@ -207,6 +152,10 @@ Hypo.AddGroup('T2_EXT')
          <fromnode>CreateCase</fromnode> <fromport>return</fromport>
          <tonode>Case_Options</tonode> <toport>Case</toport>
       </datalink>
+      <datalink control="false">
+         <fromnode>CreateBoundaryCAO</fromnode> <fromport>return</fromport>
+         <tonode>Case_Options</tonode> <toport>CAO</toport>
+      </datalink>
       <datalink control="false">
          <fromnode>CreateHypothesis_2</fromnode> <fromport>return</fromport>
          <tonode>Hypo_Options_2</tonode> <toport>Hypo</toport>
@@ -267,6 +216,7 @@ else :
     MessInfo = ""
 
 ]]></code></script>
+         <load container="DefaultContainer"/>
          <inport name="NumAdapt" type="int"/>
          <inport name="LastIter" type="HOMARD_Iteration"/>
          <inport name="Hypo" type="HOMARD_Hypothesis"/>
@@ -287,17 +237,26 @@ else :
       </datalink>
    </forloop>
    <inline name="Bilan">
-      <script><code><![CDATA[from PyQt4 import QtGui
-import sys
-app = QtGui.QApplication(sys.argv)
-if MessInfo != "" :
-    MessageBoxTitle = "Bilan"
-    QtGui.QMessageBox.warning(None, MessageBoxTitle, MessInfo)
-else :
-    MessageBoxTitle = "Bilan"
-    MessInfo = "Le maillage final est dans le fichier : " + MeshFile
-    QtGui.QMessageBox.information(None, MessageBoxTitle, MessInfo)
+      <script><code><![CDATA[import sys
+from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox
+class App(QWidget):
+    def __init__(self, MessInfo, MeshFile):
+        super(App, self).__init__()
+        self.title = "Bilan"
+        self._MessInfo = MessInfo
+        self._MeshFile = MeshFile
+        self.initUI()
+    def initUI(self):
+        if self._MessInfo != "" :
+            button = QMessageBox.critical(self, self.title, self._MessInfo)
+        else :
+            MessInfo = "Le maillage final est dans le fichier : " + self._MeshFile
+            button = QMessageBox.information(self, self.title, MessInfo)
+        self.show()
+app = QApplication(sys.argv)
+ex = App(MessInfo, MeshFile)
 ]]></code></script>
+      <load container="DefaultContainer"/>
       <inport name="MessInfo" type="string"/>
       <inport name="MeshFile" type="string"/>
    </inline>
@@ -305,8 +264,6 @@ else :
       <script><code><![CDATA[import os
 pathHomard = os.getenv("HOMARD_ROOT_DIR")
 data_dir = os.path.join(pathHomard, "share/doc/salome/gui/HOMARD/fr/_downloads")
-print "data_dir =", data_dir
-print os.listdir(data_dir)
 #
 # Maillage de la structure
 # . Nom du maillage
@@ -314,14 +271,12 @@ MeshName = "PIQUAGE"
 # . Fichier du maillage
 FileName = os.path.join(data_dir, "tutorial_4.00.med")
 #
-# Maillage de la frontiere
-# . Nom du maillage
-BMeshName = "PIQUAGE"
-# . Fichier du maillage
-BFileName = os.path.join(data_dir, "tutorial_4.fr.med")
+# CAO
+# . Fichier XAO
+BFileName = os.path.join(data_dir, "tutorial_4.xao")
 #
-# Répertoire de travail
-if os.environ.has_key("LOGNAME") :
+# Repertoire de travail
+if "LOGNAME" in os.environ :
   user = os.environ ["LOGNAME"]
 else :
   user = "anonymous"
@@ -329,9 +284,9 @@ DirName = os.path.join( os.sep, "tmp", "HOMARD_"+user)
 if not os.path.isdir(DirName) :
     os.mkdir (DirName)
 ]]></code></script>
+      <load container="DefaultContainer"/>
       <outport name="MeshName" type="string"/>
       <outport name="FileName" type="string"/>
-      <outport name="BMeshName" type="string"/>
       <outport name="BFileName" type="string"/>
       <outport name="DirName" type="string"/>
    </inline>
@@ -385,6 +340,7 @@ else :
     MessInfo = ""
 
 ]]></code></script>
+      <load container="DefaultContainer"/>
       <inport name="LastIter" type="HOMARD_Iteration"/>
       <inport name="Hypo" type="HOMARD_Hypothesis"/>
       <inport name="DirName" type="string"/>
@@ -410,25 +366,21 @@ else :
       <fromnode>DataInit</fromnode> <fromport>FileName</fromport>
       <tonode>Etude_Initialisation.CreateCase</tonode> <toport>FileName</toport>
    </datalink>
-   <datalink control="false">
-      <fromnode>DataInit</fromnode> <fromport>BMeshName</fromport>
-      <tonode>Etude_Initialisation.CreateBoundaryintersection</tonode> <toport>MeshName</toport>
-   </datalink>
    <datalink control="false">
       <fromnode>DataInit</fromnode> <fromport>BFileName</fromport>
-      <tonode>Etude_Initialisation.CreateBoundaryintersection</tonode> <toport>FileName</toport>
+      <tonode>Etude_Initialisation.CreateBoundaryCAO</tonode> <toport>FileName</toport>
    </datalink>
    <datalink control="false">
       <fromnode>DataInit</fromnode> <fromport>DirName</fromport>
-      <tonode>HOMARD_1</tonode> <toport>DirName</toport>
+      <tonode>Etude_Initialisation.Case_Options</tonode> <toport>DirName</toport>
    </datalink>
    <datalink control="false">
       <fromnode>DataInit</fromnode> <fromport>DirName</fromport>
-      <tonode>Etude_Initialisation.Case_Options</tonode> <toport>DirName</toport>
+      <tonode>ForLoop.HOMARD_2</tonode> <toport>DirName</toport>
    </datalink>
    <datalink control="false">
       <fromnode>DataInit</fromnode> <fromport>DirName</fromport>
-      <tonode>ForLoop.HOMARD_2</tonode> <toport>DirName</toport>
+      <tonode>HOMARD_1</tonode> <toport>DirName</toport>
    </datalink>
    <datalink control="false">
       <fromnode>HOMARD_1</fromnode> <fromport>MessInfo</fromport>
@@ -467,104 +419,16 @@ else :
       <tonode>HOMARD_1</tonode> <toport>Hypo</toport>
    </datalink>
    <parameter>
-      <tonode>ForLoop</tonode><toport>nsteps</toport>
-      <value><int>2</int></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>BoundaryName</toport>
-      <value><string>cyl_1_ext</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Xcentre</toport>
-      <value><double>0</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Ycentre</toport>
-      <value><double>25</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Zcentre</toport>
-      <value><double>-25</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Xaxis</toport>
-      <value><double>25</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Yaxis</toport>
-      <value><double>50</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Zaxis</toport>
-      <value><double>75</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Radius</toport>
-      <value><double>100</double></value>
+      <tonode>Etude_Initialisation.CreateBoundaryCAO</tonode><toport>BoundaryName</toport>
+      <value><string>CAO</string></value>
    </parameter>
    <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>BoundaryName</toport>
-      <value><string>cyl_1_int</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Xcentre</toport>
-      <value><double>0</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Ycentre</toport>
-      <value><double>25</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Zcentre</toport>
-      <value><double>-25</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Xaxis</toport>
-      <value><double>25</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Yaxis</toport>
-      <value><double>50</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Zaxis</toport>
-      <value><double>75</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Radius</toport>
-      <value><double>75</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>BoundaryName</toport>
-      <value><string>cyl_2_int</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Xcentre</toport>
-      <value><double>17.5</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Ycentre</toport>
-      <value><double>-2.5</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Zcentre</toport>
-      <value><double>-12.5</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Xaxis</toport>
-      <value><double>-100</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Yaxis</toport>
-      <value><double>-75</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Zaxis</toport>
-      <value><double>-25</double></value>
+      <tonode>Etude_Initialisation.CreateHypothesis_2</tonode><toport>HypoName</toport>
+      <value><string>Hypo_4_bis</string></value>
    </parameter>
    <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Radius</toport>
-      <value><double>25</double></value>
+      <tonode>ForLoop</tonode><toport>nsteps</toport>
+      <value><int>2</int></value>
    </parameter>
    <parameter>
       <tonode>Etude_Initialisation.CreateCase</tonode><toport>CaseName</toport>
@@ -572,66 +436,22 @@ else :
    </parameter>
    <parameter>
       <tonode>Etude_Initialisation.CreateHypothesis_1</tonode><toport>HypoName</toport>
-      <value><string>Hypo_1</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>BoundaryName</toport>
-      <value><string>cyl_2_ext</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Xcentre</toport>
-      <value><double>17.5</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Ycentre</toport>
-      <value><double>-2.5</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Zcentre</toport>
-      <value><double>-12.5</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Xaxis</toport>
-      <value><double>-100</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Yaxis</toport>
-      <value><double>-75</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Zaxis</toport>
-      <value><double>-25</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Radius</toport>
-      <value><double>50</double></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateBoundaryintersection</tonode><toport>BoundaryName</toport>
-      <value><string>intersection</string></value>
-   </parameter>
-   <parameter>
-      <tonode>Etude_Initialisation.CreateHypothesis_2</tonode><toport>HypoName</toport>
-      <value><string>Hypo_2</string></value>
-   </parameter>
-   <presentation name="Etude_Initialisation.StudyCreation" x="2.5" y="34" width="158" height="63" expanded="1" expx="2.5" expy="34" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="ForLoop" x="385" y="802.5" width="169" height="237" expanded="1" expx="385" expy="802.5" expWidth="169" expHeight="237" shownState="0"/>
-   <presentation name="HOMARD_1" x="6" y="804.5" width="158" height="144" expanded="1" expx="6" expy="804.5" expWidth="158" expHeight="144" shownState="0"/>
-   <presentation name="DataInit" x="4" y="32" width="158" height="171" expanded="1" expx="4" expy="32" expWidth="158" expHeight="171" shownState="0"/>
-   <presentation name="Bilan" x="720.5" y="770" width="158" height="90" expanded="1" expx="720.5" expy="770" expWidth="158" expHeight="90" shownState="0"/>
+      <value><string>Hypo_4</string></value>
+   </parameter>
+   <presentation name="Etude_Initialisation.StudyCreation" x="4" y="32" width="158" height="63" expanded="1" expx="4" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.SetCurrentStudy" x="163" y="32" width="158" height="63" expanded="1" expx="163" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.Hypo_Options_1" x="163" y="214.605" width="158" height="63" expanded="1" expx="163" expy="214.605" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateBoundaryCAO" x="4" y="96" width="158" height="90" expanded="1" expx="4" expy="96" expWidth="158" expHeight="90" shownState="0"/>
+   <presentation name="Etude_Initialisation.Case_Options" x="322.605" y="98.2103" width="158" height="117" expanded="1" expx="322.605" expy="98.2103" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="Etude_Initialisation.Hypo_Options_2" x="481.105" y="212.395" width="158" height="63" expanded="1" expx="481.105" expy="212.395" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateHypothesis_2" x="321.5" y="242.71" width="158" height="63" expanded="1" expx="321.5" expy="242.71" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Bilan" x="332.5" y="513.71" width="158" height="90" expanded="1" expx="332.5" expy="513.71" expWidth="158" expHeight="90" shownState="0"/>
    <presentation name="ForLoop.HOMARD_2" x="7" y="62" width="158" height="171" expanded="1" expx="7" expy="62" expWidth="158" expHeight="171" shownState="0"/>
-   <presentation name="Etude_Initialisation.Case_Options" x="177.5" y="358.5" width="158" height="90" expanded="1" expx="177.5" expy="358.5" expWidth="158" expHeight="90" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateBoundarycyl_1_ext" x="161" y="98" width="158" height="252" expanded="1" expx="161" expy="98" expWidth="158" expHeight="252" shownState="0"/>
-   <presentation name="Etude_Initialisation.SetCurrentStudy" x="161.5" y="34" width="158" height="63" expanded="1" expx="161.5" expy="34" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="Etude_Initialisation" x="4" y="204" width="802" height="549" expanded="1" expx="4" expy="204" expWidth="802" expHeight="549" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateBoundarycyl_1_int" x="2.5" y="98.5" width="158" height="252" expanded="1" expx="2.5" expy="98.5" expWidth="158" expHeight="252" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateBoundarycyl_2_int" x="319.5" y="98.5" width="158" height="252" expanded="1" expx="319.5" expy="98.5" expWidth="158" expHeight="252" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateCase" x="4" y="357" width="158" height="117" expanded="1" expx="4" expy="357" expWidth="158" expHeight="117" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateHypothesis_1" x="4" y="481" width="158" height="63" expanded="1" expx="4" expy="481" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="Etude_Initialisation.Hypo_Options_1" x="165" y="481.5" width="158" height="63" expanded="1" expx="165" expy="481.5" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateBoundarycyl_2_ext" x="479" y="99.5" width="158" height="252" expanded="1" expx="479" expy="99.5" expWidth="158" expHeight="252" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateBoundaryintersection" x="640" y="99.5" width="158" height="117" expanded="1" expx="640" expy="99.5" expWidth="158" expHeight="117" shownState="0"/>
-   <presentation name="Etude_Initialisation.CreateHypothesis_2" x="342.5" y="482" width="158" height="63" expanded="1" expx="342.5" expy="482" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="Etude_Initialisation.Hypo_Options_2" x="517.095" y="482.405" width="158" height="63" expanded="1" expx="517.095" expy="482.405" expWidth="158" expHeight="63" shownState="0"/>
-   <presentation name="__ROOT__" x="0" y="0" width="882.5" height="1043.5" expanded="1" expx="0" expy="0" expWidth="882.5" expHeight="1043.5" shownState="0"/>
+   <presentation name="HOMARD_1" x="4" y="513.71" width="158" height="144" expanded="1" expx="4" expy="513.71" expWidth="158" expHeight="144" shownState="0"/>
+   <presentation name="DataInit" x="4" y="32" width="158" height="144" expanded="1" expx="4" expy="32" expWidth="158" expHeight="144" shownState="0"/>
+   <presentation name="Etude_Initialisation" x="4" y="203.5" width="643.105" height="309.71" expanded="1" expx="4" expy="203.5" expWidth="643.105" expHeight="309.71" shownState="0"/>
+   <presentation name="ForLoop" x="163" y="513.71" width="169" height="237" expanded="1" expx="163" expy="513.71" expWidth="169" expHeight="237" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateCase" x="163" y="97.1052" width="158" height="117" expanded="1" expx="163" expy="97.1052" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateHypothesis_1" x="4" y="214.605" width="158" height="63" expanded="1" expx="4" expy="214.605" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="__ROOT__" x="0" y="0" width="651.105" height="754.71" expanded="1" expx="0" expy="0" expWidth="651.105" expHeight="754.71" shownState="0"/>
 </proc>
index 12bb4943ac951b4067d2d6d5a847f2a91540eed3..fdb7ea5d70685115eb127780041e4b22a0442e26 100755 (executable)
 
 """
 Exemple de couplage HOMARD-Salome
-Copyright EDF-R&D 1996, 2010, 2014
+Copyright EDF 1996, 2010, 2018
 """
-__revision__ = "V2.1"
+__revision__ = "V3.2"
 #
 import os
 import sys
 #
 # ==================================
-PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv("HOMARD_ROOT_DIR")
 # Repertoire des donnees du tutorial
 DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
@@ -47,11 +47,14 @@ salome.salome_init()
 import HOMARD
 #
 homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+homard.UpdateStudy()
 #
-# Frontiere
+#============================= Début des commandes =============================
+#
+# Frontière
 # =========
 # Creation of the discrete boundary boun_5_1
-boun_5_1 = homard.CreateBoundaryDi('boun_5_1', 'MAIL_EXT', DATA_TUTORIAL+'/tutorial_5.fr.med')
+boun_5_1 = homard.CreateBoundaryDi('boun_5_1', 'MAIL_EXT', os.path.join(DATA_TUTORIAL, "tutorial_5.fr.med"))
 #
 # Creation des zones
 # ==================
@@ -63,35 +66,37 @@ quart_sup = homard.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 )
 # Hypotheses
 # ==========
 # Creation of the hypothesis hypo_5
-hypo_5 = homard.CreateHypothesis('hypo_5')
-hypo_5.AddZone('enveloppe', 1)
-# Creation of the hypothesis hypo_5_bis
-hypo_5_bis = homard.CreateHypothesis('hypo_5_bis')
-hypo_5_bis.AddZone('quart_sup', 1)
+l_hypothese = homard.CreateHypothesis('hypo_5')
+l_hypothese.AddZone('enveloppe', 1)
+# Creation of the hypothesis l_hypothese_bis
+l_hypothese_bis = homard.CreateHypothesis('hypo_5_bis')
+l_hypothese_bis.AddZone('quart_sup', 1)
 #
 # Cas
 # ===
-case_5 = homard.CreateCase('Case_5', 'COEUR_2D', DATA_TUTORIAL+'/tutorial_5.00.med')
-case_5.SetDirName(DIRCASE)
-case_5.SetConfType(3)
-case_5.AddBoundaryGroup('boun_5_1', '')
+le_cas = homard.CreateCase('Case_5', 'COEUR_2D', os.path.join(DATA_TUTORIAL, "tutorial_5.00.med"))
+le_cas.SetDirName(DIRCASE)
+le_cas.SetConfType(1)
+le_cas.AddBoundary('boun_5_1')
 #
 # Iteration "iter_5_1"
 # ====================
-iter_5_1 = case_5.NextIteration('iter_5_1')
+iter_5_1 = le_cas.NextIteration('iter_5_1')
 iter_5_1.SetMeshName('COEUR_2D_01')
-iter_5_1.SetMeshFile(DIRCASE+'/maill.01.med')
+iter_5_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
 iter_5_1.AssociateHypo('hypo_5')
-error = iter_5_1.Compute(1, 2)
+erreur = iter_5_1.Compute(1, 2)
 #
 # Iteration "iter_5_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.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
 iter_5_2.AssociateHypo('hypo_5_bis')
-error = iter_5_2.Compute(1, 2)
-
+erreur = iter_5_2.Compute(1, 2)
+#
+#============================== Fin des commandes ==============================
+#
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 5, 1)
 # ==================================
diff --git a/doc/files/tutorial_6.fr.med.gz b/doc/files/tutorial_6.fr.med.gz
new file mode 100755 (executable)
index 0000000..e280810
Binary files /dev/null and b/doc/files/tutorial_6.fr.med.gz differ
diff --git a/doc/files/tutorial_6.py b/doc/files/tutorial_6.py
new file mode 100755 (executable)
index 0000000..c464402
--- /dev/null
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2011-2016  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
+#
+
+"""
+Exemple de couplage HOMARD-Salome
+Copyright EDF 1996, 2011, 2018
+"""
+__revision__ = "V4.4"
+#
+import os
+import sys
+#
+# ==================================
+PATH_HOMARD = os.getenv("HOMARD_ROOT_DIR")
+# Repertoire des donnees du tutorial
+DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
+DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
+sys.path.append(DATA_TUTORIAL)
+from tutorial_util import gzip_gunzip
+from tutorial_util import creation_dircase
+# ==================================
+DIRCASE = creation_dircase(6)
+gzip_gunzip(DATA_TUTORIAL, 4, -1)
+gzip_gunzip(DATA_TUTORIAL, 6, -1)
+# ==================================
+#
+import salome
+salome.salome_init()
+import HOMARD
+#
+homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+homard.SetCurrentStudy(salome.myStudy)
+#
+#============================= Début des commandes =============================
+#
+# Frontières
+# ==========
+boun_6_1 = homard.CreateBoundaryDi('intersection', 'COURBES', os.path.join(DATA_TUTORIAL, "tutorial_6.fr.med"))
+#
+boun_6_2 = homard.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.)
+#
+boun_6_3 = homard.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
+#
+boun_6_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
+#
+boun_6_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
+#
+# Cas
+# ===
+le_cas = homard.CreateCase('Case_6', 'PIQUAGE', os.path.join(DATA_TUTORIAL, "tutorial_4.00.med"))
+le_cas.SetDirName(DIRCASE)
+le_cas.AddBoundary( 'intersection' )
+le_cas.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' )
+le_cas.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
+le_cas.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' )
+le_cas.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
+le_cas.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' )
+le_cas.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
+#
+#============================== Fin des commandes ==============================
+#
+# Hypotheses
+# ==========
+# Creation of the hypothesis hypo_6
+l_hypothese = homard.CreateHypothesis('hypo_6')
+l_hypothese.SetUnifRefinUnRef(1)
+l_hypothese.AddGroup('IN1')
+l_hypothese.AddGroup('IN2')
+l_hypothese.AddGroup('T1_INT_I')
+l_hypothese.AddGroup('T1_INT_O')
+l_hypothese.AddGroup('T2_INT')
+# Creation of the hypothesis hypo_6_bis
+l_hypothese_bis = homard.CreateHypothesis('hypo_6_bis')
+l_hypothese_bis.SetUnifRefinUnRef(1)
+l_hypothese_bis.AddGroup('T1_EXT_I')
+l_hypothese_bis.AddGroup('T1_EXT_O')
+l_hypothese_bis.AddGroup('T2_EXT')
+#
+# Iterations
+# ==========
+# Iteration iter_6_1 : raffinement selon les faces internes
+iter_6_1 = le_cas.NextIteration('iter_6_1')
+iter_6_1.SetMeshName('PIQUAGE_6_1')
+iter_6_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+iter_6_1.AssociateHypo('hypo_6')
+erreur = iter_6_1.Compute(1, 2)
+# Iteration iter_6_2 : raffinement selon les faces externes
+iter_6_2 = iter_6_1.NextIteration('iter_6_2')
+iter_6_2.SetMeshName('PIQUAGE_6_2')
+iter_6_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
+iter_6_2.AssociateHypo('hypo_6_bis')
+erreur = iter_6_2.Compute(1, 2)
+# Iteration iter_6_3 : second raffinement selon les faces externes
+iter_6_3 = iter_6_2.NextIteration('iter_6_3')
+iter_6_3.SetMeshName('PIQUAGE_6_3')
+iter_6_3.SetMeshFile(os.path.join(DIRCASE, "maill.03.med"))
+iter_6_3.AssociateHypo('hypo_6_bis')
+erreur = iter_6_3.Compute(1, 2)
+#
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 4, 1)
+gzip_gunzip(DATA_TUTORIAL, 6, 1)
+# ==================================
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(True)
diff --git a/doc/files/tutorial_6.xml b/doc/files/tutorial_6.xml
new file mode 100755 (executable)
index 0000000..542251c
--- /dev/null
@@ -0,0 +1,652 @@
+<?xml version='1.0' encoding='iso-8859-1' ?>
+<proc name="tutorial_6">
+   <property name="DefaultStudyID" value="1"/>
+   <objref name="CALCIUM_real" id="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"/>
+   <type name="string" kind="string"/>
+   <struct name="Engines/dataref">
+      <member name="ref" type="string"/>
+   </struct>
+   <objref name="HOMARD_Boundary" id="IDL:HOMARD/HOMARD_Boundary:1.0"/>
+   <objref name="HOMARD_Cas" id="IDL:HOMARD/HOMARD_Cas:1.0"/>
+   <objref name="HOMARD_Hypothesis" id="IDL:HOMARD/HOMARD_Hypothesis:1.0"/>
+   <objref name="HOMARD_Iteration" id="IDL:HOMARD/HOMARD_Iteration:1.0"/>
+   <objref name="HOMARD_Zone" id="IDL:HOMARD/HOMARD_Zone:1.0"/>
+   <objref name="Study" id="IDL:SALOMEDS/Study:1.0"/>
+   <type name="bool" kind="bool"/>
+   <sequence name="boolvec" content="bool"/>
+   <type name="double" kind="double"/>
+   <sequence name="dblevec" content="double"/>
+   <objref name="file" id="file"/>
+   <type name="int" kind="int"/>
+   <sequence name="intvec" content="int"/>
+   <struct name="stringpair">
+      <member name="name" type="string"/>
+      <member name="value" type="string"/>
+   </struct>
+   <sequence name="propvec" content="stringpair"/>
+   <objref name="pyobj" id="python:obj:1.0"/>
+   <sequence name="seqboolvec" content="boolvec"/>
+   <sequence name="seqdblevec" content="dblevec"/>
+   <sequence name="seqint" content="int"/>
+   <sequence name="seqintvec" content="intvec"/>
+   <sequence name="seqpyobj" content="pyobj"/>
+   <sequence name="stringvec" content="string"/>
+   <sequence name="seqstringvec" content="stringvec"/>
+   <container name="DefaultContainer">
+      <property name="container_kind" value="Salome"/>
+      <property name="attached_on_cloning" value="0"/>
+      <property name="container_name" value="FactoryServer"/>
+      <property name="name" value="localhost"/>
+   </container>
+   <bloc name="Etude_Initialisation">
+      <inline name="StudyCreation">
+         <script><code><![CDATA[
+import orbmodule
+import SALOMEDS_idl
+
+import HOMARD
+import HOMARD_Gen_idl
+import HOMARD_Cas_idl
+import HOMARD_Iteration_idl
+import HOMARD_Hypothesis_idl
+import HOMARD_Zone_idl
+import HOMARD_Boundary_idl
+
+clt = orbmodule.client()
+StudyManager = clt.Resolve("/myStudyManager")
+CurrentStudy = StudyManager.GetStudyByID(1)
+]]></code></script>
+         <load container="DefaultContainer"/>
+         <outport name="CurrentStudy" type="Study"/>
+      </inline>
+      <service name="SetCurrentStudy">
+         <component>HOMARD</component>
+         <load container="DefaultContainer"/>
+         <method>SetCurrentStudy</method>
+         <inport name="theStudy" type="Study"/>
+      </service>
+      <service name="CreateBoundarycyl_1_int">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateBoundaryCylinder</method>
+         <inport name="BoundaryName" type="string"/>
+         <inport name="Xcentre" type="double"/>
+         <inport name="Ycentre" type="double"/>
+         <inport name="Zcentre" type="double"/>
+         <inport name="Xaxis" type="double"/>
+         <inport name="Yaxis" type="double"/>
+         <inport name="Zaxis" type="double"/>
+         <inport name="Radius" type="double"/>
+         <outport name="return" type="HOMARD_Boundary"/>
+      </service>
+      <service name="CreateBoundarycyl_1_ext">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateBoundaryCylinder</method>
+         <inport name="BoundaryName" type="string"/>
+         <inport name="Xcentre" type="double"/>
+         <inport name="Ycentre" type="double"/>
+         <inport name="Zcentre" type="double"/>
+         <inport name="Xaxis" type="double"/>
+         <inport name="Yaxis" type="double"/>
+         <inport name="Zaxis" type="double"/>
+         <inport name="Radius" type="double"/>
+         <outport name="return" type="HOMARD_Boundary"/>
+      </service>
+      <service name="CreateBoundarycyl_2_int">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateBoundaryCylinder</method>
+         <inport name="BoundaryName" type="string"/>
+         <inport name="Xcentre" type="double"/>
+         <inport name="Ycentre" type="double"/>
+         <inport name="Zcentre" type="double"/>
+         <inport name="Xaxis" type="double"/>
+         <inport name="Yaxis" type="double"/>
+         <inport name="Zaxis" type="double"/>
+         <inport name="Radius" type="double"/>
+         <outport name="return" type="HOMARD_Boundary"/>
+      </service>
+      <service name="CreateHypothesis_1">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateHypothesis</method>
+         <inport name="HypoName" type="string"/>
+         <outport name="return" type="HOMARD_Hypothesis"/>
+      </service>
+      <service name="CreateCase">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateCase</method>
+         <inport name="CaseName" type="string"/>
+         <inport name="MeshName" type="string"/>
+         <inport name="FileName" type="string"/>
+         <outport name="return" type="HOMARD_Cas"/>
+      </service>
+      <inline name="Hypo_Options_1">
+         <script><code><![CDATA[# Raffinement uniforme
+Hypo.SetUnifRefinUnRef(1)
+# Filtrage par des groupes
+Hypo.AddGroup('T1_INT_I')
+Hypo.AddGroup('T1_INT_O')
+Hypo.AddGroup('T2_INT')
+]]></code></script>
+         <load container="DefaultContainer"/>
+         <inport name="Hypo" type="HOMARD_Hypothesis"/>
+      </inline>
+      <inline name="Case_Options">
+         <script><code><![CDATA[# Options
+# =========
+# Repertoire d'execution
+Case.SetDirName(DirName)
+# Liens avec les frontieres
+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' )
+# Resultats
+# =========
+# Iteration 0 associee
+Iter0 = Case.GetIter0()
+]]></code></script>
+         <load container="DefaultContainer"/>
+         <inport name="Case" type="HOMARD_Cas"/>
+         <inport name="DirName" type="string"/>
+         <outport name="Iter0" type="HOMARD_Iteration"/>
+      </inline>
+      <service name="CreateBoundarycyl_2_ext">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateBoundaryCylinder</method>
+         <inport name="BoundaryName" type="string"/>
+         <inport name="Xcentre" type="double"/>
+         <inport name="Ycentre" type="double"/>
+         <inport name="Zcentre" type="double"/>
+         <inport name="Xaxis" type="double"/>
+         <inport name="Yaxis" type="double"/>
+         <inport name="Zaxis" type="double"/>
+         <inport name="Radius" type="double"/>
+         <outport name="return" type="HOMARD_Boundary"/>
+      </service>
+      <service name="CreateBoundaryintersection">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateBoundaryDi</method>
+         <inport name="BoundaryName" type="string"/>
+         <inport name="MeshName" type="string"/>
+         <inport name="FileName" type="string"/>
+         <outport name="return" type="HOMARD_Boundary"/>
+      </service>
+      <service name="CreateHypothesis_2">
+         <node>Etude_Initialisation.SetCurrentStudy</node>
+         <method>CreateHypothesis</method>
+         <inport name="HypoName" type="string"/>
+         <outport name="return" type="HOMARD_Hypothesis"/>
+      </service>
+      <inline name="Hypo_Options_2">
+         <script><code><![CDATA[# Raffinement uniforme
+Hypo.SetUnifRefinUnRef(1)
+# Filtrage par des groupes
+Hypo.AddGroup('T1_EXT_I')
+Hypo.AddGroup('T1_EXT_O')
+Hypo.AddGroup('T2_EXT')
+]]></code></script>
+         <load container="DefaultContainer"/>
+         <inport name="Hypo" type="HOMARD_Hypothesis"/>
+      </inline>
+      <control> <fromnode>StudyCreation</fromnode> <tonode>SetCurrentStudy</tonode> </control>
+      <control> <fromnode>SetCurrentStudy</fromnode> <tonode>CreateBoundarycyl_1_int</tonode> </control>
+      <control> <fromnode>CreateBoundarycyl_1_int</fromnode> <tonode>CreateBoundarycyl_1_ext</tonode> </control>
+      <control> <fromnode>CreateBoundarycyl_1_ext</fromnode> <tonode>CreateBoundarycyl_2_int</tonode> </control>
+      <control> <fromnode>CreateBoundarycyl_2_int</fromnode> <tonode>CreateBoundarycyl_2_ext</tonode> </control>
+      <control> <fromnode>CreateHypothesis_1</fromnode> <tonode>Hypo_Options_1</tonode> </control>
+      <control> <fromnode>CreateCase</fromnode> <tonode>Case_Options</tonode> </control>
+      <control> <fromnode>Hypo_Options_1</fromnode> <tonode>CreateHypothesis_2</tonode> </control>
+      <control> <fromnode>Case_Options</fromnode> <tonode>CreateHypothesis_1</tonode> </control>
+      <control> <fromnode>CreateBoundarycyl_2_ext</fromnode> <tonode>CreateBoundaryintersection</tonode> </control>
+      <control> <fromnode>CreateBoundaryintersection</fromnode> <tonode>CreateCase</tonode> </control>
+      <control> <fromnode>CreateHypothesis_2</fromnode> <tonode>Hypo_Options_2</tonode> </control>
+      <datalink control="false">
+         <fromnode>StudyCreation</fromnode> <fromport>CurrentStudy</fromport>
+         <tonode>SetCurrentStudy</tonode> <toport>theStudy</toport>
+      </datalink>
+      <datalink control="false">
+         <fromnode>CreateHypothesis_1</fromnode> <fromport>return</fromport>
+         <tonode>Hypo_Options_1</tonode> <toport>Hypo</toport>
+      </datalink>
+      <datalink control="false">
+         <fromnode>CreateCase</fromnode> <fromport>return</fromport>
+         <tonode>Case_Options</tonode> <toport>Case</toport>
+      </datalink>
+      <datalink control="false">
+         <fromnode>CreateHypothesis_2</fromnode> <fromport>return</fromport>
+         <tonode>Hypo_Options_2</tonode> <toport>Hypo</toport>
+      </datalink>
+   </bloc>
+   <forloop name="ForLoop" nsteps="2">
+      <inline name="HOMARD_2">
+         <script><code><![CDATA[import os
+#
+# Hypothese
+# =========
+# . Nom de l'hypothese
+# --------------------
+HypoName = Hypo.GetName()
+#
+# Nom de la future iteration et du futur maillage
+# ==========================
+# . Nom de l'iteration precedente
+LastIterName = LastIter.GetName()
+# . Nom du maillage precedent
+LastMeshName = LastIter.GetMeshName()#
+#
+aux = '%d' % (NumAdapt+2)
+#
+IterName = LastIterName[:-1] + aux
+MeshName = LastMeshName[:-1] + aux
+#
+# Creation de l'iteration
+# =======================
+Iter = LastIter.NextIteration(IterName)
+#
+# Options de l'iteration
+# ======================
+# . Association de l'hypothese
+Iter.AssociateHypo(HypoName)
+#
+# . Le fichier du futur maillage
+aux = '%02d' % (NumAdapt+2)
+MeshFile = os.path.join (DirName, "maill."+aux+".med")
+Iter.SetMeshFile(MeshFile)
+#
+# . Le nom du futur maillage
+Iter.SetMeshName(MeshName)
+#
+# Calcul si le precedent s'est bien passe
+# ======
+if LastPb :
+  Pb = LastPb
+  MessInfo = "Erreur dans HOMARD pour l'adaptation numero %d" % LastPb
+else :
+  Error = Iter.Compute(1, 1)
+#
+  if Error :
+    Pb = NumAdapt+2
+    MessInfo = "Erreur dans HOMARD pour l'adaptation numero %d" % NumAdapt
+  else :
+    Pb = 0
+    MessInfo = ""
+
+]]></code></script>
+         <inport name="NumAdapt" type="int"/>
+         <inport name="LastIter" type="HOMARD_Iteration"/>
+         <inport name="Hypo" type="HOMARD_Hypothesis"/>
+         <inport name="DirName" type="string"/>
+         <inport name="LastPb" type="int"/>
+         <outport name="MessInfo" type="string"/>
+         <outport name="MeshFile" type="string"/>
+         <outport name="Iter" type="HOMARD_Iteration"/>
+         <outport name="Pb" type="int"/>
+      </inline>
+      <datalink control="false">
+         <fromnode>HOMARD_2</fromnode> <fromport>Iter</fromport>
+         <tonode>HOMARD_2</tonode> <toport>LastIter</toport>
+      </datalink>
+      <datalink control="false">
+         <fromnode>HOMARD_2</fromnode> <fromport>Pb</fromport>
+         <tonode>HOMARD_2</tonode> <toport>LastPb</toport>
+      </datalink>
+   </forloop>
+   <inline name="Bilan">
+      <script><code><![CDATA[import sys
+from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox
+class App(QWidget):
+    def __init__(self, MessInfo, MeshFile):
+        super(App, self).__init__()
+        self.title = "Bilan"
+        self._MessInfo = MessInfo
+        self._MeshFile = MeshFile
+        self.initUI()
+    def initUI(self):
+        if self._MessInfo != "" :
+            button = QMessageBox.critical(self, self.title, self._MessInfo)
+        else :
+            MessInfo = "Le maillage final est dans le fichier : " + self._MeshFile
+            button = QMessageBox.information(self, self.title, MessInfo)
+        self.show()
+app = QApplication(sys.argv)
+ex = App(MessInfo, MeshFile)
+]]></code></script>
+      <load container="DefaultContainer"/>
+      <inport name="MessInfo" type="string"/>
+      <inport name="MeshFile" type="string"/>
+   </inline>
+   <inline name="DataInit">
+      <script><code><![CDATA[import os
+pathHomard = os.getenv("HOMARD_ROOT_DIR")
+data_dir = os.path.join(pathHomard, "share/doc/salome/gui/HOMARD/fr/_downloads")
+#
+# Maillage de la structure
+# . Nom du maillage
+MeshName = "PIQUAGE"
+# . Fichier du maillage
+FileName = os.path.join(data_dir, "tutorial_4.00.med")
+#
+# Maillage de la frontiere
+# . Nom du maillage
+BMeshName = "PIQUAGE"
+# . Fichier du maillage
+BFileName = os.path.join(data_dir, "tutorial_6.fr.med")
+#
+# Répertoire de travail
+if os.environ.has_key("LOGNAME") :
+  user = os.environ ["LOGNAME"]
+else :
+  user = "anonymous"
+DirName = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(DirName) :
+    os.mkdir (DirName)
+]]></code></script>
+      <outport name="MeshName" type="string"/>
+      <outport name="FileName" type="string"/>
+      <outport name="BMeshName" type="string"/>
+      <outport name="BFileName" type="string"/>
+      <outport name="DirName" type="string"/>
+   </inline>
+   <inline name="HOMARD_1">
+      <script><code><![CDATA[import os
+#
+# Hypothese
+# =========
+# . Nom de l'hypothese
+# --------------------
+HypoName = Hypo.GetName()
+#
+# Nom de la future iteration et du futur maillage
+# ==========================
+# . Nom de l'iteration precedente
+LastIterName = LastIter.GetName()
+# . Nom du maillage precedent
+LastMeshName = LastIter.GetMeshName()
+#
+IterName = LastIterName + "_1"
+MeshName = LastMeshName + "_1"
+#
+# Creation de l'iteration
+# =======================
+Iter = LastIter.NextIteration(IterName)
+#
+# Options de l'iteration
+# ======================
+# . Association de l'hypothese
+Iter.AssociateHypo(HypoName)
+#
+# . Le fichier du futur maillage
+MeshFile = os.path.join (DirName, "maill.01.med")
+Iter.SetMeshFile(MeshFile)
+#
+# . Le nom du futur maillage
+Iter.SetMeshName(MeshName)
+#
+# Calcul
+# ======
+Error = Iter.Compute(1, 1)
+#
+# ============================
+# Arret si erreur
+if Error :
+    Pb = 1
+    MessInfo = "Erreur dans HOMARD pour la premiere adaptation"
+# Sinon on enchaine sur 2 autres adaptations
+else :
+    Pb= 0
+    MessInfo = ""
+
+]]></code></script>
+      <load container="DefaultContainer"/>
+      <inport name="LastIter" type="HOMARD_Iteration"/>
+      <inport name="Hypo" type="HOMARD_Hypothesis"/>
+      <inport name="DirName" type="string"/>
+      <outport name="MessInfo" type="string"/>
+      <outport name="MeshFile" type="string"/>
+      <outport name="Iter" type="HOMARD_Iteration"/>
+      <outport name="Pb" type="int"/>
+   </inline>
+   <control> <fromnode>Etude_Initialisation</fromnode> <tonode>HOMARD_1</tonode> </control>
+   <control> <fromnode>ForLoop</fromnode> <tonode>Bilan</tonode> </control>
+   <control> <fromnode>DataInit</fromnode> <tonode>HOMARD_1</tonode> </control>
+   <control> <fromnode>DataInit</fromnode> <tonode>Etude_Initialisation</tonode> </control>
+   <control> <fromnode>HOMARD_1</fromnode> <tonode>ForLoop</tonode> </control>
+   <datalink control="false">
+      <fromnode>ForLoop</fromnode> <fromport>index</fromport>
+      <tonode>ForLoop.HOMARD_2</tonode> <toport>NumAdapt</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>MeshName</fromport>
+      <tonode>Etude_Initialisation.CreateCase</tonode> <toport>MeshName</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>FileName</fromport>
+      <tonode>Etude_Initialisation.CreateCase</tonode> <toport>FileName</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>BMeshName</fromport>
+      <tonode>Etude_Initialisation.CreateBoundaryintersection</tonode> <toport>MeshName</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>BFileName</fromport>
+      <tonode>Etude_Initialisation.CreateBoundaryintersection</tonode> <toport>FileName</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>DirName</fromport>
+      <tonode>ForLoop.HOMARD_2</tonode> <toport>DirName</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>DirName</fromport>
+      <tonode>Etude_Initialisation.Case_Options</tonode> <toport>DirName</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>DataInit</fromnode> <fromport>DirName</fromport>
+      <tonode>HOMARD_1</tonode> <toport>DirName</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>HOMARD_1</fromnode> <fromport>MessInfo</fromport>
+      <tonode>Bilan</tonode> <toport>MessInfo</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>HOMARD_1</fromnode> <fromport>MeshFile</fromport>
+      <tonode>Bilan</tonode> <toport>MeshFile</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>HOMARD_1</fromnode> <fromport>Iter</fromport>
+      <tonode>ForLoop.HOMARD_2</tonode> <toport>LastIter</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>HOMARD_1</fromnode> <fromport>Pb</fromport>
+      <tonode>ForLoop.HOMARD_2</tonode> <toport>LastPb</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Etude_Initialisation.CreateHypothesis_2</fromnode> <fromport>return</fromport>
+      <tonode>ForLoop.HOMARD_2</tonode> <toport>Hypo</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>ForLoop.HOMARD_2</fromnode> <fromport>MessInfo</fromport>
+      <tonode>Bilan</tonode> <toport>MessInfo</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>ForLoop.HOMARD_2</fromnode> <fromport>MeshFile</fromport>
+      <tonode>Bilan</tonode> <toport>MeshFile</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Etude_Initialisation.Case_Options</fromnode> <fromport>Iter0</fromport>
+      <tonode>HOMARD_1</tonode> <toport>LastIter</toport>
+   </datalink>
+   <datalink control="false">
+      <fromnode>Etude_Initialisation.CreateHypothesis_1</fromnode> <fromport>return</fromport>
+      <tonode>HOMARD_1</tonode> <toport>Hypo</toport>
+   </datalink>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateHypothesis_2</tonode><toport>HypoName</toport>
+      <value><string>Hypo_6_bis</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundaryintersection</tonode><toport>BoundaryName</toport>
+      <value><string>intersection</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>BoundaryName</toport>
+      <value><string>cyl_2_ext</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Xcentre</toport>
+      <value><double>17.5</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Ycentre</toport>
+      <value><double>-2.5</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Zcentre</toport>
+      <value><double>-12.5</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Xaxis</toport>
+      <value><double>-100</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Yaxis</toport>
+      <value><double>-75</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Zaxis</toport>
+      <value><double>-25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_ext</tonode><toport>Radius</toport>
+      <value><double>50</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateHypothesis_1</tonode><toport>HypoName</toport>
+      <value><string>Hypo_6</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>BoundaryName</toport>
+      <value><string>cyl_2_int</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Xcentre</toport>
+      <value><double>17.5</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Ycentre</toport>
+      <value><double>-2.5</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Zcentre</toport>
+      <value><double>-12.5</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Xaxis</toport>
+      <value><double>-100</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Yaxis</toport>
+      <value><double>-75</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Zaxis</toport>
+      <value><double>-25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_2_int</tonode><toport>Radius</toport>
+      <value><double>25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>BoundaryName</toport>
+      <value><string>cyl_1_ext</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Xcentre</toport>
+      <value><double>0</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Ycentre</toport>
+      <value><double>25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Zcentre</toport>
+      <value><double>-25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Xaxis</toport>
+      <value><double>25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Yaxis</toport>
+      <value><double>50</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Zaxis</toport>
+      <value><double>75</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_ext</tonode><toport>Radius</toport>
+      <value><double>100</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateCase</tonode><toport>CaseName</toport>
+      <value><string>tutorial_6</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>BoundaryName</toport>
+      <value><string>cyl_1_int</string></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Xcentre</toport>
+      <value><double>0</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Ycentre</toport>
+      <value><double>25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Zcentre</toport>
+      <value><double>-25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Xaxis</toport>
+      <value><double>25</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Yaxis</toport>
+      <value><double>50</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Zaxis</toport>
+      <value><double>75</double></value>
+   </parameter>
+   <parameter>
+      <tonode>Etude_Initialisation.CreateBoundarycyl_1_int</tonode><toport>Radius</toport>
+      <value><double>75</double></value>
+   </parameter>
+   <parameter>
+      <tonode>ForLoop</tonode><toport>nsteps</toport>
+      <value><int>2</int></value>
+   </parameter>
+   <presentation name="Etude_Initialisation.CreateHypothesis_2" x="321.5" y="465.422" width="158" height="63" expanded="1" expx="321.5" expy="465.422" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateBoundaryintersection" x="638.5" y="96.1845" width="158" height="117" expanded="1" expx="638.5" expy="96.1845" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="Etude_Initialisation.Hypo_Options_2" x="480" y="466.933" width="158" height="63" expanded="1" expx="480" expy="466.933" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="HOMARD_1" x="4" y="738.933" width="158" height="144" expanded="1" expx="4" expy="738.933" expWidth="158" expHeight="144" shownState="0"/>
+   <presentation name="DataInit" x="4" y="32" width="158" height="171" expanded="1" expx="4" expy="32" expWidth="158" expHeight="171" shownState="0"/>
+   <presentation name="Bilan" x="650.874" y="738.933" width="158" height="90" expanded="1" expx="650.874" expy="738.933" expWidth="158" expHeight="90" shownState="0"/>
+   <presentation name="Etude_Initialisation.Case_Options" x="163" y="348.5" width="158" height="90" expanded="1" expx="163" expy="348.5" expWidth="158" expHeight="90" shownState="0"/>
+   <presentation name="Etude_Initialisation.Hypo_Options_1" x="163" y="466.424" width="158" height="63" expanded="1" expx="163" expy="466.424" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateBoundarycyl_2_ext" x="480" y="96.1845" width="158" height="252" expanded="1" expx="480" expy="96.1845" expWidth="158" expHeight="252" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateHypothesis_1" x="4" y="466" width="158" height="63" expanded="1" expx="4" expy="466" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateBoundarycyl_2_int" x="321.5" y="96" width="158" height="252" expanded="1" expx="321.5" expy="96" expWidth="158" expHeight="252" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateBoundarycyl_1_ext" x="163" y="96" width="158" height="252" expanded="1" expx="163" expy="96" expWidth="158" expHeight="252" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateCase" x="4" y="348.5" width="158" height="117" expanded="1" expx="4" expy="348.5" expWidth="158" expHeight="117" shownState="0"/>
+   <presentation name="Etude_Initialisation.CreateBoundarycyl_1_int" x="4" y="96" width="158" height="252" expanded="1" expx="4" expy="96" expWidth="158" expHeight="252" shownState="0"/>
+   <presentation name="ForLoop.HOMARD_2" x="7" y="62" width="158" height="171" expanded="1" expx="7" expy="62" expWidth="158" expHeight="171" shownState="0"/>
+   <presentation name="Etude_Initialisation.SetCurrentStudy" x="163" y="32" width="158" height="63" expanded="1" expx="163" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="Etude_Initialisation.StudyCreation" x="4" y="32" width="158" height="63" expanded="1" expx="4" expy="32" expWidth="158" expHeight="63" shownState="0"/>
+   <presentation name="ForLoop" x="163" y="738.933" width="169" height="237" expanded="1" expx="163" expy="738.933" expWidth="169" expHeight="237" shownState="0"/>
+   <presentation name="Etude_Initialisation" x="4" y="204" width="800.5" height="533.933" expanded="1" expx="4" expy="204" expWidth="800.5" expHeight="533.933" shownState="0"/>
+   <presentation name="__ROOT__" x="0" y="0" width="812.874" height="979.933" expanded="1" expx="0" expy="0" expWidth="812.874" expHeight="979.933" shownState="0"/>
+</proc>
index 8a22233f955abdb8d5147a3c89c071d2f9bf0503..57149f4a41020b9479b62d48b05858ba5b963f9b 100755 (executable)
@@ -19,9 +19,9 @@
 #
 """
 Python script for HOMARD
-Copyright EDF-R&D 2014, 2017
+Copyright EDF 2014, 2018
 """
-__revision__ = "V2.01"
+__revision__ = "V2.02"
 
 import os
 import sys
@@ -33,11 +33,12 @@ REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
 from test_util import remove_dir
 
-#========================================================================
-#========================================================================
+#
+#========================= Debut de la fonction ==================================
+#
 def gzip_gunzip(data_dir, num_tuto, option) :
   """
-Compression/Uncompression of the med files of a directory such as tutorial_x.nn.med
+Compression/Uncompression of the med(or xao) files of a directory such as tutorial_x.nn.med (or tutorial_x.nn.xao)
 data_dir: directory
 num_tuto: number of the tutorial
 option  : 1: compression, -1: uncompression
@@ -66,13 +67,14 @@ Copyright EDF-R&D 2014
           erreur = 1
           break
 #
-    ficloc = ficloc_basis + ".fr.med"
-    nomfic = os.path.join(data_dir, ficloc)
-    if not os.path.isfile(nomfic) :
-      ficloc += ".gz"
+    for suffixe in ( "xao", "fr.med" ) :
+      ficloc = ficloc_basis + "." + suffixe
       nomfic = os.path.join(data_dir, ficloc)
-      if os.path.isfile(nomfic) :
-        os.system("gunzip "+nomfic)
+      if not os.path.isfile(nomfic) :
+        ficloc += ".gz"
+        nomfic = os.path.join(data_dir, ficloc)
+        if os.path.isfile(nomfic) :
+          os.system("gunzip "+nomfic)
 #
 # Compression
 #
@@ -91,18 +93,21 @@ Copyright EDF-R&D 2014
           erreur = 2
           break
 #
-    ficloc = ficloc_basis + ".fr.med.gz"
-    nomfic = os.path.join(data_dir, ficloc)
-    if not os.path.isfile(nomfic) :
-      ficloc = ficloc_basis + ".fr.med"
+    for suffixe in ( "xao", "fr.med" ) :
+      ficloc = ficloc_basis + "." + suffixe + ".gz"
       nomfic = os.path.join(data_dir, ficloc)
-      if os.path.isfile(nomfic) :
-        os.system("gzip "+nomfic)
+      if not os.path.isfile(nomfic) :
+        ficloc = ficloc_basis + ".fr.med"
+        nomfic = os.path.join(data_dir, ficloc)
+        if os.path.isfile(nomfic) :
+          os.system("gzip "+nomfic)
 #
   return
 #
-#========================================================================
-#========================================================================
+#==========================  Fin de la fonction ==================================
+#
+#========================= Debut de la fonction ==================================
+#
 def creation_dircase(num_tuto) :
   """
 Creation of a directory for the results of tutorial_x
@@ -124,6 +129,6 @@ Copyright EDF-R&D 2014
   os.mkdir (dircase)
 #
   return dircase
-#========================================================================
-#========================================================================
+#
+#==========================  Fin de la fonction ==================================
 #
index 587ec7e285b16a4fdadb18bb9b5bc12740476985..20367f9675536c878ff144edbe355c98dfbcf86a 100755 (executable)
@@ -22,7 +22,7 @@
 """
 Lancement d'un calcul ASTER
 """
-__revision__ = "V5.9"
+__revision__ = "V5.11"
 #
 import sys
 import os
index 12f4f581323019c0c76ffc18381187f3d637b702..056b87f254237cdef9f8462929b5030a8c16070f 100755 (executable)
@@ -22,7 +22,7 @@
 """
 Pseudo-lancement d'un calcul pour valider les tests
 """
-__revision__ = "V2.1"
+__revision__ = "V2.2"
 #
 import sys
 import os
index f2cb2bc058103dbebf963d365abcf89969f9c9f5..5bd55ac062ee88ec6eea8157591542c063e70b6c 100644 (file)
@@ -4,26 +4,52 @@ La frontière
 ############
 .. index:: single: boundary
 .. index:: single: frontière
+.. index:: single: CAO
 
 L'objet frontière contient toutes les définitions géométriques permettant de décrire une frontière courbe à suivre.
 
 Il existe deux modes de description d'une frontière :
 
-  - Discrète : ce mode est utilisé pour décrire une courbe 1D
-  - Analytique : ce mode est utilisé pour décrire une surface
+  - CAO : la frontière est issue de la géométrie du domaine
+  - Non CAO : si on ne dispose pas de la géométrie, on peut approcher la frontière par des descriptions :
 
+    * Discrète : pour décrire l'ensemble des courbes 1D composant la frontière
+    * Analytique : pour décrire chaque surface composant la frontière
+
+Le choix est exclusif :
+
+.. image:: images/create_boundary_1.png
+   :align: center
+
+Frontière CAO
+*************
+
+Le suivi d'une frontière CAO se fera en sélectionnant une frontière choisie dans la liste des frontières CAO enregistrées.
+
+Au démarrage, la liste est vide. Il faut créer une première frontière CAO par activation du bouton "*Nouveau*" :
+
+.. image:: images/create_boundary_cao_1.png
+   :align: center
+
+La fenêtre proposée invite au choix d'un fichier contenant une CAO au format XAO. Cette est celle de la géométrie qui est le support du maillage. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière, quel que soit son type.
+
+.. image:: images/create_boundary_cao_2.png
+   :align: center
+
+.. note::
+  La cohérence entre cette CAO et le maillage initial n'est pas contrôlée.
 
 Frontière discrète
 ******************
 
-Le suivi d'une frontière discrète se fera en sélectionnant une frontière choisie dans la liste des frontières discrètes existantes.
+Le suivi d'une frontière discrète se fera en sélectionnant une frontière choisie dans la liste des frontières discrètes enregistrées.
 
 Au démarrage, la liste est vide. Il faut créer une première frontière discrète par activation du bouton "*Nouveau*" :
 
 .. image:: images/create_boundary_di_1.png
    :align: center
 
-La fenêtre proposée invite au choix d'un fichier de maillage. Ce maillage est celui de toutes les lignes constituant la frontière. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière.
+La fenêtre proposée invite au choix d'un fichier de maillage. Ce maillage est celui de toutes les lignes constituant la frontière. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière, quel que soit son type.
 
 .. image:: images/create_boundary_di_2.png
    :align: center
@@ -86,7 +112,7 @@ Un cylindre
 ===========
 .. index:: single: cylindre
 
-Le cylindre est défini par un point de l'axe, son axe et son rayon. L'axe est défini par un vecteur. La norme de ce vecteur n'est pas nécessairement égale à 1 ; de même, son orientation n'a aucune importance. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière.
+Le cylindre est défini par un point de l'axe, son axe et son rayon. L'axe est défini par un vecteur. La norme de ce vecteur n'est pas nécessairement égale à 1 ; de même, son orientation n'a aucune importance. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière, quel que soit son type.
 
 .. image:: images/create_boundary_an_cy.png
    :align: center
@@ -95,7 +121,7 @@ Une sphère
 ==========
 .. index:: single: sphere
 
-La sphère est définie par son centre et son rayon. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière.
+La sphère est définie par son centre et son rayon. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière, quel que soit son type.
 
 .. image:: images/create_boundary_an_sp.png
    :align: center
@@ -104,7 +130,7 @@ Un cône
 =======
 .. index:: single: cone
 
-Un cône est défini de deux manières différentes : le centre, l'axe et l'angle d'ouverture en degré ou par deux points centrés sur l'axe et le rayon associé. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière.
+Un cône est défini de deux manières différentes : le centre, l'axe et l'angle d'ouverture en degré ou par deux points centrés sur l'axe et le rayon associé. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière, quel que soit son type.
 
 Création par une origine, un axe et un angle d'ouverture :
 
@@ -120,7 +146,7 @@ Un tore
 =======
 .. index:: single: tore
 
-Le tore est défini par son centre, son axe, le rayon de révolution et le rayon primaire. L'axe est défini par un vecteur. La norme de ce vecteur n'est pas nécessairement égale à 1 ; de même, son orientation n'a aucune importance. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière.
+Le tore est défini par son centre, son axe, le rayon de révolution et le rayon primaire. L'axe est défini par un vecteur. La norme de ce vecteur n'est pas nécessairement égale à 1 ; de même, son orientation n'a aucune importance. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière, quel que soit son type.
 
 .. image:: images/create_boundary_an_to.png
    :align: center
@@ -131,7 +157,7 @@ L'arbre d'étude
 
 A l'issue de cette création de frontières, l'arbre d'études a été enrichi. On y trouve toutes les frontières créées, identifiées par leur nom, avec la possibilité de les éditer.
 
-.. image:: images/create_boundary_1.png
+.. image:: images/create_boundary.png
    :align: center
 
 
index 0e41fc223a1371109054c19b05269d5693ad57d0..9f0ff88f284c74db5982d2d2cf0ebeb377d234d6 100644 (file)
@@ -66,12 +66,15 @@ Quand le bord du domaine est courbe, HOMARD sait placer les nouveaux noeuds sur
 
 Deux cas de figure sont présents :
 
-* courbe 1D : cette courbe peut être définie dans un plan, par exemple pour un calcul 2D. Elle peut également être définie dans l'espace 3D, par exemple pour l'intersection de deux surfaces. Une ligne à suivre est décrite de manière discrète.
-* surface : une surface à suivre est décrite de manière analytique.
+- CAO : la CAO du domaine associé au maillage est disponible. Le calcul s'appuiera sur elle pour réaliser les projections.
+- Pas de CAO : en l'absence de CAO, il est possible d'avoir une version approchée des frontières :
 
-On cochera le ou les boutons voulus :
+  * courbe 1D : cette courbe peut être définie dans un plan, par exemple pour un calcul 2D. Elle peut également être définie dans l'espace 3D, par exemple pour l'intersection de deux surfaces. Une ligne à suivre est décrite de manière discrète.
+  * surface : une surface à suivre est décrite de manière analytique.
 
-.. image:: images/create_case_5.png
+On cochera le bouton voulu :
+
+.. image:: images/create_boundary_1.png
    :align: center
 
 La définition des frontières est décrite dans :doc:`gui_create_boundary`.
diff --git a/doc/fr/images/create_boundary.png b/doc/fr/images/create_boundary.png
new file mode 100755 (executable)
index 0000000..0460d48
Binary files /dev/null and b/doc/fr/images/create_boundary.png differ
index 0460d48594962c3081f8f2aef2c5836eaec2cace..5ac25733eec0f59bc2886e29d6f943902e8ae164 100644 (file)
Binary files a/doc/fr/images/create_boundary_1.png and b/doc/fr/images/create_boundary_1.png differ
index 09630eb80cc79814445d61b35b52d09c9c844167..e46aaf4f15703cd45b7897ab38f647813729cfe4 100644 (file)
Binary files a/doc/fr/images/create_boundary_an_1.png and b/doc/fr/images/create_boundary_an_1.png differ
diff --git a/doc/fr/images/create_boundary_cao_1.png b/doc/fr/images/create_boundary_cao_1.png
new file mode 100755 (executable)
index 0000000..a2df899
Binary files /dev/null and b/doc/fr/images/create_boundary_cao_1.png differ
diff --git a/doc/fr/images/create_boundary_cao_2.png b/doc/fr/images/create_boundary_cao_2.png
new file mode 100755 (executable)
index 0000000..c508cf6
Binary files /dev/null and b/doc/fr/images/create_boundary_cao_2.png differ
index 8f80605d8f067606655906f2bccf10a61b842c70..cbfc1dbfcd21a4fb0cdc8078c140cc43859ce069 100644 (file)
Binary files a/doc/fr/images/create_boundary_di_1.png and b/doc/fr/images/create_boundary_di_1.png differ
diff --git a/doc/fr/images/create_case_5.png b/doc/fr/images/create_case_5.png
deleted file mode 100644 (file)
index 418535b..0000000
Binary files a/doc/fr/images/create_case_5.png and /dev/null differ
index 175264e0668a362422a6200520a8e72e032e4eaf..0b01550bf53c822be4d01118a40a7c87ec0cabfc 100644 (file)
Binary files a/doc/fr/images/intro_31.png and b/doc/fr/images/intro_31.png differ
index f4022ca29c85d970c5228ac29934ba9501439010..e71d7d6fb26df2563fb8ea1636d11806ac8376ed 100644 (file)
Binary files a/doc/fr/images/intro_32.png and b/doc/fr/images/intro_32.png differ
index a0bd05e288543a9028a56f94606e3cd669f03166..2c25cb89dec4c0fb4f772f3db0c7342c7d87f0f7 100644 (file)
Binary files a/doc/fr/images/intro_33.png and b/doc/fr/images/intro_33.png differ
index 94866890c15e07e1010299836f5fbe741489ccf9..e3124af24b6dfafeab81d1679f89da40222c6e21 100644 (file)
Binary files a/doc/fr/images/intro_34.png and b/doc/fr/images/intro_34.png differ
index ad542ba78adb624571b6a17164f0b34ebb2725e4..45ab1077ee4576633b76e78f0698bb2d7f4af7be 100644 (file)
Binary files a/doc/fr/images/intro_39.png and b/doc/fr/images/intro_39.png differ
index 6b963767f4ebbb3635d6c249a05d30ef25e22abb..426bd5e7ec14c073a81baa8a582d53bf0c4c93e3 100644 (file)
@@ -16,6 +16,14 @@ Ces méthodes retournent une instance de la classe boundary.
 
 +----------------------------------------------------------------------------------------+
 +----------------------------------------------------------------------------------------+
+| .. module:: CreateBoundaryCAO                                                          |
+|                                                                                        |
+| **CreateBoundaryCAO(boundary_name, xao_file)**                                         |
+|     Retourne une instance de la classe ``boundary`` de type CAO après sa création      |
+|                                                                                        |
+|     - ``boundary_name`` : le nom de la frontière CAO                                   |
+|     - ``xao_file`` : le nom du fichier contenant cette CAO, au format XAO              |
++----------------------------------------------------------------------------------------+
 | .. module:: CreateBoundaryDi                                                           |
 |                                                                                        |
 | **CreateBoundaryDi(boundary_name, mesh_name, mesh_file)**                              |
@@ -23,7 +31,7 @@ Ces méthodes retournent une instance de la classe boundary.
 |                                                                                        |
 |     - ``boundary_name`` : le nom de la frontière discrète                              |
 |     - ``mesh_name`` : le nom du maillage de la frontière                               |
-|     - ``mesh_file`` : le nom du fichier contenant ce maillage                          |
+|     - ``mesh_file`` : le nom du fichier contenant ce maillage, au format MED           |
 +----------------------------------------------------------------------------------------+
 | .. module:: CreateBoundaryCylinder                                                     |
 |                                                                                        |
@@ -106,20 +114,24 @@ Voir également dans :doc:`tui_create_case`.
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
-| .. module:: AddBoundaryGroup                                  |
+| .. module:: AddBoundary                                       |
 |                                                               |
-| **AddBoundaryGroup(boundary, group)**                         |
+| **AddBoundary(boundary)**                                     |
 |     Ajoute une frontière à la définition du cas               |
 |                                                               |
 |     - ``boundary`` : nom d'une frontière courbe à suivre      |
++---------------------------------------------------------------+
+| .. module:: AddBoundaryGroup                                  |
+|                                                               |
+| **AddBoundaryGroup(boundary, group)**                         |
+|     Ajoute une frontière à la définition du cas en précisant  |
+|     les groupes associés                                      |
 |                                                               |
-|     Pour une frontière discrète :                             |
+|     - ``boundary`` : nom d'une frontière courbe à suivre      |
 |                                                               |
-|     . si toutes les lignes courbes sont suivies, le second    |
-|     argument est une chaîne vide.                             |
+|     Pour une frontière discrète ou CAO :                      |
 |                                                               |
-|     . si seulement certaines lignes courbes sont suivies,     |
-|     ``group`` est le nom d'un groupe de segments à suivre.    |
+|     - ``group`` : nom d'un groupe de mailles à suivre         |
 |                                                               |
 |     Pour une frontière analytique :                           |
 |                                                               |
@@ -142,6 +154,7 @@ Méthodes de la classe boundary
 | **GetType()**                                                 |
 |     Retourne le type de la frontière :                        |
 |                                                               |
+|         * -1 : CAO                                            |
 |         * 0 : discrète                                        |
 |         * 1 : cylindre                                        |
 |         * 2 : sphère                                          |
@@ -159,9 +172,11 @@ Méthodes de la classe boundary
 | .. module:: Delete                                            |
 |                                                               |
 | **Delete()**                                                  |
-|     Detruit la frontière.                                     |
+|     Détruit la frontière.                                     |
 |     Pour une frontière discrète, le fichier du maillage       |
 |     associé est conservé.                                     |
+|     Pour une frontière CAO, le fichier de la géométrie        |
+|     associée est conservé.                                    |
 |                                                               |
 |     Retourne un entier :                                      |
 |         * 0 : destruction réussie                             |
@@ -171,7 +186,11 @@ Méthodes de la classe boundary
 
 Exemple
 *******
-Création d'une frontière discrète, d'une frontière sphèrique, puis d'une frontière cylindrique : ::
+Création d'une frontière CAO : ::
+
+    la_cao = homard.CreateBoundaryCAO("BLOC", dircase+'/tutorial_6.xao')
+
+Création d'une frontière discrète, d'une frontière sphérique, puis d'une frontière cylindrique : ::
 
     inter = homard.CreateBoundaryDi("INTERSECTION", 'PIQUAGE', dircase+'/tutorial_4.fr.med')
     fron_1 = homard.CreateBoundarySphere("FRON_1", 12.3, 3.4, .56, 6.5)
index a795348d2282000f8154ea0efb0bafff7f72135e..d6615eabd2ee2cef9f188bea670a65daa9c88962 100644 (file)
@@ -103,16 +103,16 @@ Méthodes de la classe cas
 | .. module:: SetDirName                                        |
 |                                                               |
 | **SetDirName(dirname)**                                       |
-|     Affecte le répertoire des résutats associé au cas. Cela ne|
-|     peut se faire qu'après la création du cas et avant le     |
+|     Affecte le répertoire des résultats associé au cas. Cela  |
+|     ne peut se faire qu'après la création du cas et avant le  |
 |     premier calcul.                                           |
 |                                                               |
-|     - ``dirname`` : le nom du répertoire des résutats         |
+|     - ``dirname`` : le nom du répertoire des résultats        |
 +---------------------------------------------------------------+
 | .. module:: GetDirName                                        |
 |                                                               |
 | **GetDirName()**                                              |
-|     Retourne le nom du répertoire des résutats associé au cas |
+|     Retourne le nom du répertoire des résultats associé au cas|
 +---------------------------------------------------------------+
 | .. module:: SetConfType                                       |
 |                                                               |
index d048cbba6c5043612fc438dc50ba42d7952867b0..fcc483f1afa253896705b286e1dbc1c003eb5f66 100644 (file)
@@ -151,7 +151,7 @@ Le champ de pilotage de l'adaptation et les seuils
 |        * 4 : moyenne + n fois l'écart-type                    |
 |                                                               |
 |     - ``threshold`` : valeur numérique entrant dans la        |
-|                       définition du seuil                     |
+|       définition du seuil                                     |
 +---------------------------------------------------------------+
 | .. module:: GetRefinThrType                                   |
 |                                                               |
index 0c3b1be0489cd2638e79a930699a3b0b838ea6cc..2f928e67596217ce84ba6086c6259cd1ed4eee4d 100644 (file)
@@ -152,7 +152,7 @@ Généralités
 | .. module:: GetDirName                                        |
 |                                                               |
 | **GetDirName()**                                              |
-|     Retourne le nom du répertoire des résutats associé à      |
+|     Retourne le nom du répertoire des résultats associé à     |
 |     l'itération                                               |
 +---------------------------------------------------------------+
 | .. module:: Delete                                            |
index 3cda6c844930cfd2fdf59168182ac15b1a9401d7..5562fb6fab15a5c8610bdc70bd91e1f7d345c7ec 100644 (file)
@@ -36,7 +36,8 @@ On fera ici trois raffinements uniformes successifs du maillage contenu dans le
   * le maillage produit porte toujours le même nom. Cela ne pose pas de problème car il est stocké dans des fichiers différents.
 
 .. literalinclude:: ../files/tutorial_1.py
-   :lines: 52-85
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Téléchargement des fichiers
@@ -53,7 +54,8 @@ Raffinement par des zones
 On procède ici au raffinement selon des zones. Pour passer du maillage initial au maillage 'M_1', on utilise une boîte encadrant le plan z=1 et une sphère centrée sur l'origine de rayon 1.05. Puis pour passer du maillage 'M_1' au maillage 'M_2', on remplace la sphère par une boîte encadrant le cube de côté 0.5, pointant sur l'origine et on déraffine les mailles contenues dans la toute première zone.
 
 .. literalinclude:: ../files/tutorial_2.py
-   :lines: 52-95
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Téléchargement des fichiers
@@ -71,7 +73,8 @@ On procède ici au raffinement selon un champ. Les hypothèses servent à défin
 Pour adapter le maillage H_1 issu de l'itération Iter_1, deux variantes sont appliquées. Dans la première, Iter_2, le champ est un champ scalaire d'indicateurs d'erreur et on découpe les 1.5% de mailles où l'erreur est la plus grande. Dans la seconde variante, Iter_2_bis, on se base sur un champ vectoriel et on examine le saut de ce vecteur entre une maille et ses voisines : on découpera là où la norme infinie de ce saut est supérieure au seuil absolu de 0.0001.
 
 .. literalinclude:: ../files/tutorial_3.py
-   :lines: 52-124
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Téléchargement des fichiers
@@ -84,24 +87,43 @@ Pour adapter le maillage H_1 issu de l'itération Iter_1, deux variantes sont ap
 
 Suivi de frontières courbes
 ***************************
-.. index:: single: champ
+.. index:: single: frontière
+.. index:: single: CAO
 .. index:: single: YACS
 
-On teste ici le suivi des frontières courbes : des frontières analytiques pour décrire les différentes surfaces des tuyaux et une frontière discrète pour décrire les lignes d'intersection des deux tuyaux. Le pilotage du raffinement est le suivant : raffinement uniforme de toutes les mailles contenues dans des groupes désignés. On commence par raffiner les faces internes aux tuyaux ; ensuite, on raffine deux fois de suite les faces externes aux tuyaux.
+On teste ici le suivi des frontières courbes en fournissant la géométrie représentée par la CAO de la pièce. Cette CAO est fournie dans un fichier au format XAO.
+Le pilotage du raffinement est le suivant : raffinement uniforme de toutes les mailles contenues dans des groupes désignés. On commence par raffiner les faces internes aux tuyaux ; ensuite, on raffine deux fois de suite les faces externes aux tuyaux.
 Le schéma YACS réalisant cette adaptation est téléchargeable.
 
 .. literalinclude:: ../files/tutorial_4.py
-   :lines: 52-111
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Téléchargement des fichiers
 
   * :download:`maillage initial<../files/tutorial_4.00.med.gz>`
-  * :download:`maillage de la frontière discrète<../files/tutorial_4.fr.med.gz>`
+  * :download:`la frontière en CAO<../files/tutorial_4.xao.gz>`
   * :download:`commandes python<../files/tutorial_4.py>`
   * :download:`commandes python de l'utilitaire de compression<../files/tutorial_util.py>`
   * :download:`schéma YACS<../files/tutorial_4.xml>`
 
+Si la géométrie sous forme de CAO n'est pas disponible, on peut l'approcher ainsi :
+des frontières analytiques pour décrire les différentes surfaces des tuyaux et une frontière discrète pour décrire les lignes d'intersection des deux tuyaux. Il suffit de remplacer la définition des frontières.
+
+.. literalinclude:: ../files/tutorial_6.py
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
+
+.. note::
+  Téléchargement des fichiers
+
+  * :download:`maillage initial<../files/tutorial_4.00.med.gz>`
+  * :download:`maillage de la frontière discrète<../files/tutorial_6.fr.med.gz>`
+  * :download:`commandes python<../files/tutorial_6.py>`
+  * :download:`commandes python de l'utilitaire de compression<../files/tutorial_util.py>`
+  * :download:`schéma YACS<../files/tutorial_6.xml>`
+
 
 Instructions spécifiques au 2D
 ******************************
@@ -111,7 +133,8 @@ Les instructions pour adapter un maillage 2D sont exactement identiques à celle
 Dans le cas présenté ici, on raffine une première fois toutes les mailles contenues dans un disque percé, puis dans une seconde itération, toutes les mailles contenues dans un rectangle. On notera l'utilisation du suivi des frontières circulaires du domaine.
 
 .. literalinclude:: ../files/tutorial_5.py
-   :lines: 52-95
+   :start-after: Début des commandes
+   :end-before: Fin des commandes
 
 .. note::
   Téléchargement des fichiers
index b78c63cdb2ac380bac26ee611a230f6b5b27a1f7..977e50c42708bbda504bac419d4633ec4d0c8da3 100644 (file)
@@ -16,7 +16,7 @@
             <component-username>HOMARD</component-username>
             <component-type>OTHER</component-type>
             <component-author>EDF</component-author>
-            <component-version>1.6</component-version>
+            <component-version>1.7</component-version>
             <component-comment>unknown</component-comment>
             <component-impltype>1</component-impltype>
             <component-icone>HOMARD_2.png</component-icone>
                 <component-interface-name>HOMARD_Gen</component-interface-name>
                 <component-interface-comment>unknown</component-interface-comment>
                 <component-service-list>
+                    <component-service>
+                        <service-name>CreateBoundaryCAO</service-name>
+                        <service-author>EDF</service-author>
+                        <service-version>1.7</service-version>
+                        <service-comment>unknown</service-comment>
+                        <service-by-default>0</service-by-default>
+                        <inParameter-list>
+                            <inParameter>
+                                <inParameter-name>BoundaryName</inParameter-name>
+                                <inParameter-type>string</inParameter-type>
+                                <inParameter-comment>unknown</inParameter-comment>
+                            </inParameter>
+                            <inParameter>
+                                <inParameter-name>FileName</inParameter-name>
+                                <inParameter-type>string</inParameter-type>
+                                <inParameter-comment>unknown</inParameter-comment>
+                            </inParameter>
+                        </inParameter-list>
+                        <outParameter-list>
+                            <outParameter>
+                                <outParameter-name>return</outParameter-name>
+                                <outParameter-type>HOMARD/HOMARD_Boundary</outParameter-type>
+                                <outParameter-comment>unknown</outParameter-comment>
+                            </outParameter>
+                        </outParameter-list>
+                        <DataStream-list></DataStream-list>
+                    </component-service>
                     <component-service>
                         <service-name>CreateBoundaryDi</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
@@ -60,7 +87,7 @@
                     <component-service>
                         <service-name>CreateBoundaryCylinder</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateBoundarySphere</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateBoundaryConeR</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateBoundaryConeA</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateBoundaryTorus</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateCase</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateCaseFromIteration</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateCaseFromCaseLastIteration</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateCaseFromCaseIteration</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateHypothesis</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateZoneBox</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateZoneBox2D</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateZoneCylinder</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateZoneDisk</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateZoneDiskWithHole</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateZonePipe</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>CreateZoneSphere</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>GetBoundary</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>GetCase</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>GetHypothesis</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>GetIteration</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>GetZone</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>GetAllBoundarysName</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list></inParameter-list>
                     <component-service>
                         <service-name>GetAllCasesName</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list></inParameter-list>
                     <component-service>
                         <service-name>GetAllHypothesesName</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list></inParameter-list>
                     <component-service>
                         <service-name>GetAllIterationsName</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list></inParameter-list>
                     <component-service>
                         <service-name>GetAllZonesName</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list></inParameter-list>
                     <component-service>
                         <service-name>MeshInfo</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>LastIteration</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
+                    <component-service>
+                        <service-name>UpdateStudy</service-name>
+                        <service-author>EDF</service-author>
+                        <service-version>1.7</service-version>
+                        <service-comment>unknown</service-comment>
+                        <service-by-default>0</service-by-default>
+                        <inParameter-list></inParameter-list>
+                        <outParameter-list></outParameter-list>
+                        <DataStream-list></DataStream-list>
+                    </component-service>
+                    <component-service>
+                        <service-name>SetLanguageShort</service-name>
+                        <service-author>EDF</service-author>
+                        <service-version>1.7</service-version>
+                        <service-comment>unknown</service-comment>
+                        <service-by-default>0</service-by-default>
+                        <inParameter-list>
+                            <inParameter>
+                                <inParameter-name>LanguageShort</inParameter-name>
+                                <inParameter-type>string</inParameter-type>
+                                <inParameter-comment>unknown</inParameter-comment>
+                            </inParameter>
+                        </inParameter-list>
+                        <outParameter-list></outParameter-list>
+                        <DataStream-list></DataStream-list>
+                    </component-service>
+                    <component-service>
+                        <service-name>GetLanguageShort</service-name>
+                        <service-author>EDF</service-author>
+                        <service-version>1.7</service-version>
+                        <service-comment>unknown</service-comment>
+                        <service-by-default>0</service-by-default>
+                        <inParameter-list></inParameter-list>
+                        <outParameter-list>
+                            <outParameter>
+                                <outParameter-name>return</outParameter-name>
+                                <outParameter-type>string</outParameter-type>
+                                <outParameter-comment>unknown</outParameter-comment>
+                            </outParameter>
+                        </outParameter-list>
+                        <DataStream-list></DataStream-list>
+                    </component-service>
                     <component-service>
                         <service-name>PublishFileUnderIteration</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>PublishBoundaryUnderCase</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>PublishResultInSmesh</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>PublishMeshIterInSmesh</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>SetLanguageShort</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                     <component-service>
                         <service-name>GetLanguageShort</service-name>
                         <service-author>EDF</service-author>
-                        <service-version>1.6</service-version>
+                        <service-version>1.7</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list></inParameter-list>
index 0aa62f72c3cf92f32f9254f41fe16ef30162715d..b8eb5c85613ca1adfb6b6ee772af6764fa1b1743 100644 (file)
@@ -54,8 +54,8 @@ module HOMARD
     void     SetType (in long Type)                        raises (SALOME::SALOME_Exception);
     long     GetType()                                     raises (SALOME::SALOME_Exception);
 
-    void     SetMeshFile(in string MeshFile)               raises (SALOME::SALOME_Exception);
-    string   GetMeshFile()                                 raises (SALOME::SALOME_Exception);
+    void     SetDataFile(in string DataFile)               raises (SALOME::SALOME_Exception);
+    string   GetDataFile()                                 raises (SALOME::SALOME_Exception);
 
     void     SetMeshName(in string MeshName)               raises (SALOME::SALOME_Exception);
     string   GetMeshName()                                 raises (SALOME::SALOME_Exception);
index 73c78b19ec5eaef0a200769637af9d1c58089ca7..d1d79ff97b42f01884427ac81f7a7d98fda46ef8 100644 (file)
@@ -75,6 +75,7 @@ module HOMARD
     void     SetGroups(in ListGroupType ListGroup)         raises (SALOME::SALOME_Exception);
     ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
 
+    void     AddBoundary(in string BoundaryName)           raises (SALOME::SALOME_Exception);
     void     AddBoundaryGroup(in string BoundaryName, in string Group)
                                                            raises (SALOME::SALOME_Exception);
     ListBoundaryGroupType GetBoundaryGroup()               raises (SALOME::SALOME_Exception);
index 20d8f8e278cfbc7f8cd5295c46f81dd5aba5c30f..018e3d7730e475983595a6e5a946e33053362ec8 100644 (file)
@@ -51,6 +51,8 @@ module HOMARD
 //
 // A.1. Les creations
 //
+    HOMARD_Boundary   CreateBoundaryCAO (in string BoundaryName, in string FileName)
+    raises(SALOME::SALOME_Exception);
     HOMARD_Boundary   CreateBoundaryDi (in string BoundaryName, in string MeshName, in string FileName)
     raises(SALOME::SALOME_Exception);
     HOMARD_Boundary   CreateBoundaryCylinder (in string BoundaryName,
index d454a9f8c70df09c553a05db91c66e0adb2c5ae9..413503d38b1c9af76d27aefbfec0c30806975d45 100755 (executable)
@@ -38,6 +38,7 @@ SET(HOMARD_RESOURCES_FILES
   diskwithhole.png
   diskwithhole_2.png
   full_view.png
+  geometry.png
   HOMARD.png
   HOMARD_2.png
   hypotheses.png
index ad8774cd2ff0276a55af2c6adfff938ef63b3782..0435cbbee79866a79346f4c673fa47ddc841c245 100644 (file)
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
+                    <component-service>
+                        <service-name>UpdateStudy</service-name>
+                        <service-author>HOMARD team - EDF RD</service-author>
+                        <service-version>1.1</service-version>
+                        <service-comment>unknown</service-comment>
+                        <service-by-default>0</service-by-default>
+                        <inParameter-list></inParameter-list>
+                        <outParameter-list></outParameter-list>
+                        <DataStream-list></DataStream-list>
+                    </component-service>
                     <component-service>
                         <service-name>PublishBoundaryUnderCase</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
diff --git a/resources/geometry.png b/resources/geometry.png
new file mode 100755 (executable)
index 0000000..5732d5d
Binary files /dev/null and b/resources/geometry.png differ
index 7c0706c3e6e4b2e981730b01a570d763a4e5e0eb..1b9a6ffdf42f2e0b0ed603591c191a0c2362f728 100755 (executable)
@@ -22,7 +22,7 @@
  *  \param [in] theInputMedFile - a MED file holding a mesh including nodes that will be
  *         moved onto the geometry
  *  \param [in] theOutputMedFile - a MED file to create, that will hold a modified mesh
- *  \param [in] theNodeFiles - an array of names of files describing groups of nodes that
+ *  \param [in] theInputNodeFiles - an array of names of files describing groups of nodes that
  *         will be moved onto the geometry
  *  \param [in] theXaoFileName - a path to a file in XAO format holding the geometry and
  *         the geometrical groups.
  */
 void FrontTrack::track( const std::string&                 theInputMedFile,
                         const std::string&                 theOutputMedFile,
-                        const std::vector< std::string > & theNodeFiles,
+                        const std::vector< std::string > & theInputNodeFiles,
                         const std::string&                 theXaoFileName,
                         bool                               theIsParallel )
 {
   // check arguments
+#ifdef _DEBUG_
+  std::cout << "FrontTrack::track" << std::endl;
+#endif
 
-  if ( theNodeFiles.empty() )
+  if ( theInputNodeFiles.empty() )
     return;
 
 #ifdef _DEBUG_
-  std::cout << "Input MED file:" << theInputMedFile << std::endl;
+  std::cout << "Input MED file: " << theInputMedFile << std::endl;
 #endif
   if ( !FT_Utils::fileExists( theInputMedFile ))
     throw std::invalid_argument( "Input MED file does not exist: " + theInputMedFile );
 
 #ifdef _DEBUG_
-  std::cout << "Output MED file:" << theOutputMedFile << std::endl;
+  std::cout << "Output MED file: " << theOutputMedFile << std::endl;
 #endif
   if ( !FT_Utils::canWrite( theOutputMedFile ))
     throw std::invalid_argument( "Can't create the output MED file: " + theOutputMedFile );
 
-  for ( size_t i = 0; i < theNodeFiles.size(); ++i )
+  std::vector< std::string > theNodeFiles ;
+  for ( size_t i = 0; i < theInputNodeFiles.size(); ++i )
   {
 #ifdef _DEBUG_
-    std::cout << "Input node file:" << theNodeFiles[i] << std::endl;
+    std::cout << "Initial input node file #"<<i<<": " << theInputNodeFiles[i] << std::endl;
 #endif
-    if ( !FT_Utils::fileExists( theNodeFiles[i] ))
-      throw std::invalid_argument( "Input node file does not exist: " + theNodeFiles[i] );
+    if ( !FT_Utils::fileExists( theInputNodeFiles[i] ))
+      throw std::invalid_argument( "Input node file does not exist: " + theInputNodeFiles[i] );
+    // the name of the groupe on line #1, then the numbers of nodes on line #>1
+    // keep only files with more than 1 line:
+    std::ifstream fichier(theInputNodeFiles[i].c_str());
+    std::string s;
+    unsigned int nb_lines = 0;
+    while(std::getline(fichier,s)) ++nb_lines;
+//     std::cout << ". nb_lines: " << nb_lines << std::endl;
+    if ( nb_lines >= 2 ) { theNodeFiles.push_back( theInputNodeFiles[i] ); }
   }
+#ifdef _DEBUG_
+  for ( size_t i = 0; i < theNodeFiles.size(); ++i )
+  { std::cout << "Valid input node file #"<<i<<": " << theNodeFiles[i] << std::endl; }
+#endif
 
 #ifdef _DEBUG_
-  std::cout << "XAO file:" << theXaoFileName << std::endl;
+  std::cout << "XAO file: " << theXaoFileName << std::endl;
 #endif
   if ( !FT_Utils::fileExists( theXaoFileName ))
     throw std::invalid_argument( "Input XAO file does not exist: " + theXaoFileName );
 
-
   // read a mesh
 
 #ifdef _DEBUG_
index 049cb4bd32e4bf3307e0ba75536d4dcbb9dc5f6f..a53555910cfeb4399b5482b330e95a7fc32fe0ce 100755 (executable)
@@ -15,21 +15,21 @@ public:
 
   /*!
    * \brief Relocate nodes to lie on geometry
-   *  \param [in] inputMedFile - a MED file holding a mesh including nodes that will be
+   *  \param [in] theInputMedFile - a MED file holding a mesh including nodes that will be
    *         moved onto the geometry
-   *  \param [in] outputMedFile - a MED file to create, that will hold a modified mesh
-   *  \param [in] nodeFiles - an array of names of files describing groups of nodes that
+   *  \param [in] theOutputMedFile - a MED file to create, that will hold a modified mesh
+   *  \param [in] theInputNodeFiles - an array of names of files describing groups of nodes that
    *         will be moved onto the geometry
-   *  \param [in] xaoFileName - a path to a file in XAO format  holding the geometry and
+   *  \param [in] theXaoFileName - a path to a file in XAO format  holding the geometry and
    *         the geometrical groups.
-   *  \param [in] isParallel - if \c true, all processors are used to treat boundary shapes
+   *  \param [in] theIsParallel - if \c true, all processors are used to treat boundary shapes
    *          in parallel.
    */
-  void track( const std::string&                 inputMedFile,
-              const std::string&                 outputMedFile,
-              const std::vector< std::string > & nodeFiles,
-              const std::string&                 xaoFileName,
-              bool                               isParallel=true);
+  void track( const std::string&                 theInputMedFile,
+              const std::string&                 theOutputMedFile,
+              const std::vector< std::string > & theInputNodeFiles,
+              const std::string&                 theXaoFileName,
+              bool                               theIsParallel=true);
 
 };
 
index 911358d5519401aa16178d1ae7570ced04dd95fa..5328b6725e8c233728f2f0ea07550edbf06b69e4 100755 (executable)
@@ -55,7 +55,7 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
   // get shape dimension by the file name
   // -------------------------------------
 
-  // hope the file name is something like "fr2D.**"
+  // hope the file name is something like "frnD.**" with n in (1,2)
   int dimPos = theNodeFile.size() - 5;
   if ( theNodeFile[ dimPos ] == '2' )
     _shapeDim = 2;
@@ -63,6 +63,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
     _shapeDim = 1;
   else
     throw std::invalid_argument( "Can't define dimension by node file name " + theNodeFile );
+#ifdef _DEBUG_
+  std::cout << ". Dimension of the file " << theNodeFile << ": " << _shapeDim << std::endl;
+#endif
 
   // -------------------------------------
   // read geom group names; several lines
@@ -77,7 +80,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
   while ( ::fgets( line, maxLineLen, file )) // read a line
   {
     if ( ::feof( file ))
+    {
       return; // no nodes in the file
+    }
 
     // check if the line describes node ids in format 3I10 (e.g. "       120         1        43\n")
     size_t lineLen = strlen( line );
@@ -149,6 +154,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
   for ( size_t i = 0; i < geomNames.size(); ++i )
   {
     std::string & groupName = geomNames[i];
+#ifdef _DEBUG_
+    std::cout << ". Group name: " << groupName << std::endl;
+#endif
 
     // remove trailing white spaces
     for ( int iC = groupName.size() - 1; iC >= 0; --iC )
@@ -219,7 +227,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
 void FT_NodesOnGeom::projectAndMove()
 {
   _OK = true;
-
+//
+// 1. Préalables
+//
   // check if all the shapes are planar
   bool isAllPlanar = true;
   for ( size_t i = 0; i < _projectors.size() &&  isAllPlanar; ++i )
@@ -240,6 +250,10 @@ void FT_NodesOnGeom::projectAndMove()
     std::cout << ".. _projectors.size() = " << _projectors.size() << std::endl;
     std::cout << ".. _nodesOrder.size() = " << _nodesOrder.size() << std::endl;
 #endif
+//
+// 2. Calculs
+// 2.1. Avec plusieurs shapes
+//
   if ( _projectors.size() > 1 )
   {
     // the nodes are to be projected onto several boundary shapes;
@@ -284,6 +298,9 @@ void FT_NodesOnGeom::projectAndMove()
       }
     }
   }
+//
+// 2.2. Avec une seule shape
+//
   else // one shape
   {
     for ( size_t i = 0; i < _nodesOrder.size(); ++i )
@@ -293,8 +310,11 @@ void FT_NodesOnGeom::projectAndMove()
       gp_Pnt       xyz1 = getPoint( nn._neighborNodes[0] );
       gp_Pnt       xyz2 = getPoint( nn._neighborNodes[1] );
 
-      // maxDist2 : le quart du carré de la distance entre les deux voisins du noued à bouger
+// maxDist2 : le quart du carré de la distance entre les deux voisins du noeud à bouger
       double   maxDist2 = xyz1.SquareDistance( xyz2 ) / 4.;
+#ifdef _DEBUG_
+    std::cout << "\n.. maxDist2 = " << maxDist2 << " entre " << nn._neighborNodes[0] << " et " << nn._neighborNodes[1] << " - milieu " << nn._nodeToMove << " - d/2 = " << sqrt(maxDist2) << " - d = " << sqrt(xyz1.SquareDistance( xyz2 )) << std::endl;
+#endif
       if ( _projectors[ 0 ].project( xyz, maxDist2, newXyz,
                                      nn._params, nn._nearParams ))
         moveNode( nn._nodeToMove, newXyz );
@@ -302,8 +322,9 @@ void FT_NodesOnGeom::projectAndMove()
         notProjectedNodes.push_back( &nn );
     }
   }
-
-
+//
+// 3. Bilan
+//
   if ( !notProjectedNodes.empty() )
   {
     // project nodes that are not projected by any of _projectors;
index a23d00dc2823b711ad651ef87c64fb10597e0d6a..efc18779f786a79876c291c83b451d21c12a5b7c 100755 (executable)
@@ -104,6 +104,9 @@ namespace // actual projection algorithms
                             double*       newSolution,
                             const double* prevSolution = 0)
     {
+#ifdef _DEBUG_
+    std::cout << ".. project a point to the curve prevSolution = " << prevSolution << std::endl;
+#endif
       gp_Pnt         proj;
       Standard_Real param;
 
@@ -115,6 +118,9 @@ namespace // actual projection algorithms
       {
         _dist = _projector.Project( _curve, P, _tol, proj, param, false );
       }
+#ifdef _DEBUG_
+    std::cout << "..    _dist : " << _dist << std::endl;
+#endif
       proj = _curve.Value( param );
 
       newSolution[0] = param;
@@ -130,6 +136,9 @@ namespace // actual projection algorithms
                                      double*       newSolution,
                                      const double* prevSolution = 0)
     {
+#ifdef _DEBUG_
+    std::cout << ".. project a point to a curve and check " << std::endl;
+#endif
       projection = project( point, newSolution, prevSolution );
       return ( _uRange[0] < newSolution[0] && newSolution[0] < _uRange[1] &&
                _dist * _dist < maxDist2 );
@@ -611,7 +620,7 @@ namespace // actual projection algorithms
   bool isStraight( const GeomAdaptor_Curve& curve, const double tol )
   {
     // rough check: evaluate how far from a straight line connecting the curve ends
-    // stand several internal points of the curve 
+    // stand several internal points of the curve
 
     const double  f = curve.FirstParameter();
     const double  l = curve.LastParameter();
index 48dd23f52453cb2c0391c3204b56333948ea24d7..66cd160f0695dbe1db2ec49e0591b0d62d8d410a 100644 (file)
@@ -77,12 +77,19 @@ std::string HOMARD_Boundary::GetDumpPython() const
 //
   switch (_Type)
   {
+    case -1:
+    {
+      aScript << "CAO boundary " << _Name << "\n";
+      aScript << "\t" << _Name << " = homard.CreateBoundaryCAO(\"" << _Name << "\", ";
+      aScript << "\"" << _DataFile << "\")\n";
+      break ;
+    }
     case 0:
     {
       aScript << "discrete boundary " << _Name << "\n";
       aScript << "\t" << _Name << " = homard.CreateBoundaryDi(\"" << _Name << "\", ";
       aScript << "\"" << _MeshName << "\", ";
-      aScript << "\"" << _MeshFile << "\")\n";
+      aScript << "\"" << _DataFile << "\")\n";
       break ;
     }
     case 1:
@@ -149,14 +156,14 @@ std::string HOMARD_Boundary::GetMeshName() const
   return _MeshName;
 }
 //=============================================================================
-void HOMARD_Boundary::SetMeshFile( const char* MeshFile )
+void HOMARD_Boundary::SetDataFile( const char* DataFile )
 {
-  _MeshFile = std::string( MeshFile );
+  _DataFile = std::string( DataFile );
 }
 //=============================================================================
-std::string HOMARD_Boundary::GetMeshFile() const
+std::string HOMARD_Boundary::GetDataFile() const
 {
-  return _MeshFile;
+  return _DataFile;
 }
 //=======================================================================================
 void HOMARD_Boundary::SetCylinder( double X0, double X1, double X2,
index aa2fd594cc4707740b419a2d88634f274687eee0..322bc5239b04a5125ca4ebf686bc3199de67c5b8 100644 (file)
@@ -63,8 +63,8 @@ public:
   void                          SetMeshName( const char* MeshName );
   std::string                   GetMeshName() const;
 
-  void                          SetMeshFile( const char* MeshFile );
-  std::string                   GetMeshFile() const;
+  void                          SetDataFile( const char* DataFile );
+  std::string                   GetDataFile() const;
 
   void                          SetCylinder( double X0, double X1, double X2, double X3,
                                              double X4, double X5, double X6 );
@@ -92,7 +92,7 @@ public:
 private:
   std::string                   _Name;
   std::string                   _NomCasCreation;
-  std::string                   _MeshFile;
+  std::string                   _DataFile;
   std::string                   _MeshName;
   int                           _Type;
   double                        _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax;
index 9e23c1ceede2da695f941fb7408ddc7e715444b0..f92fa262c6a92ac263440052e7d50a1de68ffb41 100644 (file)
@@ -109,11 +109,11 @@ std::string HOMARD_Cas::GetDumpPython() const
 //=============================================================================
 int HOMARD_Cas::SetDirName( const char* NomDir )
 {
-  MESSAGE("SetDirName,  NomDir : "<<NomDir);
-  MESSAGE("SetDirName, _NomDir : "<<_NomDir);
+//   MESSAGE("SetDirName,  NomDir : "<<NomDir);
+//   MESSAGE("SetDirName, _NomDir : "<<_NomDir);
   int erreur = 0 ;
   // On vérifie qu'aucun calcul n'a eu lieu pour ce cas
-  MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size());
+//   MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size());
   if ( _ListIter.size() > 1 ) { erreur = 1 ; }
   // Creation
   if ( CHDIR(NomDir) == 0 )
@@ -220,10 +220,17 @@ void HOMARD_Cas::SupprGroups()
 // Les frontieres
 //
 //=============================================================================
+void HOMARD_Cas::AddBoundary( const char* Boundary )
+{
+//   MESSAGE ( ". HOMARD_Cas::AddBoundary : Boundary = " << Boundary );
+  const char* Group = "";
+  AddBoundaryGroup( Boundary, Group );
+}
+//=============================================================================
 void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group )
 {
-//  MESSAGE ( ". AddBoundaryGroup : Boundary = " << Boundary );
-//   MESSAGE ( ". AddBoundaryGroup : Group = " << Group );
+//   MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Boundary = " << Boundary );
+//   MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Group = " << Group );
   _ListBoundaryGroup.push_back( Boundary );
   _ListBoundaryGroup.push_back( Group    );
 }
index f478539a36d54347413639855ebd9bcea8ec34b6..039368f28e99a5d368c51fe3cde7a0007d1eccab 100644 (file)
@@ -76,6 +76,7 @@ public:
   const std::list<std::string>& GetGroups() const;
   void                          SupprGroups();
 
+  void                          AddBoundary( const char* Boundary );
   void                          AddBoundaryGroup( const char* Boundary, const char* Group );
   const std::list<std::string>& GetBoundaryGroup() const;
   void                          SupprBoundaryGroup();
index 72697d940b8257c2e359740b4dc43a270f8af2e5..6110d3d909c456c95480d803423094f9eae854f8 100644 (file)
@@ -303,10 +303,14 @@ namespace HOMARD
     os << separator() << BoundaryType ;
     os << separator() << boundary.GetCaseCreation() ;
 
-    if ( BoundaryType == 0 )
+    if ( BoundaryType == -1 )
+    {
+      os << separator() << boundary.GetDataFile();
+    }
+    else if ( BoundaryType == 0 )
     {
       os << separator() << boundary.GetMeshName();
-      os << separator() << boundary.GetMeshFile();
+      os << separator() << boundary.GetDataFile();
     }
     else {
       std::vector<double> coor = boundary.GetCoords() ;
@@ -744,12 +748,20 @@ namespace HOMARD
 
     // Si analytique, les coordonnees des frontieres : le nombre depend du type
     // Si discret, le maillage
+    // Si CAO, la géométrie
     int lgcoords ;
-    if ( BoundaryType == 1 ) { lgcoords = 7 ; }
+    if ( BoundaryType == -1 ) { lgcoords = -1 ; }
+    else if ( BoundaryType == 1 ) { lgcoords = 7 ; }
     else if ( BoundaryType == 2 ) { lgcoords = 4 ; }
     else { lgcoords = 0 ; }
 //
-    if ( lgcoords == 0 )
+    if ( lgcoords == -1 )
+    {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      boundary.SetDataFile( chunk.c_str() );
+    }
+    else if ( lgcoords == 0 )
     {
       chunk = getNextChunk( stream, start, ok );
       if ( !ok ) return false;
@@ -757,7 +769,7 @@ namespace HOMARD
 
       chunk = getNextChunk( stream, start, ok );
       if ( !ok ) return false;
-      boundary.SetMeshFile( chunk.c_str() );
+      boundary.SetDataFile( chunk.c_str() );
     }
     else
     { std::vector<double> coords;
index cb000bb8c6f4a9d0b75238e40c97a7fbb595a15f..1a545d9136064fd02bf587cf31928fab77fbde58 100644 (file)
@@ -85,12 +85,13 @@ void HomardDriver::TexteAdap( int ExtType )
   else                      { _Texte += "CCAssoci saturne_2d\n" ; }
   _Texte += "ModeHOMA 1\n" ;
   _Texte += "NumeIter " + _siter + "\n" ;
+  _modeHOMARD = 1 ;
 //
 }
 //===============================================================================
 void HomardDriver::TexteInfo( int TypeBila, int NumeIter )
 {
-  MESSAGE("TexteInit, TypeBila ="<<TypeBila);
+  MESSAGE("TexteInfo: TypeBila ="<<TypeBila<<", NumeIter ="<<NumeIter);
 //
   _Texte += "ModeHOMA 2\n" ;
   std::stringstream saux1 ;
@@ -109,6 +110,20 @@ void HomardDriver::TexteInfo( int TypeBila, int NumeIter )
     _Texte += "Action   info_ap\n" ;
     _Texte += "CCAssoci homard\n" ;
   }
+  _modeHOMARD = 2 ;
+//
+}
+//===============================================================================
+void HomardDriver::TexteMajCoords( int NumeIter )
+{
+  MESSAGE("TexteMajCoords: NumeIter ="<<NumeIter);
+//
+  _Texte += "ModeHOMA 5\n" ;
+  _Texte += "NumeIter " + _siterp1 + "\n" ;
+  _Texte += "Action   homa\n" ;
+  _Texte += "CCAssoci med\n" ;
+  _Texte += "EcriFiHO N_SANS_FRONTIERE\n" ;
+  _modeHOMARD = 5 ;
 //
 }
 //===============================================================================
@@ -625,7 +640,15 @@ void HomardDriver::TexteBoundaryOption( int BoundaryOption )
   std::string saux = saux1.str() ;
   _Texte += "SuivFron " + saux + "\n" ;
 //
+}//===============================================================================
+void HomardDriver::TexteBoundaryCAOGr(  const std::string GroupName )
+{
+  MESSAGE("TexteBoundaryCAOGr, GroupName  = "<<GroupName);
+//
+  _Texte += "GrFroCAO \"" + GroupName + "\"\n" ;
+//
 }
+
 //===============================================================================
 void HomardDriver::TexteBoundaryDi(  const std::string MeshName, const std::string MeshFile )
 {
@@ -1030,10 +1053,12 @@ void HomardDriver::TexteInfoCompute( int MessInfo )
 void HomardDriver::CreeFichier( )
 {
 //
-  if ( _siter != _siterp1 )
+  if ( _modeHOMARD == 1 )
   { _NomFichierConf = _NomFichierConfBase + "." + _siter + ".vers." + _siterp1 ; }
-  else
+  else if ( _modeHOMARD == 2 )
   { _NomFichierConf = _NomFichierConfBase + "." + _siter + ".info" ; }
+  else if ( _modeHOMARD == 5 )
+  { _NomFichierConf = _NomFichierConfBase + ".majc" ; }
 //
   std::ofstream Fic(_NomFichierConf.c_str(), std::ios::out ) ;
   if (Fic.is_open() == true) { Fic << _Texte << std::endl ; }
index f0e4b3932c3c6617b9c844896f82b30f8f314d58..95ac54e4c33f36d8df3c17d0b46d0c614cb986b5 100644 (file)
@@ -35,6 +35,7 @@ public:
   //
   void        TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue );
   void        TexteInfo( int TypeBila, int NumeIter );
+  void        TexteMajCoords( int NumeIter );
   void        CreeFichierDonn();
   void        TexteAdap( int ExtType );
   void        CreeFichier();
@@ -50,6 +51,7 @@ public:
   void        TexteCompo( int NumeComp, const std::string NomCompo);
 
   void        TexteBoundaryOption( int BoundaryOption );
+  void        TexteBoundaryCAOGr( const std::string GroupName );
   void        TexteBoundaryDi( const std::string MeshName, const std::string MeshFile );
   void        TexteBoundaryDiGr( const std::string GroupName );
   void        TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7 );
@@ -65,6 +67,7 @@ public:
   //
 
 public:
+  int         _modeHOMARD;
   std::string _HOMARD_Exec;
   std::string _NomDir;
   std::string _NomFichierConfBase;
index 2dee97edf510193131af431ae7720432a95b6ced..c7c572536f697fce36e7e28cf4a8e9c2251cfe0b 100644 (file)
@@ -127,7 +127,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho
   _noeud_1 = noeud_2 ;
 // 3. Definition du service
   _Texte += "                           <service name=\"" + noeud_2 + "\">\n" ;
-  _Texte += "                              <node>Etude_Initialisation.UpdateStudy</node>\n" ;
+  _Texte += "                              <node>Etude_Initialisation.SetCurrentStudy</node>\n" ;
   _Texte += "                              <method>" + methode + "</method>\n" ;
 // 4. Les inports
 // 4.1. Le nom de la zone
@@ -293,7 +293,7 @@ std::string YACSDriver::Texte_Iter_1_Boundary( int BoundaryType, const std::stri
   _noeud_1 = noeud_2 ;
 // 3. Definition du service
   _Texte += "                           <service name=\"" + noeud_2 + "\">\n" ;
-  _Texte += "                              <node>Etude_Initialisation.UpdateStudy</node>\n" ;
+  _Texte += "                              <node>Etude_Initialisation.SetCurrentStudy</node>\n" ;
   _Texte += "                              <method>" + methode + "</method>\n" ;
 // 4. Les inports
 //    ATTENTION : les noms doivent etre les memes que dans Gen.xml, donc HOMARD_Gen.idl
index 48382c78708d43d9be48dc1219b1ec56e878cb5b..087093548007dc109db90c1d44bafc8825356dae 100644 (file)
@@ -67,10 +67,11 @@ SET(_ts_RESOURCES
   HOMARD_msg_en.ts
   HOMARD_msg_fr.ts
   HOMARD_msg_ja.ts
-) 
+)
 
 # resource files / to be processed by uic
 SET(_uic_FILES
+  CreateBoundaryCAO.ui
   CreateBoundaryAn.ui
   CreateBoundaryDi.ui
   CreateCase.ui
@@ -90,9 +91,11 @@ SET(_uic_FILES
 # header files / to be processed by moc
 SET(_moc_HEADERS
   HOMARDGUI.h
+  MonCreateBoundaryCAO.h
   MonCreateBoundaryAn.h
-  MonEditBoundaryAn.h
   MonCreateBoundaryDi.h
+  MonEditBoundaryCAO.h
+  MonEditBoundaryAn.h
   MonEditBoundaryDi.h
   MonCreateCase.h
   MonEditCase.h
@@ -101,7 +104,9 @@ SET(_moc_HEADERS
   MonCreateHypothesis.h
   MonEditHypothesis.h
   MonCreateListGroup.h
+  MonCreateListGroupCAO.h
   MonEditListGroup.h
+  MonEditListGroupCAO.h
   MonCreateIteration.h
   MonEditIteration.h
   MonPursueIteration.h
@@ -114,7 +119,7 @@ SET(_moc_HEADERS
 
 # header files / uic wrappings
 QT_WRAP_UIC(_uic_HEADERS ${_uic_FILES})
-  
+
 # header files / static
 SET(_other_HEADERS
   HOMARDGUI_Utils.h
@@ -134,16 +139,20 @@ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 SET(_other_SOURCES
   HOMARDGUI.cxx
   HOMARDGUI_Utils.cxx
+  MonCreateBoundaryCAO.cxx
   MonCreateBoundaryAn.cxx
-  MonEditBoundaryAn.cxx
   MonCreateBoundaryDi.cxx
+  MonEditBoundaryCAO.cxx
+  MonEditBoundaryAn.cxx
   MonEditBoundaryDi.cxx
   MonCreateCase.cxx
   MonEditCase.cxx
   MonCreateHypothesis.cxx
   MonEditHypothesis.cxx
   MonCreateListGroup.cxx
+  MonCreateListGroupCAO.cxx
   MonEditListGroup.cxx
+  MonEditListGroupCAO.cxx
   MonCreateIteration.cxx
   MonEditIteration.cxx
   MonPursueIteration.cxx
diff --git a/src/HOMARDGUI/CreateBoundaryCAO.ui b/src/HOMARDGUI/CreateBoundaryCAO.ui
new file mode 100755 (executable)
index 0000000..c74c601
--- /dev/null
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CreateBoundaryCAO</class>
+ <widget class="QDialog" name="CreateBoundaryCAO">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>566</width>
+    <height>195</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Get CAO</string>
+  </property>
+  <property name="autoFillBackground">
+   <bool>true</bool>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>9</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="3" column="0" colspan="3">
+    <widget class="QGroupBox" name="GBButtons">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="3">
+       <widget class="QPushButton" name="buttonHelp">
+        <property name="text">
+         <string>Help</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QPushButton" name="buttonCancel">
+        <property name="text">
+         <string>Cancel</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="buttonApply">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QPushButton" name="buttonOk">
+        <property name="text">
+         <string>OK</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="3">
+    <widget class="QCheckBox" name="CBGroupe">
+     <property name="text">
+      <string>Filtering with groups</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QLineEdit" name="LEFileName">
+     <property name="minimumSize">
+      <size>
+       <width>370</width>
+       <height>21</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="PushFichier">
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="XAO">
+     <property name="text">
+      <string>XAO</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" colspan="2">
+    <widget class="QLineEdit" name="LEName">
+     <property name="minimumSize">
+      <size>
+       <width>382</width>
+       <height>21</height>
+      </size>
+     </property>
+     <property name="maxLength">
+      <number>32</number>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QLabel" name="Name">
+     <property name="text">
+      <string>Name</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index 77c562de36313ccd827eceac7bba7e07deeec7a1..14fe44db98ad72af07930fbdf011aa7cf8175b03 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>600</width>
-    <height>1026</height>
+    <height>1150</height>
    </rect>
   </property>
   <property name="sizePolicy">
      </layout>
     </widget>
    </item>
-   <item row="5" column="0">
+   <item row="5" column="0" colspan="4">
+    <widget class="QGroupBox" name="GBTypeBoun">
+     <property name="title">
+      <string>Boundary type</string>
+     </property>
+     <layout class="QHBoxLayout" name="_3">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <item>
+       <widget class="QRadioButton" name="RBBoundaryNo">
+        <property name="text">
+         <string>No boundary</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBBoundaryCAO">
+        <property name="text">
+         <string>CAO</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBBoundaryNonCAO">
+        <property name="text">
+         <string>Non CAO</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="5" column="6">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>1</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="6" column="0" colspan="3">
     <layout class="QHBoxLayout">
      <property name="spacing">
       <number>6</number>
      </item>
     </layout>
    </item>
-   <item row="5" column="3">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>1</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="6" column="2">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>2</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="7" column="0" colspan="4">
-    <widget class="QGroupBox" name="GBBoundaryD">
+   <item row="7" column="0" colspan="2">
+    <widget class="QGroupBox" name="GBBoundaryC">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
        <horstretch>0</horstretch>
       </sizepolicy>
      </property>
      <property name="title">
-      <string>Discrete boundary</string>
+      <string>CAO</string>
      </property>
-     <layout class="QGridLayout">
+     <layout class="QGridLayout" name="_2">
       <property name="margin">
        <number>9</number>
       </property>
        <number>6</number>
       </property>
       <item row="0" column="3">
-       <widget class="QPushButton" name="PBBoundaryDiEdit">
+       <widget class="QPushButton" name="PBBoundaryCAOEdit">
         <property name="text">
          <string>Edit</string>
         </property>
         </property>
        </widget>
       </item>
+      <item row="0" column="4">
+       <widget class="QPushButton" name="PBBoundaryCAOHelp">
+        <property name="text">
+         <string>Help</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QComboBox" name="CBBoundaryCAO">
+        <property name="currentIndex">
+         <number>-1</number>
+        </property>
+        <property name="sizeAdjustPolicy">
+         <enum>QComboBox::AdjustToContents</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <spacer>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>13</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
       <item row="0" column="2">
-       <widget class="QPushButton" name="PBBoundaryDiNew">
+       <widget class="QPushButton" name="PBBoundaryCAONew">
         <property name="text">
          <string>New</string>
         </property>
         </property>
        </widget>
       </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="7" column="2">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="8" column="0" colspan="4">
+    <widget class="QGroupBox" name="GBBoundaryD">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Discrete boundary</string>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
       <item row="0" column="0">
        <widget class="QComboBox" name="CBBoundaryDi">
         <property name="currentIndex">
         </property>
        </spacer>
       </item>
+      <item row="0" column="3">
+       <widget class="QPushButton" name="PBBoundaryDiEdit">
+        <property name="text">
+         <string>Edit</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
       <item row="0" column="4">
        <widget class="QPushButton" name="PBBoundaryDiHelp">
         <property name="text">
         </property>
        </widget>
       </item>
+      <item row="0" column="2">
+       <widget class="QPushButton" name="PBBoundaryDiNew">
+        <property name="text">
+         <string>New</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
-   <item row="8" column="0" colspan="6">
+   <item row="9" column="0" colspan="7">
     <widget class="QGroupBox" name="GBBoundaryA">
      <property name="minimumSize">
       <size>
      </layout>
     </widget>
    </item>
-   <item row="9" column="0">
+   <item row="10" column="0">
     <spacer name="spacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="10" column="0">
+   <item row="11" column="0">
     <widget class="QCheckBox" name="CBAdvanced">
      <property name="text">
       <string>Advanced options</string>
      </property>
     </widget>
    </item>
-   <item row="11" column="0" colspan="3">
+   <item row="12" column="0" colspan="3">
     <widget class="QGroupBox" name="GBAdvancedOptions">
      <property name="title">
       <string>Advanced options</string>
            </item>
           </layout>
          </item>
-        </layout>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QGroupBox" name="GBFormat">
-        <property name="title">
-         <string>Format</string>
-        </property>
-        <layout class="QGridLayout" name="gridLayout">
-         <item row="0" column="0">
-          <widget class="QRadioButton" name="RBMED">
-           <property name="text">
-            <string>MED</string>
-           </property>
-           <property name="checked">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="QRadioButton" name="RBSaturne">
-           <property name="text">
-            <string>Saturne</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="2">
-          <widget class="QRadioButton" name="RBSaturne2D">
-           <property name="text">
-            <string>Saturne 2D</string>
+         <item row="1" column="0">
+          <widget class="QGroupBox" name="GBFormat">
+           <property name="title">
+            <string>Format</string>
            </property>
+           <layout class="QGridLayout" name="gridLayout">
+            <item row="0" column="0">
+             <widget class="QRadioButton" name="RBMED">
+              <property name="text">
+               <string>MED</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QRadioButton" name="RBSaturne">
+              <property name="text">
+               <string>Saturne</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="2">
+             <widget class="QRadioButton" name="RBSaturne2D">
+              <property name="text">
+               <string>Saturne 2D</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
           </widget>
          </item>
         </layout>
      </layout>
     </widget>
    </item>
-   <item row="11" column="5">
+   <item row="12" column="4" colspan="3">
     <spacer name="spacer_3">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
     </spacer>
    </item>
-   <item row="12" column="0">
+   <item row="13" column="0">
     <spacer name="spacer_4">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="13" column="0">
+   <item row="14" column="0">
     <widget class="QLabel" name="Comment">
      <property name="text">
       <string> No comment.</string>
      </property>
     </widget>
    </item>
-   <item row="14" column="0">
+   <item row="14" column="1">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>35</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="15" column="0" colspan="2">
     <widget class="QGroupBox" name="GroupButtons">
      <property name="title">
       <string/>
      </layout>
     </widget>
    </item>
-   <item row="14" column="1">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>35</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="14" column="4" colspan="2">
+   <item row="15" column="3" colspan="2">
     <spacer name="spacer_2">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
     </spacer>
    </item>
   </layout>
+  <zorder>WName</zorder>
+  <zorder>GBTypeConf</zorder>
+  <zorder>GBBoundaryD</zorder>
+  <zorder>GBBoundaryA</zorder>
+  <zorder>CBAdvanced</zorder>
+  <zorder>GBAdvancedOptions</zorder>
+  <zorder>Comment</zorder>
+  <zorder>GroupButtons</zorder>
+  <zorder>GBBoundaryC</zorder>
+  <zorder>GBTypeBoun</zorder>
  </widget>
  <resources/>
  <connections/>
index 3d582396fdecaa4b33c3ebef09f9d3d1c061d4eb..e5e5c11c00295c08b2e43c7a8ec1afec6b7758c2 100644 (file)
@@ -59,6 +59,7 @@
 #include "MonCreateIteration.h"
 #include "MonPursueIteration.h"
 #include "MonCreateYACS.h"
+#include "MonEditBoundaryCAO.h"
 #include "MonEditBoundaryAn.h"
 #include "MonEditBoundaryDi.h"
 #include "MonEditCase.h"
@@ -465,8 +466,14 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       _PTR(SObject) obj = chercheMonObjet();
       if (obj)
       {
+        // Edition d'une frontiere CAO
+        if (HOMARD_UTILS::isBoundaryCAO(obj))
+        {
+          MonEditBoundaryCAO *aDlg = new MonEditBoundaryCAO(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          aDlg->show();
+        }
         // Edition d'une frontiere discrete
-        if (HOMARD_UTILS::isBoundaryDi(obj))
+        else if (HOMARD_UTILS::isBoundaryDi(obj))
         {
           MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
           aDlg->show();
@@ -521,7 +528,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       if (obj)
       {
         // Suppression d'une frontiere
-        if ( HOMARD_UTILS::isBoundaryDi(obj) || HOMARD_UTILS::isBoundaryAn(obj) )
+        if ( HOMARD_UTILS::isBoundaryCAO(obj) || HOMARD_UTILS::isBoundaryDi(obj) || HOMARD_UTILS::isBoundaryAn(obj) )
         {
           try
           { homardGen->DeleteBoundary(_ObjectName.toStdString().c_str()); }
@@ -755,7 +762,12 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t
     bool DeleteObject = false ;
     bool EditObject = false ;
 //
-    if ( HOMARD_UTILS::isBoundaryAn(obj) )
+    if ( HOMARD_UTILS::isBoundaryCAO(obj) )
+    {
+      EditObject = true ;
+      DeleteObject = true ;
+    }
+    else if ( HOMARD_UTILS::isBoundaryAn(obj) )
     {
       EditObject = true ;
       DeleteObject = true ;
index 1f5abdc0b64c296c457ef5de219a533279f801b8..97aa1e1a087a2ba1249b9fe43a846ebb365d1d21 100644 (file)
@@ -186,6 +186,13 @@ bool HOMARD_UTILS::isObject(_PTR(SObject) MonObj, QString TypeObject, int option
   return bOK ;
 }
 //================================================================
+// Retourne vrai si l'objet est une frontiere CAO
+//================================================================
+bool HOMARD_UTILS::isBoundaryCAO(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("BoundaryCAOHomard"), -1 ) ;
+}
+//================================================================
 // Retourne vrai si l'objet est une frontiere analytique
 //================================================================
 bool HOMARD_UTILS::isBoundaryAn(_PTR(SObject) MonObj)
index 2946cf541ed463454169bcba15333903e51721e0..762c46beacde6cc4e5f8567a2bfbcf8153407d15 100644 (file)
@@ -71,6 +71,7 @@ namespace HOMARD_UTILS {
                                       // Function returns the last selected object in the list
                                        // of selected objects
 
+  HOMARD_EXPORT bool isBoundaryCAO(_PTR(SObject)  MonObj);
   HOMARD_EXPORT bool isBoundaryAn(_PTR(SObject)  MonObj);
   HOMARD_EXPORT bool isBoundaryDi(_PTR(SObject)  MonObj);
   HOMARD_EXPORT bool isCase(_PTR(SObject)  MonObj);
index b95385fd69f96a40d2c9c7b3d95522224ba38ac3..26c84aa1d154e7291ddf72ff714d48f0dd85c156 100644 (file)
         <source>HOM_BOUN_MESH</source>
         <translation>The file for the mesh of the boundary must be selected.</translation>
     </message>
+    <message>
+        <source>HOM_BOUN_CAO</source>
+        <translation>The file for the CAO must be selected.</translation>
+    </message>
     <message>
         <source>HOM_BOUN_CASE</source>
         <translation>The meshfile of the case is unknown.</translation>
         <source>HOM_AXE</source>
         <translation>The axis must be a non 0 vector.</translation>
     </message>
+    <message>
+        <source>HOM_BOUN_C_EDIT_WINDOW_TITLE</source>
+        <translation>Edition of a CAO based boundary</translation>
+    </message>
     <message>
         <source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
         <translation>Edition of an analytical boundary</translation>
index 2026c26b82edbccfbb12c06ed9757ee93349b6ee..56140368b33a94dc2bbf5806ef9a1efffd4d24c4 100644 (file)
@@ -29,7 +29,7 @@
     </message>
     <message>
         <source>HOM_MEN_PURSUE_ITERATION</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>HOM_MEN_COMPUTE</source>
@@ -77,7 +77,7 @@
     </message>
     <message>
         <source>HOM_TOP_PURSUE_ITERATION</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>HOM_TOP_COMPUTE</source>
     </message>
     <message>
         <source>HOM_STB_PURSUE_ITERATION</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>HOM_STB_COMPUTE</source>
     </message>
     <message>
         <source>HOM_SELECT_FILE_3</source>
-        <translation>Impossible d&apos;ouvrir ce fichier.</translation>
+        <translation>Impossible d'ouvrir ce fichier.</translation>
     </message>
     <message>
         <source>HOM_SCRIPT_FILE</source>
     </message>
     <message>
         <source>HOM_MED_FILE_3</source>
-        <translation>Ce fichier MED contient plus d&apos;un maillage.</translation>
+        <translation>Ce fichier MED contient plus d'un maillage.</translation>
     </message>
     <message>
         <source>HOM_MED_FILE_4</source>
     </message>
     <message>
         <source>Create a case</source>
-        <translation>Création d&apos;un cas</translation>
+        <translation>Création d'un cas</translation>
     </message>
     <message>
         <source>HOM_CASE_NAME</source>
     </message>
     <message>
         <source>HOM_START_DIRECTORY_1</source>
-        <translation>Il faut choisir un répertoire contenant l&apos;itération à poursuivre.</translation>
+        <translation>Il faut choisir un répertoire contenant l'itération à poursuivre.</translation>
     </message>
     <message>
         <source>HOM_START_DIRECTORY_3</source>
-        <translation>Un répertoire valide contenant l&apos;itération à poursuivre doit être choisi.</translation>
+        <translation>Un répertoire valide contenant l'itération à poursuivre doit être choisi.</translation>
     </message>
     <message>
         <source>HOM_CASE_MESH</source>
     </message>
     <message>
         <source>HOM_CASE_GROUP</source>
-        <translation>Le groupe &quot;%1&quot; ne peut pas être attribué à plus d&apos;une frontière.</translation>
+        <translation>Le groupe &quot;%1&quot; ne peut pas être attribué à plus d'une frontière.</translation>
     </message>
     <message>
         <source>HOM_CASE_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;un cas</translation>
+        <translation>Edition d'un cas</translation>
     </message>
     <message>
         <source>HOM_CASE_EDIT_STATE_0</source>
     </message>
     <message>
         <source>HOM_CASE_EDIT_STATE</source>
-        <translation>Poursuite d&apos;une itération.</translation>
+        <translation>Poursuite d'une itération.</translation>
     </message>
     <message>
         <source>HOM_CASE_PURSUE_WINDOW_TITLE</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>The configuration file cannot be found.</source>
     </message>
     <message>
         <source>HOM_ITER_NAME</source>
-        <translation>Il faut donner un nom à l&apos;itération.</translation>
+        <translation>Il faut donner un nom à l'itération.</translation>
     </message>
     <message>
         <source>HOM_ITER_STARTING_POINT</source>
-        <translation>Il faut désigner l&apos;itération précédente.</translation>
+        <translation>Il faut désigner l'itération précédente.</translation>
     </message>
     <message>
         <source>HOM_ITER_MESH</source>
     </message>
     <message>
         <source>HOM_ITER_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une itération</translation>
+        <translation>Edition d'une itération</translation>
+    </message>
+    <message>
+        <source>Boundary type</source>
+        <translation>Type de frontière</translation>
+    </message>
+    <message>
+        <source>No boundary</source>
+        <translation>Pas de frontière</translation>
+    </message>
+    <message>
+        <source>Non CAO</source>
+        <translation>Autre que CAO</translation>
     </message>
     <message>
         <source>Discrete boundary</source>
     </message>
     <message>
         <source>Initialization of adaptation</source>
-        <translation>Initialisation de l&apos;adaptation</translation>
+        <translation>Initialisation de l'adaptation</translation>
     </message>
     <message>
         <source>Maximal level</source>
     </message>
     <message>
         <source>Create an iteration</source>
-        <translation>Création d&apos;une itération</translation>
+        <translation>Création d'une itération</translation>
     </message>
     <message>
         <source>Iteration Name</source>
-        <translation>Nom de l&apos;itération</translation>
+        <translation>Nom de l'itération</translation>
     </message>
     <message>
         <source>Previous iteration</source>
     </message>
     <message>
         <source>The parent iteration is not defined.</source>
-        <translation>L&apos;itération parent n&apos;est pas définie.</translation>
+        <translation>L'itération parent n'est pas définie.</translation>
     </message>
     <message>
         <source>Unable to create the iteration.</source>
-        <translation>Impossible de créer l&apos;itération.</translation>
+        <translation>Impossible de créer l'itération.</translation>
     </message>
     <message>
         <source>The directory for the computation cannot be created.</source>
-        <translation>Impossible de créer le répertoire pour le calcul de l&apos;itération.</translation>
+        <translation>Impossible de créer le répertoire pour le calcul de l'itération.</translation>
     </message>
     <message>
         <source>This iteration is the first of the case and cannot be computed.</source>
     </message>
     <message>
         <source>This iteration does not have any associated hypothesis.</source>
-        <translation>Cette itération n&apos;est associée à aucune hypothèse.</translation>
+        <translation>Cette itération n'est associée à aucune hypothèse.</translation>
     </message>
     <message>
         <source>The mesh file does not exist.</source>
-        <translation>Le fichier du maillage n&apos;existe pas.</translation>
+        <translation>Le fichier du maillage n'existe pas.</translation>
     </message>
     <message>
         <source>The mesh file cannot be deleted.</source>
     </message>
     <message>
         <source>Rank</source>
-        <translation>Numéro d&apos;ordre</translation>
+        <translation>Numéro d'ordre</translation>
     </message>
     <message>
         <source>Hypothesis</source>
     </message>
     <message>
         <source>Create an hypothesis</source>
-        <translation>Création d&apos;une hypothèse</translation>
+        <translation>Création d'une hypothèse</translation>
     </message>
     <message>
         <source>HOM_HYPO_NAME</source>
-        <translation>Il faut donner un nom à l&apos;hypothèse.</translation>
+        <translation>Il faut donner un nom à l'hypothèse.</translation>
     </message>
     <message>
         <source>HOM_HYPO_FIELD_FILE</source>
     </message>
     <message>
         <source>HOM_HYPO_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une hypothèse</translation>
+        <translation>Edition d'une hypothèse</translation>
     </message>
     <message>
         <source>Type of adaptation</source>
-        <translation>Type d&apos;adaptation</translation>
+        <translation>Type d'adaptation</translation>
     </message>
     <message>
         <source>Uniform</source>
     </message>
     <message>
         <source>Governing field for the adaptation</source>
-        <translation>Champ pilotant l&apos;adaptation</translation>
+        <translation>Champ pilotant l'adaptation</translation>
     </message>
     <message>
         <source>Field name</source>
     </message>
     <message>
         <source>Create a zone</source>
-        <translation>Création d&apos;une zone</translation>
+        <translation>Création d'une zone</translation>
     </message>
     <message>
         <source>HOM_ZONE_NAME</source>
     </message>
     <message>
         <source>HOM_ZONE_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une zone</translation>
+        <translation>Edition d'une zone</translation>
     </message>
     <message>
         <source>Type of zone</source>
         <source>Coordinates</source>
         <translation>Coordonnées</translation>
     </message>
+    <message>
+        <source>Get CAO</source>
+        <translation>Acquisition de la CAO</translation>
+    </message>
     <message>
         <source>Create an analytical boundary</source>
-        <translation>Création d&apos;une frontière analytique</translation>
+        <translation>Création d'une frontière analytique</translation>
     </message>
     <message>
         <source>Create a discrete boundary</source>
-        <translation>Création d&apos;une frontière discrète</translation>
+        <translation>Création d'une frontière discrète</translation>
     </message>
     <message>
         <source>Type of boundary</source>
     </message>
     <message>
         <source>HOM_BOUN_MESH</source>
-        <translation>Il faut choisir le maillage qui contient la frontière.</translation>
+        <translation>Il faut choisir le fichier qui contient le maillage de la frontière discrète.</translation>
+    </message>
+    <message>
+        <source>HOM_BOUN_CAO</source>
+        <translation>Il faut choisir le fichier qui contient la CAO.</translation>
     </message>
     <message>
         <source>HOM_BOUN_CASE</source>
     </message>
     <message>
         <source>HOM_AXE</source>
-        <translation>L&apos;axe doit être un vecteur non nul.</translation>
+        <translation>L'axe doit être un vecteur non nul.</translation>
+    </message>
+    <message>
+        <source>HOM_BOUN_C_EDIT_WINDOW_TITLE</source>
+        <translation>Edition d'une frontière basée sur une CAO</translation>
     </message>
     <message>
         <source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une frontière analytique</translation>
+        <translation>Edition d'une frontière analytique</translation>
     </message>
     <message>
         <source>HOM_BOUN_D_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une frontière discrète</translation>
+        <translation>Edition d'une frontière discrète</translation>
     </message>
     <message>
         <source>HOM_GROU_EDIT_WINDOW_TITLE</source>
     </message>
     <message>
         <source>The axis must be a non 0 vector.</source>
-        <translation>L&apos;axe doit être un vecteur non nul.</translation>
+        <translation>L'axe doit être un vecteur non nul.</translation>
     </message>
     <message>
         <source>The angle must be included higher than 0 degree and lower than 90 degrees.</source>
-        <translation>L&apos;angle doit être compris entre 0 et 90 degrés.</translation>
+        <translation>L'angle doit être compris entre 0 et 90 degrés.</translation>
     </message>
     <message>
         <source>The radius must be different.</source>
     </message>
     <message>
         <source>The orientation must be 1, 2 or 3.</source>
-        <translation>L&apos;orientation vaut 1, 2 ou 3.</translation>
+        <translation>L'orientation vaut 1, 2 ou 3.</translation>
     </message>
     <message>
         <source>HOM_MESH_INFO_0</source>
     </message>
     <message>
         <source>HOM_MESH_INFO_2</source>
-        <translation>Bilan de l&apos;analyse dans l&apos;arbre d&apos;études, fichier </translation>
+        <translation>Bilan de l'analyse dans l'arbre d'études, fichier </translation>
     </message>
     <message>
         <source>Filtering with groups</source>
     </message>
     <message>
         <source>Information on a mesh</source>
-        <translation>Analyse d&apos;un maillage</translation>
+        <translation>Analyse d'un maillage</translation>
     </message>
     <message>
         <source>Group size</source>
     </message>
     <message>
         <source>From an iteration</source>
-        <translation>A partir d&apos;une itération</translation>
+        <translation>A partir d'une itération</translation>
     </message>
     <message>
         <source>From a case</source>
-        <translation>A partir d&apos;un cas</translation>
+        <translation>A partir d'un cas</translation>
     </message>
     <message>
         <source>Iteration into the case</source>
-        <translation>Choix d&apos;une itération dans le cas</translation>
+        <translation>Choix d'une itération dans le cas</translation>
     </message>
     <message>
         <source>Last iteration</source>
     </message>
     <message>
         <source>Iteration number</source>
-        <translation>A partir d&apos;une itération numérotée</translation>
+        <translation>A partir d'une itération numérotée</translation>
     </message>
     <message>
         <source>The directory of the case does not exist.</source>
-        <translation>Le répertoire du cas n&apos;existe pas.</translation>
+        <translation>Le répertoire du cas n'existe pas.</translation>
     </message>
     <message>
         <source>The directory for the case cannot be modified because some iterations are already defined.</source>
     </message>
     <message>
         <source>The directory for the case cannot be reached.</source>
-        <translation>Impossible d&apos;atteindre ce répertoire pour le cas.</translation>
+        <translation>Impossible d'atteindre ce répertoire pour le cas.</translation>
     </message>
     <message>
         <source>The starting point for the case cannot be copied into the working directory.</source>
     </message>
     <message>
         <source>The directory of the case for the pursuit does not exist.</source>
-        <translation>Le répertoire du cas de reprise n&apos;existe pas.</translation>
+        <translation>Le répertoire du cas de reprise n'existe pas.</translation>
     </message>
     <message>
         <source>The directory of the iteration does not exist.</source>
-        <translation>Le répertoire de l&apos;itération de reprise n&apos;existe pas.</translation>
+        <translation>Le répertoire de l'itération de reprise n'existe pas.</translation>
     </message>
     <message>
         <source>The number of iteration must be positive.</source>
-        <translation>Le numéro de l&apos;itération doit etre positif.</translation>
+        <translation>Le numéro de l'itération doit etre positif.</translation>
     </message>
     <message>
         <source>Number of iteration</source>
-        <translation>Numéro de l&apos;itération</translation>
+        <translation>Numéro de l'itération</translation>
     </message>
     <message>
         <source>Case</source>
     </message>
     <message>
         <source>Edit a file</source>
-        <translation>Affichage d&apos;un fichier</translation>
+        <translation>Affichage d'un fichier</translation>
     </message>
     <message>
         <source>Print</source>
     </message>
     <message>
         <source>HOM_YACS_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;un schéma YACS</translation>
+        <translation>Edition d'un schéma YACS</translation>
     </message>
     <message>
         <source>PREF_TAB_GENERAL</source>
     </message>
     <message>
         <source>PREF_PUBLICATION_MAILLAGE_IN</source>
-        <translation>Les maillages d&apos;entrée</translation>
+        <translation>Les maillages d'entrée</translation>
     </message>
     <message>
         <source>PREF_PUBLICATION_MAILLAGE_OUT</source>
diff --git a/src/HOMARDGUI/MonCreateBoundaryCAO.cxx b/src/HOMARDGUI/MonCreateBoundaryCAO.cxx
new file mode 100755 (executable)
index 0000000..efefdeb
--- /dev/null
@@ -0,0 +1,202 @@
+// Copyright (C) 2011-2016  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
+//
+
+#include "MonCreateBoundaryCAO.h"
+#include "MonCreateListGroupCAO.h"
+#include "MonCreateCase.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+using namespace std;
+
+// -------------------------------------------------------------------------------
+MonCreateBoundaryCAO::MonCreateBoundaryCAO(MonCreateCase* parent, bool modal,
+                                         HOMARD::HOMARD_Gen_var myHomardGen0,
+                                         QString caseName, QString aName)
+// ---------------------------------------------------------------------------------
+/* Constructs a MonCreateBoundaryCAO */
+    :
+    QDialog(0), Ui_CreateBoundaryCAO(),
+    _parent(parent), _aName(aName),
+    myHomardGen(HOMARD::HOMARD_Gen::_duplicate(myHomardGen0)),
+    _aCaseName(caseName)
+    {
+      MESSAGE("Constructeur") ;
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+     if ( _aName == QString("") ) {SetNewName();};
+    }
+
+// ------------------------------------------------------------------------
+MonCreateBoundaryCAO::~MonCreateBoundaryCAO()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( PushFichier,  SIGNAL(pressed()), this, SLOT(SetCAOFile()));
+    connect( buttonOk,     SIGNAL(pressed()), this, SLOT( PushOnOK()));
+    connect( buttonApply,  SIGNAL(pressed()), this, SLOT( PushOnApply()));
+    connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,   SIGNAL(pressed()), this, SLOT( PushOnHelp()));
+    connect( CBGroupe,     SIGNAL(stateChanged(int)), this, SLOT( SetFiltrage()));
+}
+
+// ------------------------------------------------------------------------
+bool MonCreateBoundaryCAO::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+// Verifications
+
+  QString aName=LEName->text().trimmed();
+  if (aName=="") {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_NAME") );
+    return false;
+  }
+
+//  La CAO
+  QString aCAOFile=LEFileName->text().trimmed();
+  if (aCAOFile ==QString(""))
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_CAO") );
+    return false;
+  }
+
+// Creation de l'objet CORBA si ce n'est pas deja fait sous le meme nom
+  if ( _aName != aName )
+  {
+   try
+   {
+     _aName=aName;
+     aBoundary=myHomardGen->CreateBoundaryCAO(CORBA::string_dup(_aName.toStdString().c_str()), aCAOFile.toStdString().c_str());
+     _parent->AddBoundaryCAO(_aName);
+     aBoundary->SetCaseCreation(_aCaseName.toStdString().c_str());
+   }
+   catch( SALOME::SALOME_Exception& S_ex )
+   {
+      QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+      return false;
+   }
+  }
+
+// Les groupes
+  AssocieLesGroupes();
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+     if ( _parent ) { _parent->raise(); _parent->activateWindow(); };
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  std::string LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("CAO"), QString(LanguageShort.c_str()));
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::AssocieLesGroupes()
+// ------------------------------------------------------------------------
+{
+  HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType;
+  aSeqGroupe->length(_listeGroupesBoundary.size());
+  QStringList::const_iterator it;
+  int i=0;
+  for (it = _listeGroupesBoundary.constBegin(); it != _listeGroupesBoundary.constEnd(); it++)
+     aSeqGroupe[i++]=(*it).toStdString().c_str();
+  aBoundary->SetGroups(aSeqGroupe);
+
+}
+
+// -------------------------------------------------
+void MonCreateBoundaryCAO::SetNewName()
+// --------------------------------------------------
+{
+
+  HOMARD::listeBoundarys_var  MyObjects = myHomardGen->GetAllBoundarysName();
+  int num = 0; QString aName="";
+  while (aName == QString("") )
+  {
+    aName.setNum(num+1) ;
+    aName.insert(0, QString("Boun_")) ;
+    for ( int i=0; i<MyObjects->length(); i++)
+    {
+      if ( aName ==  QString(MyObjects[i]))
+      {
+        num ++ ;
+        aName = "" ;
+        break ;
+      }
+   }
+  }
+  LEName->setText(aName);
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::SetCAOFile()
+// ------------------------------------------------------------------------
+{
+  QString aCAOFile = HOMARD_QT_COMMUN::PushNomFichier( false, QString("xao") );
+  if (!(aCAOFile.isEmpty())) LEFileName->setText(aCAOFile);
+}
+
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::setGroups (QStringList listGroup)
+// ------------------------------------------------------------------------
+{
+    _listeGroupesBoundary = listGroup;
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::SetFiltrage()
+// // ------------------------------------------------------------------------
+{
+  if (!CBGroupe->isChecked()) return;
+  if (_aCaseName.toStdString().c_str() == QString()) {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_CASE") );
+    return;
+  }
+
+  MonCreateListGroupCAO *aDlg = new MonCreateListGroupCAO(NULL, this, true, HOMARD::HOMARD_Gen::_duplicate(myHomardGen),
+                            _aCaseName, _listeGroupesBoundary) ;
+  aDlg->show();
+}
+
diff --git a/src/HOMARDGUI/MonCreateBoundaryCAO.h b/src/HOMARDGUI/MonCreateBoundaryCAO.h
new file mode 100755 (executable)
index 0000000..7f135ab
--- /dev/null
@@ -0,0 +1,73 @@
+// Copyright (C) 2011-2016  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
+//
+
+#ifndef MON_CREATEBOUNDARYCAO_H
+#define MON_CREATEBOUNDARYCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Boundary)
+
+#include "ui_CreateBoundaryCAO.h"
+#include <QDialog>
+
+class MonCreateCase;
+class HOMARD_EXPORT MonCreateBoundaryCAO : public QDialog, public Ui_CreateBoundaryCAO
+{
+    Q_OBJECT
+
+public:
+    MonCreateBoundaryCAO( MonCreateCase* parent, bool modal,
+                         HOMARD::HOMARD_Gen_var myHomardGen,
+                         QString caseName, QString BoundaryName );
+    ~MonCreateBoundaryCAO();
+    virtual void setGroups (QStringList listGroup);
+
+protected :
+
+    MonCreateCase *_parent;
+
+    QString _aName;
+    QString _aCaseName;
+
+
+    HOMARD::HOMARD_Boundary_var aBoundary;
+    HOMARD::HOMARD_Gen_var myHomardGen;
+
+    QStringList  _listeGroupesBoundary;
+
+    virtual void AssocieLesGroupes();
+    virtual void InitConnect();
+    virtual void SetNewName();
+
+public slots:
+
+    virtual void SetCAOFile();
+    virtual void SetFiltrage();
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+};
+
+#endif // MON_CREATEBOUNDARYCAO_H
index a912f79cfe30d62ff63f7407b6db8b142a279a71..657ea9c1607456b17dcba2baf28bc68c847389e3 100644 (file)
@@ -18,6 +18,8 @@
 //
 
 #include "MonCreateCase.h"
+#include "MonCreateBoundaryCAO.h"
+#include "MonEditBoundaryCAO.h"
 #include "MonCreateBoundaryAn.h"
 #include "MonEditBoundaryAn.h"
 #include "MonCreateBoundaryDi.h"
@@ -59,8 +61,14 @@ MonCreateCase::MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen0 )
   InitConnect();
 
   SetNewName() ;
+
+  GBBoundaryC->setVisible(0);
   GBBoundaryA->setVisible(0);
   GBBoundaryD->setVisible(0);
+
+  CBBoundaryA->setVisible(0);
+  CBBoundaryD->setVisible(0);
+
   GBAdvancedOptions->setVisible(0);
   Comment->setVisible(0);
   CBPyramid->setChecked(false);
@@ -79,21 +87,28 @@ MonCreateCase::~MonCreateCase()
 void MonCreateCase::InitConnect()
 // ------------------------------------------------------------------------
 {
-    connect( LEName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
-    connect( PushDir,        SIGNAL(pressed()), this, SLOT(SetDirName()));
-    connect( PushFichier,    SIGNAL(pressed()), this, SLOT(SetFileName()));
+    connect( LEName,      SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
+    connect( PushDir,     SIGNAL(pressed()), this, SLOT(SetDirName()));
+    connect( PushFichier, SIGNAL(pressed()), this, SLOT(SetFileName()));
 
     connect( RBConforme,     SIGNAL(clicked()), this, SLOT(SetConforme()));
     connect( RBNonConforme,  SIGNAL(clicked()), this, SLOT(SetNonConforme()));
 
-    connect( CBBoundaryD,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
-    connect( PBBoundaryDiNew,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
-    connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
-    connect( PBBoundaryDiHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) );
-    connect( CBBoundaryA,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
-    connect( PBBoundaryAnNew,  SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew()));
-    connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) );
-    connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) );
+    connect( RBBoundaryNo,      SIGNAL(clicked()), this, SLOT(SetBoundaryNo()));
+    connect( RBBoundaryCAO,     SIGNAL(clicked()), this, SLOT(SetBoundaryCAO()));
+    connect( RBBoundaryNonCAO,  SIGNAL(clicked()), this, SLOT(SetBoundaryNonCAO()));
+
+    connect( PBBoundaryCAONew,  SIGNAL(pressed()), this, SLOT(PushBoundaryCAONew()));
+    connect( PBBoundaryCAOEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryCAOEdit()) );
+    connect( PBBoundaryCAOHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryCAOHelp()) );
+    connect( CBBoundaryD,       SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
+    connect( PBBoundaryDiNew,   SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
+    connect( PBBoundaryDiEdit,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
+    connect( PBBoundaryDiHelp,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) );
+    connect( CBBoundaryA,       SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
+    connect( PBBoundaryAnNew,   SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew()));
+    connect( PBBoundaryAnEdit,  SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) );
+    connect( PBBoundaryAnHelp,  SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) );
 
     connect( CBAdvanced,     SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced()));
     connect( RBStandard,     SIGNAL(clicked()), this, SLOT(SetStandard()));
@@ -127,6 +142,7 @@ void MonCreateCase::InitBoundarys()
     TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
     TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
   }
+// Pour les frontieres CAO : la liste a saisir
 // Pour les frontieres discretes : la liste a saisir
 // Pour les frontieres analytiques : les colonnes de chaque frontiere
   HOMARD::HOMARD_Boundary_var myBoundary ;
@@ -136,8 +152,9 @@ void MonCreateCase::InitBoundarys()
   {
     myBoundary = myHomardGen->GetBoundary(mesBoundarys[i]);
     int type_obj = myBoundary->GetType() ;
-    if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
-    else               { AddBoundaryAn(QString(mesBoundarys[i])); }
+    if ( type_obj==-1 )     { CBBoundaryCAO->addItem(QString(mesBoundarys[i])); }
+    else if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
+    else                    { AddBoundaryAn(QString(mesBoundarys[i])); }
   }
 // Ajustement
   TWBoundary->resizeColumnsToContents();
@@ -265,12 +282,20 @@ bool MonCreateCase::PushOnApply(int option)
   // Enregistrement et publication dans l'arbre d'etudes a la sortie definitive
   if ( option > 0 )
   {
+    if (RBBoundaryCAO->isChecked())
+    {
+      QString monBoundaryCAOName=CBBoundaryCAO->currentText();
+      if (monBoundaryCAOName != "" )
+      {
+        aCase->AddBoundary(monBoundaryCAOName.toStdString().c_str());
+      }
+    }
     if (CBBoundaryD->isChecked())
     {
       QString monBoundaryDiName=CBBoundaryDi->currentText();
       if (monBoundaryDiName != "" )
       {
-        aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), "");
+        aCase->AddBoundary(monBoundaryDiName.toStdString().c_str());
       }
     }
     if (CBBoundaryA->isChecked())
@@ -434,6 +459,74 @@ void MonCreateCase::SetSaturne2D()
   RBSaturne2D->setChecked(true);
 }
 // ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryNo()
+// ------------------------------------------------------------------------
+{
+//
+  GBBoundaryC->setVisible(0);
+  GBBoundaryA->setVisible(0);
+  GBBoundaryD->setVisible(0);
+  CBBoundaryD->setVisible(0);
+  CBBoundaryA->setVisible(0);
+//
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryCAO()
+// ------------------------------------------------------------------------
+{
+//
+  GBBoundaryC->setVisible(1);
+  GBBoundaryA->setVisible(0);
+  GBBoundaryD->setVisible(0);
+  CBBoundaryD->setVisible(0);
+  CBBoundaryA->setVisible(0);
+//
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryNonCAO()
+// ------------------------------------------------------------------------
+{
+//
+  GBBoundaryC->setVisible(0);
+  CBBoundaryD->setVisible(1);
+  CBBoundaryA->setVisible(1);
+//
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::AddBoundaryCAO(QString newBoundary)
+// ------------------------------------------------------------------------
+{
+  CBBoundaryCAO->insertItem(0,newBoundary);
+  CBBoundaryCAO->setCurrentIndex(0);
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAONew()
+// ------------------------------------------------------------------------
+{
+   MonCreateBoundaryCAO *BoundaryDlg = new MonCreateBoundaryCAO(this, true,
+                HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, "") ;
+   BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAOEdit()
+// ------------------------------------------------------------------------
+{
+  if (CBBoundaryCAO->currentText() == QString(""))  return;
+  MonEditBoundaryCAO *BoundaryDlg = new MonEditBoundaryCAO(this, true,
+       HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, CBBoundaryCAO->currentText() ) ;
+  BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAOHelp()
+// ------------------------------------------------------------------------
+{
+  std::string LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("CAO"), QString(LanguageShort.c_str()));
+}
+// ------------------------------------------------------------------------
 void MonCreateCase::SetBoundaryD()
 // ------------------------------------------------------------------------
 {
@@ -497,8 +590,6 @@ void MonCreateCase::SetBoundaryA()
   else { GBBoundaryA->setVisible(0); }
 //
   adjustSize();
-//
-//   MESSAGE("Fin de SetBoundaryA ");
 }
 // ------------------------------------------------------------------------
 void MonCreateCase::AddBoundaryAn(QString newBoundary)
index 7b3815992c5e8da6e13bfe8eaf1e656786acd8b3..8bc8645fcfc8b2cc2745dc1eff40de1695b98dff 100644 (file)
@@ -40,6 +40,7 @@ public:
     MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen );
     ~MonCreateCase();
 
+    void AddBoundaryCAO(QString newBoundary);
     void AddBoundaryAn(QString newBoundary);
     void AddBoundaryDi(QString newBoundary);
 
@@ -74,6 +75,12 @@ public slots:
     virtual void SetSaturne();
     virtual void SetSaturne2D();
 
+    virtual void SetBoundaryNo();
+    virtual void SetBoundaryCAO();
+    virtual void SetBoundaryNonCAO();
+    virtual void PushBoundaryCAONew();
+    virtual void PushBoundaryCAOEdit();
+    virtual void PushBoundaryCAOHelp();
     virtual void SetBoundaryD();
     virtual void PushBoundaryDiNew();
     virtual void PushBoundaryDiEdit();
diff --git a/src/HOMARDGUI/MonCreateListGroupCAO.cxx b/src/HOMARDGUI/MonCreateListGroupCAO.cxx
new file mode 100755 (executable)
index 0000000..8c8286a
--- /dev/null
@@ -0,0 +1,150 @@
+// Copyright (C) 2011-2016  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
+//
+
+#include "MonCreateListGroupCAO.h"
+#include "MonCreateHypothesis.h"
+#include "MonCreateBoundaryCAO.h"
+
+#include <QFileDialog>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_ViewManager.h>
+
+using namespace std;
+
+// --------------------------------------------------------------------------------------------------------------
+MonCreateListGroupCAO::MonCreateListGroupCAO(MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, bool modal,
+                                       HOMARD::HOMARD_Gen_var myHomardGen0, QString aCaseName,  QStringList listeGroupesHypo) :
+// --------------------------------------------------------------------------------------------------------------
+//
+    QDialog(0), Ui_CreateListGroup(),
+    _aCaseName (aCaseName),
+    _listeGroupesHypo (listeGroupesHypo),
+    _parentHyp(parentHyp),
+    _parentBound(parentBound)
+{
+    MESSAGE("Debut de  MonCreateListGroupCAO")
+     myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
+    setupUi(this);
+    setModal(modal);
+    InitConnect();
+    InitGroupes();
+}
+// --------------------------------------------------------------------------------------------------------------
+MonCreateListGroupCAO::MonCreateListGroupCAO(MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound,
+                                       HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo) :
+// --------------------------------------------------------------------------------------------------------------
+//
+    QDialog(0), Ui_CreateListGroup(),
+    _aCaseName (aCaseName),
+    _listeGroupesHypo (listeGroupesHypo),
+    _parentHyp(parentHyp),
+    _parentBound(parentBound)
+{
+    myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+    setupUi(this);
+    InitConnect();
+}
+
+// ------------------------------------------------------------------------
+MonCreateListGroupCAO::~MonCreateListGroupCAO()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( buttonOk,     SIGNAL( pressed() ), this, SLOT( PushOnOK() ) );
+    connect( buttonApply,  SIGNAL( pressed() ), this, SLOT( PushOnApply() ) );
+    connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) );
+    connect( buttonHelp,   SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) );
+}
+// ------------------------------------------------------------------------
+bool MonCreateListGroupCAO::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+  QStringList ListeGroup ;
+  for ( int row=0; row< TWGroupe->rowCount(); row++)
+  {
+      if ( TWGroupe->item( row, 0 )->checkState() ==  Qt::Checked )
+          ListeGroup.insert(0, QString(TWGroupe->item(row, 1)->text()) );
+  }
+  if ( _parentHyp )   { _parentHyp->setGroups(ListeGroup);};
+  if ( _parentBound ) { _parentBound->setGroups(ListeGroup);};
+  return true;
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+     if ( _parentHyp )   { _parentHyp->raise(); _parentHyp->activateWindow(); };
+     if ( _parentBound ) { _parentBound->raise(); _parentBound->activateWindow(); };
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  std::string LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"), QString(""), QString(LanguageShort.c_str()));
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::InitGroupes()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de MonCreateListGroupCAO::InitGroupes ");
+  for ( int row=0; row< TWGroupe->rowCount(); row++)
+      TWGroupe->removeRow(row);
+  TWGroupe->setRowCount(0);
+  if (_aCaseName == QString("")) { return; };
+  HOMARD::HOMARD_Cas_var monCas= myHomardGen->GetCase(_aCaseName.toStdString().c_str());
+  HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
+  for ( int i = 0; i < _listeGroupesCas->length(); i++ )
+  {
+    TWGroupe->insertRow(i);
+    TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
+    TWGroupe->item( i, 0 )->setFlags( 0 );
+    TWGroupe->item( i, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
+    if (_listeGroupesHypo.contains (QString((_listeGroupesCas)[i])))
+      {TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );}
+    else
+      {TWGroupe->item( i, 0 )->setCheckState( Qt::Unchecked );}
+    TWGroupe->setItem( i, 1, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
+    TWGroupe->item( i, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+  }
+  TWGroupe->resizeColumnsToContents();
+  TWGroupe->resizeRowsToContents();
+  TWGroupe->clearSelection();
+//   MESSAGE("Fin de MonCreateListGroupCAO::InitGroupes ");
+}
+
diff --git a/src/HOMARDGUI/MonCreateListGroupCAO.h b/src/HOMARDGUI/MonCreateListGroupCAO.h
new file mode 100755 (executable)
index 0000000..1943266
--- /dev/null
@@ -0,0 +1,64 @@
+// Copyright (C) 2011-2016  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
+//
+
+#ifndef MON_CREATELISTGROUPCAO_H
+#define MON_CREATELISTGROUPCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include "ui_CreateListGroup.h"
+#include <QDialog>
+
+class MonCreateHypothesis;
+class MonCreateBoundaryCAO;
+class HOMARD_EXPORT MonCreateListGroupCAO : public QDialog, public Ui_CreateListGroup
+{
+    Q_OBJECT
+
+public:
+    MonCreateListGroupCAO( MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo);
+    MonCreateListGroupCAO( MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
+    virtual ~MonCreateListGroupCAO();
+
+protected :
+
+    HOMARD::HOMARD_Gen_var myHomardGen;
+
+    MonCreateHypothesis * _parentHyp;
+    MonCreateBoundaryCAO * _parentBound;
+    QString _aCaseName;
+    QStringList _listeGroupesHypo;
+
+    virtual void InitConnect();
+    virtual void InitGroupes();
+
+public slots:
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+};
+
+#endif // MON_CREATELISTGROUPCAO_H
diff --git a/src/HOMARDGUI/MonEditBoundaryCAO.cxx b/src/HOMARDGUI/MonEditBoundaryCAO.cxx
new file mode 100755 (executable)
index 0000000..d217ea1
--- /dev/null
@@ -0,0 +1,105 @@
+// Copyright (C) 2011-2016  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
+//
+
+#include "MonEditBoundaryCAO.h"
+#include "MonEditListGroupCAO.h"
+
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+using namespace std;
+
+// -------------------------------------------------------------------------------------------------------------------------------------
+MonEditBoundaryCAO::MonEditBoundaryCAO( MonCreateCase* parent, bool modal,
+                                      HOMARD::HOMARD_Gen_var myHomardGen,
+                                      QString caseName, QString Name):
+// -------------------------------------------------------------------------------------------------------------------------------------
+/* Constructs a MonEditBoundaryCAO
+    herite de MonCreateBoundaryCAO
+*/
+    MonCreateBoundaryCAO(parent, modal, myHomardGen, caseName, Name)
+{
+    MESSAGE("Debut de Boundary pour " << Name.toStdString().c_str());
+    setWindowTitle(QObject::tr("HOM_BOUN_C_EDIT_WINDOW_TITLE"));
+    try
+    {
+     aBoundary=myHomardGen->GetBoundary(CORBA::string_dup(_aName.toStdString().c_str()));
+     if (caseName==QString("")) { _aCaseName=aBoundary->GetCaseCreation();}
+     InitValEdit();
+    }
+    catch( SALOME::SALOME_Exception& S_ex )
+    {
+      QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+      return;
+    }
+
+    HOMARD::ListGroupType_var maListe = aBoundary->GetGroups();
+    for ( int i = 0; i < maListe->length(); i++ )
+       _listeGroupesBoundary << QString(maListe[i]);
+
+}
+// ------------------------------
+MonEditBoundaryCAO::~MonEditBoundaryCAO()
+// ------------------------------
+{
+}
+// ------------------------------
+void MonEditBoundaryCAO::InitValEdit()
+// ------------------------------
+{
+      LEName->setText(_aName);
+      LEName->setReadOnly(true);
+
+      QString aDataFile = aBoundary->GetDataFile();
+      LEFileName->setText(aDataFile);
+      LEFileName->setReadOnly(1);
+      PushFichier->setVisible(0);
+//
+      adjustSize();
+}
+// ------------------------------
+bool MonEditBoundaryCAO::PushOnApply()
+// ------------------------------
+{
+     return true;
+}
+// ------------------------------------------------------------------------
+void MonEditBoundaryCAO::SetFiltrage()
+// // ------------------------------------------------------------------------
+{
+  if (!CBGroupe->isChecked()) return;
+  if (_aCaseName.toStdString().c_str() == QString())
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_CASE") );
+    return;
+  }
+  HOMARD::HOMARD_Cas_var monCas= myHomardGen->GetCase(_aCaseName.toStdString().c_str());
+  HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
+
+  MonEditListGroupCAO *aDlg = new MonEditListGroupCAO(NULL, this, true, HOMARD::HOMARD_Gen::_duplicate(myHomardGen),
+                            _aCaseName, _listeGroupesBoundary) ;
+  aDlg->show();
+}
+
diff --git a/src/HOMARDGUI/MonEditBoundaryCAO.h b/src/HOMARDGUI/MonEditBoundaryCAO.h
new file mode 100755 (executable)
index 0000000..b86f4dc
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (C) 2011-2016  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
+//
+
+#ifndef MON_EDITBOUNDARYCAO_H
+#define MON_EDITBOUNDARYCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateBoundaryCAO.h>
+
+class HOMARD_EXPORT MonEditBoundaryCAO : public MonCreateBoundaryCAO
+{
+    Q_OBJECT
+public:
+    MonEditBoundaryCAO( MonCreateCase* parent, bool modal,
+                       HOMARD::HOMARD_Gen_var myHomardGen,
+                       QString caseName, QString Name );
+    virtual ~MonEditBoundaryCAO();
+
+protected :
+    virtual void InitValEdit();
+    virtual bool PushOnApply();
+    virtual void SetFiltrage();
+
+public slots:
+
+};
+
+#endif
index 40e38f69f1766de3ba7aaa06a373efe5d308ad49..05f1fd1545bff9cc152660aaa60d5cc97b21cc66 100644 (file)
@@ -71,8 +71,8 @@ void MonEditBoundaryDi::InitValEdit()
       LEName->setText(_aName);
       LEName->setReadOnly(true);
 
-      QString aMeshFile = aBoundary->GetMeshFile();
-      LEFileName->setText(aMeshFile);
+      QString aDataFile = aBoundary->GetDataFile();
+      LEFileName->setText(aDataFile);
       LEFileName->setReadOnly(1);
       PushFichier->setVisible(0);
 //
index 2ad3ef4ec58dd6eb0b99b0ef42dad4fde5d565f3..1035eae63aae542abafb41a443ddcf66da82a22f 100644 (file)
@@ -74,31 +74,43 @@ void MonEditCase::InitValEdit()
   RBNonConforme->setEnabled(false);
   int ExtType=aCase->GetExtType();
 
-//    Non affichage du mode de suivi de frontiere
-  CBBoundaryA->setVisible(0);
-  GBBoundaryA->setVisible(0);
+
+// Suivi de frontiere
+// A priori, aucun affichage
+  GBTypeBoun->setVisible(0);
   CBBoundaryD->setVisible(0);
+  CBBoundaryA->setVisible(0);
+  GBBoundaryC->setVisible(0);
   GBBoundaryD->setVisible(0);
-
+  GBBoundaryA->setVisible(0);
 //    On passe en revue tous les couples (frontiere,groupe) du cas
   HOMARD::ListBoundaryGroupType_var mesBoundarys = aCase->GetBoundaryGroup();
   if (mesBoundarys->length()>0)
   {
     QStringList ListeFron ;
     QString NomFron ;
+    bool BounCAO = false ;
     bool BounDi = false ;
     bool BounAn = false ;
     for (int i=0; i<mesBoundarys->length(); i++)
     {
-//        Nom de la frontiere
+//    Nom de la frontiere
       NomFron = mesBoundarys[i++];
       MESSAGE("NomFron "<<NomFron.toStdString().c_str());
-//        L'objet associe pour en deduire le type
+//    L'objet associe pour en deduire le type
       HOMARD::HOMARD_Boundary_var myBoundary = myHomardGen->GetBoundary(NomFron.toStdString().c_str());
       int type_obj = myBoundary->GetType() ;
+      MESSAGE("type_obj "<<type_obj);
+//        C'est une frontiere CAO
+//        Remarque : on ne gere pas les groupes
+      if ( type_obj==-1 )
+      {
+        BounCAO = true ;
+        CBBoundaryCAO->addItem(NomFron);
+      }
 //        C'est une frontiere discrete
 //        Rermarque : on ne gere pas les groupes
-      if ( type_obj==0 )
+      else if ( type_obj==0 )
       {
         BounDi = true ;
         CBBoundaryDi->addItem(NomFron);
@@ -138,9 +150,23 @@ void MonEditCase::InitValEdit()
         TWBoundary->item( 0, ok )->setCheckState( Qt::Checked );
       }
     }
-    MESSAGE("BounDi "<<BounDi<<", BounAn "<<BounAn);
+    MESSAGE("BounCAO "<<BounCAO<<",BounDi "<<BounDi<<", BounAn "<<BounAn);
+    GBTypeBoun->setVisible(1);
+    if ( BounCAO )
+    { RBBoundaryCAO->setChecked(true);
+      GBBoundaryC->setVisible(1);
+      CBBoundaryCAO->setDisabled(true);
+      PBBoundaryCAONew->setVisible(0);
+      PBBoundaryCAOHelp->setVisible(0); }
+    if ( BounDi )
+    { RBBoundaryNonCAO->setChecked(true);
+      GBBoundaryD->setVisible(1);
+      CBBoundaryDi->setDisabled(true);
+      PBBoundaryDiNew->setVisible(0);
+      PBBoundaryDiHelp->setVisible(0); }
     if ( BounAn )
-    { GBBoundaryA->setVisible(1);
+    { RBBoundaryNonCAO->setChecked(true);
+      GBBoundaryA->setVisible(1);
 //    On rend les cases non modifiables.
 //    On ne peut pas le faire pour tout le tableau sinon on perd l'ascenseur !
       int nbcol = TWBoundary->columnCount();
@@ -155,11 +181,9 @@ void MonEditCase::InitValEdit()
       PBBoundaryAnNew->setVisible(0);
       PBBoundaryAnHelp->setVisible(0);
     }
-    if ( BounDi )
-    { GBBoundaryD->setVisible(1);
-      CBBoundaryDi->setDisabled(true);
-      PBBoundaryDiNew->setVisible(0);
-      PBBoundaryDiHelp->setVisible(0); }
+    RBBoundaryNo->setEnabled(false);
+    RBBoundaryCAO->setEnabled(false);
+    RBBoundaryNonCAO->setEnabled(false);
   }
 //
 // Les options avancees (non modifiables)
diff --git a/src/HOMARDGUI/MonEditListGroupCAO.cxx b/src/HOMARDGUI/MonEditListGroupCAO.cxx
new file mode 100755 (executable)
index 0000000..783e368
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright (C) 2011-2016  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
+//
+
+#include "MonEditListGroupCAO.h"
+#include <utilities.h>
+
+using namespace std;
+//---------------------------------------------------------------------
+MonEditListGroupCAO::MonEditListGroupCAO( MonCreateHypothesis* parentHyp,
+                                    MonCreateBoundaryCAO* parentBound,
+                                    bool modal,
+                                    HOMARD::HOMARD_Gen_var myHomardGen,
+                                    QString aCaseName,
+                                    QStringList listeGroupesHypo):
+//---------------------------------------------------------------------
+MonCreateListGroupCAO(parentHyp,parentBound,myHomardGen,aCaseName,listeGroupesHypo)
+{
+  MESSAGE("Debut de MonEditListGroupCAO");
+    setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE"));
+  setModal(true);
+  InitGroupes();
+}
+
+//------------------------------------
+MonEditListGroupCAO:: ~MonEditListGroupCAO()
+//------------------------------------
+{
+}
+// -------------------------------------
+void MonEditListGroupCAO:: InitGroupes()
+// -------------------------------------
+{
+  for (int i = 0; i < _listeGroupesHypo.size(); i++ )
+  {
+     std::cerr << _listeGroupesHypo[i].toStdString().c_str() << std::endl;
+     TWGroupe->insertRow(i);
+     TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
+     TWGroupe->item( i, 0 )->setFlags( 0 );
+     TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );
+     TWGroupe->setItem( i, 1, new QTableWidgetItem(_listeGroupesHypo[i]));
+   }
+   TWGroupe->resizeRowsToContents();
+}
+
+
diff --git a/src/HOMARDGUI/MonEditListGroupCAO.h b/src/HOMARDGUI/MonEditListGroupCAO.h
new file mode 100755 (executable)
index 0000000..7a72ce5
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 2011-2016  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
+//
+
+#ifndef MON_EDITLISTGROUPCAO_H
+#define MON_EDITLISTGROUPCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateListGroupCAO.h>
+
+class MonCreateHypothesis;
+class MonCreateBoundaryCAO;
+class HOMARD_EXPORT MonEditListGroupCAO : public MonCreateListGroupCAO
+{
+    Q_OBJECT
+
+public:
+    MonEditListGroupCAO( MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo);
+    virtual ~MonEditListGroupCAO();
+
+protected :
+
+    virtual void InitGroupes();
+
+};
+
+#endif // MON_EDITLISTGROUPCAO_H
index 569efea16ec2115a6d4f4b043c47b58960b6da0d..99082ed37670bdd4427b99b5362221bccc593808 100644 (file)
@@ -29,6 +29,7 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_BINARY_DIR}
   ${PROJECT_BINARY_DIR}/idl
   ${PROJECT_BINARY_DIR}/adm_local/unix
+  ${PROJECT_SOURCE_DIR}/src/FrontTrack
   ${PROJECT_SOURCE_DIR}/src/HOMARD
   ${PROJECT_SOURCE_DIR}/src/HOMARDGUI
 )
@@ -49,6 +50,7 @@ SET(_link_LIBRARIES
   ${KERNEL_SalomeGenericObj}
   ${SMESH_SalomeIDLSMESH}
   ${SMESH_SMESHEngine}
+  FrontTrack
   SalomeIDLHOMARD
   HOMARDImpl
 )
@@ -65,7 +67,7 @@ SET(HOMARDEngine_HEADERS
   HOMARD_Boundary_i.hxx
   HOMARD_YACS_i.hxx
   HomardMedCommun.h
-  HOMARD_i.hxx 
+  HOMARD_i.hxx
 )
 
 # --- sources ---
index 3cb92a5651a41d88a9b34a7a6068fcc299a220e8..2d904436ed119a36f9011a735ebeeb52b882fecc 100644 (file)
@@ -134,18 +134,18 @@ char* HOMARD_Boundary_i::GetMeshName()
   return CORBA::string_dup( myHomardBoundary->GetMeshName().c_str() );
 }
 //=============================================================================
-void HOMARD_Boundary_i::SetMeshFile( const char* MeshFile )
+void HOMARD_Boundary_i::SetDataFile( const char* DataFile )
 {
   ASSERT( myHomardBoundary );
-  myHomardBoundary->SetMeshFile( MeshFile );
+  myHomardBoundary->SetDataFile( DataFile );
   int PublisMeshIN = _gen_i->GetPublisMeshIN () ;
-  if ( PublisMeshIN != 0 ) { _gen_i->PublishResultInSmesh(MeshFile, 0); }
+  if ( PublisMeshIN != 0 ) { _gen_i->PublishResultInSmesh(DataFile, 0); }
 }
 //=============================================================================
-char* HOMARD_Boundary_i::GetMeshFile()
+char* HOMARD_Boundary_i::GetDataFile()
 {
   ASSERT( myHomardBoundary );
-  return CORBA::string_dup( myHomardBoundary->GetMeshFile().c_str() );
+  return CORBA::string_dup( myHomardBoundary->GetDataFile().c_str() );
 }
 //=============================================================================
 void HOMARD_Boundary_i::SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 )
index ba26c743695bee61ace8a0f5e82614772b79cd3c..86485d1f1725029e41f3fdce69865f119e688b18 100644 (file)
@@ -72,8 +72,8 @@ public:
   void                   SetMeshName( const char* MeshName );
   char*                  GetMeshName();
 
-  void                   SetMeshFile( const char* MeshFile );
-  char*                  GetMeshFile();
+  void                   SetDataFile( const char* DataFile );
+  char*                  GetDataFile();
 
   void                   SetCylinder( double Xcentre, double Ycentre, double ZCentre,
                                       double Xaxe, double Yaxe, double Zaxe,
index 6558e235baf9304168e6c956a3748e8fc13ed994..74fdfa3d09714cc56f63ba906c4f5a955ca5475e 100755 (executable)
@@ -319,46 +319,140 @@ HOMARD::ListGroupType* HOMARD_Cas_i::GetGroups()
   return aResult._retn();
 }
 //=============================================================================
+void HOMARD_Cas_i::AddBoundary(const char* BoundaryName)
+{
+  MESSAGE ("HOMARD_Cas_i::AddBoundary : BoundaryName = "<< BoundaryName );
+  const char * Group = "" ;
+  AddBoundaryGroup( BoundaryName, Group) ;
+}
+//=============================================================================
 void HOMARD_Cas_i::AddBoundaryGroup( const char* BoundaryName, const char* Group)
 {
-  MESSAGE ("AddBoundaryGroup : BoundaryName = "<< BoundaryName << ", Group = " << Group );
+  MESSAGE ("HOMARD_Cas_i::AddBoundaryGroup : BoundaryName = "<< BoundaryName << ", Group = " << Group );
   ASSERT( myHomardCas );
-  // A. La liste des frontiere+groupes
+  // A. Préalables
+  // A.1. Caractéristiques de la frontière à ajouter
+  HOMARD::HOMARD_Boundary_ptr myBoundary = _gen_i->GetBoundary(BoundaryName) ;
+  ASSERT(!CORBA::is_nil(myBoundary));
+  int BoundaryType = myBoundary->GetType();
+  MESSAGE ( ". BoundaryType = " << BoundaryType );
+  // A.2. La liste des frontiere+groupes
   const std::list<std::string>& ListBoundaryGroup = myHomardCas->GetBoundaryGroup();
   std::list<std::string>::const_iterator it;
-  // B. La frontiere
-  // B.1. La frontiere est-elle deja enregistree pour ce cas ?
-  bool existe = false ;
-  for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+  // B. Controles
+  const char * boun ;
+  int erreur = 0 ;
+  while ( erreur == 0 )
   {
-//     MESSAGE ("..  Frontiere : "<< *it );
-    if ( *it == BoundaryName ) { existe = true ; }
-    it++ ;
-  }
-  // B.2. Pour une nouvelle frontiere, publication dans l'arbre d'etudes sous le cas
-  if ( !existe )
-  {
-    char* CaseName = GetName() ;
-    MESSAGE ( "AddBoundaryGroup : insertion de la frontiere dans l'arbre de " << CaseName );
-    _gen_i->PublishBoundaryUnderCase(CaseName, BoundaryName) ;
+  // B.1. Si on ajoute une frontière CAO, elle doit être la seule frontière
+    if ( BoundaryType == -1 )
+    {
+      for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+      {
+        boun = (*it).c_str() ;
+        MESSAGE ("..  Frontiere enregistrée : "<< boun );
+        if ( *it != BoundaryName )
+        { erreur = 1 ;
+          break ; }
+        // On saute le nom du groupe
+        it++ ;
+      }
+    }
+    if ( erreur != 0 ) { break ; }
+  // B.2. Si on ajoute une frontière non CAO, il ne doit pas y avoir de frontière CAO
+    if ( BoundaryType != -1 )
+    {
+      for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+      {
+        boun = (*it).c_str() ;
+        MESSAGE ("..  Frontiere enregistrée : "<< boun );
+        HOMARD::HOMARD_Boundary_ptr myBoundary_0 = _gen_i->GetBoundary(boun) ;
+        int BoundaryType_0 = myBoundary_0->GetType();
+        MESSAGE ( ".. BoundaryType_0 = " << BoundaryType_0 );
+        if ( BoundaryType_0 == -1 )
+        { erreur = 2 ;
+          break ; }
+        // On saute le nom du groupe
+        it++ ;
+      }
+      if ( erreur != 0 ) { break ; }
+    }
+  // B.3. Si on ajoute une frontière discrète, il ne doit pas y avoir d'autre frontière discrète
+    if ( BoundaryType == 0 )
+    {
+      for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+      {
+        boun = (*it).c_str() ;
+        MESSAGE ("..  Frontiere enregistrée : "<< boun );
+        if ( boun != BoundaryName )
+        {
+          HOMARD::HOMARD_Boundary_ptr myBoundary_0 = _gen_i->GetBoundary(boun) ;
+          int BoundaryType_0 = myBoundary_0->GetType();
+          MESSAGE ( ".. BoundaryType_0 = " << BoundaryType_0 );
+          if ( BoundaryType_0 == 0 )
+          { erreur = 3 ;
+            break ; }
+        }
+        // On saute le nom du groupe
+        it++ ;
+      }
+      if ( erreur != 0 ) { break ; }
+    }
+  // B.4. Pour une nouvelle frontiere, publication dans l'arbre d'etudes sous le cas
+    bool existe = false ;
+    for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+    {
+      MESSAGE ("..  Frontiere : "<< *it );
+      if ( *it == BoundaryName ) { existe = true ; }
+      // On saute le nom du groupe
+      it++ ;
+    }
+    if ( !existe )
+    {
+      char* CaseName = GetName() ;
+      MESSAGE ( "AddBoundaryGroup : insertion de la frontiere dans l'arbre de " << CaseName );
+      _gen_i->PublishBoundaryUnderCase(CaseName, BoundaryName) ;
+    }
+  // B.5. Le groupe est-il deja enregistre pour une frontiere de ce cas ?
+    for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+    {
+      boun = (*it).c_str() ;
+      it++ ;
+      MESSAGE ("..  Groupe enregistré : "<< *it );
+      if ( *it == Group )
+      { erreur = 5 ;
+        break ; }
+    }
+    if ( erreur != 0 ) { break ; }
+    //
+    break ;
   }
-  // C. Le groupe est-il deja enregistre pour une frontiere de ce cas ?
-  for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+  // F. Si aucune erreur, enregistrement du couple (frontiere,groupe) dans la reference du cas
+  //    Sinon, arrêt
+  if ( erreur == 0 )
+  { myHomardCas->AddBoundaryGroup( BoundaryName, Group ); }
+  else
   {
-    std::string boun = *it ;
-    it++ ;
-//     MESSAGE ("..  Group : "<< *it );
-    if ( *it == Group )
-    { INFOS ("Frontiere " << boun << " Un groupe est deja associe " << Group ) ;
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid AddBoundaryGroup";
-      throw SALOME::SALOME_Exception(es);
-      return ;
-    }
+    std::stringstream ss;
+    ss << erreur;
+    std::string str = ss.str();
+    std::string texte ;
+    texte = "Erreur numéro " + str + " pour la frontière à enregistrer : " + std::string(BoundaryName) ;
+    if ( erreur == 1 ) { texte += "\nIl existe déjà la frontière " ; }
+    else if ( erreur == 2 ) { texte += "\nIl existe déjà la frontière CAO " ; }
+    else if ( erreur == 3 ) { texte += "\nIl existe déjà une frontière discrète : " ; }
+    else if ( erreur == 5 ) { texte += "\nLe groupe " + std::string(Group) + " est déjà enregistré pour la frontière " ; }
+    texte += std::string(boun) ;
+    //
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+#ifdef _DEBUG_
+    texte += "\nInvalid AddBoundaryGroup";
+#endif
+    INFOS(texte) ;
+    es.text = CORBA::string_dup(texte.c_str());
+    throw SALOME::SALOME_Exception(es);
   }
-  // D. Enregistrement du couple (frontiere,groupe) dans la reference du cas
-  myHomardCas->AddBoundaryGroup( BoundaryName, Group );
 }
 //=============================================================================
 HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup()
index 14a25ac685be92f971745fe409ca35eea95f445f..71181bf8036daf92f1e73d3fc6fc2ba9c632e5f2 100644 (file)
@@ -86,7 +86,8 @@ public:
   void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
   HOMARD::ListGroupType* GetGroups();
 
-  void                   AddBoundaryGroup( const char* Boundary, const char* Group);
+  void                   AddBoundary(const char* Boundary);
+  void                   AddBoundaryGroup(const char* Boundary, const char* Group);
   HOMARD::ListBoundaryGroupType*  GetBoundaryGroup();
   void                   SupprBoundaryGroup( );
 
index 915463dfbb6380834bb5c4d0e9ed4e22ac2201e6..9602c2f934010cfa87416f70490ba954ddf9dcc0 100644 (file)
@@ -30,6 +30,8 @@
 #include "YACSDriver.hxx"
 #include "HOMARD.hxx"
 
+#include "FrontTrack.hxx"
+
 #include "HOMARD_version.h"
 
 #include "utilities.h"
@@ -121,7 +123,7 @@ HOMARD_Gen_i::~HOMARD_Gen_i()
 }
 //=============================================================================
 //=============================================================================
-// Utilitaires pour l'??tude
+// Utilitaires pour l'étude
 //=============================================================================
 //=============================================================================
 void HOMARD_Gen_i::UpdateStudy()
@@ -873,7 +875,7 @@ void HOMARD_Gen_i::AssociateIterHypo(const char* nomIter, const char* nomHypo)
   myIteration->SetHypoName(nomHypo);
   myHypo->LinkIteration(nomIter);
 
-  // On stocke les noms des champ a interpoler pour le futur controle de la donnee des pas de temps
+  // On stocke les noms des champ a interpoler pour le futur controle de la donnée des pas de temps
   myIteration->SupprFieldInterps() ;
   HOMARD::listeFieldInterpsHypo* ListField = myHypo->GetFieldInterps();
   int numberOfFieldsx2 = ListField->length();
@@ -1220,7 +1222,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char*
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, const char* DirNameStart)
 //
 // nomCas : nom du cas a creer
-// DirNameStart : nom du repertoire contenant l'iteration de reprise
+// DirNameStart : nom du répertoire contenant l'iteration de reprise
 //
 {
   INFOS ( "CreateCaseFromIteration : nomCas = " << nomCas << ", DirNameStart = " << DirNameStart );
@@ -1228,7 +1230,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   int codret ;
 
   // A. Decodage du point de reprise
-  // A.1. Controle du repertoire de depart de l'iteration
+  // A.1. Controle du répertoire de depart de l'iteration
   codret = CHDIR(DirNameStart) ;
   if ( codret != 0 )
   {
@@ -1238,7 +1240,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
     throw SALOME::SALOME_Exception(es);
     return 0;
   };
-  // A.2. Reperage des fichiers du repertoire de reprise
+  // A.2. Reperage des fichiers du répertoire de reprise
   std::string file_configuration = "" ;
   std::string file_maillage_homard = "" ;
   int bilan ;
@@ -1304,13 +1306,13 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   char* MeshFile ;
   // le constructeur de ifstream permet d'ouvrir un fichier en lecture
   std::ifstream fichier( file_configuration.c_str() );
-  if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+  if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
   {
     std::string ligne; // variable contenant chaque ligne lue
     std::string mot_cle;
     std::string argument;
     int decalage;
-    // cette boucle sur les lignes s'arr??te d??s qu'une erreur de lecture survient
+    // cette boucle sur les lignes s'arrête dès qu'une erreur de lecture survient
     while ( std::getline( fichier, ligne ) )
     {
       // B.1. Pour la ligne courante, on identifie le premier mot : le mot-cle
@@ -1391,9 +1393,9 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   myCase->SetPyram (Pyram) ;
 
   // E. Copie du fichier de maillage homard
-  // E.1. Repertoire associe au cas
+  // E.1. Répertoire associe au cas
   char* nomDirCase = myCase->GetDirName() ;
-  // E.2. Repertoire associe a l'iteration de ce cas
+  // E.2. Répertoire associe a l'iteration de ce cas
   char* IterName ;
   IterName = myCase->GetIter0Name() ;
   HOMARD::HOMARD_Iteration_var Iter = GetIteration(IterName) ;
@@ -1441,7 +1443,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseLastIteration(const char* nomCas, const char* DirNameStart)
 //
 // nomCas : nom du cas a creer
-// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// DirNameStart : nom du répertoire du cas contenant l'iteration de reprise
 //
 {
   INFOS ( "CreateCaseFromCaseLastIteration : nomCas = " << nomCas << ", DirNameStart = " << DirNameStart );
@@ -1457,7 +1459,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseLastIteration(const char*
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseIteration(const char* nomCas, const char* DirNameStart, CORBA::Long Number)
 //
 // nomCas : nom du cas a creer
-// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// DirNameStart : nom du répertoire du cas contenant l'iteration de reprise
 // Number : numero de l'iteration de depart
 //
 {
@@ -1481,8 +1483,8 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseIteration(const char* nom
 //=============================================================================
 std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Number)
 //
-// Retourne le nom du repertoire ou se trouve l'iteration voulue.
-// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// Retourne le nom du répertoire ou se trouve l'iteration voulue.
+// DirNameStart : nom du répertoire du cas contenant l'iteration de reprise
 // Number : numero de l'iteration de depart ou -1 si on cherche la derniere
 //
 {
@@ -1492,7 +1494,7 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
   int codret ;
   int NumeIterMax = -1 ;
 
-  // A.1. Controle du repertoire de depart du cas
+  // A.1. Controle du répertoire de depart du cas
   codret = CHDIR(DirNameStart) ;
   if ( codret != 0 )
   {
@@ -1502,7 +1504,7 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
     throw SALOME::SALOME_Exception(es);
     return 0;
   };
-  // A.2. Reperage des sous-repertoire du repertoire de reprise
+  // A.2. Reperage des sous-répertoire du répertoire de reprise
   bool existe = false ;
 #ifndef WIN32
   DIR *dp;
@@ -1525,7 +1527,7 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
     {
       if ( CHDIR(DirName_1.c_str()) == 0 )
       {
-//      On cherche le fichier de configuration dans ce sous-repertoire
+//      On cherche le fichier de configuration dans ce sous-répertoire
         codret = CHDIR(DirNameStart);
 #ifndef WIN32
         DIR *dp_1;
@@ -1550,12 +1552,12 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
             CHDIR(DirName_1.c_str()) ;
 
             std::ifstream fichier( file_name_1.c_str() );
-            if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+            if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
             {
               int NumeIter ;
               std::string ligne; // variable contenant chaque ligne lue
               std::string mot_cle;
-              // cette boucle sur les lignes s'arr??te d??s qu'une erreur de lecture survient
+              // cette boucle sur les lignes s'arrête dès qu'une erreur de lecture survient
               while ( std::getline( fichier, ligne ) )
               {
                 // B.1. Pour la ligne courante, on identifie le premier mot : le mot-cle
@@ -1684,8 +1686,8 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase0(const char* nomCas, const char*
   // C. Caracteristiques du maillage
   if ( existeMeshFile != 0 )
   {
-  // Les valeurs extremes des coordonnees
-//     MESSAGE ( "CreateCase0 : Les valeurs extremes des coordonnees" );
+  // Les valeurs extremes des coordonnées
+//     MESSAGE ( "CreateCase0 : Les valeurs extremes des coordonnées" );
     std::vector<double> LesExtremes =GetBoundingBoxInMedFile(MeshFile) ;
     HOMARD::extrema_var aSeq = new HOMARD::extrema() ;
     if (LesExtremes.size()!=10) { return 0; }
@@ -1845,7 +1847,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat
   myIteration->SetNumber(numero);
 
 // Nombre d'iterations deja connues pour le cas, permettant
-// la creation d'un sous-repertoire unique
+// la creation d'un sous-répertoire unique
   int nbitercase = myCase->GetNumberofIter();
   char* nomDirIter = CreateDirNameIter(nomDirCase, nbitercase );
   myIteration->SetDirNameLoc(nomDirIter);
@@ -1914,11 +1916,20 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryNam
   return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
 }
 //=============================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryCAO(const char* BoundaryName, const char* CAOFile)
+{
+  INFOS ("CreateBoundaryCAO : BoundaryName  = " << BoundaryName << ", CAOFile = " << CAOFile );
+  HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, -1);
+  myBoundary->SetDataFile( CAOFile ) ;
+
+  return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
+}
+//=============================================================================
 HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryDi(const char* BoundaryName, const char* MeshName, const char* MeshFile)
 {
-  INFOS ("CreateBoundaryDi : BoundaryName  = " << BoundaryName << ", MeshName = " << MeshName );
+  INFOS ("CreateBoundaryDi : BoundaryName  = " << BoundaryName << ", MeshName = " << MeshName << ", MeshFile = " << MeshFile );
   HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 0);
-  myBoundary->SetMeshFile( MeshFile ) ;
+  myBoundary->SetDataFile( MeshFile ) ;
   myBoundary->SetMeshName( MeshName ) ;
 
   return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
@@ -2375,7 +2386,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam
 //=============================================================================
 //=============================================================================
 // Traitement d'une iteration
-// etatMenage = 1 : destruction du repertoire d'execution
+// etatMenage = 1 : destruction du répertoire d'execution
 // modeHOMARD  = 1 : adaptation
 //            != 1 : information avec les options modeHOMARD
 // Option1 >0 : appel depuis python
@@ -2462,10 +2473,10 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   HOMARD::HOMARD_Cas_var myCase = myStudyContext._mesCas[nomCas];
   ASSERT(!CORBA::is_nil(myCase));
 
-  // B. Les repertoires
-  // B.1. Le repertoire courant
+  // B. Les répertoires
+  // B.1. Le répertoire courant
   std::string nomDirWork = getenv("PWD") ;
-  // B.2. Le sous-repertoire de l'iteration a traiter
+  // B.2. Le sous-répertoire de l'iteration a traiter
   char* DirCompute = ComputeDirManagement(myCase, myIteration, etatMenage);
   MESSAGE( ". DirCompute = " << DirCompute );
 
@@ -2488,11 +2499,11 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   FileInfo += "." + siterp1 + ".bilan" ;
   myIteration->SetFileInfo(FileInfo.c_str());
 
-   // D. On passe dans le repertoire de l'iteration a calculer
+   // D. On passe dans le répertoire de l'iteration a calculer
   MESSAGE ( ". On passe dans DirCompute = " << DirCompute );
   CHDIR(DirCompute);
 
-  // E. Les donnees de l'execution HOMARD
+  // E. Les données de l'exécution HOMARD
   // E.1. L'objet du texte du fichier de configuration
   HomardDriver* myDriver = new HomardDriver(siter, siterp1);
   myDriver->TexteInit(DirCompute, LogFile, _Langue);
@@ -2503,7 +2514,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   const char* MeshFile = myIteration->GetMeshFile();
   MESSAGE ( ". MeshFile = " << MeshFile );
 
-  // E.3. Les donnees du traitement HOMARD
+  // E.3. Les données du traitement HOMARD
   int iaux ;
   if ( modeHOMARD == 1 )
   {
@@ -2523,7 +2534,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   }
 
   // E.4. Ajout des informations liees a l'eventuel suivi de frontiere
-  DriverTexteBoundary(myCase, myDriver) ;
+  int BoundaryOption = DriverTexteBoundary(myCase, myDriver) ;
 
   // E.5. Ecriture du texte dans le fichier
   MESSAGE ( ". Ecriture du texte dans le fichier de configuration ; codret = "<<codret );
@@ -2532,7 +2543,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
 
 // G. Execution
 //
-  int codretexec = 12 ;
+  int codretexec = 1789 ;
   if (codret == 0)
   {
     codretexec = myDriver->ExecuteHomard(Option1);
@@ -2585,7 +2596,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
         text = "Error during the adaptation.\n" ;
         bool stopvu = false ;
         std::ifstream fichier( LogFile.c_str() );
-        if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+        if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
         {
           std::string ligne; // variable contenant chaque ligne lue
           while ( std::getline( fichier, ligne ) )
@@ -2613,7 +2624,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
     }
   }
 
-  // I. Menage et retour dans le repertoire du cas
+  // I. Menage et retour dans le répertoire du cas
   if (codret == 0)
   {
     delete myDriver;
@@ -2622,14 +2633,28 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
     CHDIR(nomDirWork.c_str());
   }
 
+  // J. Suivi de la frontière CAO
+//   std::cout << "- codret : " << codret << std::endl;
+//   std::cout << "- modeHOMARD : " << modeHOMARD << std::endl;
+//   std::cout << "- BoundaryOption : " << BoundaryOption << std::endl;
+//   std::cout << "- codretexec : " << codretexec << std::endl;
+  if (codret == 0)
+  {
+    if ( ( modeHOMARD == 1 ) && ( BoundaryOption % 5 == 0 ) && (codretexec == 0) )
+    {
+      INFOS ( "Suivi de frontière CAO" );
+      codret = ComputeCAO(myCase, myIteration, Option1, Option2) ;
+    }
+  }
+
   return codretexec ;
 }
 //=============================================================================
-// Calcul d'une iteration : partie specifique a l'adaptation
+// Calcul d'une iteration : partie spécifique à l'adaptation
 //=============================================================================
 CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option1, CORBA::Long Option2)
 {
-  MESSAGE ( "ComputeAdap" );
+  MESSAGE ( "ComputeAdap avec Option1 = " << Option1 << ", Option2 = " << Option2 );
 
   // A. Prealable
   // A.1. Bases
@@ -2670,11 +2695,11 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
     }
   };
 
-  // C. Le sous-repertoire de l'iteration precedente
+  // C. Le sous-répertoire de l'iteration precedente
   char* DirComputePa = ComputeDirPaManagement(myCase, myIteration);
   MESSAGE( ". DirComputePa = " << DirComputePa );
 
-  // D. Les donnees de l'adaptation HOMARD
+  // D. Les données de l'adaptation HOMARD
   // D.1. Le type de conformite
   int ConfType = myCase->GetConfType();
   MESSAGE ( ". ConfType = " << ConfType );
@@ -2783,14 +2808,221 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
   return codret ;
 }
 //=============================================================================
-// Creation d'un nom de sous-repertoire pour l'iteration au sein d'un repertoire parent
-//  nomrep : nom du repertoire parent
-//  num : le nom du sous-repertoire est sous la forme 'In', n est >= num
+// Calcul d'une iteration : partie spécifique au suivi de frontière CAO
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::ComputeCAO(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2)
+{
+  MESSAGE ( "ComputeCAO avec Option1 = " << Option1 << ", Option2 = " << Option2 );
+
+  // A. Prealable
+  // A.1. Bases
+  int codret = 0;
+  // A.2. Le sous-répertoire de l'iteration en cours de traitement
+  char* DirCompute = myIteration->GetDirName();
+  // A.3. Le maillage résultat de l'iteration en cours de traitement
+  char* MeshFile = myIteration->GetMeshFile();
+
+  // B. Les données pour FrontTrack
+  // B.1. Le maillage à modifier
+  const std::string theInputMedFile = MeshFile;
+  MESSAGE ( ". theInputMedFile  = " << theInputMedFile );
+
+  // B.2. Le maillage après modification : fichier identique
+  const std::string theOutputMedFile = MeshFile ;
+  MESSAGE ( ". theOutputMedFile = " << theInputMedFile );
+
+  // B.3. La liste des fichiers contenant les numéros des noeuds à bouger
+  std::vector< std::string > theInputNodeFiles ;
+  MESSAGE ( ". DirCompute = " << DirCompute );
+  int bilan ;
+  int icpt = 0 ;
+#ifndef WIN32
+  DIR *dp;
+  struct dirent *dirp;
+  dp  = opendir(DirCompute);
+  while ( (dirp = readdir(dp)) != NULL )
+  {
+    std::string file_name(dirp->d_name);
+    bilan = file_name.find("fr") ;
+    if ( bilan != string::npos )
+    {
+      std::stringstream filename_total ;
+      filename_total << DirCompute << "/" << file_name ;
+      theInputNodeFiles.push_back(filename_total.str()) ;
+      icpt += 1 ;
+    }
+  }
+#else
+  HANDLE hFind = INVALID_HANDLE_VALUE;
+  WIN32_FIND_DATA ffd;
+  hFind = FindFirstFile(DirNameStart, &ffd);
+  if (INVALID_HANDLE_VALUE != hFind) {
+    while (FindNextFile(hFind, &ffd) != 0) {
+      std::string file_name(ffd.cFileName);
+      bilan = file_name.find("fr") ;
+      if ( bilan != string::npos )
+      {
+        std::stringstream filename_total ;
+        filename_total << DirCompute << "/" << file_name ;
+        theInputNodeFiles.push_back(filename_total.str()) ;
+        icpt += 1 ;
+      }
+    }
+    FindClose(hFind);
+  }
+#endif
+  for ( int i = 0; i < icpt; i++ )
+  { MESSAGE ( ". theInputNodeFiles["<< i << "] = " << theInputNodeFiles[i] ); }
+
+  // B.4. Le fichier de la CAO
+  HOMARD::ListBoundaryGroupType* ListBoundaryGroupType = myCase->GetBoundaryGroup();
+  std::string BoundaryName = std::string((*ListBoundaryGroupType)[0]);
+  MESSAGE ( ". BoundaryName = " << BoundaryName );
+  HOMARD::HOMARD_Boundary_var myBoundary = myStudyContext._mesBoundarys[BoundaryName];
+  const std::string theXaoFileName = myBoundary->GetDataFile();
+  MESSAGE ( ". theXaoFileName = " << theXaoFileName );
+
+  // B.5. Parallélisme
+  bool theIsParallel = false;
+
+  // C. Lancement des projections
+  MESSAGE ( ". Lancement des projections" );
+  FrontTrack* myFrontTrack = new FrontTrack();
+  myFrontTrack->track(theInputMedFile, theOutputMedFile, theInputNodeFiles, theXaoFileName, theIsParallel);
+
+  // D. Transfert des coordonnées modifiées dans le fichier historique de HOMARD
+  //    On lance une exécution spéciale de HOMARD en attendant de savoir le faire avec MEDCoupling
+  MESSAGE ( ". Transfert des coordonnées" );
+  codret = ComputeCAObis(myIteration, Option1, Option2) ;
+
+  return codret ;
+}
+//=============================================================================
+//=============================================================================
+// Transfert des coordonnées en suivi de frontière CAO
+// Option1 >0 : appel depuis python
+//         <0 : appel depuis GUI
+// Option2 : multiple de nombres premiers
+//         1 : aucune option
+//        x2 : publication du maillage dans SMESH
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::ComputeCAObis(HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2)
+{
+  MESSAGE ( "ComputeCAObis, avec Option1 = " << Option1 << ", Option2 = " << Option2 );
+
+  // A. Prealable
+  int codret = 0;
+
+  // A.1. Controle de la possibilite d'agir
+  // A.1.1. Etat de l'iteration
+  int etat = myIteration->GetState();
+  MESSAGE ( "etat = "<<etat );
+  // A.1.2. L'iteration doit être calculee
+  if ( etat == 1 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This iteration is not computed.";
+    throw SALOME::SALOME_Exception(es);
+    return 1 ;
+  }
+  // A.2. Numero de l'iteration
+  //     siterp1 : numero de l'iteration a traiter
+  int NumeIter = myIteration->GetNumber();
+  std::string siterp1 ;
+  std::stringstream saux1 ;
+  saux1 << NumeIter ;
+  siterp1 = saux1.str() ;
+  if (NumeIter < 10) { siterp1 = "0" + siterp1 ; }
+  MESSAGE ( "siterp1 = "<<siterp1 );
+
+  // A.3. Le cas
+  const char* CaseName = myIteration->GetCaseName();
+  HOMARD::HOMARD_Cas_var myCase = myStudyContext._mesCas[CaseName];
+  ASSERT(!CORBA::is_nil(myCase));
+
+  // A.4. Le sous-répertoire de l'iteration a traiter
+  char* DirCompute = myIteration->GetDirName();
+  MESSAGE( ". DirCompute = " << DirCompute );
+
+  // C. Le fichier des messages
+  std::string LogFile = DirCompute ;
+  LogFile += "/Liste." + siterp1 + ".maj_coords.log" ;
+  MESSAGE (". LogFile = " << LogFile);
+  myIteration->SetFileInfo(LogFile.c_str());
+
+   // D. On passe dans le répertoire de l'iteration a calculer
+  MESSAGE ( ". On passe dans DirCompute = " << DirCompute );
+  CHDIR(DirCompute);
+
+  // E. Les données de l'exécution HOMARD
+  // E.1. L'objet du texte du fichier de configuration
+  HomardDriver* myDriver = new HomardDriver("", siterp1);
+  myDriver->TexteInit(DirCompute, LogFile, _Langue);
+
+  // E.2. Le maillage associe a l'iteration
+  const char* NomMesh = myIteration->GetMeshName();
+  MESSAGE ( ". NomMesh = " << NomMesh );
+  const char* MeshFile = myIteration->GetMeshFile();
+  MESSAGE ( ". MeshFile = " << MeshFile );
+
+  // E.3. Les données du traitement HOMARD
+  int iaux ;
+  myDriver->TexteMajCoords( NumeIter ) ;
+  iaux = 0 ;
+  myDriver->TexteMaillageHOMARD( DirCompute, siterp1, iaux ) ;
+  myDriver->TexteMaillage(NomMesh, MeshFile, 0);
+//
+  // E.4. Ecriture du texte dans le fichier
+  MESSAGE ( ". Ecriture du texte dans le fichier de configuration ; codret = "<<codret );
+  if (codret == 0)
+  { myDriver->CreeFichier(); }
+
+// F. Execution
+//
+  int codretexec = 1789 ;
+  if (codret == 0)
+  {
+    codretexec = myDriver->ExecuteHomard(Option1);
+    MESSAGE ( "Erreur en executant HOMARD : " << codretexec );
+  }
+
+  // G. Gestion des resultats
+  if (codret == 0)
+  {
+    // G.1. Le fichier des messages, dans tous les cas
+    const char* NomIteration = myIteration->GetName();
+    std::string Commentaire = "logmaj_coords" ;
+    PublishFileUnderIteration(NomIteration, LogFile.c_str(), Commentaire.c_str());
+    // G.2 Message d'erreur
+    if (codretexec != 0)
+    {
+      std::string text = "\n\nSee the file " + LogFile + "\n" ;
+      INFOS ( text ) ;
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = CORBA::string_dup(text.c_str());
+      throw SALOME::SALOME_Exception(es);
+
+      // On force le succes pour pouvoir consulter le fichier log
+      codretexec = 0 ;
+    }
+  }
+
+  // H. Menage et retour dans le répertoire du cas
+  if (codret == 0) { delete myDriver; }
+
+  return codret ;
+}
+//=============================================================================
+// Creation d'un nom de sous-répertoire pour l'iteration au sein d'un répertoire parent
+//  nomrep : nom du répertoire parent
+//  num : le nom du sous-répertoire est sous la forme 'In', n est >= num
 //=============================================================================
 char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
 {
   MESSAGE ( "CreateDirNameIter : nomrep ="<< nomrep << ", num = "<<num);
-  // On verifie que le repertoire parent existe
+  // On verifie que le répertoire parent existe
   int codret = CHDIR(nomrep) ;
   if ( codret != 0 )
   {
@@ -2802,11 +3034,11 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
   };
   std::string nomDirActuel = getenv("PWD") ;
   std::string DirName ;
-  // On boucle sur tous les noms possibles jusqu'a trouver un nom correspondant a un repertoire inconnu
+  // On boucle sur tous les noms possibles jusqu'a trouver un nom correspondant a un répertoire inconnu
   bool a_chercher = true ;
   while ( a_chercher )
   {
-    // On passe dans le repertoire parent
+    // On passe dans le répertoire parent
 
     CHDIR(nomrep);
     // On recherche un nom sous la forme Iabc, avec abc representant le numero
@@ -2820,7 +3052,7 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
     iaux << std::setw(jaux) << std::setfill('0') << num ;
     std::ostringstream DirNameA ;
     DirNameA << "I" << iaux.str();
-    // Si on ne pas peut entrer dans le repertoire, on doit verifier
+    // Si on ne pas peut entrer dans le répertoire, on doit verifier
     // que c'est bien un probleme d'absence
     if ( CHDIR(DirNameA.str().c_str()) != 0 )
     {
@@ -2864,29 +3096,29 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
   return CORBA::string_dup( DirName.c_str() );
 }
 //=============================================================================
-// Calcul d'une iteration : gestion du repertoire de calcul
-//        Si le sous-repertoire existe :
-//         etatMenage =  0 : on sort en erreur si le repertoire n'est pas vide
-//         etatMenage =  1 : on fait le menage du repertoire
+// Calcul d'une iteration : gestion du répertoire de calcul
+//        Si le sous-répertoire existe :
+//         etatMenage =  0 : on sort en erreur si le répertoire n'est pas vide
+//         etatMenage =  1 : on fait le menage du répertoire
 //         etatMenage = -1 : on ne fait rien
 //=============================================================================
 char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage)
 {
-  MESSAGE ( "ComputeDirManagement : repertoires pour le calcul" );
-  // B.2. Le repertoire du cas
+  MESSAGE ( "ComputeDirManagement : répertoires pour le calcul" );
+  // B.2. Le répertoire du cas
   const char* nomDirCase = myCase->GetDirName();
   MESSAGE ( ". nomDirCase = " << nomDirCase );
 
-  // B.3. Le sous-repertoire de l'iteration a calculer, puis le repertoire complet a creer
-  // B.3.1. Le nom du sous-repertoire
+  // B.3. Le sous-répertoire de l'iteration a calculer, puis le répertoire complet a creer
+  // B.3.1. Le nom du sous-répertoire
   const char* nomDirIt = myIteration->GetDirNameLoc();
 
-  // B.3.2. Le nom complet du sous-repertoire
+  // B.3.2. Le nom complet du sous-répertoire
   std::stringstream DirCompute ;
   DirCompute << nomDirCase << "/" << nomDirIt;
   MESSAGE (". DirCompute = " << DirCompute.str() );
 
-  // B.3.3. Si le sous-repertoire n'existe pas, on le cree
+  // B.3.3. Si le sous-répertoire n'existe pas, on le cree
   if (CHDIR(DirCompute.str().c_str()) != 0)
   {
 #ifndef WIN32
@@ -2896,24 +3128,24 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::
 #endif
     {
        // GERALD -- QMESSAGE BOX
-       std::cerr << "Pb Creation du repertoire DirCompute = " << DirCompute.str() << std::endl;
-       VERIFICATION("Pb a la creation du repertoire" == 0);
+       std::cerr << "Pb Creation du répertoire DirCompute = " << DirCompute.str() << std::endl;
+       VERIFICATION("Pb a la creation du répertoire" == 0);
     }
   }
   else
   {
-//  Le repertoire existe
+//  Le répertoire existe
 //  On demande de faire le menage de son contenu :
     if (etatMenage == 1)
     {
-      MESSAGE (". Menage du repertoire DirCompute = " << DirCompute.str());
+      MESSAGE (". Menage du répertoire DirCompute = " << DirCompute.str());
       std::string commande = "rm -rf " + DirCompute.str()+"/*" ;
       int codret = system(commande.c_str());
       if (codret != 0)
       {
         // GERALD -- QMESSAGE BOX
-        std::cerr << ". Menage du repertoire de calcul" << DirCompute.str() << std::endl;
-        VERIFICATION("Pb au menage du repertoire de calcul" == 0);
+        std::cerr << ". Menage du répertoire de calcul" << DirCompute.str() << std::endl;
+        VERIFICATION("Pb au menage du répertoire de calcul" == 0);
       }
     }
 //  On n'a pas demande de faire le menage de son contenu : on sort en erreur :
@@ -2962,16 +3194,16 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::
   return CORBA::string_dup( DirCompute.str().c_str() );
 }
 //=============================================================================
-// Calcul d'une iteration : gestion du repertoire de calcul de l'iteration parent
+// Calcul d'une iteration : gestion du répertoire de calcul de l'iteration parent
 //=============================================================================
 char* HOMARD_Gen_i::ComputeDirPaManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration)
 {
-  MESSAGE ( "ComputeDirPaManagement : repertoires pour le calcul" );
-  // Le repertoire du cas
+  MESSAGE ( "ComputeDirPaManagement : répertoires pour le calcul" );
+  // Le répertoire du cas
   const char* nomDirCase = myCase->GetDirName();
   MESSAGE ( ". nomDirCase = " << nomDirCase );
 
-  // Le sous-repertoire de l'iteration precedente
+  // Le sous-répertoire de l'iteration precedente
 
   const char* nomIterationParent = myIteration->GetIterParentName();
   HOMARD::HOMARD_Iteration_var myIterationParent = myStudyContext._mesIterations[nomIterationParent];
@@ -3064,11 +3296,8 @@ void HOMARD_Gen_i::DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HO
   for (int NumeComp = 0; NumeComp< numberOfCompos; NumeComp++)
   {
     std::string nomCompo = std::string((*mescompo)[NumeComp]);
-    if ((system(nomCompo.c_str())) != 0)
-    {
-      MESSAGE( "... nomCompo = " << nomCompo );
-      myDriver->TexteCompo(NumeComp, nomCompo);
-    }
+    MESSAGE( "... nomCompo = " << nomCompo );
+    myDriver->TexteCompo(NumeComp, nomCompo);
   }
   return ;
 }
@@ -3079,7 +3308,7 @@ void HOMARD_Gen_i::DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HO
 //    2. les liens avec les groupes
 //    3. un entier resumant le type de comportement pour les frontieres
 //=============================================================================
-void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver)
+int HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver)
 {
   MESSAGE ( "... DriverTexteBoundary" );
   // 1. Recuperation des frontieres
@@ -3113,17 +3342,24 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
       int BoundaryType = myBoundary->GetType();
       MESSAGE ( "... BoundaryType = " << BoundaryType );
       // 2.2.2. Ecriture selon le type
-      // 2.2.2.1. Cas d une frontiere discrete
-      if (BoundaryType == 0)
+      // 2.2.2.1. Cas d une frontiere CAO
+      if (BoundaryType == -1)
+      {
+//         const char* CAOFile = myBoundary->GetDataFile() ;
+//         MESSAGE ( ". CAOFile = " << CAOFile );
+        if ( BoundaryOption % 5 != 0 ) { BoundaryOption = BoundaryOption*5 ; }
+      }
+      // 2.2.2.2. Cas d une frontiere discrete
+      else if (BoundaryType == 0)
       {
         const char* MeshName = myBoundary->GetMeshName() ;
         MESSAGE ( ". MeshName = " << MeshName );
-        const char* MeshFile = myBoundary->GetMeshFile() ;
+        const char* MeshFile = myBoundary->GetDataFile() ;
         MESSAGE ( ". MeshFile = " << MeshFile );
         myDriver->TexteBoundaryDi( MeshName, MeshFile);
         if ( BoundaryOption % 2 != 0 ) { BoundaryOption = BoundaryOption*2 ; }
       }
-      // 2.2.2.1. Cas d une frontiere analytique
+      // 2.2.2.3. Cas d une frontiere analytique
       else
       {
         NumBoundaryAnalytical++ ;
@@ -3171,12 +3407,17 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
     // 3.1. Recuperation du nom du groupe
     std::string GroupName = std::string((*ListBoundaryGroupType)[NumBoundary+1]);
     MESSAGE ( "... GroupName = " << GroupName);
-    // 3.2. Cas d une frontiere discrete
-    if ( BoundaryType == 0 )
+    // 3.2. Cas d une frontiere CAO
+    if ( BoundaryType == -1 )
+    {
+      if ( GroupName.size() > 0 ) { myDriver->TexteBoundaryCAOGr ( GroupName ) ; }
+    }
+    // 3.3. Cas d une frontiere discrete
+    else if ( BoundaryType == 0 )
     {
       if ( GroupName.size() > 0 ) { myDriver->TexteBoundaryDiGr ( GroupName ) ; }
     }
-    // 3.3. Cas d une frontiere analytique
+    // 3.4. Cas d une frontiere analytique
     else
     {
       NumBoundaryAnalytical++ ;
@@ -3186,7 +3427,7 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
   // 4. Ecriture de l'option finale
   myDriver->TexteBoundaryOption(BoundaryOption);
 //
-  return ;
+  return BoundaryOption ;
 }
 //=============================================================================
 // Calcul d'une iteration : ecriture des interpolations dans le fichier de configuration
@@ -3259,7 +3500,7 @@ void HOMARD_Gen_i::DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIterati
           }
           jaux += 2 ;
         }
-        // Si aucun instant n'a ??t?? d??fini
+        // Si aucun instant n'a été défini
         if ( tsrvu == 0 )
         {
           NumField += 1 ;
@@ -3932,7 +4173,7 @@ void HOMARD_Gen_i::PublishFileUnderYACS(const char* nomYACS, const char* NomFich
 // Creation d'un schema YACS
 // nomCas : nom du cas a traiter
 // FileName : nom du fichier contenant le script de lancement du calcul
-// DirName : le repertoire de lancement des calculs du sch??ma
+// DirName : le répertoire de lancement des calculs du schéma
 //=============================================================================
 HOMARD::HOMARD_YACS_ptr HOMARD_Gen_i::CreateYACSSchema (const char* nomYACS, const char* nomCas, const char* ScriptFile, const char* DirName, const char* MeshFile)
 {
@@ -3989,7 +4230,7 @@ HOMARD::HOMARD_YACS_ptr HOMARD_Gen_i::CreateYACSSchema (const char* nomYACS, con
   myYACS->SetMaxNode( defaut_i ) ;
   defaut_i = GetYACSMaxElem() ;
   myYACS->SetMaxElem( defaut_i ) ;
-  // D.3. Fichier de sauvegarde dans le repertoire du cas
+  // D.3. Fichier de sauvegarde dans le répertoire du cas
   HOMARD::HOMARD_Cas_ptr caseyacs = GetCase(nomCas) ;
   std::string dirnamecase = caseyacs->GetDirName() ;
   std::string XMLFile ;
@@ -4004,7 +4245,7 @@ HOMARD::HOMARD_YACS_ptr HOMARD_Gen_i::CreateYACSSchema (const char* nomYACS, con
 CORBA::Long HOMARD_Gen_i::YACSWrite(const char* nomYACS)
 {
   INFOS ( "YACSWrite : Ecriture de " << nomYACS );
-// Le repertoire du cas
+// Le répertoire du cas
   HOMARD::HOMARD_YACS_var myYACS = myStudyContext._mesYACSs[nomYACS];
   ASSERT(!CORBA::is_nil(myYACS));
 // Le nom du fichier du schema
@@ -4094,7 +4335,7 @@ CORBA::Long HOMARD_Gen_i::YACSWriteOnFile(const char* nomYACS, const char* XMLFi
   MESSAGE ("pythonHypo :\n"<<pythonHypo<<"\n");
 
   // F. Le fichier du schema de reference
-  // HOMARD_ROOT_DIR : repertoire ou se trouve le module HOMARD
+  // HOMARD_ROOT_DIR : répertoire ou se trouve le module HOMARD
   std::string XMLFile_base ;
   if ( getenv("HOMARD_ROOT_DIR") != NULL ) { XMLFile_base = getenv("HOMARD_ROOT_DIR") ; }
   else
@@ -4110,12 +4351,12 @@ CORBA::Long HOMARD_Gen_i::YACSWriteOnFile(const char* nomYACS, const char* XMLFi
 //   if ( _Langue ==
   MESSAGE("XMLFile_base ="<<XMLFile_base);
 
-  // G. Lecture du schema de reference et insertion des donnees propres au fil de la rencontre des mots-cles
+  // G. Lecture du schema de reference et insertion des données propres au fil de la rencontre des mots-cles
   YACSDriver* myDriver = new YACSDriver(XMLFile, DirName);
   std::ifstream fichier( XMLFile_base.c_str() );
-  if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+  if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
   {
-    // G.1. Lecture du schema de reference et insertion des donnees propres au fil de la rencontre des mots-cles
+    // G.1. Lecture du schema de reference et insertion des données propres au fil de la rencontre des mots-cles
     std::string ligne; // variable contenant chaque ligne lue
     std::string mot_cle;
     while ( std::getline( fichier, ligne ) )
@@ -4132,7 +4373,7 @@ CORBA::Long HOMARD_Gen_i::YACSWriteOnFile(const char* nomYACS, const char* XMLFi
       // G.1.4. Les options du cas
       else if ( mot_cle == "Iter_1_Case_Options" )
       { myDriver->Texte_Iter_1_Case_Options(pythonCas); }
-      // G.1.5. Execution de HOMARD : le repertoire du cas
+      // G.1.5. Execution de HOMARD : le répertoire du cas
       else if ( mot_cle == "HOMARD_Exec_DirName" )
       { myDriver->Texte_HOMARD_Exec_DirName(); }
       // G.1.6. Execution de HOMARD : le nom du maillage
@@ -4286,16 +4527,21 @@ std::string HOMARD_Gen_i::YACSDriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase,
       int BoundaryType = myBoundary->GetType();
       MESSAGE ( "... BoundaryType = " << BoundaryType);
       const char* MeshName ;
-      const char* MeshFile ;
-      if (BoundaryType == 0)
+      const char* DataFile ;
+      if (BoundaryType == -1)
+      {
+        DataFile = myBoundary->GetDataFile() ;
+        MESSAGE ( ". CAOFile = " << DataFile );
+      }
+      else if (BoundaryType == 0)
       {
         MeshName = myBoundary->GetMeshName() ;
         MESSAGE ( ". MeshName = " << MeshName );
-        MeshFile = myBoundary->GetMeshFile() ;
-        MESSAGE ( ". MeshFile = " << MeshFile );
+        DataFile = myBoundary->GetDataFile() ;
+        MESSAGE ( ". MeshFile = " << DataFile );
       }
       std::string texte_control_0 ;
-      texte_control_0 = myDriver->Texte_Iter_1_Boundary(BoundaryType, pythonStructure, methode, BoundaryName, MeshName, MeshFile );
+      texte_control_0 = myDriver->Texte_Iter_1_Boundary(BoundaryType, pythonStructure, methode, BoundaryName, MeshName, DataFile );
       texte_control += texte_control_0 ;
       // 5. Memorisation du traitement
       ListeBoundaryTraitees.push_back( BoundaryName );
@@ -4985,7 +5231,7 @@ void HOMARD_Gen_i::SetPreferences( )
   File += "/bin/salome/VERSION" ;
   MESSAGE ( "File = "<<File ) ;
   std::ifstream fichier0( File.c_str() ) ;
-  if ( fichier0 ) // ce test ??choue si le fichier n'est pas ouvert
+  if ( fichier0 ) // ce test échoue si le fichier n'est pas ouvert
   {
     std::string ligne; // variable contenant chaque ligne lue
     while ( std::getline( fichier0, ligne ) )
@@ -5011,7 +5257,7 @@ void HOMARD_Gen_i::SetPreferences( )
     MESSAGE ( "PrefFile = "<<PrefFile ) ;
 
     std::ifstream fichier( PrefFile.c_str() );
-    if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+    if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
     {
       bool section_langue = false ;
       bool section_homard = false ;
index 856e25f148c0b497c83b9c0a3e40b10e21436e1a..d93c0cf11977818e402bca40e56b5df517a582af 100644 (file)
 #include "HOMARD_Gen.hxx"
 #include "HomardDriver.hxx"
 #include "YACSDriver.hxx"
+#include "FrontTrack.hxx"
 #include "SALOME_Component_i.hxx"
 #include "SALOME_NamingService.hxx"
 #include "Utils_CorbaException.hxx"
 
-
 #include <string>
 #include <map>
 
@@ -60,8 +60,10 @@ public:
 
 // Les creations
   HOMARD::HOMARD_Boundary_ptr     CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary);
+  HOMARD::HOMARD_Boundary_ptr     CreateBoundaryCAO(const char* nomBoundary,
+                                                    const char* DataFile);
   HOMARD::HOMARD_Boundary_ptr     CreateBoundaryDi (const char* nomBoundary,
-                                                    const char* MeshName, const char* FileName);
+                                                    const char* MeshName, const char* DataFile);
   HOMARD::HOMARD_Boundary_ptr     CreateBoundaryCylinder (const char* nomBoundary,
                                       CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
                                       CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
@@ -175,11 +177,13 @@ public:
 
   CORBA::Long                     Compute(const char* nomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option1, CORBA::Long Option2);
   CORBA::Long                     ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option1, CORBA::Long Option2);
+  CORBA::Long                     ComputeCAO(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2);
+  CORBA::Long                     ComputeCAObis(HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2);
   char*                           ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage);
   char*                           ComputeDirPaManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration);
   void                            DriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
   void                            DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
-  void                            DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
+  int                             DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
   void                            DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
 
   char*                           VerifieDir(const char* nomDir);
index 9326644406929dbb798c1f47e0a2f76a5b2b6dfc..d27d7859baac0a8959df5ef556742ade38ce426d 100755 (executable)
@@ -24,11 +24,13 @@ SET(HOMARD_TEST_FILES
   test_3.py
   test_4.py
   test_5.py
+  test_6.py
   tutorial_1.py
   tutorial_2.py
   tutorial_3.py
   tutorial_4.py
   tutorial_5.py
+  tutorial_6.py
   test_util.py
 )
 
index f9df746f3fb1a142d75fb1d50cc2d68737579974..a95627c3f36b97cab88d5c15123a19a8507d8918 100644 (file)
@@ -28,11 +28,13 @@ test_2
 test_3
 test_4
 test_5
+test_6
 tutorial_1
 tutorial_2
 tutorial_3
 tutorial_4
 tutorial_5
+tutorial_6
 )
 
 FOREACH(tfile ${HOMARD_TEST_FILES})
index 9690918fe9e0e9f9bee9de6c97267c2134437ea2..ca1a4c93bb92351cad2e72a35fff3de00edd90e3 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test test_1
 """
-__revision__ = "V4.01"
+__revision__ = "V4.03"
 
 #========================================================================
 TEST_NAME = "test_1"
@@ -29,7 +29,6 @@ DEBUG = False
 N_ITER_TEST_FILE = 3
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -40,19 +39,11 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
 # ==================================
 
 salome.salome_init()
@@ -108,10 +99,10 @@ Python script for HOMARD
     zones_1_et_2.AddZone('Zone_1_2', 1)
     laux = zones_1_et_2.GetZones()
     nbzone = len(laux) // 2
-    jaux = 0
-    for iaux in range(nbzone) :
-      print(hyponame_2, " : ", dico[laux[jaux+1]], "sur la zone", laux[jaux])
-      jaux += 2
+    iaux = 0
+    for _ in range(nbzone) :
+      print(hyponame_2, " : ", dico[laux[iaux+1]], "sur la zone", laux[iaux])
+      iaux += 2
     print(hyponame_2, " : champ utilisé :", zones_1_et_2.GetFieldName())
     if ( len (zones_1_et_2.GetFieldName()) > 0 ) :
       print(".. caractéristiques de l'adaptation :", zones_1_et_2.GetField())
@@ -205,7 +196,7 @@ try :
   ERROR = homard_exec()
   if ERROR :
     raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
+except RuntimeError as eee:
   raise Exception('Pb in homard_exec: '+str(eee.message))
 #
 # Test of the results
index f4f58a2189c3c26c1c0c1d1ff386186d34b7cd97..ad6cff7f3e4a5ef1b7a3ce53666d37f1d69032a5 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test test_2
 """
-__revision__ = "V4.01"
+__revision__ = "V4.03"
 
 #========================================================================
 TEST_NAME = "test_2"
@@ -29,7 +29,6 @@ DEBUG = False
 N_ITER_TEST_FILE = 3
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -40,19 +39,11 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
 # ==================================
 
 salome.salome_init()
@@ -177,8 +168,8 @@ try :
   ERROR = homard_exec()
   if ERROR :
     raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
+except RuntimeError as eee:
+  raise Exception('Pb in homard_exec: '+str(eee.message))
 #
 # Test of the results
 #
index cb324205722acdfedfb622482b40c99ce006f124..87175a93f21e046b9d3a8474ef7fc6f1a7784468 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test test_3
 """
-__revision__ = "V4.01"
+__revision__ = "V4.04"
 
 #========================================================================
 TEST_NAME = "test_3"
@@ -30,7 +30,6 @@ N_BOUCLE = 2
 N_ITER_TEST_FILE = 2
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -41,19 +40,11 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
 # ==================================
 
 salome.salome_init()
@@ -112,7 +103,7 @@ Python script for HOMARD
         mesh_file = os.path.join(REP_DATA, TEST_NAME + '.00.med')
         case_test_3 = HOMARD.CreateCase(TEST_NAME, 'MOYEU', mesh_file)
         case_test_3.SetDirName(DIRCASE)
-        case_test_3.AddBoundaryGroup('courbes', '')
+        case_test_3.AddBoundary('courbes')
         case_test_3.AddBoundaryGroup('cyl_ext', 'EXT')
         case_test_3.AddBoundaryGroup('cyl_int', 'INT')
         case_test_3.AddBoundaryGroup('sphere_1', 'END_1')
@@ -211,8 +202,8 @@ try :
   ERROR = homard_exec()
   if ERROR :
     raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
+except RuntimeError as eee:
+  raise Exception('Pb in homard_exec: '+str(eee.message))
 #
 # Test of the results
 #
index 6a83c6f8e1bd60aa7dd1a724e63f6ce32907790f..ddb7d7d1d83fdf9f2e0c80583d5d30f9cf9ac572 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test test_4
 """
-__revision__ = "V3.01"
+__revision__ = "V3.03"
 
 #========================================================================
 TEST_NAME = "test_4"
@@ -32,7 +32,6 @@ DY = 400.
 DZ = 200.
 #========================================================================
 import os
-import tempfile
 import sys
 import numpy as np
 import salome
@@ -48,19 +47,11 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
 # ==================================
 
 salome.salome_init()
@@ -128,7 +119,7 @@ Python script for GEOM and SMESH
     try:
       ficmed = os.path.join(DIRCASE, 'maill.00.med')
       box_m.ExportMED(ficmed)
-    except Exception as eee:
+    except IOError as eee:
       error = 2
       raise Exception('ExportMED() failed. ' + str(eee))
   #
@@ -220,7 +211,7 @@ Python script for HOMARD
     laux = hypo_4_1.GetZones()
     nbzone = len(laux) // 2
     jaux = 0
-    for iaux in range(nbzone) :
+    for _ in range(nbzone) :
       print(hyponame_1, " : ", dico[laux[jaux+1]], "sur la zone", laux[jaux])
       jaux += 2
   # Creation of the hypothesis hypo_4_2
@@ -232,7 +223,7 @@ Python script for HOMARD
     laux = hypo_4_2.GetZones()
     nbzone = len(laux) // 2
     jaux = 0
-    for iaux in range(nbzone) :
+    for _ in range(nbzone) :
       print(hyponame_2, " : ", dico[laux[jaux+1]], "sur la zone", laux[jaux])
       jaux += 2
   # Creation of the hypothesis DISTANCE INVERSE
@@ -320,7 +311,7 @@ try :
   ERROR = geom_smesh_exec()
   if ERROR :
     raise Exception('Pb in geom_smesh_exec')
-except Exception as eee:
+except RuntimeError as eee:
   raise Exception('Pb in geom_smesh_exec: '+str(eee.message))
 
 HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
@@ -333,7 +324,7 @@ try :
   ERROR = homard_exec()
   if ERROR :
     raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
+except RuntimeError as eee:
   raise Exception('Pb in homard_exec: '+str(eee.message))
 #
 # Test of the results
index 439426c02ef8b994aa0f19c1aa8fd115cc1fc963..125a9626a95ef280df7272fe4e2cf79fb501f853 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Specific conditions for Code_Saturne
 Test test_5
 """
-__revision__ = "V2.01"
+__revision__ = "V2.03"
 
 #========================================================================
 TEST_NAME = "test_5"
@@ -38,7 +38,6 @@ LG_Z = 160.
 MESH_NAME = "MESH"
 #========================================================================
 import os
-import tempfile
 import sys
 import numpy as np
 import salome
@@ -52,19 +51,11 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
 # ==================================
 
 salome.salome_init()
@@ -103,11 +94,11 @@ Python script for MED
 #
     coordinates = list()
     coo_z = -0.5*LG_Z
-    for kaux in range(nbno_z) :
+    for _ in range(nbno_z) :
       coo_y = -0.5*LG_Y
-      for jaux in range(nbno_y) :
+      for _ in range(nbno_y) :
         coo_x = -0.5*LG_X
-        for iaux in range(nbno_x) :
+        for _ in range(nbno_x) :
           coordinates.append(coo_x)
           coordinates.append(coo_y)
           coordinates.append(coo_z)
@@ -167,7 +158,7 @@ Python script for MED
       ficmed = os.path.join(DIRCASE, 'maill.00.med')
       #print "Ecriture du maillage dans le fichier", ficmed
       meshMEDFile3D.write(ficmed, 2)
-    except Exception as eee:
+    except IOError as eee:
       error = 2
       raise Exception('MEDFileUMesh.write() failed. ' + str(eee))
   #
@@ -308,7 +299,7 @@ try :
   ERROR = mesh_exec()
   if ERROR :
     raise Exception('Pb in mesh_exec')
-except Exception as eee:
+except RuntimeError as eee:
   raise Exception('Pb in mesh_exec: '+str(eee.message))
 
 HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
@@ -321,7 +312,7 @@ try :
   ERROR = homard_exec()
   if ERROR :
     raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
+except RuntimeError as eee:
   raise Exception('Pb in homard_exec: '+str(eee.message))
 #
 # Test of the results
diff --git a/src/tests/Test/test_6.py b/src/tests/Test/test_6.py
new file mode 100755 (executable)
index 0000000..c329efd
--- /dev/null
@@ -0,0 +1,341 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2016  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
+#
+"""
+Python script for HOMARD
+Test test_6
+"""
+__revision__ = "V1.04"
+
+#========================================================================
+TEST_NAME = "test_6"
+DEBUG = False
+N_ITER_TEST_FILE = 3
+#
+TAILLE = 10.
+LG_ARETE = TAILLE*2.5
+#========================================================================
+import os
+import sys
+import HOMARD
+import salome
+#
+# ==================================
+PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
+# Repertoire des scripts utilitaires
+REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
+REP_PYTHON = os.path.normpath(REP_PYTHON)
+sys.path.append(REP_PYTHON)
+from test_util import saveGeometry
+from test_util import get_dir
+from test_util import test_results
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================= Debut de la fonction ==================================
+#
+def create_geom(nom_obj, taille, verbose=False) :
+  """
+Création de la géométrie
+  """
+#
+  erreur = 0
+#
+  if verbose :
+    texte = "Geometrie '%s'\n" % nom_obj
+    texte += "Taille de base = %f" % taille
+    print (texte)
+#
+  from salome.geom import geomBuilder
+  geompy = geomBuilder.New()
+#
+# 1. Les sommets et la première ligne
+#
+  vertex_1 = geompy.MakeVertex( 0.*taille,  0.*taille, 0.*taille, theName = "V1")
+  vertex_2 = geompy.MakeVertex( 5.*taille,  2.*taille, 0.*taille, theName = "V2")
+  vertex_3 = geompy.MakeVertex(10.*taille,  1.*taille, 0.*taille, theName = "V3")
+  vertex_4 = geompy.MakeVertex(16.*taille,  4.*taille, 0.*taille, theName = "V4")
+  vertex_5 = geompy.MakeVertex(16.*taille, 10.*taille, 0.*taille, theName = "V5")
+#
+  courbe_0 = geompy.MakeInterpol([vertex_1, vertex_2, vertex_3, vertex_4, vertex_5], False, False, theName="courbe_0")
+#
+# 2. Les sommets et la seconde ligne
+#
+  sommet_1 = geompy.MakeVertex( 0.*taille,  0.*taille, 20.*taille, theName = "S1")
+  sommet_2 = geompy.MakeVertex( 6.*taille, -5.*taille, 20.*taille, theName = "S2")
+  sommet_3 = geompy.MakeVertex(11.*taille, -2.*taille, 20.*taille, theName = "S3")
+  sommet_4 = geompy.MakeVertex(12.*taille,  3.*taille, 20.*taille, theName = "S4")
+  sommet_5 = geompy.MakeVertex(16.*taille, 10.*taille, 20.*taille, theName = "S5")
+#
+  courbe_1 = geompy.MakeInterpol([sommet_1, sommet_2, sommet_3, sommet_4, sommet_5], False, False, theName="courbe_1")
+#
+# 3. La face de base
+#
+  structure_g = geompy.MakeFilling([courbe_0, courbe_1], theName=nom_obj)
+#
+# 4. Groupes : on cherche les entites par des proximités avec des shapes bien choisies
+#
+  l_groupes_g = list()
+#
+  shape = geompy.GetFaceNearPoint (structure_g, vertex_2)
+  nom = "Voile"
+  groupe_g = geompy.CreateGroup(structure_g, geompy.ShapeType["FACE"], nom)
+  geompy.UnionList ( groupe_g, [shape] )
+  l_groupes_g.append( (nom, groupe_g, 2) )
+#
+  shape = geompy.GetEdgeNearPoint (structure_g, vertex_2)
+  nom = "C_0"
+  groupe_g = geompy.CreateGroup(structure_g, geompy.ShapeType["EDGE"], nom)
+  geompy.UnionList ( groupe_g, [shape] )
+  l_groupes_g.append( (nom, groupe_g, 1) )
+#
+  shape = geompy.GetEdgeNearPoint (structure_g, sommet_2)
+  nom = "C_1"
+  groupe_g = geompy.CreateGroup(structure_g, geompy.ShapeType["EDGE"], nom)
+  geompy.UnionList ( groupe_g, [shape] )
+  l_groupes_g.append( (nom, groupe_g, 1) )
+#
+  shape = geompy.GetEdge (structure_g, vertex_1, sommet_1)
+  nom = "D_0"
+  groupe_g = geompy.CreateGroup(structure_g, geompy.ShapeType["EDGE"], nom)
+  geompy.UnionList ( groupe_g, [shape] )
+  l_groupes_g.append( (nom, groupe_g, 1) )
+#
+  shape = geompy.GetEdge (structure_g, vertex_5, sommet_5)
+  nom = "D_1"
+  groupe_g = geompy.CreateGroup(structure_g, geompy.ShapeType["EDGE"], nom)
+  geompy.UnionList ( groupe_g, [shape] )
+  l_groupes_g.append( (nom, groupe_g, 1) )
+#
+  return erreur, structure_g, l_groupes_g
+#
+#==========================  Fin de la fonction ==================================
+#
+#========================= Debut de la fonction ==================================
+#
+def create_mail(lg_arete, structure_g, l_groupes_g, rep_mail, verbose=False) :
+  """
+Création du maillage
+  """
+#
+  erreur = 0
+  message = ""
+  ficmed = ""
+#
+  while not erreur :
+#
+    nom = structure_g.GetName()
+    if verbose :
+      texte = "Maillage de '%s'\n" % nom
+      texte += "lg_arete = %f\n" % lg_arete
+      texte += "rep_mail = '%s'" % rep_mail
+      print (texte)
+#
+    from salome.smesh import smeshBuilder
+    smesh = smeshBuilder.New()
+#
+# 2. Maillage de calcul
+#
+    maill_00 = smesh.Mesh(structure_g)
+    smesh.SetName(maill_00.GetMesh(), nom)
+#
+    MG_CADSurf = maill_00.Triangle(algo=smeshBuilder.MG_CADSurf)
+    smesh.SetName(MG_CADSurf.GetAlgorithm(), 'MG_CADSurf')
+#
+    MG_CADSurf_Parameters = MG_CADSurf.Parameters()
+    smesh.SetName(MG_CADSurf_Parameters, 'MG_CADSurf Triangles')
+    MG_CADSurf_Parameters.SetPhySize( lg_arete )
+    MG_CADSurf_Parameters.SetMinSize( lg_arete/20. )
+    MG_CADSurf_Parameters.SetMaxSize( lg_arete*5. )
+    MG_CADSurf_Parameters.SetChordalError( lg_arete )
+    MG_CADSurf_Parameters.SetAngleMesh( 12. )
+#
+# 3. Les groupes issus de la géométrie
+#
+    for taux in l_groupes_g :
+      groupe_m = maill_00.Group(taux[1])
+      smesh.SetName(groupe_m, taux[0])
+#
+# 4. Calcul
+#
+    isDone = maill_00.Compute()
+    if not isDone :
+      message += "Probleme dans le maillage de la surface."
+      erreur = 13
+      break
+#
+# 5. Export MED
+#
+    ficmed = os.path.join(rep_mail,'maill.00.med')
+    texte = "Ecriture du fichier '%s'" % ficmed
+    if verbose :
+      print (texte)
+    try:
+      maill_00.ExportMED(ficmed)
+    except IOError as eee:
+      error = 2
+      raise Exception('ExportMED() failed. ' + str(eee))
+#
+    break
+#
+  return erreur, message, ficmed
+#
+#==========================  Fin de la fonction ==================================
+#
+#========================= Debut de la fonction ==================================
+#
+def homard_exec(nom, ficmed, xao_file, verbose=False):
+  """
+Python script for HOMARD
+  """
+  erreur = 0
+  message = ""
+#
+  while not erreur :
+    #
+    HOMARD.UpdateStudy()
+    #
+    # Frontière
+    # =========
+    if verbose :
+      print(". Frontière")
+    cao_name = "CAO_" + nom
+    la_frontiere = HOMARD.CreateBoundaryCAO(cao_name, xao_file)
+    #
+    # Hypotheses
+    # ==========
+    if verbose :
+      print(". Hypothèses")
+    hyponame = "hypo_" + nom
+    l_hypothese = HOMARD.CreateHypothesis(hyponame)
+    l_hypothese.SetUnifRefinUnRef(1)
+    #
+    # Cas
+    # ===
+    if verbose :
+      print(". Cas")
+    le_cas = HOMARD.CreateCase('case_'+nom, nom, ficmed)
+    le_cas.SetDirName(DIRCASE)
+    le_cas.AddBoundary(cao_name)
+    #
+    # Creation of the iterations
+    # ==========================
+    if verbose :
+      option = 2
+    else :
+      option = 1
+    #
+    for niter in range(1, N_ITER_TEST_FILE+1):
+      if verbose :
+        print(". Itération numéro %d" % niter)
+      iter_name = "I_" + nom + "_%02d" % niter
+      if ( niter == 1 ) :
+        l_iteration = le_cas.NextIteration(iter_name)
+      else :
+        l_iteration = l_iteration.NextIteration(iter_name)
+      l_iteration.SetMeshName(nom)
+      mesh_file = os.path.join(DIRCASE, "maill.%02d.med" % niter)
+      l_iteration.SetMeshFile(mesh_file)
+      l_iteration.AssociateHypo(hyponame)
+      erreur = l_iteration.Compute(1, option)
+      if erreur :
+        erreur = niter
+        break
+    #
+    break
+  #
+  if erreur :
+    message += "Erreur au calcul de l'itération %d" % erreur
+  #
+  return erreur, message
+#
+#==========================  Fin de la fonction ==================================
+#
+#
+ERREUR = 0
+MESSAGE = ""
+while not ERREUR :
+  #
+  VERBOSE = DEBUG
+  #
+  # A. Geometry
+  #
+  ERREUR, STRUCTURE_G, L_GROUPES_G = create_geom(TEST_NAME, TAILLE, VERBOSE)
+  if ERREUR :
+    MESSAGE = "The construction of the geometry failed."
+    break
+  #
+  # B. Save the geometry
+  #
+  XAO_FILE = os.path.join(DIRCASE, TEST_NAME+".xao")
+  try :
+    ERREUR = saveGeometry(XAO_FILE, TEST_NAME, "test_salome_"+TEST_NAME)
+  except IOError as eee:
+    ERREUR = os.error
+    MESSAGE = str(eee.message)
+  #
+  if ERREUR :
+    MESSAGE += "Pb in saveGeometry"
+    break
+  #
+  # C. Mesh
+  #
+  ERREUR, MESSAGE, FICMED = create_mail(LG_ARETE, STRUCTURE_G, L_GROUPES_G, DIRCASE, VERBOSE)
+  if ERREUR :
+    break
+  #
+  # D. Exec of HOMARD-SALOME
+  #
+  HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+  assert HOMARD is not None, "Impossible to load homard engine"
+  HOMARD.SetLanguageShort("fr")
+#
+  try:
+    ERREUR, MESSAGE = homard_exec(TEST_NAME, FICMED, XAO_FILE, VERBOSE)
+  except RuntimeError as eee:
+    ERREUR = os.error
+    MESSAGE = str(eee.message)
+  #
+  if ERREUR :
+    MESSAGE += "Pb in homard_exec"
+    break
+  #
+  # E. Test of the results
+  #
+  N_REP_TEST_FILE = N_ITER_TEST_FILE
+  DESTROY_DIR = not DEBUG
+  test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+  #
+  break
+#
+if ERREUR:
+  MESSAGE = "\nErreur numéro %d\n" % ERREUR + MESSAGE
+  raise Exception(MESSAGE)
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser()
+  iparameters.getSession().restoreVisualState(1)
+
index 6fb8c33f1e3d40fbfbd120c1b59562cd3194a248..960c0e8dafb814808456df205695df057ce17e32 100755 (executable)
 Python script for HOMARD
 Utilitaires pour les tests
 """
-__revision__ = "V3.01"
+__revision__ = "V4.02"
 
 import os
+import tempfile
 import MEDLoader as ml
 import shutil
 #========================================================================
 #========================================================================
+def get_dir(path_homard, test_name, debug=False) :
+  """
+Get directories for the test.
+Copyright EDF 2018
+  """
+#
+# Répertoire des données du test
+  rep_data = os.path.join(path_homard, "share", "salome", "homardsamples")
+  rep_data = os.path.normpath(rep_data)
+#
+# Répertoire des résultats
+  if debug :
+    dircase = os.path.join("/tmp", test_name)
+    if ( os.path.isdir(dircase) ) :
+      remove_dir(dircase)
+    os.mkdir(dircase)
+  else :
+    dircase = tempfile.mkdtemp(prefix=test_name)
+#
+  return rep_data, dircase
+#
+#========================================================================
+#========================================================================
+def get_dir_tutorial(path_homard) :
+  """
+Get directory for the tutorial.
+Copyright EDF 2018
+  """
+#
+# Répertoire des données du tutorial
+  data_tutorial = os.path.join(path_homard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
+  data_tutorial = os.path.normpath(data_tutorial)
+#
+  return data_tutorial
+#========================================================================
+#========================================================================
 def remove_dir(directory) :
   """
 Empties, then removes a directory.
@@ -61,16 +98,15 @@ Copyright EDF-R&D 2014
   #
   test_file_suff = "apad.%02d.bilan" % n_iter_test_file
   rep_test_file = "I%02d" % n_rep_test_file
+#
+# Existence du fichier de référence
   #
   test_file = os.path.join(rep_test, test_name + "." + test_file_suff)
   mess_error_ref = "\nReference file: " + test_file
-#
-# Existence du fichier de référence
-#
+  #print ("test_file = %s" % test_file)
   try :
-    file = open (test_file, "r")
-    les_lignes_ref = file.readlines()
-    file.close()
+    with open (test_file, "r") as fichier :
+      les_lignes_ref = fichier.readlines()
   except :
     mess_error = mess_error_ref + "\nThis file does not exist.\n"
     destroy_dir = False
@@ -80,9 +116,8 @@ Copyright EDF-R&D 2014
 #
   test_file = os.path.join(dircase, rep_test_file, test_file_suff)
   if os.path.isfile (test_file) :
-    file = open (test_file, "r")
-    les_lignes = file.readlines()
-    file.close()
+    with open (test_file, "r") as fichier :
+      les_lignes = fichier.readlines()
   else :
     mess_error  = "\nResult file: " + test_file
     mess_error += "\nThis file does not exist.\n"
@@ -164,7 +199,7 @@ def saveGeometry( xao_file, name, author="" ):
 #========================================================================
 #========================================================================
 #
-def repositionnement (rep_calc, fic_med_brut, fic_med_new, xao_file, verbose=False) :
+def repositionnement (rep_calc, fic_med_brut, fic_med_new, xao_file, menage=True, verbose=False) :
 #
   """
 Pilote le repositionnement des noeuds qui ont bougé
@@ -173,12 +208,14 @@ Entrées :
   fic_med_brut : fichier MED du calcul avec les coordonnées avant projection
   fic_med_new  : fichier MED du calcul avec les coordonnées après projection
   xao_file : fichier XAO de la géométrie
+  menage : Suppression du fichier fic_med_brut
   """
   if verbose :
     ligne =    "rep_calc     = %s" % rep_calc
     ligne += "\nfic_med_brut = %s" % fic_med_brut
     ligne += "\nfic_med_new  = %s" % fic_med_new
     ligne += "\nxao_file     = %s" % xao_file
+    ligne += "\nmenage       = %d" % menage
     print(ligne)
 
   message = ""
@@ -186,8 +223,6 @@ Entrées :
   while not erreur :
 #
 # 1. l_fr = liste des fichiers des lignes/surfaces a suivre
-#           Les fichiers des numéros de groupes par frontière sont renommés selon le support
-#           à condition de ne pas être vide.
 #
     fic_hom_med = None
     laux = os.listdir(rep_calc)
@@ -197,33 +232,8 @@ Entrées :
     icpt_2D = 0
     for fic in laux :
       #print "\t" + fic
-      if ( fic[:5] == 'fort.' ) :
-        fic_fort = os.path.join(rep_calc, fic)
-        fichier = open (fic_fort, "r")
-        les_lignes = fichier.readlines()
-        fichier.close()
-        os.remove(fic_fort)
-        a_faire = False
-        for ligne in les_lignes[1:] :
-          laux1 = ligne.split()
-          if ( len(laux1) >= 3 ) :
-            a_faire = True
-            break
-        if a_faire :
-          if ( "1D" in les_lignes[0] ) :
-            nomfic_bis = "fr1D.%02d" % icpt_1D
-            icpt_1D += 1
-          else :
-            nomfic_bis = "fr2D.%02d" % icpt_2D
-            icpt_2D += 1
-          fic_1 = os.path.join(rep_calc, nomfic_bis)
-          fichier = open (fic_1, "w")
-          for ligne in les_lignes[1:] :
-            if ( ( "1D" not in ligne ) and ( "2D" not in ligne ) ) :
-              fichier.write(ligne)
-          fichier.close()
-          #print "\t\tajout de %s" % fic_1
-          l_fr.append(fic_1)
+      if ( fic[:2] == 'fr' ) :
+        l_fr.append(os.path.join(rep_calc, fic))
       elif ( fic[-4:] == '.med' ) :
         fic_hom_med = os.path.join(rep_calc, fic)
         #print "\t\treperage de fic_hom_med =", fic_hom_med
@@ -259,11 +269,14 @@ Entrées :
       #if erreur :
         #break
 #
-# 2.3. Ménage de l'ancien fichier MED
+# 2.3. Ménage éventuel de l'ancien fichier MED
 #
-      if ( fic_med_brut != fic_med_new ) :
-        print("Suppression du fichier %s" % fic_med_new)
-        os.remove(fic_med_brut)
+      if menage :
+#
+        if ( fic_med_brut != fic_med_new ) :
+          if verbose :
+            print("Suppression du fichier %s" % fic_med_brut)
+          os.remove(fic_med_brut)
 #
 # 3. Renommage du fichier si aucun noeud n'est concerné
 #
@@ -306,9 +319,8 @@ Entrées :
 # 1. Recherche des inforamtions permanentes dans le fichier de configuration
 #
     fic_conf = os.path.join(rep_calc, "HOMARD.Configuration")
-    fichier = open (fic_conf, "r")
-    les_lignes = fichier.readlines()
-    fichier.close()
+    with open (fic_conf, "r") as fichier :
+      les_lignes = fichier.readlines()
 #
     ligne0 = ""
     icpt = 0
@@ -336,22 +348,22 @@ Entrées :
 # 2. Création du fichier de configuration
 #
     fic_conf_sv = os.path.join(rep_calc, "HOMARD.Configuration.majc")
-    fichier = open (fic_conf_sv, "w")
-#
-    ligne = ligne0
-    ligne += "ModeHOMA 5\n"
-    fic = os.path.join(rep_calc, "Liste.%s.maj_coords.log" % s_iter)
-    ligne += "ListeStd %s\n" % fic
-    ligne += "CCMaiN__ %s\n" % fic_med_calc
-    ligne += "RepeTrav %s\n" % rep_calc
-    ligne += "RepeInfo %s\n" % rep_calc
-    ligne += "Action   homa\n"
-    ligne += "CCAssoci med\n"
-    ligne += "EcriFiHO N_SANS_FRONTIERE\n"
-    ligne += "MessInfo 10\n"
-#
-    fichier.write(ligne)
-    fichier.close()
+#
+    with open (fic_conf_sv, "w") as fichier :
+#
+      ligne = ligne0
+      ligne += "ModeHOMA 5\n"
+      fic = os.path.join(rep_calc, "Liste.%s.maj_coords.log" % s_iter)
+      ligne += "ListeStd %s\n" % fic
+      ligne += "CCMaiN__ %s\n" % fic_med_calc
+      ligne += "RepeTrav %s\n" % rep_calc
+      ligne += "RepeInfo %s\n" % rep_calc
+      ligne += "Action   homa\n"
+      ligne += "CCAssoci med\n"
+      ligne += "EcriFiHO N_SANS_FRONTIERE\n"
+      ligne += "MessInfo 10\n"
+#
+      fichier.write(ligne)
 #
 # 3. Mise à jour
 # 3.1. Détermination de l'exécutable
index 96a3868a970a8658e09f62034a8548b047625ee0..e8105bcef3868f2bc70806eaa75f08c8b43ee3cd 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test tutorial_1 associe au tutorial 1
 """
-__revision__ = "V4.01"
+__revision__ = "V4.04"
 
 #========================================================================
 TEST_NAME = "tutorial_1"
@@ -29,7 +29,6 @@ DEBUG = False
 N_ITER_TEST_FILE = 3
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -40,22 +39,14 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
+from test_util import get_dir_tutorial
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
-# Repertoire des donnees du tutorial
-DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
+DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD)
+# ==================================
 sys.path.append(DATA_TUTORIAL)
 from tutorial_util import gzip_gunzip
 # ==================================
@@ -67,70 +58,109 @@ import iparameters
 IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
 IPAR.append("AP_MODULES_LIST", "Homard")
 #
-#========================================================================
-#========================================================================
-def homard_exec():
+#
+#========================= Debut de la fonction ==================================
+#
+def homard_exec(nom, ficmed, verbose=False):
   """
 Python script for HOMARD
   """
+  erreur = 0
+  message = ""
   #
-  homard.UpdateStudy()
-  #
-  # Hypotheses
-  # ==========
-  hypo_1 = homard.CreateHypothesis('hypo_1')
-  hypo_1.SetUnifRefinUnRef(1)
-  #
-  # Cas
-  # ===
-  case_1 = homard.CreateCase('case_1', 'MAILL', DATA_TUTORIAL+'/tutorial_1.00.med')
-  case_1.SetDirName(DIRCASE)
+  while not erreur :
   #
-  # Iterations
-  # ==========
-  # Iteration "iter_1_1"
-  iter_1_1 = case_1.NextIteration('iter_1_1')
-  iter_1_1.SetMeshName('MESH')
-  iter_1_1.SetMeshFile(DIRCASE+'/maill.01.med')
-  iter_1_1.AssociateHypo('hypo_1')
-  error = iter_1_1.Compute(1, 2)
+    HOMARD.UpdateStudy()
+    #
+    # Hypotheses
+    # ==========
+    if verbose :
+      print(". Hypothèses")
+    hypo_1 = HOMARD.CreateHypothesis('hypo_1')
+    hypo_1.SetUnifRefinUnRef(1)
+    #
+    # Cas
+    # ===
+    if verbose :
+      print(". Cas")
+    le_cas = HOMARD.CreateCase('case_1', nom, ficmed)
+    le_cas.SetDirName(DIRCASE)
+    #
+    # Itérations
+    # ==========
+    if verbose :
+      option = 2
+    else :
+      option = 1
+    if verbose :
+      print(". Itérations")
+    # Iteration "iter_1_1"
+    iter_1_1 = le_cas.NextIteration('iter_1_1')
+    iter_1_1.SetMeshName('MESH')
+    iter_1_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+    iter_1_1.AssociateHypo('hypo_1')
+    erreur = iter_1_1.Compute(1, option)
+    if erreur :
+      break
 
-  # 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.02.med')
-  iter_1_2.AssociateHypo('hypo_1')
-  error = iter_1_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(os.path.join(DIRCASE, "maill.01.med"))
+    iter_1_2.AssociateHypo('hypo_1')
+    erreur = iter_1_2.Compute(1, option)
+    if erreur :
+      break
 
-  # Iteration "iter_1_3"
-  iter_1_3 = iter_1_2.NextIteration('iter_1_3')
-  iter_1_3.SetMeshName('MESH')
-  iter_1_3.SetMeshFile(DIRCASE+'/maill.03.med')
-  iter_1_3.AssociateHypo('hypo_1')
-  error = iter_1_3.Compute(1, 2)
+    # Iteration "iter_1_3"
+    iter_1_3 = iter_1_2.NextIteration('iter_1_3')
+    iter_1_3.SetMeshName('MESH')
+    iter_1_3.SetMeshFile(os.path.join(DIRCASE, "maill.03.med"))
+    iter_1_3.AssociateHypo('hypo_1')
+    erreur = iter_1_3.Compute(1, option)
+    if erreur :
+      break
   #
-  return error
-
-#========================================================================
-
-homard = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
-assert homard is not None, "Impossible to load homard engine"
-homard.SetLanguageShort("fr")
+    break
+  #
+  if erreur :
+    message += "Erreur au calcul de l'itération %d" % erreur
+  #
+  return erreur, message
 #
-# Exec of HOMARD-SALOME
+#==========================  Fin de la fonction ==================================
 #
-try :
-  ERROR = homard_exec()
-  if ERROR :
-    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
+ERREUR = 0
+MESSAGE = ""
+while not ERREUR :
+  #
+  # A. Exec of HOMARD-SALOME
+  #
+  HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+  assert HOMARD is not None, "Impossible to load homard engine"
+  HOMARD.SetLanguageShort("fr")
 #
-# Test of the results
+  FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med")
+  try:
+    ERREUR, MESSAGE = homard_exec("MAILL", FICMED, DEBUG)
+  except RuntimeError as eee:
+    ERREUR = 2
+    MESSAGE = str(eee.message)
+  #
+  if ERREUR :
+    MESSAGE += "Pb in homard_exec"
+    break
+  #
+  # B. Test of the results
+  #
+  N_REP_TEST_FILE = N_ITER_TEST_FILE
+  DESTROY_DIR = not DEBUG
+  test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+  #
+  break
 #
-N_REP_TEST_FILE = N_ITER_TEST_FILE
-DESTROY_DIR = not DEBUG
-test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+if ERREUR:
+  raise Exception(MESSAGE)
 #
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 1, 1)
index 585523c117eb64916232836df192a7e79fc2decc..7f89207c0d2091f30180175e516f44b1534a2bb3 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test tutorial_2 associe au tutorial 2
 """
-__revision__ = "V4.01"
+__revision__ = "V4.04"
 
 #========================================================================
 TEST_NAME = "tutorial_2"
@@ -29,7 +29,6 @@ DEBUG = False
 N_ITER_TEST_FILE = 2
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -40,22 +39,14 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
+from test_util import get_dir_tutorial
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
-# Repertoire des donnees du tutorial
-DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
+DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD)
+# ==================================
 sys.path.append(DATA_TUTORIAL)
 from tutorial_util import gzip_gunzip
 # ==================================
@@ -67,81 +58,125 @@ import iparameters
 IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
 IPAR.append("AP_MODULES_LIST", "Homard")
 #
-#========================================================================
-#========================================================================
-def homard_exec():
+#
+#========================= Debut de la fonction ==================================
+#
+def homard_exec(nom, ficmed, verbose=False):
   """
 Python script for HOMARD
   """
+  erreur = 0
+  message = ""
   #
-  HOMARD.UpdateStudy()
+  while not erreur :
+    #
+    HOMARD.UpdateStudy()
+    #
+    # Creation des zones
+    # ==================
+    if verbose :
+      print(". Zones")
+    # Box "Zone_12_0"
+    zone_12_0 = HOMARD.CreateZoneBox ('Zone_12_0', -0.1, 1.1, -0.1, 1.1, 0.9, 1.1)
+    #
+    # Sphere "Zone_12_1"
+    zone_12_1 = HOMARD.CreateZoneSphere ('Zone_12_1', 0., 0., 0., 1.05)
+    #
+    # Box "Zone_12_2"
+    zone_12_2 = HOMARD.CreateZoneBox ('Zone_12_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
+    #
+    # Hypotheses
+    # ==========
+    if verbose :
+      print(". Hypothèses")
+    # Hypothese "hypo_2"
+    # ==================
+    hypo_2 = HOMARD.CreateHypothesis('hypo_2')
+    hypo_2.AddZone('Zone_12_1', 1)
+    hypo_2.AddZone('Zone_12_0', 1)
+    #
+    # Hypothese "hypo_2_bis"
+    # ======================
+    hypo_2_bis = HOMARD.CreateHypothesis('hypo_2_bis')
+    hypo_2_bis.AddZone('Zone_12_0', -1)
+    hypo_2_bis.AddZone('Zone_12_2', 1)
+    #
+    # Cas
+    # ===
+    if verbose :
+      print(". Cas")
+    le_cas = HOMARD.CreateCase('case_2', nom, ficmed)
+    le_cas.SetDirName(DIRCASE)
+    #
+    # Itérations
+    # ==========
+    if verbose :
+      option = 2
+    else :
+      option = 1
+    if verbose :
+      print(". Itérations")
+    #
+    # Iteration "iter_2_1"
+    # ====================
+    iter_2_1 = le_cas.NextIteration('iter_2_1')
+    iter_2_1.SetMeshName('M_1')
+    iter_2_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+    iter_2_1.AssociateHypo('hypo_2')
+    erreur = iter_2_1.Compute(1, option)
+    if erreur :
+      break
+    #
+    # Iteration "iter_2_2"
+    # ====================
+    iter_2_2 = iter_2_1.NextIteration('iter_2_2')
+    iter_2_2.SetMeshName('M_2')
+    iter_2_2.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+    iter_2_2.AssociateHypo('hypo_2_bis')
+    erreur = iter_2_2.Compute(1, option)
+    if erreur :
+      break
   #
-  # Creation des zones
-  # ==================
-  # Box "Zone_12_0"
-  zone_12_0 = HOMARD.CreateZoneBox ('Zone_12_0', -0.1, 1.1, -0.1, 1.1, 0.9, 1.1)
+    break
   #
-  # Sphere "Zone_12_1"
-  zone_12_1 = HOMARD.CreateZoneSphere ('Zone_12_1', 0., 0., 0., 1.05)
+  if erreur :
+    message += "Erreur au calcul de l'itération %d" % erreur
   #
-  # Box "Zone_12_2"
-  zone_12_2 = HOMARD.CreateZoneBox ('Zone_12_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
+  return erreur, message
+#
+#==========================  Fin de la fonction ==================================
+#
+ERREUR = 0
+MESSAGE = ""
+while not ERREUR :
   #
-  # Hypothese "hypo_2"
-  # ==================
-  hypo_2 = HOMARD.CreateHypothesis('hypo_2')
-  hypo_2.AddZone('Zone_12_1', 1)
-  hypo_2.AddZone('Zone_12_0', 1)
+  # A. Exec of HOMARD-SALOME
   #
-  # Hypothese "hypo_2_bis"
-  # ======================
-  hypo_2_bis = HOMARD.CreateHypothesis('hypo_2_bis')
-  hypo_2_bis.AddZone('Zone_12_0', -1)
-  hypo_2_bis.AddZone('Zone_12_2', 1)
+  HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+  assert HOMARD is not None, "Impossible to load homard engine"
+  HOMARD.SetLanguageShort("fr")
+#
+  FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med")
+  try:
+    ERREUR, MESSAGE = homard_exec("MZERO", FICMED, DEBUG)
+  except RuntimeError as eee:
+    ERREUR = 2
+    MESSAGE = str(eee.message)
   #
-  # Cas
-  # ===
-  case_2 = HOMARD.CreateCase('case_2', 'MZERO', DATA_TUTORIAL+'/tutorial_2.00.med')
-  case_2.SetDirName(DIRCASE)
+  if ERREUR :
+    MESSAGE += "Pb in homard_exec"
+    break
   #
-  # Iteration "iter_2_1"
-  # ====================
-  iter_2_1 = case_2.NextIteration('iter_2_1')
-  iter_2_1.SetMeshName('M_1')
-  iter_2_1.SetMeshFile(DIRCASE+'/maill.01.med')
-  iter_2_1.AssociateHypo('hypo_2')
-  error = iter_2_1.Compute(1, 2)
+  # B. Test of the results
   #
-  # Iteration "iter_2_2"
-  # ====================
-  iter_2_2 = iter_2_1.NextIteration('iter_2_2')
-  iter_2_2.SetMeshName('M_2')
-  iter_2_2.SetMeshFile(DIRCASE+'/maill.02.med')
-  iter_2_2.AssociateHypo('hypo_2_bis')
-  error = iter_2_2.Compute(1, 2)
+  N_REP_TEST_FILE = N_ITER_TEST_FILE
+  DESTROY_DIR = not DEBUG
+  test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
   #
-  return error
-
-#========================================================================
-
-HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
-assert HOMARD is not None, "Impossible to load HOMARD engine"
-HOMARD.SetLanguageShort("fr")
-#
-# Exec of HOMARD-SALOME
-#
-try :
-  ERROR = homard_exec()
-  if ERROR :
-    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
-#
-# Test of the results
+  break
 #
-N_REP_TEST_FILE = N_ITER_TEST_FILE
-DESTROY_DIR = not DEBUG
-test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+if ERREUR:
+  raise Exception(MESSAGE)
 #
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 2, 1)
index d9b843715087a5b55de52a002d80581f77c1da0e..ae8e15354f89d32cfb7b187aa6d286ff12e2d7bb 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test tutorial_3 associe au tutorial 3
 """
-__revision__ = "V4.01"
+__revision__ = "V4.04"
 
 #========================================================================
 TEST_NAME = "tutorial_3"
@@ -29,7 +29,6 @@ DEBUG = False
 N_ITER_TEST_FILE = 2
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -40,22 +39,14 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
+from test_util import get_dir_tutorial
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
-# Repertoire des donnees du tutorial
-DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
+DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD)
+# ==================================
 sys.path.append(DATA_TUTORIAL)
 from tutorial_util import gzip_gunzip
 # ==================================
@@ -67,110 +58,153 @@ import iparameters
 IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
 IPAR.append("AP_MODULES_LIST", "Homard")
 #
-#========================================================================
-#========================================================================
-def homard_exec():
+#
+#========================= Debut de la fonction ==================================
+#
+def homard_exec(nom, ficmed, verbose=False):
   """
 Python script for HOMARD
   """
+  erreur = 0
+  message = ""
   #
-  HOMARD.UpdateStudy()
+  while not erreur :
+    #
+    HOMARD.UpdateStudy()
+    #
+    # Hypotheses
+    # ==========
+    if verbose :
+      print(". Hypothèses")
+    # Hypothese "hypo_0vers1"
+    # =======================
+    hypo_0vers1 = HOMARD.CreateHypothesis('hypo_0vers1')
+    # Characterization of the field
+    hypo_0vers1.SetField('SOLU_0__QIRE_ELEM_SIGM__________')
+    hypo_0vers1.SetUseComp(0)
+    hypo_0vers1.AddComp('ERREST          ')
+    hypo_0vers1.SetRefinThr(3, 1.0)
+    hypo_0vers1.SetTypeFieldInterp(2)
+    hypo_0vers1.AddFieldInterp('SOLU_0__DEPL____________________')
+    hypo_0vers1.AddFieldInterp('SOLU_0__ERRE_ELEM_SIGM__________')
+    #
+    # Hypothese "hypo_1vers2"
+    # =======================
+    hypo_1vers2 = HOMARD.CreateHypothesis('hypo_1vers2')
+    # Characterization of the field
+    hypo_1vers2.SetField('SOLU_1__QIRE_ELEM_SIGM__________')
+    hypo_1vers2.SetUseComp(0)
+    hypo_1vers2.AddComp('ERREST          ')
+    hypo_1vers2.SetRefinThr(3, 1.5)
+    hypo_1vers2.SetUnRefThr(3, 6.)
+    hypo_1vers2.SetTypeFieldInterp(2)
+    hypo_1vers2.AddFieldInterp('SOLU_1__DEPL____________________')
+    hypo_1vers2.AddFieldInterp('SOLU_1__QIRE_ELEM_SIGM__________')
+    #
+    # Hypothese "hypo_1vers2_bis"
+    # ===========================
+    hypo_1vers2_bis = HOMARD.CreateHypothesis('hypo_1vers2_bis')
+    # Characterization of the field
+    hypo_1vers2_bis.SetField('SOLU_1__DEPL____________________')
+    hypo_1vers2_bis.SetUseComp(1)
+    hypo_1vers2_bis.AddComp('DX')
+    hypo_1vers2_bis.AddComp('DY')
+    hypo_1vers2_bis.AddComp('DZ')
+    hypo_1vers2_bis.SetRefinThr(1, 0.0001)
+    hypo_1vers2_bis.SetUnRefThr(1, 0.000001)
+    hypo_1vers2_bis.SetTypeFieldInterp(0)
+    #
+    # Cas
+    # ===
+    if verbose :
+      print(". Cas")
+    le_cas = HOMARD.CreateCase('case_3', nom, ficmed)
+    le_cas.SetDirName(DIRCASE)
+    #
+    # Itérations
+    # ==========
+    if verbose :
+      option = 2
+    else :
+      option = 1
+    if verbose :
+      print(". Itérations")
+    # Iteration "iter_3_1"
+    # ====================
+    iter_3_1 = le_cas.NextIteration('iter_3_1')
+    iter_3_1.SetMeshName('H_1')
+    iter_3_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+    iter_3_1.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.00.med"))
+    iter_3_1.SetTimeStepRank( 1, 1)
+    iter_3_1.AssociateHypo('hypo_0vers1')
+    erreur = iter_3_1.Compute(1, option)
+    if erreur :
+      break
+    #
+    # Iteration "iter_3_2"
+    # ====================
+    iter_3_2 = iter_3_1.NextIteration('iter_3_2')
+    iter_3_2.SetMeshName('H_2')
+    iter_3_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
+    iter_3_2.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.01.med"))
+    iter_3_2.SetTimeStepRank(1, 1)
+    iter_3_2.AssociateHypo('hypo_1vers2')
+    erreur = iter_3_2.Compute(1, option)
+    if erreur :
+      break
+    #
+    # Iteration "iter_3_2_bis"
+    # ========================
+    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(os.path.join(DIRCASE, "maill.02.bis.med"))
+    iter_3_2_bis.SetFieldFile(os.path.join(DATA_TUTORIAL, "tutorial_3.01.med"))
+    iter_3_2_bis.SetTimeStepRank(1, 1)
+    iter_3_2_bis.AssociateHypo('hypo_1vers2_bis')
+    erreur = iter_3_2_bis.Compute(1, option)
+    if erreur :
+      break
   #
-  # Hypothese "hypo_0vers1"
-  # =======================
-  hypo_0vers1 = HOMARD.CreateHypothesis('hypo_0vers1')
-  # Characterization of the field
-  hypo_0vers1.SetField('SOLU_0__QIRE_ELEM_SIGM__________')
-  hypo_0vers1.SetUseComp(0)
-  hypo_0vers1.AddComp('ERREST          ')
-  hypo_0vers1.SetRefinThr(3, 1.0)
-  hypo_0vers1.SetTypeFieldInterp(2)
-  hypo_0vers1.AddFieldInterp('SOLU_0__DEPL____________________')
-  hypo_0vers1.AddFieldInterp('SOLU_0__ERRE_ELEM_SIGM__________')
+    break
   #
-  # Hypothese "hypo_1vers2"
-  # =======================
-  hypo_1vers2 = HOMARD.CreateHypothesis('hypo_1vers2')
-  # Characterization of the field
-  hypo_1vers2.SetField('SOLU_1__QIRE_ELEM_SIGM__________')
-  hypo_1vers2.SetUseComp(0)
-  hypo_1vers2.AddComp('ERREST          ')
-  hypo_1vers2.SetRefinThr(3, 1.5)
-  hypo_1vers2.SetUnRefThr(3, 6.)
-  hypo_1vers2.SetTypeFieldInterp(2)
-  hypo_1vers2.AddFieldInterp('SOLU_1__DEPL____________________')
-  hypo_1vers2.AddFieldInterp('SOLU_1__QIRE_ELEM_SIGM__________')
+  if erreur :
+    message += "Erreur au calcul de l'itération %d" % erreur
+  #
+  return erreur, message
+#
+#==========================  Fin de la fonction ==================================
+#
+ERREUR = 0
+MESSAGE = ""
+while not ERREUR :
   #
-  # Hypothese "hypo_1vers2_bis"
-  # ===========================
-  hypo_1vers2_bis = HOMARD.CreateHypothesis('hypo_1vers2_bis')
-  # Characterization of the field
-  hypo_1vers2_bis.SetField('SOLU_1__DEPL____________________')
-  hypo_1vers2_bis.SetUseComp(1)
-  hypo_1vers2_bis.AddComp('DX')
-  hypo_1vers2_bis.AddComp('DY')
-  hypo_1vers2_bis.AddComp('DZ')
-  hypo_1vers2_bis.SetRefinThr(1, 0.0001)
-  hypo_1vers2_bis.SetUnRefThr(1, 0.000001)
-  hypo_1vers2_bis.SetTypeFieldInterp(0)
+  # A. Exec of HOMARD-SALOME
   #
-  # Cas
-  # ===
-  case_3 = HOMARD.CreateCase('case_3', 'G_0', DATA_TUTORIAL+'/tutorial_3.00.med')
-  case_3.SetDirName(DIRCASE)
+  HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+  assert HOMARD is not None, "Impossible to load homard engine"
+  HOMARD.SetLanguageShort("fr")
+#
+  FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med")
+  try:
+    ERREUR, MESSAGE = homard_exec("G_0", FICMED, DEBUG)
+  except RuntimeError as eee:
+    ERREUR = 2
+    MESSAGE = str(eee.message)
   #
-  # Iteration "iter_3_1"
-  # ====================
-  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_TUTORIAL+'/tutorial_3.00.med')
-  iter_3_1.SetTimeStepRank( 1, 1)
-  iter_3_1.AssociateHypo('hypo_0vers1')
-  error = iter_3_1.Compute(1, 2)
+  if ERREUR :
+    MESSAGE += "Pb in homard_exec"
+    break
   #
-  # Iteration "iter_3_2"
-  # ====================
-  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_TUTORIAL+'/tutorial_3.01.med')
-  iter_3_2.SetTimeStepRank(1, 1)
-  iter_3_2.AssociateHypo('hypo_1vers2')
-  error = iter_3_2.Compute(1, 2)
+  # B. Test of the results
   #
-  # Iteration "iter_3_2_bis"
-  # ========================
-  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_TUTORIAL+'/tutorial_3.01.med')
-  iter_3_2_bis.SetTimeStepRank(1, 1)
-  iter_3_2_bis.AssociateHypo('hypo_1vers2_bis')
-  error = iter_3_2_bis.Compute(1, 2)
+  N_REP_TEST_FILE = 3
+  DESTROY_DIR = not DEBUG
+  test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
   #
-  return error
-
-#========================================================================
-
-HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
-assert HOMARD is not None, "Impossible to load HOMARD engine"
-HOMARD.SetLanguageShort("fr")
-#
-# Exec of HOMARD-SALOME
-#
-try :
-  ERROR = homard_exec()
-  if ERROR :
-    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
-#
-# Test of the results
+  break
 #
-N_REP_TEST_FILE = 3
-DESTROY_DIR = not DEBUG
-test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+if ERREUR:
+  raise Exception(MESSAGE)
 #
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 3, 1)
index 1853abe37ebe0de6ac537196adb8f553c9cc4a71..61ee052c91f9afd33cd78ec705470d2487fc0724 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test tutorial_4 associe au tutorial 4
 """
-__revision__ = "V4.01"
+__revision__ = "V5.03"
 
 #========================================================================
 TEST_NAME = "tutorial_4"
@@ -29,7 +29,6 @@ DEBUG = False
 N_ITER_TEST_FILE = 3
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -40,22 +39,14 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
+from test_util import get_dir_tutorial
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
-# Repertoire des donnees du tutorial
-DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
+DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD)
+# ==================================
 sys.path.append(DATA_TUTORIAL)
 from tutorial_util import gzip_gunzip
 # ==================================
@@ -67,97 +58,136 @@ import iparameters
 IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
 IPAR.append("AP_MODULES_LIST", "Homard")
 #
-#========================================================================
-#========================================================================
-def homard_exec():
+#
+#========================= Debut de la fonction ==================================
+#
+def homard_exec(nom, ficmed, xao_file, verbose=True):
   """
 Python script for HOMARD
   """
-  #
-  HOMARD.UpdateStudy()
+  erreur = 0
+  message = ""
 #
-  # Frontieres
-  # ==========
-  boun_4_1 = HOMARD.CreateBoundaryDi('intersection', 'PIQUAGE', DATA_TUTORIAL+'/tutorial_4.fr.med')
+  while not erreur :
+    #
+    HOMARD.UpdateStudy()
+    #
+    # Frontières
+    # ==========
+    if verbose :
+      print(". Frontières")
+    cao_name = "CAO_" + nom
+    la_frontiere = HOMARD.CreateBoundaryCAO(cao_name, xao_file)
+    #
+    # Hypotheses
+    # ==========
+    if verbose :
+      print(". Hypothèses")
+    # Creation of the hypothesis hypo_0_1
+    l_hypothese_0_1 = HOMARD.CreateHypothesis('hypo_4_0_1')
+    l_hypothese_0_1.SetUnifRefinUnRef(1)
+    l_hypothese_0_1.AddGroup('IN1')
+    l_hypothese_0_1.AddGroup('IN2')
+    l_hypothese_0_1.AddGroup('T1_INT_I')
+    l_hypothese_0_1.AddGroup('T1_INT_O')
+    l_hypothese_0_1.AddGroup('T2_INT')
+    # Creation of the hypothesis hypo_1_2
+    l_hypothese_1_2 = HOMARD.CreateHypothesis('hypo_4_1_2')
+    l_hypothese_1_2.SetUnifRefinUnRef(1)
+    l_hypothese_1_2.AddGroup('T1_EXT_I')
+    l_hypothese_1_2.AddGroup('T1_EXT_O')
+    l_hypothese_1_2.AddGroup('T2_EXT')
+    # Creation of the hypothesis hypo_2_3
+    l_hypothese_2_3 = HOMARD.CreateHypothesis('hypo_4_2_3')
+    l_hypothese_2_3.SetUnifRefinUnRef(1)
+    l_hypothese_2_3.AddGroup('INT_I')
+    l_hypothese_2_3.AddGroup('INT_E')
+    l_hypothese_2_3.AddGroup('IN1')
+    l_hypothese_2_3.AddGroup('IN2')
+    #
+    # Cas
+    # ===
+    if verbose :
+      print(". Cas")
+    le_cas = HOMARD.CreateCase('case_'+nom, nom, ficmed)
+    le_cas.SetDirName(DIRCASE)
+    le_cas.AddBoundary(cao_name)
+    #
+    # Itérations
+    # ==========
+    if verbose :
+      option = 2
+    else :
+      option = 1
+    if verbose :
+      print(". Itérations")
+    # Iteration iter_4_1 : raffinement selon les faces internes
+    iter_4_1 = le_cas.NextIteration('iter_4_1')
+    iter_4_1.SetMeshName('PIQUAGE_1')
+    iter_4_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+    iter_4_1.AssociateHypo('hypo_4_0_1')
+    erreur = iter_4_1.Compute(1, option)
+    print ("erreur = %d" % erreur)
+    if erreur :
+      break
+    # 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(os.path.join(DIRCASE, "maill.02.med"))
+    iter_4_2.AssociateHypo('hypo_4_1_2')
+    erreur = iter_4_2.Compute(1, option)
+    if erreur :
+      break
+    # 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(os.path.join(DIRCASE, "maill.03.med"))
+    iter_4_3.AssociateHypo('hypo_4_2_3')
+    erreur = iter_4_3.Compute(1, option)
+    if erreur :
+      break
   #
-  boun_4_2 = HOMARD.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.)
+    break
   #
-  boun_4_3 = HOMARD.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
+  if erreur :
+    message += "Erreur au calcul de l'itération %d" % erreur
   #
-  boun_4_4 = HOMARD.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
+  return erreur, message
+#
+#==========================  Fin de la fonction ==================================
+#
+ERREUR = 0
+MESSAGE = ""
+while not ERREUR :
   #
-  boun_4_5 = HOMARD.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
+  # A. Exec of HOMARD-SALOME
   #
-  # Hypotheses
-  # ==========
-  # Creation of the hypothesis hypo_4
-  hypo_4 = HOMARD.CreateHypothesis('hypo_4')
-  hypo_4.SetUnifRefinUnRef(1)
-  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.SetUnifRefinUnRef(1)
-  hypo_4_bis.AddGroup('T1_EXT_I')
-  hypo_4_bis.AddGroup('T1_EXT_O')
-  hypo_4_bis.AddGroup('T2_EXT')
+  HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+  assert HOMARD is not None, "Impossible to load homard engine"
+  HOMARD.SetLanguageShort("fr")
+#
+  FICMED = os.path.join(DATA_TUTORIAL, "tutorial_4.00.med")
+  XAO_FILE = os.path.join(DATA_TUTORIAL, TEST_NAME+".xao")
+  try:
+    ERREUR, MESSAGE = homard_exec("PIQUAGE", FICMED, XAO_FILE, DEBUG)
+  except RuntimeError as eee:
+    ERREUR = 2
+    MESSAGE = str(eee.message)
   #
-  # Cas
-  # ===
-  case_4 = HOMARD.CreateCase('case_4', 'PIQUAGE', DATA_TUTORIAL+'/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' )
+  if ERREUR :
+    MESSAGE += "Pb in homard_exec"
+    break
   #
-  # Iterations
-  # ==========
-  # 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')
-  error = iter_4_1.Compute(1, 2)
-  # 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')
-  error = iter_4_2.Compute(1, 2)
-  # 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')
-  error = iter_4_3.Compute(1, 2)
+  # B. Test of the results
   #
-  return error
-
-#========================================================================
-
-HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
-assert HOMARD is not None, "Impossible to load HOMARD engine"
-HOMARD.SetLanguageShort("fr")
-#
-# Exec of HOMARD-SALOME
-#
-try :
-  ERROR = homard_exec()
-  if ERROR :
-    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
-#
-# Test of the results
+  N_REP_TEST_FILE = N_ITER_TEST_FILE
+  DESTROY_DIR = not DEBUG
+  test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+  #
+  break
 #
-N_REP_TEST_FILE = N_ITER_TEST_FILE
-DESTROY_DIR = not DEBUG
-test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+if ERREUR:
+  raise Exception(MESSAGE)
 #
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 4, 1)
index 00234d92fb2d8ff8ef17af2d77a0a0b754ae903a..499a195f6113a66afd4ba91cd2d6223d7b03b5a8 100755 (executable)
@@ -21,7 +21,7 @@
 Python script for HOMARD
 Test tutorial_5 associe au tutorial 5
 """
-__revision__ = "V4.01"
+__revision__ = "V4.04"
 
 #========================================================================
 TEST_NAME = "tutorial_5"
@@ -29,7 +29,6 @@ DEBUG = False
 N_ITER_TEST_FILE = 2
 #========================================================================
 import os
-import tempfile
 import sys
 import HOMARD
 import salome
@@ -40,22 +39,14 @@ PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
 REP_PYTHON = os.path.normpath(REP_PYTHON)
 sys.path.append(REP_PYTHON)
-from test_util import remove_dir
+from test_util import get_dir
+from test_util import get_dir_tutorial
 from test_util import test_results
-# Repertoire des donnees du test
-REP_DATA = os.path.join(PATH_HOMARD, "share", "salome", "homardsamples")
-REP_DATA = os.path.normpath(REP_DATA)
-# Repertoire des resultats
-if DEBUG :
-  DIRCASE = os.path.join("/tmp", TEST_NAME)
-  if ( os.path.isdir(DIRCASE) ) :
-    remove_dir(DIRCASE)
-  os.mkdir(DIRCASE)
-else :
-  DIRCASE = tempfile.mkdtemp()
-# Repertoire des donnees du tutorial
-DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
+DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD)
+# ==================================
 sys.path.append(DATA_TUTORIAL)
 from tutorial_util import gzip_gunzip
 # ==================================
@@ -67,81 +58,126 @@ import iparameters
 IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
 IPAR.append("AP_MODULES_LIST", "Homard")
 #
-#========================================================================
-#========================================================================
-def homard_exec():
+#
+#========================= Debut de la fonction ==================================
+#
+def homard_exec(nom, ficmed, nomfr, ficfrmed, verbose=False):
   """
 Python script for HOMARD
   """
+  erreur = 0
+  message = ""
+#
+  while not erreur :
+    #
+    HOMARD.UpdateStudy()
+    #
+    # Frontiere
+    # =========
+    if verbose :
+      print(". Frontière")
+    # Creation of the discrete boundary Boun_5_1
+    boun_5_1 = HOMARD.CreateBoundaryDi('Boun_5_1', nomfr, ficfrmed)
+    #
+    # Creation des zones
+    # ==================
+    if verbose :
+      print(". Zones")
+    # Creation of the disk with hole enveloppe
+    enveloppe = HOMARD.CreateZoneDiskWithHole( 'enveloppe', 0., 0., 250., 193., 1 )
+    # Creation of the rectangle quart_sup
+    quart_sup = HOMARD.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 )
+    #
+    # Hypotheses
+    # ==========
+    if verbose :
+      print(". Hypothèses")
+    # Creation of the hypothesis hypo_5
+    hypo_5 = HOMARD.CreateHypothesis('hypo_5')
+    hypo_5.AddZone('enveloppe', 1)
+    # Creation of the hypothesis hypo_5_bis
+    hypo_5_bis = HOMARD.CreateHypothesis('hypo_5_bis')
+    hypo_5_bis.AddZone('quart_sup', 1)
+    #
+    # Cas
+    # ===
+    if verbose :
+      print(". Cas")
+    le_cas = HOMARD.CreateCase('case_5', nom, ficmed)
+    le_cas.SetDirName(DIRCASE)
+    le_cas.SetConfType(1)
+    le_cas.AddBoundary('Boun_5_1')
+    #
+    # Itérations
+    # ==========
+    if verbose :
+      option = 2
+    else :
+      option = 1
+    if verbose :
+      print(". Itérations")
+    #
+    # Iteration "iter_5_1"
+    # ====================
+    iter_5_1 = le_cas.NextIteration('iter_5_1')
+    iter_5_1.SetMeshName('COEUR_2D_01')
+    iter_5_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+    iter_5_1.AssociateHypo('hypo_5')
+    erreur = iter_5_1.Compute(1, option)
+    if erreur :
+      break
+    #
+    # Iteration "iter_5_2"
+    # ====================
+    iter_5_2 = iter_5_1.NextIteration('iter_5_2')
+    iter_5_2.SetMeshName('COEUR_2D_02')
+    iter_5_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
+    iter_5_2.AssociateHypo('hypo_5_bis')
+    erreur = iter_5_2.Compute(1, option)
+    if erreur :
+      break
+  #
+    break
+  #
+  if erreur :
+    message += "Erreur au calcul de l'itération %d" % erreur
   #
-  HOMARD.UpdateStudy()
+  return erreur, message
+
+#==========================  Fin de la fonction ==================================
 #
-  # Frontiere
-  # =========
-  # Creation of the discrete boundary Boun_5_1
-  boun_5_1 = HOMARD.CreateBoundaryDi('Boun_5_1', 'MAIL_EXT', DATA_TUTORIAL+'/tutorial_5.fr.med')
+ERREUR = 0
+MESSAGE = ""
+while not ERREUR :
   #
-  # Creation des zones
-  # ==================
-  # Creation of the disk with hole enveloppe
-  enveloppe = HOMARD.CreateZoneDiskWithHole( 'enveloppe', 0., 0., 250., 193., 1 )
-  # Creation of the rectangle quart_sup
-  quart_sup = HOMARD.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 )
+  # A. Exec of HOMARD-SALOME
   #
-  # Hypotheses
-  # ==========
-  # Creation of the hypothesis hypo_5
-  hypo_5 = HOMARD.CreateHypothesis('hypo_5')
-  hypo_5.AddZone('enveloppe', 1)
-  # Creation of the hypothesis hypo_5_bis
-  hypo_5_bis = HOMARD.CreateHypothesis('hypo_5_bis')
-  hypo_5_bis.AddZone('quart_sup', 1)
+  HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+  assert HOMARD is not None, "Impossible to load homard engine"
+  HOMARD.SetLanguageShort("fr")
+#
+  FICMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".00.med")
+  FICFRMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".fr.med")
+  try:
+    ERREUR, MESSAGE = homard_exec("COEUR_2D", FICMED, "MAIL_EXT", FICFRMED, DEBUG)
+  except RuntimeError as eee:
+    ERREUR = 2
+    MESSAGE = str(eee.message)
   #
-  # Cas
-  # ===
-  case_5 = HOMARD.CreateCase('case_5', 'COEUR_2D', DATA_TUTORIAL+'/tutorial_5.00.med')
-  case_5.SetDirName(DIRCASE)
-  case_5.SetConfType(1)
-  case_5.AddBoundaryGroup('Boun_5_1', '')
+  if ERREUR :
+    MESSAGE += "Pb in homard_exec"
+    break
   #
-  # Iteration "iter_5_1"
-  # ====================
-  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')
-  error = iter_5_1.Compute(1, 2)
+  # B. Test of the results
   #
-  # Iteration "iter_5_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')
-  error = iter_5_2.Compute(1, 2)
+  N_REP_TEST_FILE = N_ITER_TEST_FILE
+  DESTROY_DIR = not DEBUG
+  test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
   #
-  return error
-
-#========================================================================
-
-HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
-assert HOMARD is not None, "Impossible to load HOMARD engine"
-HOMARD.SetLanguageShort("fr")
-#
-# Exec of HOMARD-SALOME
-#
-try :
-  ERROR = homard_exec()
-  if ERROR :
-    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
-except Exception as eee:
-  raise Exception('Pb in homard_exec: '+eee.message)
-#
-# Test of the results
+  break
 #
-N_REP_TEST_FILE = N_ITER_TEST_FILE
-DESTROY_DIR = not DEBUG
-test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+if ERREUR:
+  raise Exception(MESSAGE)
 #
 # ==================================
 gzip_gunzip(DATA_TUTORIAL, 5, 1)
diff --git a/src/tests/Test/tutorial_6.py b/src/tests/Test/tutorial_6.py
new file mode 100755 (executable)
index 0000000..433a7c8
--- /dev/null
@@ -0,0 +1,214 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2016  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
+#
+"""
+Python script for HOMARD
+Test tutorial_6 associe au tutorial 6
+"""
+__revision__ = "V4.04"
+
+#========================================================================
+TEST_NAME = "tutorial_6"
+DEBUG = False
+N_ITER_TEST_FILE = 3
+#========================================================================
+import os
+import sys
+import HOMARD
+import salome
+#
+# ==================================
+PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
+# Repertoire des scripts utilitaires
+REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD")
+REP_PYTHON = os.path.normpath(REP_PYTHON)
+sys.path.append(REP_PYTHON)
+from test_util import get_dir
+from test_util import get_dir_tutorial
+from test_util import test_results
+# ==================================
+# Répertoires pour ce test
+REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG)
+DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD)
+# ==================================
+sys.path.append(DATA_TUTORIAL)
+from tutorial_util import gzip_gunzip
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 4, -1)
+gzip_gunzip(DATA_TUTORIAL, 6, -1)
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#
+#========================= Debut de la fonction ==================================
+#
+def homard_exec(nom, ficmed, nomfr, ficfrmed, verbose=False):
+  """
+Python script for HOMARD
+  """
+  erreur = 0
+  message = ""
+#
+  while not erreur :
+    #
+    HOMARD.UpdateStudy()
+    #
+    # Frontières
+    # ==========
+    if verbose :
+      print(". Frontières")
+    boun_6_1 = HOMARD.CreateBoundaryDi('intersection', nomfr, ficfrmed)
+    #
+    boun_6_2 = HOMARD.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.)
+    #
+    boun_6_3 = HOMARD.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
+    #
+    boun_6_6 = HOMARD.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
+    #
+    boun_6_5 = HOMARD.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
+    #
+    # Hypotheses
+    # ==========
+    if verbose :
+      print(". Hypothèses")
+    # Creation of the hypothesis hypo_0_1
+    l_hypothese_0_1 = HOMARD.CreateHypothesis('hypo_6_0_1')
+    l_hypothese_0_1.SetUnifRefinUnRef(1)
+    l_hypothese_0_1.AddGroup('IN1')
+    l_hypothese_0_1.AddGroup('IN2')
+    l_hypothese_0_1.AddGroup('T1_INT_I')
+    l_hypothese_0_1.AddGroup('T1_INT_O')
+    l_hypothese_0_1.AddGroup('T2_INT')
+    # Creation of the hypothesis hypo_1_2
+    l_hypothese_1_2 = HOMARD.CreateHypothesis('hypo_6_1_2')
+    l_hypothese_1_2.SetUnifRefinUnRef(1)
+    l_hypothese_1_2.AddGroup('T1_EXT_I')
+    l_hypothese_1_2.AddGroup('T1_EXT_O')
+    l_hypothese_1_2.AddGroup('T2_EXT')
+    # Creation of the hypothesis hypo_2_3
+    l_hypothese_2_3 = HOMARD.CreateHypothesis('hypo_6_2_3')
+    l_hypothese_2_3.SetUnifRefinUnRef(1)
+    l_hypothese_2_3.AddGroup('INT_I')
+    l_hypothese_2_3.AddGroup('INT_E')
+    l_hypothese_2_3.AddGroup('IN1')
+    l_hypothese_2_3.AddGroup('IN2')
+    #
+    # Cas
+    # ===
+    if verbose :
+      print(". Cas")
+    le_cas = HOMARD.CreateCase('case_'+nom, nom, ficmed)
+    le_cas.SetDirName(DIRCASE)
+    le_cas.AddBoundary( 'intersection' )
+    le_cas.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' )
+    le_cas.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
+    le_cas.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' )
+    le_cas.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
+    le_cas.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' )
+    le_cas.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
+    #
+    # Itérations
+    # ==========
+    if verbose :
+      option = 2
+    else :
+      option = 1
+    if verbose :
+      print(". Itérations")
+    # Iteration iter_6_1 : raffinement selon les faces internes
+    iter_6_1 = le_cas.NextIteration('iter_6_1')
+    iter_6_1.SetMeshName('PIQUAGE_1')
+    iter_6_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+    iter_6_1.AssociateHypo('hypo_6_0_1')
+    erreur = iter_6_1.Compute(1, option)
+    print ("erreur = %d" % erreur)
+    if erreur :
+      break
+    # Iteration iter_6_2 : raffinement selon les faces externes
+    iter_6_2 = iter_6_1.NextIteration('iter_6_2')
+    iter_6_2.SetMeshName('PIQUAGE_2')
+    iter_6_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
+    iter_6_2.AssociateHypo('hypo_6_1_2')
+    erreur = iter_6_2.Compute(1, option)
+    if erreur :
+      break
+    # Iteration iter_6_3 : second raffinement selon les faces externes
+    iter_6_3 = iter_6_2.NextIteration('iter_6_3')
+    iter_6_3.SetMeshName('PIQUAGE_3')
+    iter_6_3.SetMeshFile(os.path.join(DIRCASE, "maill.03.med"))
+    iter_6_3.AssociateHypo('hypo_6_2_3')
+    erreur = iter_6_3.Compute(1, option)
+    if erreur :
+      break
+  #
+    break
+  #
+  if erreur :
+    message += "Erreur au calcul de l'itération %d" % erreur
+  #
+  return erreur, message
+#
+#==========================  Fin de la fonction ==================================
+#
+ERREUR = 0
+MESSAGE = ""
+while not ERREUR :
+  #
+  # A. Exec of HOMARD-SALOME
+  #
+  HOMARD = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+  assert HOMARD is not None, "Impossible to load homard engine"
+  HOMARD.SetLanguageShort("fr")
+#
+  FICMED = os.path.join(DATA_TUTORIAL, "tutorial_4.00.med")
+  FICFRMED = os.path.join(DATA_TUTORIAL, TEST_NAME+".fr.med")
+  try:
+    ERREUR, MESSAGE = homard_exec("PIQUAGE", FICMED, "COURBES", FICFRMED, DEBUG)
+  except RuntimeError as eee:
+    ERREUR = 2
+    MESSAGE = str(eee.message)
+  #
+  if ERREUR :
+    MESSAGE += "Pb in homard_exec"
+    break
+  #
+  # B. Test of the results
+  #
+  N_REP_TEST_FILE = N_ITER_TEST_FILE
+  DESTROY_DIR = not DEBUG
+  test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+  #
+  break
+#
+if ERREUR:
+  raise Exception(MESSAGE)
+#
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 4, 1)
+gzip_gunzip(DATA_TUTORIAL, 6, 1)
+# ==================================
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser()
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/samples/test_6.apad.03.bilan b/src/tests/samples/test_6.apad.03.bilan
new file mode 100755 (executable)
index 0000000..bfa20c2
--- /dev/null
@@ -0,0 +1,53 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     test_6                                                                          
+     Date de creation : jeudi 4 janvier 2018 a 14 h 20 mn 19 s          
+     Dimension : 3
+     Degre : 1
+     C'est un maillage obtenu apres      3 adaptations.
+     Le niveau minimum actif est   :     3
+     Le niveau maximum atteint est :     3
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+                      |                   |  0.0000    |  169.52    
+                      |                   | -50.434    |  100.00    
+                      |                   |  0.0000    |  200.00    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       6441 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        336 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *        336 *
+     * . dont aretes internes aux faces/volumes    *          0 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *      12544 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *          0 *
+     * . du niveau   2                             *          0 *
+     * . du niveau   2.5                           *          0 *
+     * . du niveau   3                             *      12544 *
+     ************************************************************
index 45a987dc1708fe6ceecfad9eb3f8b5824d2b5834..4325d63ef8d7f2d0a5141618c1a4bc960963e04e 100644 (file)
@@ -5,7 +5,7 @@ ANALYSE DU MAILLAGE
 
      Maillage apres adaptation                         
      PIQUAGE                                                                         
-     Date de creation : lundi 2 novembre 2015 a 9 h 13 mn 13 s          
+     Date de creation : jeudi 4 janvier 2018 a 14 h 7 mn 55 s           
      Dimension : 3
      Degre : 1
      C'est un maillage obtenu apres      3 adaptations.
@@ -14,9 +14,9 @@ ANALYSE DU MAILLAGE
 
          Direction    |       Unite       |  Minimum   |  Maximum
      ---------------------------------------------------------------
-                      |                   | -230.00    |  136.45    
-                      |                   | -250.62    |  189.69    
-                      |                   | -285.21    |  155.03    
+                      |                   | -230.00    |  136.04    
+                      |                   | -250.19    |  188.38    
+                      |                   | -285.20    |  154.14    
 
 
    NOMBRE D'ENTITES DU CALCUL
@@ -26,40 +26,40 @@ ANALYSE DU MAILLAGE
      ************************************************************
      *                      Noeuds                              *
      ************************************************************
-     * Nombre total                                *      12825 *
+     * Nombre total                                *       3040 *
      ************************************************************
 
      ************************************************************
      *                      Segments                            *
      ************************************************************
-     * Nombre total                                *        758 *
+     * Nombre total                                *        452 *
      * . dont aretes isolees                       *          0 *
      * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *        758 *
+     * . dont aretes internes aux faces/volumes    *        452 *
      ************************************************************
 
      ************************************************************
      *                      Triangles                           *
      ************************************************************
-     * Nombre total                                *      20838 *
+     * Nombre total                                *       4562 *
      * . dont triangles de regions 2D              *          0 *
-     * . dont triangles de bord                    *      20560 *
-     * . dont triangles internes aux volumes       *        278 *
+     * . dont triangles de bord                    *       4418 *
+     * . dont triangles internes aux volumes       *        144 *
      ************************************************************
      * . du niveau   0                             *          0 *
      * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *       3530 *
-     * . du niveau   1.5                           *        380 *
-     * . du niveau   2                             *      16928 *
+     * . du niveau   1                             *       3526 *
+     * . du niveau   1.5                           *        316 *
+     * . du niveau   2                             *        720 *
      ************************************************************
 
      ************************************************************
      *                      Tetraedres                          *
      ************************************************************
-     * Nombre total                                *      43490 *
+     * Nombre total                                *      11214 *
      ************************************************************
      * . du niveau   0                             *          0 *
      * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *      18174 *
-     * . du niveau   1.5                           *      25316 *
+     * . du niveau   1                             *       9930 *
+     * . du niveau   1.5                           *       1284 *
      ************************************************************
diff --git a/src/tests/samples/tutorial_6.apad.03.bilan b/src/tests/samples/tutorial_6.apad.03.bilan
new file mode 100755 (executable)
index 0000000..452d42a
--- /dev/null
@@ -0,0 +1,65 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     PIQUAGE                                                                         
+     Date de creation : lundi 25 septembre 2017 a 13 h 52 mn 40 s       
+     Dimension : 3
+     Degre : 1
+     C'est un maillage obtenu apres      3 adaptations.
+     Le niveau minimum actif est   :     1
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+                      |                   | -230.00    |  136.04    
+                      |                   | -250.52    |  189.69    
+                      |                   | -285.20    |  155.02    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       3040 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        452 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *        452 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *       4562 *
+     * . dont triangles de regions 2D              *          0 *
+     * . dont triangles de bord                    *       4418 *
+     * . dont triangles internes aux volumes       *        144 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *       3526 *
+     * . du niveau   1.5                           *        316 *
+     * . du niveau   2                             *        720 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *      11214 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *       9930 *
+     * . du niveau   1.5                           *       1284 *
+     ************************************************************