]> SALOME platform Git repositories - modules/homard.git/commitdiff
Salome HOME
Merge branch 'V8_0_BR' V8_0_0a2
authorvsr <vsr@opencascade.com>
Fri, 15 Jan 2016 07:31:10 +0000 (10:31 +0300)
committervsr <vsr@opencascade.com>
Fri, 15 Jan 2016 07:31:10 +0000 (10:31 +0300)
105 files changed:
CMakeLists.txt
doc/files/tutorial_1.py
doc/files/tutorial_2.py
doc/files/tutorial_3.py
doc/files/tutorial_4.py
doc/files/tutorial_5.py
doc/files/tutorial_util.py
src/CMakeLists.txt
src/CTestTestfileInstall.cmake [new file with mode: 0644]
src/tests/CMakeLists.txt [new file with mode: 0755]
src/tests/Test/CMakeLists.txt [new file with mode: 0755]
src/tests/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/tests/Test/test_1.py [new file with mode: 0755]
src/tests/Test/test_2.py [new file with mode: 0755]
src/tests/Test/test_3.py [new file with mode: 0755]
src/tests/Test/test_4.py [new file with mode: 0755]
src/tests/Test/test_util.py [new file with mode: 0755]
src/tests/Test/tutorial_1.py [new file with mode: 0755]
src/tests/Test/tutorial_2.py [new file with mode: 0755]
src/tests/Test/tutorial_3.py [new file with mode: 0755]
src/tests/Test/tutorial_4.py [new file with mode: 0755]
src/tests/Test/tutorial_5.py [new file with mode: 0755]
src/tests/samples/test_1.00.med [new file with mode: 0644]
src/tests/samples/test_1.01.med [new file with mode: 0644]
src/tests/samples/test_1.02.med [new file with mode: 0644]
src/tests/samples/test_1.apad.03.bilan [new file with mode: 0644]
src/tests/samples/test_1.en.odt [new file with mode: 0644]
src/tests/samples/test_1.en.pdf [new file with mode: 0644]
src/tests/samples/test_1.odt [new file with mode: 0644]
src/tests/samples/test_1.pdf [new file with mode: 0644]
src/tests/samples/test_1.png [new file with mode: 0644]
src/tests/samples/test_2.00.med [new file with mode: 0644]
src/tests/samples/test_2.apad.03.bilan [new file with mode: 0644]
src/tests/samples/test_2.en.odt [new file with mode: 0644]
src/tests/samples/test_2.en.pdf [new file with mode: 0644]
src/tests/samples/test_2.fr.med [new file with mode: 0644]
src/tests/samples/test_2.odt [new file with mode: 0644]
src/tests/samples/test_2.pdf [new file with mode: 0644]
src/tests/samples/test_2.png [new file with mode: 0644]
src/tests/samples/test_3.00.med [new file with mode: 0644]
src/tests/samples/test_3.apad.02.bilan [new file with mode: 0644]
src/tests/samples/test_3.en.odt [new file with mode: 0644]
src/tests/samples/test_3.en.pdf [new file with mode: 0644]
src/tests/samples/test_3.fr.med [new file with mode: 0644]
src/tests/samples/test_3.odt [new file with mode: 0644]
src/tests/samples/test_3.pdf [new file with mode: 0644]
src/tests/samples/test_3.png [new file with mode: 0644]
src/tests/samples/test_4.apad.02.bilan [new file with mode: 0644]
src/tests/samples/test_4.apad.03.bilan [new file with mode: 0644]
src/tests/samples/test_4.en.odt [new file with mode: 0644]
src/tests/samples/test_4.en.pdf [new file with mode: 0644]
src/tests/samples/test_4.odt [new file with mode: 0644]
src/tests/samples/test_4.pdf [new file with mode: 0644]
src/tests/samples/tutorial_1.apad.03.bilan [new file with mode: 0644]
src/tests/samples/tutorial_2.apad.02.bilan [new file with mode: 0644]
src/tests/samples/tutorial_3.apad.02.bilan [new file with mode: 0644]
src/tests/samples/tutorial_4.apad.03.bilan [new file with mode: 0644]
src/tests/samples/tutorial_5.apad.02.bilan [new file with mode: 0644]
tests/CMakeLists.txt [deleted file]
tests/test_1.00.med [deleted file]
tests/test_1.01.med [deleted file]
tests/test_1.02.med [deleted file]
tests/test_1.apad.03.bilan [deleted file]
tests/test_1.en.odt [deleted file]
tests/test_1.en.pdf [deleted file]
tests/test_1.odt [deleted file]
tests/test_1.pdf [deleted file]
tests/test_1.png [deleted file]
tests/test_1.py [deleted file]
tests/test_11.apad.03.bilan [deleted file]
tests/test_11.py [deleted file]
tests/test_12.apad.02.bilan [deleted file]
tests/test_12.py [deleted file]
tests/test_13.apad.02.bilan [deleted file]
tests/test_13.py [deleted file]
tests/test_14.apad.03.bilan [deleted file]
tests/test_14.py [deleted file]
tests/test_15.apad.02.bilan [deleted file]
tests/test_15.py [deleted file]
tests/test_2.00.med [deleted file]
tests/test_2.apad.03.bilan [deleted file]
tests/test_2.en.odt [deleted file]
tests/test_2.en.pdf [deleted file]
tests/test_2.fr.med [deleted file]
tests/test_2.odt [deleted file]
tests/test_2.pdf [deleted file]
tests/test_2.png [deleted file]
tests/test_2.py [deleted file]
tests/test_3.00.med [deleted file]
tests/test_3.apad.02.bilan [deleted file]
tests/test_3.en.odt [deleted file]
tests/test_3.en.pdf [deleted file]
tests/test_3.fr.med [deleted file]
tests/test_3.odt [deleted file]
tests/test_3.pdf [deleted file]
tests/test_3.png [deleted file]
tests/test_3.py [deleted file]
tests/test_4.apad.02.bilan [deleted file]
tests/test_4.apad.03.bilan [deleted file]
tests/test_4.en.odt [deleted file]
tests/test_4.en.pdf [deleted file]
tests/test_4.odt [deleted file]
tests/test_4.pdf [deleted file]
tests/test_4.py [deleted file]
tests/test_util.py [deleted file]

index 111e15b125a58365357e590e2db7b0f4ef0d7265..83d6ff3982756be738d6010b22b8e1cd624ecf44 100755 (executable)
@@ -17,6 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
+
 PROJECT(SalomeHOMARD C CXX)
 
 # Ensure a proper linker behavior:
@@ -46,6 +47,20 @@ ELSE(EXISTS ${KERNEL_ROOT_DIR})
   MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
 ENDIF(EXISTS ${KERNEL_ROOT_DIR})
 
+# Find SALOME GUI
+# ===============
+SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
+IF(EXISTS ${GUI_ROOT_DIR})
+  LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
+  FIND_PACKAGE(SalomeGUI REQUIRED)
+  SALOME_GUI_WITH_CORBA() # check whether GUI builded with CORBA
+  SALOME_GUI_MODE(OPTIONAL SALOME_USE_PYCONSOLE)
+  ADD_DEFINITIONS(${GUI_DEFINITIONS})
+  INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
+ELSE(EXISTS ${GUI_ROOT_DIR})
+  MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
+ENDIF(EXISTS ${GUI_ROOT_DIR})
+
 # Platform setup
 # ==============
 INCLUDE(SalomeSetupPlatform)   # From KERNEL
@@ -54,15 +69,30 @@ SET(BUILD_SHARED_LIBS TRUE)
 # Local macros:
 LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 
+# additional preprocessor / compiler flags
+#ADD_DEFINITIONS(-DCMAKE_BUILD)
+IF(WIN32)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
+
 # User options
 # ============
 OPTION(SALOME_BUILD_DOC "Generate SALOME HOMARD documentation" ON)
 OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
 
+
+# Other KERNEL optionals: 
 IF(SALOME_BUILD_TESTS)
   ENABLE_TESTING()
+  FIND_PACKAGE(SalomeCppUnit)
+  SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS)
+ENDIF()
+IF(SALOME_BUILD_DOC)
+  FIND_PACKAGE(SalomeSphinx)
+  SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
 ENDIF()
 
+
 ##
 ## From KERNEL:
 ##
@@ -77,25 +107,6 @@ FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
 # HDF5
 FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
 
-# Other KERNEL optionals:
-IF(SALOME_BUILD_DOC)
-  FIND_PACKAGE(SalomeSphinx)
-  SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
-ENDIF()
-
-# Find GUI
-# ===========
-SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
-IF(EXISTS ${GUI_ROOT_DIR})
-  LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
-  FIND_PACKAGE(SalomeGUI REQUIRED)
-  SALOME_GUI_WITH_CORBA() # check whether GUI builded with CORBA
-  SALOME_GUI_MODE(OPTIONAL SALOME_USE_PYCONSOLE)
-  ADD_DEFINITIONS(${GUI_DEFINITIONS})
-  INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
-ELSE(EXISTS ${GUI_ROOT_DIR})
-  MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
-ENDIF(EXISTS ${GUI_ROOT_DIR})
 
 ##
 ## From GUI:
@@ -160,28 +171,34 @@ SET(SALOME_INSTALL_BINS "${SALOME_INSTALL_BINS}" CACHE PATH "Install path: SALOM
 SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs")
 SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files")
 SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers")
-SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH 
+SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH
    "Install path: SALOME scripts")
-SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH 
+SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH
    "Install path: SALOME script data")
-SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH 
+SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH
    "Install path: SALOME Python scripts")
-SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "${SALOME_INSTALL_APPLISKEL_SCRIPTS}" CACHE PATH 
+SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "${SALOME_INSTALL_APPLISKEL_SCRIPTS}" CACHE PATH
    "Install path: SALOME application skeleton - scripts")
-SET(SALOME_INSTALL_APPLISKEL_PYTHON "${SALOME_INSTALL_APPLISKEL_PYTHON}" CACHE PATH 
+SET(SALOME_INSTALL_APPLISKEL_PYTHON "${SALOME_INSTALL_APPLISKEL_PYTHON}" CACHE PATH
    "Install path: SALOME application skeleton - Python")
 SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff")
-SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH 
+SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH
    "Install path: SALOME Python shared modules")
-SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH 
-    "Install path: local SALOME CMake files") 
+SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH
+    "Install path: local SALOME CMake files")
 SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH
   "Install path: local SALOME config files (obsolete, to be removed)")
 SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources")
 SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation")
 
 # Specific to HOMARD:
-SET(SALOME_HOMARD_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/homard" CACHE PATH 
+SET(SALOME_HOMARD_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/homard" CACHE PATH
+  "Install path: SALOME HOMARD specific data")
+SET(SALOME_HOMARD_INSTALL_SAMPLES share/salome/homardsamples CACHE PATH
+  "Install path: SALOME HOMARD samples")
+SET(SALOME_HOMARD_INSTALL_TEST ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test CACHE PATH
+    "Install path: SALOME HOMARD Test files")
+SET(SALOME_HOMARD_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/homard" CACHE PATH
     "Install path: SALOME HOMARD specific data")
 
 MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS)
@@ -189,28 +206,26 @@ MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME
 MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS  SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE_LOCAL SALOME_INSTALL_RES)
 MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED)
 MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
+MARK_AS_ADVANCED(SALOME_HOMARD_INSTALL_TEST)
 MARK_AS_ADVANCED(SALOME_HOMARD_INSTALL_RES_DATA)
 
 # Accumulate environment variables for HOMARD module
 SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
                                                  ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}
                                                  ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED})
-SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) 
-                                              
-# Sources 
+SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
+
+# Sources
 # ========
 
 ADD_SUBDIRECTORY(idl)
 ADD_SUBDIRECTORY(adm_local)
 ADD_SUBDIRECTORY(resources)
 ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(bin)
-IF(SALOME_BUILD_TESTS)
-  ADD_SUBDIRECTORY(tests)
-ENDIF(SALOME_BUILD_TESTS)
 IF(SALOME_BUILD_DOC)
   ADD_SUBDIRECTORY(doc)
-ENDIF(SALOME_BUILD_DOC)
+ENDIF()
+ADD_SUBDIRECTORY(bin)
 
 # Header configuration
 # ====================
@@ -260,5 +275,5 @@ INSTALL(FILES
   DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}")
 
 # Install the export set for use with the install-tree
-INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" 
+INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
   FILE ${PROJECT_NAME}Targets.cmake)
index f8a0254899210d803fabf24b165e24f3d7273341..f701336f483e40fb33272cf4f8c8cc877d673cd4 100755 (executable)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2014
 """
-__revision__ = "V1.9"
+__revision__ = "V2.1"
 #
 import os
 import sys
 #
 # ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 # Repertoire des donnees du tutorial
-data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
+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(1)
-gzip_gunzip(data_dir, 1, -1)
+DIRCASE = creation_dircase(1)
+gzip_gunzip(DATA_TUTORIAL, 1, -1)
 # ==================================
 #
 import salome
@@ -52,41 +52,42 @@ homard.SetCurrentStudy(salome.myStudy)
 #
 # Hypotheses
 # ==========
-Hypo_1 = homard.CreateHypothesis('Hypo_1')
-Hypo_1.SetUnifRefinUnRef(1)
+hypo_1 = homard.CreateHypothesis('hypo_1')
+hypo_1.SetUnifRefinUnRef(1)
 #
 # Cas
 # ===
-Case_1 = homard.CreateCase('Case_1', 'MAILL', data_dir+'/tutorial_1.00.med')
-Case_1.SetDirName(dircase)
-Case_1.SetConfType(1)
+case_1 = homard.CreateCase('Case_1', 'MAILL', DATA_TUTORIAL+'/tutorial_1.00.med')
+case_1.SetDirName(DIRCASE)
+case_1.SetConfType(1)
 #
 # 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)
+# 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)
 
-# 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_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_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_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)
+#
 # ==================================
-gzip_gunzip(data_dir, 1, 1)
+gzip_gunzip(DATA_TUTORIAL, 1, 1)
 # ==================================
-
+#
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
index b48a9b80ffaf06a6349686d55168895136207558..e63af00a29d4ac2eeedb4ab5fa43d513bf0fb024 100755 (executable)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2014
 """
-__revision__ = "V1.10"
+__revision__ = "V2.10"
 #
 import os
 import sys
 #
 # ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 # Repertoire des donnees du tutorial
-data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
+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(2)
-gzip_gunzip(data_dir, 2, -1)
+DIRCASE = creation_dircase(2)
+gzip_gunzip(DATA_TUTORIAL, 2, -1)
 # ==================================
 #
 import salome
@@ -61,41 +61,41 @@ Zone_1 = homard.CreateZoneSphere ('Zone_1', 0., 0., 0., 1.05)
 # Box "Zone_2"
 Zone_2 = homard.CreateZoneBox ('Zone_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
 #
-# Hypothese "Hypo_2"
+# Hypothese "hypo_2"
 # ==================
-Hypo_2 = homard.CreateHypothesis('Hypo_2')
-Hypo_2.AddZone('Zone_1', 1)
-Hypo_2.AddZone('Zone_0', 1)
+hypo_2 = homard.CreateHypothesis('hypo_2')
+hypo_2.AddZone('Zone_1', 1)
+hypo_2.AddZone('Zone_0', 1)
 #
-# Hypothese "Hypo_2_bis"
+# 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)
+hypo_2_bis = homard.CreateHypothesis('hypo_2_bis')
+hypo_2_bis.AddZone('Zone_0', -1)
+hypo_2_bis.AddZone('Zone_2', 1)
 #
 # Cas
 # ===
-Case_2 = homard.CreateCase('Case_2', 'MZERO', data_dir+'/tutorial_2.00.med')
-Case_2.SetDirName(dircase)
+case_2 = homard.CreateCase('Case_2', 'MZERO', DATA_TUTORIAL+'/tutorial_2.00.med')
+case_2.SetDirName(DIRCASE)
 #
-# Iteration "Iter_2_1"
+# 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)
+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)
 #
-# Iteration "Iter_2_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.AssociateHypo('Hypo_2_bis')
-error = Iter_2_2.Compute(1, 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)
 
 # ==================================
-gzip_gunzip(data_dir, 2, 1)
+gzip_gunzip(DATA_TUTORIAL, 2, 1)
 # ==================================
 
 if salome.sg.hasDesktop():
index dd0554888cd3158b415a3770f72296ec52c751e6..cec15ff92b949c32d25d2fe7df71ef96c675e003 100755 (executable)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2014
 """
-__revision__ = "V1.9"
+__revision__ = "V2.1"
 #
 import os
 import sys
 #
 # ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 # Repertoire des donnees du tutorial
-data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
+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(3)
-gzip_gunzip(data_dir, 3, -1)
+DIRCASE = creation_dircase(3)
+gzip_gunzip(DATA_TUTORIAL, 3, -1)
 # ==================================
 #
 import salome
@@ -50,81 +50,81 @@ homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
 study_main = salome.myStudyManager.NewStudy("HOMARD")
 homard.SetCurrentStudy(salome.myStudy)
 #
-# Hypothese "Hypo_0vers1"
+# Hypothese "hypo_0vers1"
 # =======================
-Hypo_0vers1 = homard.CreateHypothesis('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_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')
+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.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')
+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)
+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
 # ===
-Case_3 = homard.CreateCase('Case_3', 'G_0', data_dir+'/tutorial_3.00.med')
-Case_3.SetDirName(dircase)
+case_3 = homard.CreateCase('Case_3', 'G_0', DATA_TUTORIAL+'/tutorial_3.00.med')
+case_3.SetDirName(DIRCASE)
 #
-# Iteration "Iter_3_1"
+# 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_dir+'/tutorial_3.00.med')
-Iter_3_1.SetTimeStepRank( 1, 1)
-Iter_3_1.AssociateHypo('Hypo_0vers1')
-error = Iter_3_1.Compute(1, 2)
-#
-# Iteration "Iter_3_2"
+iter_3_1 = case_3.NextIteration('iter_3_1')
+iter_3_1.SetMeshName('H_1')
+iter_3_1.SetMeshFile(DIRCASE+'/maill.01.med')
+iter_3_1.SetFieldFile(DATA_TUTORIAL+'/tutorial_3.00.med')
+iter_3_1.SetTimeStepRank( 1, 1)
+iter_3_1.AssociateHypo('hypo_0vers1')
+error = 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_dir+'/tutorial_3.01.med')
-Iter_3_2.SetTimeStepRank(1, 1)
-Iter_3_2.AssociateHypo('Hypo_1vers2')
-error = Iter_3_2.Compute(1, 2)
-#
-# Iteration "Iter_3_2_bis"
+iter_3_2 = iter_3_1.NextIteration('iter_3_2')
+iter_3_2.SetMeshName('H_2')
+iter_3_2.SetMeshFile(DIRCASE+'/maill.02.med')
+iter_3_2.SetFieldFile(DATA_TUTORIAL+'/tutorial_3.01.med')
+iter_3_2.SetTimeStepRank(1, 1)
+iter_3_2.AssociateHypo('hypo_1vers2')
+error = 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_dir+'/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)
+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)
 
 # ==================================
-gzip_gunzip(data_dir, 3, 1)
+gzip_gunzip(DATA_TUTORIAL, 3, 1)
 # ==================================
 
 if salome.sg.hasDesktop():
index 2111fe0360f36cd87b9b21b3d913ab24a2a4d65a..f45af8bce5ac065af4369ba1ea63170279a74709 100755 (executable)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2011, 2014
 """
-__revision__ = "V2.5"
+__revision__ = "V3.1"
 #
 import os
 import sys
 #
 # ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 # Repertoire des donnees du tutorial
-data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
+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(4)
-gzip_gunzip(data_dir, 4, -1)
+DIRCASE = creation_dircase(4)
+gzip_gunzip(DATA_TUTORIAL, 4, -1)
 # ==================================
 #
 import salome
@@ -52,66 +52,66 @@ homard.SetCurrentStudy(salome.myStudy)
 #
 # Frontieres
 # ==========
-Boun_4_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', data_dir+'/tutorial_4.fr.med')
+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_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.)
+boun_4_3 = homard.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
 #
-Boun_4_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
+boun_4_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
 #
-Boun_4_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
+boun_4_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
 #
 # 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')
+# 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')
 #
 # Cas
 # ===
-Case_4 = homard.CreateCase('Case_4', 'PIQUAGE', data_dir+'/tutorial_4.00.med')
-Case_4.SetDirName(dircase)
-Case_4.AddBoundaryGroup( 'intersection', '' )
-Case_4.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' )
-Case_4.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
-Case_4.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' )
-Case_4.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
-Case_4.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' )
-Case_4.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
+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' )
 #
 # 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)
+# 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)
 
 # ==================================
-gzip_gunzip(data_dir, 4, 1)
+gzip_gunzip(DATA_TUTORIAL, 4, 1)
 # ==================================
 
 if salome.sg.hasDesktop():
index 0daeb9a645dc44063ca7cafc7fa5c6e2a12d28a0..8b82bfba08590b35cb5855ae704a45ab8cb0446f 100755 (executable)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2014
 """
-__revision__ = "V1.8"
+__revision__ = "V2.1"
 #
 import os
 import sys
 #
 # ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
+PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR')
 # Repertoire des donnees du tutorial
-data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
+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(5)
-gzip_gunzip(data_dir, 5, -1)
+DIRCASE = creation_dircase(5)
+gzip_gunzip(DATA_TUTORIAL, 5, -1)
 # ==================================
 #
 import salome
@@ -52,8 +52,8 @@ homard.SetCurrentStudy(salome.myStudy)
 #
 # Frontiere
 # =========
-# Creation of the discrete boundary Boun_5_1
-Boun_5_1 = homard.CreateBoundaryDi('Boun_5_1', 'MAIL_EXT', data_dir+'/tutorial_5.fr.med')
+# Creation of the discrete boundary boun_5_1
+boun_5_1 = homard.CreateBoundaryDi('boun_5_1', 'MAIL_EXT', DATA_TUTORIAL+'/tutorial_5.fr.med')
 #
 # Creation des zones
 # ==================
@@ -64,38 +64,38 @@ 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)
+# 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
 # ===
-Case_5 = homard.CreateCase('Case_5', 'COEUR_2D', data_dir+'/tutorial_5.00.med')
-Case_5.SetDirName(dircase)
-Case_5.SetConfType(3)
-Case_5.AddBoundaryGroup('Boun_5_1', '')
+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', '')
 #
-# Iteration "Iter_5_1"
+# 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)
+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)
 #
-# Iteration "Iter_5_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.AssociateHypo('Hypo_5_bis')
-error = Iter_5_2.Compute(1, 2)
+iter_5_2 = iter_5_1.NextIteration('iter_5_2')
+iter_5_2.SetMeshName('COEUR_2D_02')
+iter_5_2.SetMeshFile(DIRCASE+'/maill.02.med')
+iter_5_2.AssociateHypo('hypo_5_bis')
+error = iter_5_2.Compute(1, 2)
 
 # ==================================
-gzip_gunzip(data_dir, 5, 1)
+gzip_gunzip(DATA_TUTORIAL, 5, 1)
 # ==================================
 
 if salome.sg.hasDesktop():
index ebad1ad14992428f827cb969b0ad1b5c05574cf6..4199ce7752faa7d9e7bb3e193cd323b131d8c4c7 100755 (executable)
 Python script for HOMARD
 Copyright EDF-R&D 2014
 """
-__revision__ = "V1.1"
+__revision__ = "V1.3"
 
 import os
 import sys
 
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des tests
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
+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 remove_dir
 
 #========================================================================
@@ -46,14 +46,14 @@ Copyright EDF-R&D 2014
 #
   ficloc_basis = "tutorial_%d" % num_tuto
 #
-  ok = True
+  erreur = 0
   num = -1
 #
 # Uncompression
 #
   if ( option == -1 ) :
 #
-    while ok :
+    while not erreur :
       num += 1
       ficloc = ficloc_basis + ".%02d.med" % num
       nomfic = os.path.join(data_dir, ficloc)
@@ -63,7 +63,7 @@ Copyright EDF-R&D 2014
         if os.path.isfile(nomfic) :
           os.system("gunzip "+nomfic)
         else :
-          ok = False
+          erreur = 1
           break
 #
     ficloc = ficloc_basis + ".fr.med"
@@ -78,7 +78,7 @@ Copyright EDF-R&D 2014
 #
   elif ( option == 1 ) :
 #
-    while ok :
+    while not erreur :
       num += 1
       ficloc = ficloc_basis + ".%02d.med.gz" % num
       nomfic = os.path.join(data_dir, ficloc)
@@ -88,7 +88,7 @@ Copyright EDF-R&D 2014
         if os.path.isfile(nomfic) :
           os.system("gzip "+nomfic)
         else :
-          ok = False
+          erreur = 2
           break
 #
     ficloc = ficloc_basis + ".fr.med.gz"
index f71b030c696c76f514b7c5623fbbf4e976638c8a..1226a565bcb14c41e18bd4bdfa5fdef389274433 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015  CEA/DEN, EDF R&D
+# Copyright (C) 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
@@ -25,6 +25,7 @@ SET(SUBDIRS_COMMON
   HOMARD_I
   HOMARDGUI
   HOMARD_SWIG
+  tests
 )
 
 SET(SUBDIRS
@@ -32,6 +33,7 @@ SET(SUBDIRS
 )
 
 FOREACH(dir ${SUBDIRS})
- ADD_SUBDIRECTORY(${dir})
 ADD_SUBDIRECTORY(${dir})
 ENDFOREACH(dir ${SUBDIRS})
 
+
diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..d6c725b
--- /dev/null
@@ -0,0 +1,25 @@
+# Copyright (C) 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
+#
+
+# Add all test subdirs
+SUBDIRS(
+    tests
+    )
+
+
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..fa4407b
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright (C) 20126  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
+#
+
+IF(SALOME_BUILD_TESTS)
+  ADD_SUBDIRECTORY(Test)
+ENDIF(SALOME_BUILD_TESTS)
+
+FILE(GLOB sample_files
+  ${PROJECT_SOURCE_DIR}/src/tests/samples/*.med
+  ${PROJECT_SOURCE_DIR}/src/tests/samples/*.bilan
+  ${PROJECT_SOURCE_DIR}/src/tests/samples/*.odt
+  ${PROJECT_SOURCE_DIR}/src/tests/samples/*.pdf
+  ${PROJECT_SOURCE_DIR}/src/tests/samples/*.png)
+INSTALL(FILES ${sample_files} DESTINATION ${SALOME_HOMARD_INSTALL_SAMPLES})
diff --git a/src/tests/Test/CMakeLists.txt b/src/tests/Test/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f625031
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright (C) 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
+#
+
+# For salome test
+SET(HOMARD_TEST_FILES
+  test_1.py
+  test_2.py
+  test_3.py
+  test_4.py
+  tutorial_1.py
+  tutorial_2.py
+  tutorial_3.py
+  tutorial_4.py
+  tutorial_5.py
+  test_util.py
+)
+
+INSTALL(FILES ${HOMARD_TEST_FILES}
+        DESTINATION ${SALOME_HOMARD_INSTALL_TEST})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${SALOME_HOMARD_INSTALL_TEST}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/tests/Test/CTestTestfileInstall.cmake b/src/tests/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..7e8c01f
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright (C) 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
+#
+
+SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
+
+SET(COMPONENT_NAME HOMARD)
+SET(TIMEOUT        500)
+
+SET(HOMARD_TEST_FILES
+test_1
+test_2
+test_3
+test_4
+tutorial_1
+tutorial_2
+tutorial_3
+tutorial_4
+tutorial_5
+)
+
+FOREACH(tfile ${HOMARD_TEST_FILES})
+  SET(TEST_NAME HOMARD_${tfile})
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+ENDFOREACH()
diff --git a/src/tests/Test/test_1.py b/src/tests/Test/test_1.py
new file mode 100755 (executable)
index 0000000..79d100f
--- /dev/null
@@ -0,0 +1,220 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_1
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "test_1"
+DEBUG = False
+N_ITER_TEST_FILE = 3
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  error = 0
+#
+  while not error :
+  #
+    HOMARD.SetCurrentStudy(theStudy)
+  #
+  # Creation of the zones
+  # =====================
+  # Creation of the box zone_1_1
+    zone_1_1 = HOMARD.CreateZoneBox('Zone_1_1', -0.01, 1.01, -0.01, 0.4, -0.01, 0.6)
+
+  # Creation of the sphere zone_1_2
+    zone_1_2 = HOMARD.CreateZoneSphere('Zone_1_2', 0.5, 0.6, 0.7, 0.75)
+  #
+  # Creation of the hypotheses
+  # ==========================
+    dico = {}
+    dico["1"] = "raffinement"
+    dico["-1"] = "deraffinement"
+  # Creation of the hypothesis a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM
+    hyponame_1 = "a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM"
+    print "-------- Creation of the hypothesis", hyponame_1
+    hypo_1_1 = HOMARD.CreateHypothesis(hyponame_1)
+    hypo_1_1.SetField('RESU____ERRE_ELEM_SIGM__________')
+    hypo_1_1.SetUseComp(0)
+    hypo_1_1.AddComp('ERREST')
+    hypo_1_1.SetRefinThr(3, 10.1)
+    hypo_1_1.AddFieldInterp('RESU____DEPL____________________')
+    hypo_1_1.AddFieldInterp('RESU____ERRE_ELEM_SIGM__________')
+    print hyponame_1, " : champ utilisé :", hypo_1_1.GetFieldName()
+    print hyponame_1, " : composantes utilisées :", hypo_1_1.GetComps()
+    if ( len (hypo_1_1.GetFieldName()) > 0 ) :
+      print ".. caractéristiques de l'adaptation :", hypo_1_1.GetField()
+    print hyponame_1, " : champs interpolés :", hypo_1_1.GetFieldInterps()
+  # Creation of the hypothesis Zones_1_et_2
+    hyponame_2 = "Zones_1_et_2"
+    print "-------- Creation of the hypothesis", hyponame_2
+    zones_1_et_2 = HOMARD.CreateHypothesis(hyponame_2)
+    zones_1_et_2.AddZone('Zone_1_1', 1)
+    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
+    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()
+    print hyponame_2, " : champs interpolés :", zones_1_et_2.GetFieldInterps()
+  #
+  # Creation of the cases
+  # =====================
+    # Creation of the case
+    print "-------- Creation of the case", TEST_NAME
+    mesh_file = os.path.join(REP_DATA, TEST_NAME + '.00.med')
+    case_test_1 = HOMARD.CreateCase(TEST_NAME, 'MAILL', mesh_file)
+    case_test_1.SetDirName(DIRCASE)
+  #
+  # Creation of the iterations
+  # ==========================
+  # Creation of the iteration 1
+    iter_name = "I_" + TEST_NAME + "_1"
+    print "-------- Creation of the iteration", iter_name
+    iter_test_1_1 = case_test_1.NextIteration(iter_name)
+    iter_test_1_1.AssociateHypo(hyponame_1)
+    print ". Hypothese :", hyponame_1
+    iter_test_1_1.SetMeshName('M1')
+    iter_test_1_1.SetMeshFile(os.path.join(DIRCASE, 'maill.01.med'))
+    iter_test_1_1.SetFieldFile(os.path.join(REP_DATA, TEST_NAME + '.00.med'))
+    iter_test_1_1.SetTimeStepRank(1, 1)
+    iter_test_1_1.SetFieldInterpTimeStep('RESU____DEPL____________________', 1)
+    iter_test_1_1.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1)
+    print ". Instants d'interpolation :", iter_test_1_1.GetFieldInterpsTimeStepRank()
+    error = iter_test_1_1.Compute(1, 1)
+    if error :
+      error = 1
+      break
+
+  # Creation of the iteration 2
+    iter_name = "I_" + TEST_NAME + "_2"
+    print "-------- Creation of the iteration", iter_name
+    iter_test_1_2 = iter_test_1_1.NextIteration(iter_name)
+    iter_test_1_2.AssociateHypo(hyponame_1)
+    print ". Hypothese :", hyponame_1
+    iter_test_1_2.SetMeshName('M2')
+    iter_test_1_2.SetMeshFile(os.path.join(DIRCASE, 'maill.02.med'))
+    iter_test_1_2.SetFieldFile(os.path.join(REP_DATA, TEST_NAME + '.01.med'))
+    iter_test_1_2.SetTimeStepRank(1, 1)
+    iter_test_1_2.SetFieldInterpTimeStep('RESU____DEPL____________________', 1)
+    iter_test_1_2.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1)
+    print ". Instants d'interpolation :", iter_test_1_2.GetFieldInterpsTimeStepRank()
+    error = iter_test_1_2.Compute(1, 1)
+    if error :
+      error = 2
+      break
+
+  # Creation of the iteration 3
+    iter_name = "I_" + TEST_NAME + "_3"
+    print "-------- Creation of the iteration", iter_name
+    iter_test_1_3 = iter_test_1_2.NextIteration(iter_name)
+    iter_test_1_3.AssociateHypo(hyponame_2)
+    print ". Hypothese :", hyponame_2
+    iter_test_1_3.SetMeshName('M3')
+    iter_test_1_3.SetMeshFile(os.path.join(DIRCASE, 'maill.03.med'))
+    iter_test_1_2.SetFieldFile(os.path.join(REP_DATA, TEST_NAME + '.02.med'))
+    print ". Instants d'interpolation :", iter_test_1_3.GetFieldInterpsTimeStepRank()
+    error = iter_test_1_3.Compute(1, 1)
+    if error :
+      error = 3
+      break
+  #
+  # Creation of the schema YACS
+  # ===========================
+    scriptfile = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script_test.py")
+    scriptfile = os.path.normpath(scriptfile)
+    dirname = DIRCASE
+    yacs_test_1 = case_test_1.CreateYACSSchema("YACS_test_1", scriptfile, dirname, mesh_file)
+    error = yacs_test_1.Write()
+    if error :
+      error = 4
+      break
+  #
+    break
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, 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)
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/test_2.py b/src/tests/Test/test_2.py
new file mode 100755 (executable)
index 0000000..2d121d4
--- /dev/null
@@ -0,0 +1,192 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_2
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "test_2"
+DEBUG = False
+N_ITER_TEST_FILE = 3
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  error = 0
+#
+  while not error :
+  #
+    HOMARD.SetCurrentStudy(theStudy)
+  #
+  # Creation of the boundaries
+  # ==========================
+  # Creation of the discrete boundary boundary_1
+    boundary_1 = HOMARD.CreateBoundaryDi('internal_boundary', 'plaque', os.path.join(REP_DATA, TEST_NAME + '.fr.med'))
+  #
+  # Creation of the hypotheses
+  # ==========================
+  # Creation of the hypothesis 1
+    hyponame_1 = "hypo_" + TEST_NAME + "_1"
+    print "-------- Creation of the hypothesis", hyponame_1
+    hypo_test_2_1 = HOMARD.CreateHypothesis(hyponame_1)
+    hypo_test_2_1.SetUnifRefinUnRef(1)
+    hypo_test_2_1.AddGroup('EG')
+    hypo_test_2_1.AddGroup('BANDE')
+    print hyponame_1, " : zones utilisées :", hypo_test_2_1.GetZones()
+    print hyponame_1, " : champ utilisé :", hypo_test_2_1.GetFieldName()
+    print hyponame_1, " : composantes utilisées :", hypo_test_2_1.GetComps()
+    if ( len (hypo_test_2_1.GetFieldName()) > 0 ) :
+      print ".. caractéristiques de l'adaptation :", hypo_test_2_1.GetField()
+
+  # Creation of the hypothesis 2
+    hyponame_2 = "hypo_" + TEST_NAME + "_2"
+    print "-------- Creation of the hypothesis", hyponame_2
+    hypo_test_2_2 = HOMARD.CreateHypothesis(hyponame_2)
+    hypo_test_2_2.SetUnifRefinUnRef(1)
+    hypo_test_2_2.AddGroup('M_D')
+    print hyponame_2, " : zones utilisées :", hypo_test_2_2.GetZones()
+    print hyponame_2, " : champ utilisé :", hypo_test_2_2.GetFieldName()
+    print hyponame_2, " : composantes utilisées :", hypo_test_2_2.GetComps()
+    if ( len (hypo_test_2_2.GetFieldName()) > 0 ) :
+      print ".. caractéristiques de l'adaptation :", hypo_test_2_2.GetField()
+  #
+  # Creation of the cases
+  # =====================
+    # Creation of the case
+    mesh_file = os.path.join(REP_DATA, TEST_NAME + '.00.med')
+    case_test_2 = HOMARD.CreateCase(TEST_NAME, 'PLAQUE_0', mesh_file)
+    case_test_2.SetDirName(DIRCASE)
+    case_test_2.AddBoundaryGroup('internal_boundary', '')
+  #
+  # Creation of the iterations
+  # ==========================
+  # Creation of the iteration 1
+    iter_name = "I_" + TEST_NAME + "_1"
+    iter_test_2_1 = case_test_2.NextIteration(iter_name)
+    iter_test_2_1.SetMeshName('PLAQUE_1')
+    iter_test_2_1.SetMeshFile(os.path.join(DIRCASE, 'maill.01.med'))
+    iter_test_2_1.AssociateHypo(hyponame_1)
+    error = iter_test_2_1.Compute(1, 1)
+    if error :
+      error = 1
+      break
+
+  # Creation of the iteration 2
+    iter_name = "I_" + TEST_NAME + "_2"
+    iter_test_2_2 = iter_test_2_1.NextIteration(iter_name)
+    iter_test_2_2.SetMeshName('PLAQUE_2')
+    iter_test_2_2.SetMeshFile(os.path.join(DIRCASE, 'maill.02.med'))
+    iter_test_2_2.AssociateHypo(hyponame_1)
+    error = iter_test_2_2.Compute(1, 1)
+    if error :
+      error = 2
+      break
+
+  # Creation of the iteration 3
+    iter_name = "I_" + TEST_NAME + "_3"
+    iter_test_2_3 = iter_test_2_2.NextIteration(iter_name)
+    iter_test_2_3.SetMeshName('PLAQUE_3')
+    iter_test_2_3.SetMeshFile(os.path.join(DIRCASE, 'maill.03.med'))
+    iter_test_2_3.AssociateHypo(hyponame_2)
+    error = iter_test_2_3.Compute(1, 1)
+    if error :
+      error = 3
+      break
+  #
+  # Creation of the schema YACS
+  # ===========================
+    scriptfile = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script_test.py")
+    scriptfile = os.path.normpath(scriptfile)
+    dirname = DIRCASE
+    yacs_test_2 = case_test_2.CreateYACSSchema("YACS_test_2", scriptfile, dirname, mesh_file)
+    yacs_test_2.SetMaxIter(4)
+    yacs_test_2.SetType(1)
+    filexml = os.path.join(DIRCASE, 'yacs_test_2.xml')
+    error = yacs_test_2.WriteOnFile(filexml)
+    if error :
+      error = 4
+      break
+  #
+    break
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, 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)
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/test_3.py b/src/tests/Test/test_3.py
new file mode 100755 (executable)
index 0000000..1c4527f
--- /dev/null
@@ -0,0 +1,226 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_3
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "test_3"
+DEBUG = False
+N_BOUCLE = 2
+N_ITER_TEST_FILE = 2
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  error = 0
+#
+  while not error :
+  #
+    HOMARD.SetCurrentStudy(theStudy)
+  #
+  # Creation of the boundaries
+  # ==========================
+  # Creation of the discrete boundary
+    boundary_3_1 = HOMARD.CreateBoundaryDi('courbes', 'COURBES', os.path.join(REP_DATA, TEST_NAME + '.fr.med'))
+  #
+  # Creation of the external cylinder
+    boundary_3_2 = HOMARD.CreateBoundaryCylinder('cyl_ext', 50.0, 25., -25., 1., 0., 0., 100.)
+  #
+  # Creation of the internal cylinder
+    boundary_3_3 = HOMARD.CreateBoundaryCylinder('cyl_int', 50.0, 25., -25., 1., 0., 0., 50.)
+  #
+  # Creation of the first sphere
+    boundary_3_4 = HOMARD.CreateBoundarySphere('sphere_1', 50.0, 25., -25., 100.)
+  #
+  # Creation of the second sphere
+    boundary_3_5 = HOMARD.CreateBoundarySphere('sphere_2', 450.0, 25., -25., 100.)
+  #
+  # Creation of the hypotheses
+  # ==========================
+  # Uniform refinement
+    hyponame = "hypo_" + TEST_NAME
+    print "-------- Creation of the hypothesis", hyponame
+    hypo_test_3 = HOMARD.CreateHypothesis(hyponame)
+    hypo_test_3.SetUnifRefinUnRef(1)
+    print hyponame, " : zones utilisées :", hypo_test_3.GetZones()
+    print hyponame, " : champ utilisé :", hypo_test_3.GetFieldName()
+    print hyponame, " : composantes utilisées :", hypo_test_3.GetComps()
+  #
+    for num in range (N_BOUCLE+1) :
+  #
+      print "-------- num =", num, "--------"
+  #
+  # Creation of the case case_test_3
+  # ===========================
+      if ( num <= 1 ) :
+        print "-------- Creation of the case", TEST_NAME
+        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.AddBoundaryGroup('cyl_ext', 'EXT')
+        case_test_3.AddBoundaryGroup('cyl_int', 'INT')
+        case_test_3.AddBoundaryGroup('sphere_1', 'END_1')
+        case_test_3.AddBoundaryGroup('sphere_2', 'END_2')
+  #
+  # Creation of the iterations
+  # ==========================
+  # Creation of the iteration 1
+      iter_name = "I_" + TEST_NAME + "_1"
+      print "-------- Creation of the iteration", iter_name
+      iter_test_3_1 = case_test_3.NextIteration(iter_name)
+      iter_test_3_1.SetMeshName('MOYEU_1')
+      iter_test_3_1.SetMeshFile(os.path.join(DIRCASE, 'maill.01.med'))
+      iter_test_3_1.AssociateHypo('hypo_test_3')
+      error = iter_test_3_1.Compute(1, 1)
+      if error :
+        error = 10*num + 1
+        break
+
+  # Creation of the iteration 2
+      iter_name = "I_" + TEST_NAME + "_2"
+      print "-------- Creation of the iteration", iter_name
+      iter_test_3_2 = iter_test_3_1.NextIteration(iter_name)
+      iter_test_3_2.SetMeshName('MOYEU_2')
+      iter_test_3_2.SetMeshFile(os.path.join(DIRCASE, 'maill.02.med'))
+      iter_test_3_2.AssociateHypo('hypo_test_3')
+      error = iter_test_3_2.Compute(1, 1)
+      if error :
+        error = 10*num + 2
+        break
+  #
+  # Creation of the schema YACS
+  # ===========================
+      scriptfile = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script_test.py")
+      scriptfile = os.path.normpath(scriptfile)
+      dirname = DIRCASE
+      yacsname = "YACS_" + TEST_NAME
+      print "-------- Creation of the schema", yacsname
+      yacs_test_3 = case_test_3.CreateYACSSchema(yacsname, scriptfile, dirname, mesh_file)
+      yacs_test_3.SetType(2)
+      yacs_test_3.SetMaxIter(2)
+      error = yacs_test_3.Write()
+      if error :
+        error = 10*num + 5
+        break
+
+  # Destructions
+  # ============
+  # Destruction of the schema, sauf a la fin
+      if ( num < N_BOUCLE ) :
+        print "-------- Destruction of the schema", yacs_test_3.GetName()
+        error = yacs_test_3.Delete(1)
+        if error :
+          error = 10*num + 6
+          break
+  # After the first loop, the case is deleted, except the final mesh files
+  # All the iterations are deleted
+      if ( num == 0 ) :
+        print "-------- Destruction of the case", case_test_3.GetName()
+        error = case_test_3.Delete(0)
+        if error :
+          break
+  # After the second loop, the iterations are deleted, with the final mesh files
+      elif ( num == 1 ) :
+  # Recursive destruction of the iterations
+        print "-------- Recursive destruction of the iteration", iter_test_3_1.GetName()
+        error = iter_test_3_1.Delete(1)
+        if error :
+          error = 10*num + 3
+          break
+  # Destruction and creation of the hypothese
+        if ( num == 1 ) :
+          print "-------- Destruction of the hypothese", hypo_test_3.GetName()
+          error = hypo_test_3.Delete()
+          if error :
+            error = 10*num + 4
+            break
+          hyponame = "hypo_test_3"
+          print "-------- Creation of the hypothesis", hyponame
+          hypo_test_3 = HOMARD.CreateHypothesis(hyponame)
+          hypo_test_3.SetUnifRefinUnRef(1)
+  #
+    break
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, eee:
+  raise Exception('Pb in homard_exec: '+eee.message)
+#
+# Test of the results
+#
+N_REP_TEST_FILE = N_ITER_TEST_FILE*N_BOUCLE
+DESTROY_DIR = not DEBUG
+test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/test_4.py b/src/tests/Test/test_4.py
new file mode 100755 (executable)
index 0000000..335c5d4
--- /dev/null
@@ -0,0 +1,349 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_4
+"""
+__revision__ = "V2.1"
+
+#========================================================================
+TEST_NAME = "test_4"
+DEBUG = False
+N_ITER_TEST_FILE = 3
+DX = 600.
+DY = 400.
+DZ = 200.
+#========================================================================
+import os
+import tempfile
+import sys
+import numpy as np
+import salome
+import GEOM
+import SMESH
+import HOMARD
+import MEDCoupling as mc
+import MEDLoader as ml
+#
+# ==================================
+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 remove_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()
+# ==================================
+
+salome.salome_init()
+
+import SALOMEDS
+from salome.geom import geomBuilder
+from salome.smesh import smeshBuilder
+from salome.StdMeshers import StdMeshersBuilder
+#
+from MEDLoader import MEDLoader
+from MEDCouplingRemapper import MEDCouplingRemapper
+
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def geom_smesh_exec(theStudy):
+  """
+Python script for GEOM and SMESH
+  """
+  error = 0
+#
+  while not error :
+  #
+    geompy = geomBuilder.New(theStudy)
+  #
+  # Creation of the box
+  # ===================
+    box_g = geompy.MakeBoxDXDYDZ(DX, DY, DZ, "BOX")
+
+  # Creation of the mesh
+  # ====================
+    smesh = smeshBuilder.New(theStudy)
+    box_m = smesh.Mesh(box_g)
+    smesh.SetName(box_m.GetMesh(), 'MESH')
+  #
+  # Creation of the hypotheses
+  # ==========================
+    regular_1d = box_m.Segment()
+    smesh.SetName(regular_1d.GetAlgorithm(), 'Regular_1D')
+    length = min(DX, DY, DZ) / 5.
+    local_length = regular_1d.LocalLength(length, None, 1e-07)
+    smesh.SetName(local_length, 'Local Length')
+  #
+    quadrangle_2d = box_m.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+    smesh.SetName(quadrangle_2d.GetAlgorithm(), 'Quadrangle_2D')
+    quadrangle_parameters = quadrangle_2d.QuadrangleParameters(StdMeshersBuilder.QUAD_STANDARD, -1, [], [])
+    smesh.SetName(quadrangle_parameters, 'Quadrangle Parameters')
+  #
+    hexa_3d = box_m.Hexahedron(algo=smeshBuilder.Hexa)
+    smesh.SetName(hexa_3d.GetAlgorithm(), 'Hexa_3D')
+  #
+  # Computation
+  # ===========
+  #
+    isDone = box_m.Compute()
+    if not isDone :
+      error = 1
+      break
+  #
+  # MED exportation
+  # ===============
+  #
+    try:
+      ficmed = os.path.join(DIRCASE, 'maill.00.med')
+      box_m.ExportMED( ficmed, 0, SMESH.MED_V2_2, 1, None, 1)
+    except Exception, eee:
+      error = 2
+      raise Exception('ExportToMEDX() failed. '+eee.message)
+  #
+    break
+  #
+  return error
+
+#========================================================================
+#
+#========================================================================
+def field_exec(theStudy, niter):
+  """
+Python script for MEDCoupling
+  """
+  error = 0
+#
+  while not error :
+  #
+  # The mesh
+  # ========
+    ficmed = os.path.join(DIRCASE, 'maill.%02d.med' % niter)
+    meshMEDFileRead = ml.MEDFileMesh.New(ficmed)
+    meshRead0 = meshMEDFileRead.getMeshAtLevel(0)
+  # Valeurs of the field
+  # ====================
+    nbNodes = meshRead0.getNumberOfNodes()
+    valeur = mc.DataArrayDouble(nbNodes)
+    for iaux, taux in enumerate(meshRead0.getCoords()) :
+      #ligne   = "x = %f" % taux[0]
+      #ligne  += ", y = %f" % taux[1]
+      #ligne  += ", z = %f" % taux[2]
+      #print ligne
+      #distance = (taux[0]-DX*0.2)**2 + (taux[1]-DY*0.2)**2 + (taux[2]-DZ*0.4)**2
+      distance = min(abs(taux[0]-DX*0.4), abs(taux[1]-DY*0.2), abs(taux[2]-DZ*0.4))
+      valeur[iaux] = 1.e0 / max ( 1.e-5, np.sqrt(distance) )
+    #print ". valeur", valeur
+    nparr = valeur.toNumPyArray()
+    print ". mini/maxi", nparr.min(), nparr.max()
+  #
+  # Creation of the field
+  # =====================
+    field = ml.MEDCouplingFieldDouble(ml.ON_NODES, ml.ONE_TIME)
+    field.setArray(valeur)
+    field.setMesh(meshRead0)
+    field.setName("DISTANCE")
+  #
+    fMEDFile_ch = ml.MEDFileField1TS()
+    fMEDFile_ch.setFieldNoProfileSBT(field)     # No profile desired on the field, Sort By Type
+    fMEDFile_ch.write(ficmed, 0) # 0 to indicate that we *append* (and no overwrite) to the MED file
+  #
+    break
+  #
+  return error
+
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  error = 0
+#
+  while not error :
+  #
+    HOMARD.SetCurrentStudy(theStudy)
+  #
+  # Creation of the zones
+  # =====================
+  #
+    epsilon = min(DX, DY, DZ) / 100.
+  # Creation of the box zone_4_1
+    zone_4_1 = HOMARD.CreateZoneBox('Zone_4_1', -epsilon, DX/3.+epsilon, DY/4.-epsilon, 3.*DY/4.+epsilon, 4.*DZ/5.-epsilon, DZ+epsilon)
+
+  # Creation of the sphere zone_4_2
+    rayon = min(DX, DY, DZ) / 4.
+    zone_4_2 = HOMARD.CreateZoneSphere('Zone_4_2', DX/3., DY*0.3, DZ*0.6, rayon)
+  #
+  # Creation of the hypotheses
+  # ==========================
+    dico = {}
+    dico["1"] = "raffinement"
+    dico["-1"] = "deraffinement"
+  # Creation of the hypothesis hypo_4_1
+    hyponame_1 = "Zone_1"
+    print "-------- Creation of the hypothesis", hyponame_1
+    hypo_4_1 = HOMARD.CreateHypothesis(hyponame_1)
+    hypo_4_1.AddZone('Zone_4_1', 1)
+    hypo_4_1.SetExtraOutput(2)
+    laux = hypo_4_1.GetZones()
+    nbzone = len(laux)/2
+    jaux = 0
+    for iaux in range(nbzone) :
+      print hyponame_1, " : ", dico[laux[jaux+1]], "sur la zone", laux[jaux]
+      jaux += 2
+  # Creation of the hypothesis hypo_4_2
+    hyponame_2 = "Zone_2"
+    print "-------- Creation of the hypothesis", hyponame_2
+    hypo_4_2 = HOMARD.CreateHypothesis(hyponame_2)
+    hypo_4_2.AddZone('Zone_4_2', 1)
+    hypo_4_2.SetExtraOutput(2)
+    laux = hypo_4_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
+  # Creation of the hypothesis DISTANCE INVERSE
+    hyponame_3 = "DISTANCE INVERSE"
+    print "-------- Creation of the hypothesis", hyponame_3
+    hypo_4_3 = HOMARD.CreateHypothesis(hyponame_3)
+    hypo_4_3.SetField('DISTANCE')
+    hypo_4_3.SetUseComp(0)
+    hypo_4_3.SetRefinThr(1, 0.3)
+    hypo_4_3.SetUnRefThr(1, 0.2)
+    hypo_4_3.AddFieldInterp('DISTANCE')
+    hypo_4_3.SetExtraOutput(2)
+    print hyponame_3, " : zones utilisées :", hypo_4_3.GetZones()
+    print hyponame_3, " : champ utilisé :", hypo_4_3.GetFieldName()
+    print hyponame_3, " : composantes utilisées :", hypo_4_3.GetComps()
+    if ( len (hypo_4_3.GetFieldName()) > 0 ) :
+      print ".. caractéristiques de l'adaptation :", hypo_4_3.GetField()
+    print hyponame_3, " : champs interpolés :", hypo_4_3.GetFieldInterps()
+  #
+  # Creation of the cases
+  # =====================
+    # Creation of the case
+    print "-------- Creation of the case", TEST_NAME
+    mesh_file = os.path.join(DIRCASE, 'maill.00.med')
+    case_test_4 = HOMARD.CreateCase(TEST_NAME, 'MESH', mesh_file)
+    case_test_4.SetDirName(DIRCASE)
+  #
+  # Creation of the iterations
+  # ==========================
+  # Creation of the iteration 1
+    iter_name = "I_" + TEST_NAME + "_1"
+    print "-------- Creation of the iteration", iter_name
+    iter_test_4_1 = case_test_4.NextIteration(iter_name)
+    iter_test_4_1.AssociateHypo(hyponame_1)
+    print ". Hypothese :", hyponame_1
+    iter_test_4_1.SetMeshName('M1')
+    iter_test_4_1.SetMeshFile(os.path.join(DIRCASE, 'maill.01.med'))
+    error = iter_test_4_1.Compute(1, 2)
+    if error :
+      error = 1
+      break
+
+  # Creation of the iteration 2
+    iter_name = "I_" + TEST_NAME + "_2"
+    print "-------- Creation of the iteration", iter_name
+    iter_test_4_2 = iter_test_4_1.NextIteration(iter_name)
+    iter_test_4_2.AssociateHypo(hyponame_2)
+    print ". Hypothese :", hyponame_2
+    iter_test_4_2.SetMeshName('M2')
+    iter_test_4_2.SetMeshFile(os.path.join(DIRCASE, 'maill.02.med'))
+    error = iter_test_4_2.Compute(1, 2)
+    if error :
+      error = 2
+      break
+
+  # Creation of the iteration 3
+  #
+    error = field_exec(theStudy, 2)
+    if error :
+      error = 30
+      break
+  #
+    iter_name = "I_" + TEST_NAME + "_3"
+    print "-------- Creation of the iteration", iter_name
+    iter_test_4_3 = iter_test_4_2.NextIteration(iter_name)
+    iter_test_4_3.AssociateHypo(hyponame_3)
+    print ". Hypothese :", hyponame_3
+    iter_test_4_3.SetMeshName('M3')
+    iter_test_4_3.SetFieldFile(os.path.join(DIRCASE, 'maill.02.med'))
+    iter_test_4_3.SetMeshFile(os.path.join(DIRCASE, 'maill.03.med'))
+    error = iter_test_4_3.Compute(1, 2)
+    if error :
+      error = 3
+      break
+  #
+    break
+  #
+  return error
+
+#========================================================================
+#
+# Geometry and Mesh
+#
+try :
+  ERROR = geom_smesh_exec(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in geom_smesh_exec')
+except Exception, eee:
+  raise Exception('Pb in geom_smesh_exec: '+eee.message)
+
+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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, 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)
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/test_util.py b/src/tests/Test/test_util.py
new file mode 100755 (executable)
index 0000000..baef9ad
--- /dev/null
@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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
+Copyright EDF-R&D 2014
+Utilitaires pour les tests
+"""
+__revision__ = "V1.3"
+
+import os
+#========================================================================
+#========================================================================
+def remove_dir(directory) :
+  """
+Empties, then removes a directory.
+Copyright EDF-R&D 2013
+  """
+#
+  l_aux = os.listdir(directory)
+  for fic in l_aux :
+    fic_a = os.path.join(directory, fic)
+    if os.path.isdir(fic_a) :
+      remove_dir(fic_a)
+    else :
+      os.remove(fic_a)
+  os.rmdir(directory)
+#
+  return
+#
+#========================================================================
+#========================================================================
+def test_results(rep_test, test_name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir = True) :
+  """
+Test of the result
+rep_test: repertoire des tests
+test_name: nom du test
+dircase: repertoire des resultats du test
+n_iter_test_file: numero de l'iteration a tester
+n_rep_test_file: numero du repertoire de l'iteration a tester
+destroy_dir: destruction du repertoire de calcul
+Copyright EDF-R&D 2014
+  """
+  #
+  test_file_suff = "apad.%02d.bilan" % n_iter_test_file
+  rep_test_file = "I%02d" % n_rep_test_file
+  #
+  test_file = os.path.join(rep_test, test_name + "." + test_file_suff)
+  mess_error_ref = "\nReference file: " + test_file
+  try :
+    file = open (test_file, "r")
+    mess_ref = file.readlines()
+    file.close()
+  except :
+    mess_error = mess_error_ref + "\nThis file does not exist.\n"
+    destroy_dir = False
+    raise Exception(mess_error)
+  #
+  test_file = os.path.join(dircase, rep_test_file, test_file_suff)
+  if os.path.isfile (test_file) :
+    file = open (test_file, "r")
+    mess = file.readlines()
+    file.close()
+  else :
+    mess_error  = "\nResult file: " + test_file
+    mess_error += "\nThis file does not exist.\n"
+    destroy_dir = False
+    raise Exception(mess_error)
+
+  nblign = len(mess_ref)
+  if ( len(mess) != nblign ):
+    mess_error = mess_error_ref +  "\nResult file: " + test_file
+    mess_error += "\nThe number of lines of the files are not the same.\n"
+    destroy_dir = False
+    raise Exception(mess_error)
+
+  for num in range(nblign) :
+    if (( "creation" not in mess_ref[num] ) and ( mess_ref[num] != mess[num])) :
+      message_erreur = "\nRefe : " + mess_ref[num]
+      message_erreur += "Test : " + mess[num][:-1]
+      message_erreur += "\nThe test is different from the reference."
+      destroy_dir = False
+      raise Exception(message_erreur)
+  #
+  if destroy_dir:
+    remove_dir(dircase)
+#
+  return
+#
+#========================================================================
+#========================================================================
diff --git a/src/tests/Test/tutorial_1.py b/src/tests/Test/tutorial_1.py
new file mode 100755 (executable)
index 0000000..c5cf70d
--- /dev/null
@@ -0,0 +1,142 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_1 associe au tutorial 1
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "tutorial_1"
+DEBUG = False
+N_ITER_TEST_FILE = 3
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# 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
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 1, -1)
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  #
+  homard.SetCurrentStudy(theStudy)
+  #
+  # 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)
+  #
+  # 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)
+
+  # 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_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)
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, 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)
+#
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 1, 1)
+# ==================================
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/tutorial_2.py b/src/tests/Test/tutorial_2.py
new file mode 100755 (executable)
index 0000000..ef3d723
--- /dev/null
@@ -0,0 +1,153 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_2 associe au tutorial 2
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "tutorial_2"
+DEBUG = False
+N_ITER_TEST_FILE = 2
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# 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
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 2, -1)
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  #
+  HOMARD.SetCurrentStudy(theStudy)
+  #
+  # 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)
+  #
+  # 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)
+  #
+  # 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
+  # ===
+  case_2 = HOMARD.CreateCase('case_2', 'MZERO', DATA_TUTORIAL+'/tutorial_2.00.med')
+  case_2.SetDirName(DIRCASE)
+  #
+  # 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)
+  #
+  # 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)
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, 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)
+#
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 2, 1)
+# ==================================
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/tutorial_3.py b/src/tests/Test/tutorial_3.py
new file mode 100755 (executable)
index 0000000..f16568b
--- /dev/null
@@ -0,0 +1,182 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_3 associe au tutorial 3
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "tutorial_3"
+DEBUG = False
+N_ITER_TEST_FILE = 2
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# 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
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 3, -1)
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  #
+  HOMARD.SetCurrentStudy(theStudy)
+  #
+  # 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
+  # ===
+  case_3 = HOMARD.CreateCase('case_3', 'G_0', DATA_TUTORIAL+'/tutorial_3.00.med')
+  case_3.SetDirName(DIRCASE)
+  #
+  # 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)
+  #
+  # 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)
+  #
+  # 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)
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, eee:
+  raise Exception('Pb in homard_exec: '+eee.message)
+#
+# Test of the results
+#
+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)
+#
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 3, 1)
+# ==================================
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/tutorial_4.py b/src/tests/Test/tutorial_4.py
new file mode 100755 (executable)
index 0000000..5ae91dd
--- /dev/null
@@ -0,0 +1,169 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_4 associe au tutorial 4
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "tutorial_4"
+DEBUG = False
+N_ITER_TEST_FILE = 3
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# 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
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 4, -1)
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  #
+  HOMARD.SetCurrentStudy(theStudy)
+#
+  # 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.)
+  #
+  boun_4_4 = HOMARD.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
+  #
+  boun_4_5 = HOMARD.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
+  #
+  # 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')
+  #
+  # 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' )
+  #
+  # 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)
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, 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)
+#
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 4, 1)
+# ==================================
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/Test/tutorial_5.py b/src/tests/Test/tutorial_5.py
new file mode 100755 (executable)
index 0000000..b5c8201
--- /dev/null
@@ -0,0 +1,153 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015  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_5 associe au tutorial 5
+"""
+__revision__ = "V3.1"
+
+#========================================================================
+TEST_NAME = "tutorial_5"
+DEBUG = False
+N_ITER_TEST_FILE = 2
+#========================================================================
+import os
+import tempfile
+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 remove_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()
+# 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
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 5, -1)
+# ==================================
+
+salome.salome_init()
+import iparameters
+IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+IPAR.append("AP_MODULES_LIST", "Homard")
+#
+#========================================================================
+#========================================================================
+def homard_exec(theStudy):
+  """
+Python script for HOMARD
+  """
+  #
+  HOMARD.SetCurrentStudy(theStudy)
+#
+  # 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')
+  #
+  # 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 )
+  #
+  # 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)
+  #
+  # 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', '')
+  #
+  # 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)
+  #
+  # 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)
+  #
+  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(salome.myStudy)
+  if ERROR :
+    raise Exception('Pb in homard_exec at iteration %d' %ERROR )
+except Exception, 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)
+#
+# ==================================
+gzip_gunzip(DATA_TUTORIAL, 5, 1)
+# ==================================
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+
diff --git a/src/tests/samples/test_1.00.med b/src/tests/samples/test_1.00.med
new file mode 100644 (file)
index 0000000..316e140
Binary files /dev/null and b/src/tests/samples/test_1.00.med differ
diff --git a/src/tests/samples/test_1.01.med b/src/tests/samples/test_1.01.med
new file mode 100644 (file)
index 0000000..661ce23
Binary files /dev/null and b/src/tests/samples/test_1.01.med differ
diff --git a/src/tests/samples/test_1.02.med b/src/tests/samples/test_1.02.med
new file mode 100644 (file)
index 0000000..1a9688c
Binary files /dev/null and b/src/tests/samples/test_1.02.med differ
diff --git a/src/tests/samples/test_1.apad.03.bilan b/src/tests/samples/test_1.apad.03.bilan
new file mode 100644 (file)
index 0000000..0204654
--- /dev/null
@@ -0,0 +1,74 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     MAILL                                                                           
+     Date de creation : jeudi 3 avril 2014 a 11 h 45 mn 28 s            
+     Dimension : 3
+     Degre : 2
+     C'est un maillage obtenu apres      3 adaptations.
+     Le niveau minimum actif est   :     1
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+     X                | INCONNUE          |  0.0000    |  1.0000    
+     Y                | INCONNUE          |  0.0000    |  1.0000    
+     Z                | INCONNUE          |  0.0000    |  1.0000    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *        379 *
+     * . dont sommets d'aretes                     *         67 *
+     * . dont milieux d'aretes                     *        312 *
+     ************************************************************
+
+     ************************************************************
+     *                      Mailles-Points                      *
+     ************************************************************
+     * Nombre total                                *          2 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *          2 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *          2 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *         98 *
+     * . dont triangles de regions 2D              *          0 *
+     * . dont triangles de bord                    *         98 *
+     * . dont triangles internes aux volumes       *          0 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *         22 *
+     * . du niveau   1.5                           *         28 *
+     * . du niveau   2                             *         48 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *        197 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *         13 *
+     * . du niveau   1.5                           *         64 *
+     * . du niveau   2                             *        120 *
+     ************************************************************
diff --git a/src/tests/samples/test_1.en.odt b/src/tests/samples/test_1.en.odt
new file mode 100644 (file)
index 0000000..005ba6a
Binary files /dev/null and b/src/tests/samples/test_1.en.odt differ
diff --git a/src/tests/samples/test_1.en.pdf b/src/tests/samples/test_1.en.pdf
new file mode 100644 (file)
index 0000000..909cb28
Binary files /dev/null and b/src/tests/samples/test_1.en.pdf differ
diff --git a/src/tests/samples/test_1.odt b/src/tests/samples/test_1.odt
new file mode 100644 (file)
index 0000000..cd2a657
Binary files /dev/null and b/src/tests/samples/test_1.odt differ
diff --git a/src/tests/samples/test_1.pdf b/src/tests/samples/test_1.pdf
new file mode 100644 (file)
index 0000000..caa7941
Binary files /dev/null and b/src/tests/samples/test_1.pdf differ
diff --git a/src/tests/samples/test_1.png b/src/tests/samples/test_1.png
new file mode 100644 (file)
index 0000000..046034c
Binary files /dev/null and b/src/tests/samples/test_1.png differ
diff --git a/src/tests/samples/test_2.00.med b/src/tests/samples/test_2.00.med
new file mode 100644 (file)
index 0000000..b4ada0f
Binary files /dev/null and b/src/tests/samples/test_2.00.med differ
diff --git a/src/tests/samples/test_2.apad.03.bilan b/src/tests/samples/test_2.apad.03.bilan
new file mode 100644 (file)
index 0000000..a236e7e
--- /dev/null
@@ -0,0 +1,53 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     PLAQUE_0                                                                        
+     Date de creation : jeudi 3 avril 2014 a 13 h 21 mn 21 s            
+     Dimension : 3
+     Degre : 2
+     C'est un maillage obtenu apres      3 adaptations.
+     Le niveau minimum actif est   :     0
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+     X                | INCONNUE          |-0.40000E-01| 0.40000E-01
+     Y                | INCONNUE          |-0.30000E-01| 0.30000E-01
+     Z                | INCONNUE          |-0.30854E-01| 0.30854E-01
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       1212 *
+     * . dont sommets d'aretes                     *        317 *
+     * . dont milieux d'aretes                     *        895 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        101 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *         53 *
+     * . dont aretes internes aux faces/volumes    *         48 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *        579 *
+     ************************************************************
+     * . du niveau   0                             *         33 *
+     * . du niveau   0.5                           *         14 *
+     * . du niveau   1                             *        148 *
+     * . du niveau   1.5                           *         48 *
+     * . du niveau   2                             *        336 *
+     ************************************************************
diff --git a/src/tests/samples/test_2.en.odt b/src/tests/samples/test_2.en.odt
new file mode 100644 (file)
index 0000000..21ffeac
Binary files /dev/null and b/src/tests/samples/test_2.en.odt differ
diff --git a/src/tests/samples/test_2.en.pdf b/src/tests/samples/test_2.en.pdf
new file mode 100644 (file)
index 0000000..51e1c33
Binary files /dev/null and b/src/tests/samples/test_2.en.pdf differ
diff --git a/src/tests/samples/test_2.fr.med b/src/tests/samples/test_2.fr.med
new file mode 100644 (file)
index 0000000..33315ed
Binary files /dev/null and b/src/tests/samples/test_2.fr.med differ
diff --git a/src/tests/samples/test_2.odt b/src/tests/samples/test_2.odt
new file mode 100644 (file)
index 0000000..1bcc259
Binary files /dev/null and b/src/tests/samples/test_2.odt differ
diff --git a/src/tests/samples/test_2.pdf b/src/tests/samples/test_2.pdf
new file mode 100644 (file)
index 0000000..c9122cb
Binary files /dev/null and b/src/tests/samples/test_2.pdf differ
diff --git a/src/tests/samples/test_2.png b/src/tests/samples/test_2.png
new file mode 100644 (file)
index 0000000..dced743
Binary files /dev/null and b/src/tests/samples/test_2.png differ
diff --git a/src/tests/samples/test_3.00.med b/src/tests/samples/test_3.00.med
new file mode 100644 (file)
index 0000000..c76b750
Binary files /dev/null and b/src/tests/samples/test_3.00.med differ
diff --git a/src/tests/samples/test_3.apad.02.bilan b/src/tests/samples/test_3.apad.02.bilan
new file mode 100644 (file)
index 0000000..2b49601
--- /dev/null
@@ -0,0 +1,66 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     MOYEU                                                                           
+     Date de creation : jeudi 3 avril 2014 a 13 h 22 mn 30 s            
+     Dimension : 3
+     Degre : 1
+     C'est un maillage obtenu apres      2 adaptations.
+     Le niveau minimum actif est   :     2
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+     x                | m                 | -36.603    |  536.60    
+     y                | m                 | -75.000    |  125.00    
+     z                | m                 | -125.00    |  75.000    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       3710 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        156 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *        156 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *       3232 *
+     * . dont triangles de regions 2D              *          0 *
+     * . dont triangles de bord                    *       3232 *
+     * . dont triangles internes aux volumes       *          0 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *          0 *
+     * . du niveau   2                             *       3232 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *      17280 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *          0 *
+     * . du niveau   2                             *      17280 *
+     ************************************************************
diff --git a/src/tests/samples/test_3.en.odt b/src/tests/samples/test_3.en.odt
new file mode 100644 (file)
index 0000000..0b65fe3
Binary files /dev/null and b/src/tests/samples/test_3.en.odt differ
diff --git a/src/tests/samples/test_3.en.pdf b/src/tests/samples/test_3.en.pdf
new file mode 100644 (file)
index 0000000..8981740
Binary files /dev/null and b/src/tests/samples/test_3.en.pdf differ
diff --git a/src/tests/samples/test_3.fr.med b/src/tests/samples/test_3.fr.med
new file mode 100644 (file)
index 0000000..99b15ca
Binary files /dev/null and b/src/tests/samples/test_3.fr.med differ
diff --git a/src/tests/samples/test_3.odt b/src/tests/samples/test_3.odt
new file mode 100644 (file)
index 0000000..a84751b
Binary files /dev/null and b/src/tests/samples/test_3.odt differ
diff --git a/src/tests/samples/test_3.pdf b/src/tests/samples/test_3.pdf
new file mode 100644 (file)
index 0000000..ffba80d
Binary files /dev/null and b/src/tests/samples/test_3.pdf differ
diff --git a/src/tests/samples/test_3.png b/src/tests/samples/test_3.png
new file mode 100644 (file)
index 0000000..19c94e8
Binary files /dev/null and b/src/tests/samples/test_3.png differ
diff --git a/src/tests/samples/test_4.apad.02.bilan b/src/tests/samples/test_4.apad.02.bilan
new file mode 100644 (file)
index 0000000..c1a9ff3
--- /dev/null
@@ -0,0 +1,96 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     MESH                                                                            
+     Date de creation : lundi 2 novembre 2015 a 11 h 32 mn 46 s         
+     Dimension : 3
+     Degre : 1
+     C'est un maillage obtenu apres      2 adaptations.
+     Le niveau minimum actif est   :     0
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+                      |                   |  0.0000    |  600.00    
+                      |                   |  0.0000    |  400.00    
+                      |                   |  0.0000    |  200.00    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       1389 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        124 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *        124 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *         54 *
+     * . dont triangles de regions 2D              *         54 *
+     * . dont triangles de bord                    *          0 *
+     * . dont triangles internes aux volumes       *          0 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *         54 *
+     ************************************************************
+
+     ************************************************************
+     *                      Quadrangles                         *
+     ************************************************************
+     * Nombre total                                *        616 *
+     * . dont quadrangles de regions 2D            *          9 *
+     * . dont quadrangles de bord                  *        607 *
+     * . dont quadrangles internes aux volumes     *          0 *
+     ************************************************************
+     * . du niveau   0                             *        503 *
+     * . du niveau   0.5                           *          9 *
+     * . du niveau   1                             *        104 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *        200 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *        192 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *          8 *
+     ************************************************************
+
+     ************************************************************
+     *                      Hexaedres                           *
+     ************************************************************
+     * Nombre total                                *        847 *
+     ************************************************************
+     * . du niveau   0                             *        657 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *        190 *
+     ************************************************************
+
+     ************************************************************
+     *                      Pyramides                           *
+     ************************************************************
+     * Nombre total                                *        454 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *        412 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *         42 *
+     ************************************************************
diff --git a/src/tests/samples/test_4.apad.03.bilan b/src/tests/samples/test_4.apad.03.bilan
new file mode 100644 (file)
index 0000000..9ab79c5
--- /dev/null
@@ -0,0 +1,98 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     MESH                                                                            
+     Date de creation : mardi 3 novembre 2015 a 9 h 1 mn 54 s           
+     Dimension : 3
+     Degre : 1
+     C'est un maillage obtenu apres      3 adaptations.
+     Le niveau minimum actif est   :     0
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+                      |                   |  0.0000    |  600.00    
+                      |                   |  0.0000    |  400.00    
+                      |                   |  0.0000    |  200.00    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       2503 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        120 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *        120 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *        582 *
+     * . dont triangles de regions 2D              *        582 *
+     * . dont triangles de bord                    *          0 *
+     * . dont triangles internes aux volumes       *          0 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *        558 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *         24 *
+     ************************************************************
+
+     ************************************************************
+     *                      Quadrangles                         *
+     ************************************************************
+     * Nombre total                                *        455 *
+     * . dont quadrangles de regions 2D            *         81 *
+     * . dont quadrangles de bord                  *        374 *
+     * . dont quadrangles internes aux volumes     *          0 *
+     ************************************************************
+     * . du niveau   0                             *        322 *
+     * . du niveau   0.5                           *         81 *
+     * . du niveau   1                             *         52 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *       1952 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *       1824 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *        128 *
+     ************************************************************
+
+     ************************************************************
+     *                      Hexaedres                           *
+     ************************************************************
+     * Nombre total                                *        523 *
+     ************************************************************
+     * . du niveau   0                             *        283 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *        240 *
+     ************************************************************
+
+     ************************************************************
+     *                      Pyramides                           *
+     ************************************************************
+     * Nombre total                                *       3559 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *       3239 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *        320 *
+     ************************************************************
diff --git a/src/tests/samples/test_4.en.odt b/src/tests/samples/test_4.en.odt
new file mode 100644 (file)
index 0000000..af57cf3
Binary files /dev/null and b/src/tests/samples/test_4.en.odt differ
diff --git a/src/tests/samples/test_4.en.pdf b/src/tests/samples/test_4.en.pdf
new file mode 100644 (file)
index 0000000..f45e2c5
Binary files /dev/null and b/src/tests/samples/test_4.en.pdf differ
diff --git a/src/tests/samples/test_4.odt b/src/tests/samples/test_4.odt
new file mode 100644 (file)
index 0000000..841bdf3
Binary files /dev/null and b/src/tests/samples/test_4.odt differ
diff --git a/src/tests/samples/test_4.pdf b/src/tests/samples/test_4.pdf
new file mode 100644 (file)
index 0000000..a313e82
Binary files /dev/null and b/src/tests/samples/test_4.pdf differ
diff --git a/src/tests/samples/tutorial_1.apad.03.bilan b/src/tests/samples/tutorial_1.apad.03.bilan
new file mode 100644 (file)
index 0000000..dbe302a
--- /dev/null
@@ -0,0 +1,78 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     MAILL                                                                           
+     Date de creation : jeudi 3 avril 2014 a 13 h 24 mn 23 s            
+     Dimension : 3
+     Degre : 2
+     C'est un maillage obtenu apres      3 adaptations.
+     Le niveau minimum actif est   :     3
+     Le niveau maximum atteint est :     3
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+     X                | INCONNUE          |  0.0000    |  1.0000    
+     Y                | INCONNUE          |  0.0000    |  1.0000    
+     Z                | INCONNUE          |  0.0000    |  1.0000    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       4913 *
+     * . dont sommets d'aretes                     *        729 *
+     * . dont milieux d'aretes                     *       4184 *
+     ************************************************************
+
+     ************************************************************
+     *                      Mailles-Points                      *
+     ************************************************************
+     * Nombre total                                *          2 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *          8 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *          8 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *        768 *
+     * . dont triangles de regions 2D              *          0 *
+     * . dont triangles de bord                    *        768 *
+     * . dont triangles internes aux volumes       *          0 *
+     ************************************************************
+     * . 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                             *        768 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *       3072 *
+     ************************************************************
+     * . 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                             *       3072 *
+     ************************************************************
diff --git a/src/tests/samples/tutorial_2.apad.02.bilan b/src/tests/samples/tutorial_2.apad.02.bilan
new file mode 100644 (file)
index 0000000..c45015c
--- /dev/null
@@ -0,0 +1,74 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     MZERO                                                                           
+     Date de creation : jeudi 3 avril 2014 a 13 h 25 mn 10 s            
+     Dimension : 3
+     Degre : 2
+     C'est un maillage obtenu apres      2 adaptations.
+     Le niveau minimum actif est   :     1
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+     X                | INCONNUE          |  0.0000    |  1.0000    
+     Y                | INCONNUE          |  0.0000    |  1.0000    
+     Z                | INCONNUE          |  0.0000    |  1.0000    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *        231 *
+     * . dont sommets d'aretes                     *         43 *
+     * . dont milieux d'aretes                     *        188 *
+     ************************************************************
+
+     ************************************************************
+     *                      Mailles-Points                      *
+     ************************************************************
+     * Nombre total                                *          2 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *          3 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *          3 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *         66 *
+     * . dont triangles de regions 2D              *          0 *
+     * . dont triangles de bord                    *         66 *
+     * . dont triangles internes aux volumes       *          0 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          6 *
+     * . du niveau   1                             *         24 *
+     * . du niveau   1.5                           *         12 *
+     * . du niveau   2                             *         24 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *        113 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          4 *
+     * . du niveau   1                             *         19 *
+     * . du niveau   1.5                           *         42 *
+     * . du niveau   2                             *         48 *
+     ************************************************************
diff --git a/src/tests/samples/tutorial_3.apad.02.bilan b/src/tests/samples/tutorial_3.apad.02.bilan
new file mode 100644 (file)
index 0000000..30afe19
--- /dev/null
@@ -0,0 +1,104 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     G_0                                                                             
+     Date de creation : lundi 2 novembre 2015 a 9 h 14 mn 1 s           
+     Dimension : 3
+     Degre : 2
+     C'est un maillage obtenu apres      2 adaptations.
+     Le niveau minimum actif est   :     0
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+     X                | INCONNUE          |  0.0000    | 0.60000    
+     Y                | INCONNUE          |  0.0000    | 0.30000    
+     Z                | INCONNUE          |  0.0000    | 0.20000    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *      14455 *
+     * . dont sommets d'aretes                     *       3839 *
+     * . dont milieux d'aretes                     *      10616 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        764 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *        764 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *        288 *
+     * . dont triangles de regions 2D              *        288 *
+     * . dont triangles de bord                    *          0 *
+     * . dont triangles internes aux volumes       *          0 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *        168 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *        120 *
+     ************************************************************
+
+     ************************************************************
+     *                      Quadrangles                         *
+     ************************************************************
+     * Nombre total                                *       2534 *
+     * . dont quadrangles de regions 2D            *          0 *
+     * . dont quadrangles de bord                  *       2534 *
+     * . dont quadrangles internes aux volumes     *          0 *
+     ************************************************************
+     * . du niveau   0                             *        142 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *       2296 *
+     * . du niveau   1.5                           *          0 *
+     * . du niveau   2                             *         96 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *        256 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *         96 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *        160 *
+     ************************************************************
+
+     ************************************************************
+     *                      Hexaedres                           *
+     ************************************************************
+     * Nombre total                                *       2230 *
+     ************************************************************
+     * . du niveau   0                             *         66 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *       1972 *
+     * . du niveau   1.5                           *          0 *
+     * . du niveau   2                             *        192 *
+     ************************************************************
+
+     ************************************************************
+     *                      Pyramides                           *
+     ************************************************************
+     * Nombre total                                *        432 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *        120 *
+     * . du niveau   1                             *          0 *
+     * . du niveau   1.5                           *        312 *
+     ************************************************************
diff --git a/src/tests/samples/tutorial_4.apad.03.bilan b/src/tests/samples/tutorial_4.apad.03.bilan
new file mode 100644 (file)
index 0000000..45a987d
--- /dev/null
@@ -0,0 +1,65 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     PIQUAGE                                                                         
+     Date de creation : lundi 2 novembre 2015 a 9 h 13 mn 13 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.45    
+                      |                   | -250.62    |  189.69    
+                      |                   | -285.21    |  155.03    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *      12825 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        758 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *          0 *
+     * . dont aretes internes aux faces/volumes    *        758 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *      20838 *
+     * . dont triangles de regions 2D              *          0 *
+     * . dont triangles de bord                    *      20560 *
+     * . dont triangles internes aux volumes       *        278 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *       3530 *
+     * . du niveau   1.5                           *        380 *
+     * . du niveau   2                             *      16928 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *      43490 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   0.5                           *          0 *
+     * . du niveau   1                             *      18174 *
+     * . du niveau   1.5                           *      25316 *
+     ************************************************************
diff --git a/src/tests/samples/tutorial_5.apad.02.bilan b/src/tests/samples/tutorial_5.apad.02.bilan
new file mode 100644 (file)
index 0000000..c703911
--- /dev/null
@@ -0,0 +1,57 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     COEUR_2D                                                                        
+     Date de creation : mardi 24 novembre 2015 a 9 h 33 mn 8 s          
+     Dimension : 2
+     Degre : 1
+     C'est un maillage obtenu apres      2 adaptations.
+     Le niveau minimum actif est   :     0
+     Le niveau maximum atteint est :     2
+
+         Direction    |       Unite       |  Minimum   |  Maximum
+     ---------------------------------------------------------------
+                      |                   | -248.00    |  248.00    
+                      |                   | -248.00    |  248.00    
+
+
+   NOMBRE D'ENTITES DU CALCUL
+   ==========================
+
+
+     ************************************************************
+     *                      Noeuds                              *
+     ************************************************************
+     * Nombre total                                *       1542 *
+     ************************************************************
+
+     ************************************************************
+     *                      Segments                            *
+     ************************************************************
+     * Nombre total                                *        418 *
+     * . dont aretes isolees                       *          0 *
+     * . dont aretes de bord de regions 2D         *        300 *
+     * . dont aretes internes aux faces/volumes    *        118 *
+     ************************************************************
+
+     ************************************************************
+     *                      Triangles                           *
+     ************************************************************
+     * Nombre total                                *       2204 *
+     ************************************************************
+     * . du niveau   0                             *         88 *
+     * . du niveau   1                             *        980 *
+     * . du niveau   2                             *       1136 *
+     ************************************************************
+
+     ************************************************************
+     *                      Quadrangles                         *
+     ************************************************************
+     * Nombre total                                *        334 *
+     ************************************************************
+     * . du niveau   0                             *        162 *
+     * . du niveau   1                             *        172 *
+     ************************************************************
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
deleted file mode 100755 (executable)
index 1dbb442..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (C) 2007-2015  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
-#
-
-SET(HOMARD_TEST_FILES
-  test_util.py
-  test_1.pdf
-  test_1.en.pdf
-  test_1.py
-  test_1.00.med
-  test_1.01.med
-  test_1.02.med
-  test_1.apad.03.bilan
-  test_2.pdf
-  test_2.en.pdf
-  test_2.py
-  test_2.00.med
-  test_2.fr.med
-  test_2.apad.03.bilan
-  test_3.pdf
-  test_3.en.pdf
-  test_3.py
-  test_3.00.med
-  test_3.fr.med
-  test_3.apad.02.bilan
-  test_4.pdf
-  test_4.en.pdf
-  test_4.py
-  test_4.apad.03.bilan
-  test_11.py
-  test_11.apad.03.bilan
-  test_12.py
-  test_12.apad.02.bilan
-  test_13.py
-  test_13.apad.02.bilan
-  test_14.py
-  test_14.apad.03.bilan
-  test_15.py
-  test_15.apad.02.bilan
-)
-
-INSTALL(FILES ${HOMARD_TEST_FILES} DESTINATION ${SALOME_HOMARD_INSTALL_RES_DATA})
diff --git a/tests/test_1.00.med b/tests/test_1.00.med
deleted file mode 100644 (file)
index 316e140..0000000
Binary files a/tests/test_1.00.med and /dev/null differ
diff --git a/tests/test_1.01.med b/tests/test_1.01.med
deleted file mode 100644 (file)
index 661ce23..0000000
Binary files a/tests/test_1.01.med and /dev/null differ
diff --git a/tests/test_1.02.med b/tests/test_1.02.med
deleted file mode 100644 (file)
index 1a9688c..0000000
Binary files a/tests/test_1.02.med and /dev/null differ
diff --git a/tests/test_1.apad.03.bilan b/tests/test_1.apad.03.bilan
deleted file mode 100644 (file)
index 0204654..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     MAILL                                                                           
-     Date de creation : jeudi 3 avril 2014 a 11 h 45 mn 28 s            
-     Dimension : 3
-     Degre : 2
-     C'est un maillage obtenu apres      3 adaptations.
-     Le niveau minimum actif est   :     1
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-     X                | INCONNUE          |  0.0000    |  1.0000    
-     Y                | INCONNUE          |  0.0000    |  1.0000    
-     Z                | INCONNUE          |  0.0000    |  1.0000    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *        379 *
-     * . dont sommets d'aretes                     *         67 *
-     * . dont milieux d'aretes                     *        312 *
-     ************************************************************
-
-     ************************************************************
-     *                      Mailles-Points                      *
-     ************************************************************
-     * Nombre total                                *          2 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *          2 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *          2 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *         98 *
-     * . dont triangles de regions 2D              *          0 *
-     * . dont triangles de bord                    *         98 *
-     * . dont triangles internes aux volumes       *          0 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *         22 *
-     * . du niveau   1.5                           *         28 *
-     * . du niveau   2                             *         48 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *        197 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *         13 *
-     * . du niveau   1.5                           *         64 *
-     * . du niveau   2                             *        120 *
-     ************************************************************
diff --git a/tests/test_1.en.odt b/tests/test_1.en.odt
deleted file mode 100644 (file)
index 005ba6a..0000000
Binary files a/tests/test_1.en.odt and /dev/null differ
diff --git a/tests/test_1.en.pdf b/tests/test_1.en.pdf
deleted file mode 100644 (file)
index 909cb28..0000000
Binary files a/tests/test_1.en.pdf and /dev/null differ
diff --git a/tests/test_1.odt b/tests/test_1.odt
deleted file mode 100644 (file)
index cd2a657..0000000
Binary files a/tests/test_1.odt and /dev/null differ
diff --git a/tests/test_1.pdf b/tests/test_1.pdf
deleted file mode 100644 (file)
index caa7941..0000000
Binary files a/tests/test_1.pdf and /dev/null differ
diff --git a/tests/test_1.png b/tests/test_1.png
deleted file mode 100644 (file)
index 046034c..0000000
Binary files a/tests/test_1.png and /dev/null differ
diff --git a/tests/test_1.py b/tests/test_1.py
deleted file mode 100755 (executable)
index 2a1d189..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_1
-"""
-__revision__ = "V2.6"
-
-#========================================================================
-Test_Name = "test_1"
-debug=False
-n_iter_test_file = 3
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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()
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  error = 0
-#
-  while not error :
-  #
-    homard.SetCurrentStudy(theStudy)
-  #
-  # Creation of the zones
-  # =====================
-  # Creation of the box Zone_1_1
-    Zone_1_1 = homard.CreateZoneBox('Zone_1_1', -0.01, 1.01, -0.01, 0.4, -0.01, 0.6)
-
-  # Creation of the sphere Zone_1_2
-    Zone_1_2 = homard.CreateZoneSphere('Zone_1_2', 0.5, 0.6, 0.7, 0.75)
-  #
-  # Creation of the hypotheses
-  # ==========================
-    dico = {}
-    dico["1"] = "raffinement"
-    dico["-1"] = "deraffinement"
-  # Creation of the hypothesis a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM
-    HypoName_1 = "a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM"
-    print "-------- Creation of the hypothesis", HypoName_1
-    Hypo_1_1 = homard.CreateHypothesis(HypoName_1)
-    Hypo_1_1.SetField('RESU____ERRE_ELEM_SIGM__________')
-    Hypo_1_1.SetUseComp(0)
-    Hypo_1_1.AddComp('ERREST')
-    Hypo_1_1.SetRefinThr(3, 10.1)
-    Hypo_1_1.AddFieldInterp('RESU____DEPL____________________')
-    Hypo_1_1.AddFieldInterp('RESU____ERRE_ELEM_SIGM__________')
-    print HypoName_1, " : champ utilisé :", Hypo_1_1.GetFieldName()
-    print HypoName_1, " : composantes utilisées :", Hypo_1_1.GetComps()
-    if ( len (Hypo_1_1.GetFieldName()) > 0 ) :
-      print ".. caractéristiques de l'adaptation :", Hypo_1_1.GetField()
-    print HypoName_1, " : champs interpolés :", Hypo_1_1.GetFieldInterps()
-  # Creation of the hypothesis Zones_1_et_2
-    HypoName_2 = "Zones_1_et_2"
-    print "-------- Creation of the hypothesis", HypoName_2
-    Zones_1_et_2 = homard.CreateHypothesis(HypoName_2)
-    Zones_1_et_2.AddZone('Zone_1_1', 1)
-    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
-    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()
-    print HypoName_2, " : champs interpolés :", Zones_1_et_2.GetFieldInterps()
-  #
-  # Creation of the cases
-  # =====================
-    # Creation of the case
-    CaseName = "Case_" + Test_Name
-    print "-------- Creation of the case", CaseName
-    MeshFile = os.path.join(Rep_Test, Test_Name + '.00.med')
-    Case_test_1 = homard.CreateCase(CaseName, 'MAILL', MeshFile)
-    Case_test_1.SetDirName(dircase)
-  #
-  # Creation of the iterations
-  # ==========================
-  # Creation of the iteration 1
-    IterName = "I_" + Test_Name + "_1"
-    print "-------- Creation of the iteration", IterName
-    Iter_test_1_1 = Case_test_1.NextIteration(IterName)
-    Iter_test_1_1.AssociateHypo(HypoName_1)
-    print ". Hypothese :", HypoName_1
-    Iter_test_1_1.SetMeshName('M1')
-    Iter_test_1_1.SetMeshFile(os.path.join(dircase, 'maill.01.med'))
-    Iter_test_1_1.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.00.med'))
-    Iter_test_1_1.SetTimeStepRank(1, 1)
-    Iter_test_1_1.SetFieldInterpTimeStep('RESU____DEPL____________________', 1)
-    Iter_test_1_1.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1)
-    print ". Instants d'interpolation :", Iter_test_1_1.GetFieldInterpsTimeStepRank()
-    error = Iter_test_1_1.Compute(1, 1)
-    if error :
-      error = 1
-      break
-
-  # Creation of the iteration 2
-    IterName = "I_" + Test_Name + "_2"
-    print "-------- Creation of the iteration", IterName
-    Iter_test_1_2 = Iter_test_1_1.NextIteration(IterName)
-    Iter_test_1_2.AssociateHypo(HypoName_1)
-    print ". Hypothese :", HypoName_1
-    Iter_test_1_2.SetMeshName('M2')
-    Iter_test_1_2.SetMeshFile(os.path.join(dircase, 'maill.02.med'))
-    Iter_test_1_2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.01.med'))
-    Iter_test_1_2.SetTimeStepRank(1, 1)
-    Iter_test_1_2.SetFieldInterpTimeStep('RESU____DEPL____________________', 1)
-    Iter_test_1_2.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1)
-    print ". Instants d'interpolation :", Iter_test_1_2.GetFieldInterpsTimeStepRank()
-    error = Iter_test_1_2.Compute(1, 1)
-    if error :
-      error = 2
-      break
-
-  # Creation of the iteration 3
-    IterName = "I_" + Test_Name + "_3"
-    print "-------- Creation of the iteration", IterName
-    Iter_test_1_3 = Iter_test_1_2.NextIteration(IterName)
-    Iter_test_1_3.AssociateHypo(HypoName_2)
-    print ". Hypothese :", HypoName_2
-    Iter_test_1_3.SetMeshName('M3')
-    Iter_test_1_3.SetMeshFile(os.path.join(dircase, 'maill.03.med'))
-    Iter_test_1_2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.02.med'))
-    print ". Instants d'interpolation :", Iter_test_1_3.GetFieldInterpsTimeStepRank()
-    error = Iter_test_1_3.Compute(1, 1)
-    if error :
-      error = 3
-      break
-  #
-  # Creation of the schema YACS
-  # ===========================
-    ScriptFile = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script_test.py")
-    ScriptFile = os.path.normpath(ScriptFile)
-    DirName = dircase
-    YACS_test_1 = Case_test_1.CreateYACSSchema("YACS_test_1", ScriptFile, DirName, MeshFile)
-    error = YACS_test_1.Write()
-    if error :
-      error = 4
-      break
-  #
-    break
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_11.apad.03.bilan b/tests/test_11.apad.03.bilan
deleted file mode 100644 (file)
index dbe302a..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     MAILL                                                                           
-     Date de creation : jeudi 3 avril 2014 a 13 h 24 mn 23 s            
-     Dimension : 3
-     Degre : 2
-     C'est un maillage obtenu apres      3 adaptations.
-     Le niveau minimum actif est   :     3
-     Le niveau maximum atteint est :     3
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-     X                | INCONNUE          |  0.0000    |  1.0000    
-     Y                | INCONNUE          |  0.0000    |  1.0000    
-     Z                | INCONNUE          |  0.0000    |  1.0000    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *       4913 *
-     * . dont sommets d'aretes                     *        729 *
-     * . dont milieux d'aretes                     *       4184 *
-     ************************************************************
-
-     ************************************************************
-     *                      Mailles-Points                      *
-     ************************************************************
-     * Nombre total                                *          2 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *          8 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *          8 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *        768 *
-     * . dont triangles de regions 2D              *          0 *
-     * . dont triangles de bord                    *        768 *
-     * . dont triangles internes aux volumes       *          0 *
-     ************************************************************
-     * . 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                             *        768 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *       3072 *
-     ************************************************************
-     * . 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                             *       3072 *
-     ************************************************************
diff --git a/tests/test_11.py b/tests/test_11.py
deleted file mode 100755 (executable)
index 00f8770..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_11 associe au tutorial 1
-"""
-__revision__ = "V2.3"
-
-#========================================================================
-Test_Name = "test_11"
-debug=False
-n_iter_test_file = 3
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
-from tutorial_util import gzip_gunzip
-# ==================================
-gzip_gunzip(data_dir, 1, -1)
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  #
-  homard.SetCurrentStudy(theStudy)
-  #
-  # Hypotheses
-  # ==========
-  Hypo_1 = homard.CreateHypothesis('Hypo_1')
-  Hypo_1.SetUnifRefinUnRef(1)
-  #
-  # Cas
-  # ===
-  Case_1 = homard.CreateCase('Case_1', 'MAILL', data_dir+'/tutorial_1.00.med')
-  Case_1.SetDirName(dircase)
-  #
-  # 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)
-
-  # 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_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)
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-# ==================================
-gzip_gunzip(data_dir, 1, 1)
-# ==================================
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_12.apad.02.bilan b/tests/test_12.apad.02.bilan
deleted file mode 100644 (file)
index c45015c..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     MZERO                                                                           
-     Date de creation : jeudi 3 avril 2014 a 13 h 25 mn 10 s            
-     Dimension : 3
-     Degre : 2
-     C'est un maillage obtenu apres      2 adaptations.
-     Le niveau minimum actif est   :     1
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-     X                | INCONNUE          |  0.0000    |  1.0000    
-     Y                | INCONNUE          |  0.0000    |  1.0000    
-     Z                | INCONNUE          |  0.0000    |  1.0000    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *        231 *
-     * . dont sommets d'aretes                     *         43 *
-     * . dont milieux d'aretes                     *        188 *
-     ************************************************************
-
-     ************************************************************
-     *                      Mailles-Points                      *
-     ************************************************************
-     * Nombre total                                *          2 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *          3 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *          3 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *         66 *
-     * . dont triangles de regions 2D              *          0 *
-     * . dont triangles de bord                    *         66 *
-     * . dont triangles internes aux volumes       *          0 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          6 *
-     * . du niveau   1                             *         24 *
-     * . du niveau   1.5                           *         12 *
-     * . du niveau   2                             *         24 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *        113 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          4 *
-     * . du niveau   1                             *         19 *
-     * . du niveau   1.5                           *         42 *
-     * . du niveau   2                             *         48 *
-     ************************************************************
diff --git a/tests/test_12.py b/tests/test_12.py
deleted file mode 100755 (executable)
index 97a2aa8..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_11 associe au tutorial 2
-"""
-__revision__ = "V2.3"
-
-#========================================================================
-Test_Name = "test_12"
-debug=False
-n_iter_test_file = 2
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
-from tutorial_util import gzip_gunzip
-# ==================================
-gzip_gunzip(data_dir, 2, -1)
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  #
-  homard.SetCurrentStudy(theStudy)
-  #
-  # Creation des zones
-  # ==================
-  # Box "Zone_0"
-  Zone_0 = homard.CreateZoneBox ('Zone_0', -0.1, 1.1, -0.1, 1.1, 0.9, 1.1)
-  #
-  # Sphere "Zone_1"
-  Zone_1 = homard.CreateZoneSphere ('Zone_1', 0., 0., 0., 1.05)
-  #
-  # Box "Zone_2"
-  Zone_2 = homard.CreateZoneBox ('Zone_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
-  #
-  # Hypothese "Hypo_2"
-  # ==================
-  Hypo_2 = homard.CreateHypothesis('Hypo_2')
-  Hypo_2.AddZone('Zone_1', 1)
-  Hypo_2.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)
-  #
-  # Cas
-  # ===
-  Case_2 = homard.CreateCase('Case_2', 'MZERO', data_dir+'/tutorial_2.00.med')
-  Case_2.SetDirName(dircase)
-  #
-  # 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)
-  #
-  # 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)
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-# ==================================
-gzip_gunzip(data_dir, 2, 1)
-# ==================================
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_13.apad.02.bilan b/tests/test_13.apad.02.bilan
deleted file mode 100644 (file)
index 30afe19..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     G_0                                                                             
-     Date de creation : lundi 2 novembre 2015 a 9 h 14 mn 1 s           
-     Dimension : 3
-     Degre : 2
-     C'est un maillage obtenu apres      2 adaptations.
-     Le niveau minimum actif est   :     0
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-     X                | INCONNUE          |  0.0000    | 0.60000    
-     Y                | INCONNUE          |  0.0000    | 0.30000    
-     Z                | INCONNUE          |  0.0000    | 0.20000    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *      14455 *
-     * . dont sommets d'aretes                     *       3839 *
-     * . dont milieux d'aretes                     *      10616 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *        764 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *        764 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *        288 *
-     * . dont triangles de regions 2D              *        288 *
-     * . dont triangles de bord                    *          0 *
-     * . dont triangles internes aux volumes       *          0 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *        168 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *        120 *
-     ************************************************************
-
-     ************************************************************
-     *                      Quadrangles                         *
-     ************************************************************
-     * Nombre total                                *       2534 *
-     * . dont quadrangles de regions 2D            *          0 *
-     * . dont quadrangles de bord                  *       2534 *
-     * . dont quadrangles internes aux volumes     *          0 *
-     ************************************************************
-     * . du niveau   0                             *        142 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *       2296 *
-     * . du niveau   1.5                           *          0 *
-     * . du niveau   2                             *         96 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *        256 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *         96 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *        160 *
-     ************************************************************
-
-     ************************************************************
-     *                      Hexaedres                           *
-     ************************************************************
-     * Nombre total                                *       2230 *
-     ************************************************************
-     * . du niveau   0                             *         66 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *       1972 *
-     * . du niveau   1.5                           *          0 *
-     * . du niveau   2                             *        192 *
-     ************************************************************
-
-     ************************************************************
-     *                      Pyramides                           *
-     ************************************************************
-     * Nombre total                                *        432 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *        120 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *        312 *
-     ************************************************************
diff --git a/tests/test_13.py b/tests/test_13.py
deleted file mode 100755 (executable)
index 0d074ce..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_11 associe au tutorial 3
-"""
-__revision__ = "V2.3"
-
-#========================================================================
-Test_Name = "test_13"
-debug=False
-n_iter_test_file = 2
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
-from tutorial_util import gzip_gunzip
-# ==================================
-gzip_gunzip(data_dir, 3, -1)
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  #
-  homard.SetCurrentStudy(theStudy)
-  #
-  # 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
-  # ===
-  Case_3 = homard.CreateCase('Case_3', 'G_0', data_dir+'/tutorial_3.00.med')
-  Case_3.SetDirName(dircase)
-  #
-  # 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_dir+'/tutorial_3.00.med')
-  Iter_3_1.SetTimeStepRank( 1, 1)
-  Iter_3_1.AssociateHypo('Hypo_0vers1')
-  error = 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_dir+'/tutorial_3.01.med')
-  Iter_3_2.SetTimeStepRank(1, 1)
-  Iter_3_2.AssociateHypo('Hypo_1vers2')
-  error = 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_dir+'/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)
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = 3
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-# ==================================
-gzip_gunzip(data_dir, 3, 1)
-# ==================================
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_14.apad.03.bilan b/tests/test_14.apad.03.bilan
deleted file mode 100644 (file)
index 45a987d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     PIQUAGE                                                                         
-     Date de creation : lundi 2 novembre 2015 a 9 h 13 mn 13 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.45    
-                      |                   | -250.62    |  189.69    
-                      |                   | -285.21    |  155.03    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *      12825 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *        758 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *        758 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *      20838 *
-     * . dont triangles de regions 2D              *          0 *
-     * . dont triangles de bord                    *      20560 *
-     * . dont triangles internes aux volumes       *        278 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *       3530 *
-     * . du niveau   1.5                           *        380 *
-     * . du niveau   2                             *      16928 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *      43490 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *      18174 *
-     * . du niveau   1.5                           *      25316 *
-     ************************************************************
diff --git a/tests/test_14.py b/tests/test_14.py
deleted file mode 100755 (executable)
index 2d9a91c..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_11 associe au tutorial 4
-"""
-__revision__ = "V2.3"
-
-#========================================================================
-Test_Name = "test_14"
-debug=False
-n_iter_test_file = 3
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
-from tutorial_util import gzip_gunzip
-# ==================================
-gzip_gunzip(data_dir, 4, -1)
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  #
-  homard.SetCurrentStudy(theStudy)
-#
-  # Frontieres
-  # ==========
-  Boun_4_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', data_dir+'/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.)
-  #
-  Boun_4_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.)
-  #
-  Boun_4_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.)
-  #
-  # 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')
-  #
-  # Cas
-  # ===
-  Case_4 = homard.CreateCase('Case_4', 'PIQUAGE', data_dir+'/tutorial_4.00.med')
-  Case_4.SetDirName(dircase)
-  Case_4.AddBoundaryGroup( 'intersection', '' )
-  Case_4.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' )
-  Case_4.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
-  Case_4.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' )
-  Case_4.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
-  Case_4.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' )
-  Case_4.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
-  #
-  # 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)
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-# ==================================
-gzip_gunzip(data_dir, 4, 1)
-# ==================================
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_15.apad.02.bilan b/tests/test_15.apad.02.bilan
deleted file mode 100644 (file)
index c703911..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     COEUR_2D                                                                        
-     Date de creation : mardi 24 novembre 2015 a 9 h 33 mn 8 s          
-     Dimension : 2
-     Degre : 1
-     C'est un maillage obtenu apres      2 adaptations.
-     Le niveau minimum actif est   :     0
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-                      |                   | -248.00    |  248.00    
-                      |                   | -248.00    |  248.00    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *       1542 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *        418 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *        300 *
-     * . dont aretes internes aux faces/volumes    *        118 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *       2204 *
-     ************************************************************
-     * . du niveau   0                             *         88 *
-     * . du niveau   1                             *        980 *
-     * . du niveau   2                             *       1136 *
-     ************************************************************
-
-     ************************************************************
-     *                      Quadrangles                         *
-     ************************************************************
-     * Nombre total                                *        334 *
-     ************************************************************
-     * . du niveau   0                             *        162 *
-     * . du niveau   1                             *        172 *
-     ************************************************************
diff --git a/tests/test_15.py b/tests/test_15.py
deleted file mode 100755 (executable)
index da64c66..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_11 associe au tutorial 5
-"""
-__revision__ = "V2.3"
-
-#========================================================================
-Test_Name = "test_15"
-debug=False
-n_iter_test_file = 2
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
-data_dir = os.path.normpath(data_dir)
-sys.path.append(data_dir)
-from tutorial_util import gzip_gunzip
-# ==================================
-gzip_gunzip(data_dir, 5, -1)
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  #
-  homard.SetCurrentStudy(theStudy)
-#
-  # Frontiere
-  # =========
-  # Creation of the discrete boundary Boun_5_1
-  Boun_5_1 = homard.CreateBoundaryDi('Boun_5_1', 'MAIL_EXT', data_dir+'/tutorial_5.fr.med')
-  #
-  # Creation 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 )
-  #
-  # 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)
-  #
-  # Cas
-  # ===
-  Case_5 = homard.CreateCase('Case_5', 'COEUR_2D', data_dir+'/tutorial_5.00.med')
-  Case_5.SetDirName(dircase)
-  Case_5.SetConfType(1)
-  Case_5.AddBoundaryGroup('Boun_5_1', '')
-  #
-  # 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)
-  #
-  # 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)
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-# ==================================
-gzip_gunzip(data_dir, 5, 1)
-# ==================================
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_2.00.med b/tests/test_2.00.med
deleted file mode 100644 (file)
index b4ada0f..0000000
Binary files a/tests/test_2.00.med and /dev/null differ
diff --git a/tests/test_2.apad.03.bilan b/tests/test_2.apad.03.bilan
deleted file mode 100644 (file)
index a236e7e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     PLAQUE_0                                                                        
-     Date de creation : jeudi 3 avril 2014 a 13 h 21 mn 21 s            
-     Dimension : 3
-     Degre : 2
-     C'est un maillage obtenu apres      3 adaptations.
-     Le niveau minimum actif est   :     0
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-     X                | INCONNUE          |-0.40000E-01| 0.40000E-01
-     Y                | INCONNUE          |-0.30000E-01| 0.30000E-01
-     Z                | INCONNUE          |-0.30854E-01| 0.30854E-01
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *       1212 *
-     * . dont sommets d'aretes                     *        317 *
-     * . dont milieux d'aretes                     *        895 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *        101 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *         53 *
-     * . dont aretes internes aux faces/volumes    *         48 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *        579 *
-     ************************************************************
-     * . du niveau   0                             *         33 *
-     * . du niveau   0.5                           *         14 *
-     * . du niveau   1                             *        148 *
-     * . du niveau   1.5                           *         48 *
-     * . du niveau   2                             *        336 *
-     ************************************************************
diff --git a/tests/test_2.en.odt b/tests/test_2.en.odt
deleted file mode 100644 (file)
index 21ffeac..0000000
Binary files a/tests/test_2.en.odt and /dev/null differ
diff --git a/tests/test_2.en.pdf b/tests/test_2.en.pdf
deleted file mode 100644 (file)
index 51e1c33..0000000
Binary files a/tests/test_2.en.pdf and /dev/null differ
diff --git a/tests/test_2.fr.med b/tests/test_2.fr.med
deleted file mode 100644 (file)
index 33315ed..0000000
Binary files a/tests/test_2.fr.med and /dev/null differ
diff --git a/tests/test_2.odt b/tests/test_2.odt
deleted file mode 100644 (file)
index 1bcc259..0000000
Binary files a/tests/test_2.odt and /dev/null differ
diff --git a/tests/test_2.pdf b/tests/test_2.pdf
deleted file mode 100644 (file)
index c9122cb..0000000
Binary files a/tests/test_2.pdf and /dev/null differ
diff --git a/tests/test_2.png b/tests/test_2.png
deleted file mode 100644 (file)
index dced743..0000000
Binary files a/tests/test_2.png and /dev/null differ
diff --git a/tests/test_2.py b/tests/test_2.py
deleted file mode 100755 (executable)
index c2c2c97..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_2
-"""
-__revision__ = "V2.5"
-
-#========================================================================
-Test_Name = "test_2"
-debug=False
-n_iter_test_file = 3
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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()
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  error = 0
-#
-  while not error :
-  #
-    homard.SetCurrentStudy(theStudy)
-  #
-  # Creation of the boundaries
-  # ==========================
-  # Creation of the discrete boundary Boundary_1
-    Boundary_1 = homard.CreateBoundaryDi('internal_boundary', 'plaque', os.path.join(Rep_Test, Test_Name + '.fr.med'))
-  #
-  # Creation of the hypotheses
-  # ==========================
-  # Creation of the hypothesis 1
-    HypoName_1 = "Hypo_" + Test_Name + "_1"
-    print "-------- Creation of the hypothesis", HypoName_1
-    Hypo_test_2_1 = homard.CreateHypothesis(HypoName_1)
-    Hypo_test_2_1.SetUnifRefinUnRef(1)
-    Hypo_test_2_1.AddGroup('EG')
-    Hypo_test_2_1.AddGroup('BANDE')
-    print HypoName_1, " : zones utilisées :", Hypo_test_2_1.GetZones()
-    print HypoName_1, " : champ utilisé :", Hypo_test_2_1.GetFieldName()
-    print HypoName_1, " : composantes utilisées :", Hypo_test_2_1.GetComps()
-    if ( len (Hypo_test_2_1.GetFieldName()) > 0 ) :
-      print ".. caractéristiques de l'adaptation :", Hypo_test_2_1.GetField()
-
-  # Creation of the hypothesis 2
-    HypoName_2 = "Hypo_" + Test_Name + "_2"
-    print "-------- Creation of the hypothesis", HypoName_2
-    Hypo_test_2_2 = homard.CreateHypothesis(HypoName_2)
-    Hypo_test_2_2.SetUnifRefinUnRef(1)
-    Hypo_test_2_2.AddGroup('M_D')
-    print HypoName_2, " : zones utilisées :", Hypo_test_2_2.GetZones()
-    print HypoName_2, " : champ utilisé :", Hypo_test_2_2.GetFieldName()
-    print HypoName_2, " : composantes utilisées :", Hypo_test_2_2.GetComps()
-    if ( len (Hypo_test_2_2.GetFieldName()) > 0 ) :
-      print ".. caractéristiques de l'adaptation :", Hypo_test_2_2.GetField()
-  #
-  # Creation of the cases
-  # =====================
-    # Creation of the case
-    CaseName = "Case_" + Test_Name
-    MeshFile = os.path.join(Rep_Test, Test_Name + '.00.med')
-    Case_test_2 = homard.CreateCase(CaseName, 'PLAQUE_0', MeshFile)
-    Case_test_2.SetDirName(dircase)
-    Case_test_2.AddBoundaryGroup('internal_boundary', '')
-  #
-  # Creation of the iterations
-  # ==========================
-  # Creation of the iteration 1
-    IterName = "I_" + Test_Name + "_1"
-    Iter_test_2_1 = Case_test_2.NextIteration(IterName)
-    Iter_test_2_1.SetMeshName('PLAQUE_1')
-    Iter_test_2_1.SetMeshFile(os.path.join(dircase, 'maill.01.med'))
-    Iter_test_2_1.AssociateHypo(HypoName_1)
-    error = Iter_test_2_1.Compute(1, 1)
-    if error :
-      error = 1
-      break
-
-  # Creation of the iteration 2
-    IterName = "I_" + Test_Name + "_2"
-    Iter_test_2_2 = Iter_test_2_1.NextIteration(IterName)
-    Iter_test_2_2.SetMeshName('PLAQUE_2')
-    Iter_test_2_2.SetMeshFile(os.path.join(dircase, 'maill.02.med'))
-    Iter_test_2_2.AssociateHypo(HypoName_1)
-    error = Iter_test_2_2.Compute(1, 1)
-    if error :
-      error = 2
-      break
-
-  # Creation of the iteration 3
-    IterName = "I_" + Test_Name + "_3"
-    Iter_test_2_3 = Iter_test_2_2.NextIteration(IterName)
-    Iter_test_2_3.SetMeshName('PLAQUE_3')
-    Iter_test_2_3.SetMeshFile(os.path.join(dircase, 'maill.03.med'))
-    Iter_test_2_3.AssociateHypo(HypoName_2)
-    error = Iter_test_2_3.Compute(1, 1)
-    if error :
-      error = 3
-      break
-  #
-  # Creation of the schema YACS
-  # ===========================
-    ScriptFile = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script_test.py")
-    ScriptFile = os.path.normpath(ScriptFile)
-    DirName = dircase
-    YACS_test_2 = Case_test_2.CreateYACSSchema("YACS_test_2", ScriptFile, DirName, MeshFile)
-    YACS_test_2.SetMaxIter(4)
-    YACS_test_2.SetType(1)
-    filexml = os.path.join(dircase, 'YACS_test_2.xml')
-    error = YACS_test_2.WriteOnFile(filexml)
-    if error :
-      error = 4
-      break
-  #
-    break
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_3.00.med b/tests/test_3.00.med
deleted file mode 100644 (file)
index c76b750..0000000
Binary files a/tests/test_3.00.med and /dev/null differ
diff --git a/tests/test_3.apad.02.bilan b/tests/test_3.apad.02.bilan
deleted file mode 100644 (file)
index 2b49601..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     MOYEU                                                                           
-     Date de creation : jeudi 3 avril 2014 a 13 h 22 mn 30 s            
-     Dimension : 3
-     Degre : 1
-     C'est un maillage obtenu apres      2 adaptations.
-     Le niveau minimum actif est   :     2
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-     x                | m                 | -36.603    |  536.60    
-     y                | m                 | -75.000    |  125.00    
-     z                | m                 | -125.00    |  75.000    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *       3710 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *        156 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *        156 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *       3232 *
-     * . dont triangles de regions 2D              *          0 *
-     * . dont triangles de bord                    *       3232 *
-     * . dont triangles internes aux volumes       *          0 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *          0 *
-     * . du niveau   2                             *       3232 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *      17280 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *          0 *
-     * . du niveau   2                             *      17280 *
-     ************************************************************
diff --git a/tests/test_3.en.odt b/tests/test_3.en.odt
deleted file mode 100644 (file)
index 0b65fe3..0000000
Binary files a/tests/test_3.en.odt and /dev/null differ
diff --git a/tests/test_3.en.pdf b/tests/test_3.en.pdf
deleted file mode 100644 (file)
index 8981740..0000000
Binary files a/tests/test_3.en.pdf and /dev/null differ
diff --git a/tests/test_3.fr.med b/tests/test_3.fr.med
deleted file mode 100644 (file)
index 99b15ca..0000000
Binary files a/tests/test_3.fr.med and /dev/null differ
diff --git a/tests/test_3.odt b/tests/test_3.odt
deleted file mode 100644 (file)
index a84751b..0000000
Binary files a/tests/test_3.odt and /dev/null differ
diff --git a/tests/test_3.pdf b/tests/test_3.pdf
deleted file mode 100644 (file)
index ffba80d..0000000
Binary files a/tests/test_3.pdf and /dev/null differ
diff --git a/tests/test_3.png b/tests/test_3.png
deleted file mode 100644 (file)
index 19c94e8..0000000
Binary files a/tests/test_3.png and /dev/null differ
diff --git a/tests/test_3.py b/tests/test_3.py
deleted file mode 100755 (executable)
index 358a17f..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_3
-"""
-__revision__ = "V2.4"
-
-#========================================================================
-Test_Name = "test_3"
-debug=False
-n_boucle = 2
-n_iter_test_file = 2
-#========================================================================
-import os
-import tempfile
-import sys
-import HOMARD
-import salome
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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()
-# ==================================
-
-salome.salome_init()
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  error = 0
-#
-  while not error :
-#
-    homard.SetCurrentStudy(theStudy)
-  #
-  # Creation of the boundaries
-  # ==========================
-  # Creation of the discrete boundary
-    Boundary_3_1 = homard.CreateBoundaryDi('courbes', 'COURBES', os.path.join(Rep_Test, Test_Name + '.fr.med'))
-  #
-  # Creation of the external cylinder
-    Boundary_3_2 = homard.CreateBoundaryCylinder('cyl_ext', 50.0, 25., -25., 1., 0., 0., 100.)
-  #
-  # Creation of the internal cylinder
-    Boundary_3_3 = homard.CreateBoundaryCylinder('cyl_int', 50.0, 25., -25., 1., 0., 0., 50.)
-  #
-  # Creation of the first sphere
-    Boundary_3_4 = homard.CreateBoundarySphere('sphere_1', 50.0, 25., -25., 100.)
-  #
-  # Creation of the second sphere
-    Boundary_3_5 = homard.CreateBoundarySphere('sphere_2', 450.0, 25., -25., 100.)
-  #
-  # Creation of the hypotheses
-  # ==========================
-  # Uniform refinement
-    HypoName = "Hypo_" + Test_Name
-    print "-------- Creation of the hypothesis", HypoName
-    Hypo_test_3 = homard.CreateHypothesis(HypoName)
-    Hypo_test_3.SetUnifRefinUnRef(1)
-    print HypoName, " : zones utilisées :", Hypo_test_3.GetZones()
-    print HypoName, " : champ utilisé :", Hypo_test_3.GetFieldName()
-    print HypoName, " : composantes utilisées :", Hypo_test_3.GetComps()
-  #
-    for num in range (n_boucle+1) :
-  #
-      print "-------- num =", num, "--------"
-  #
-  # Creation of the case Case_test_3
-  # ===========================
-      if ( num <= 1 ) :
-        CaseName = "Case_" + Test_Name
-        print "-------- Creation of the case", CaseName
-        MeshFile = os.path.join(Rep_Test, Test_Name + '.00.med')
-        Case_test_3 = homard.CreateCase(CaseName, 'MOYEU', MeshFile)
-        Case_test_3.SetDirName(dircase)
-        Case_test_3.AddBoundaryGroup('courbes', '')
-        Case_test_3.AddBoundaryGroup('cyl_ext', 'EXT')
-        Case_test_3.AddBoundaryGroup('cyl_int', 'INT')
-        Case_test_3.AddBoundaryGroup('sphere_1', 'END_1')
-        Case_test_3.AddBoundaryGroup('sphere_2', 'END_2')
-  #
-  # Creation of the iterations
-  # ==========================
-  # Creation of the iteration 1
-      IterName = "I_" + Test_Name + "_1"
-      print "-------- Creation of the iteration", IterName
-      Iter_test_3_1 = Case_test_3.NextIteration(IterName)
-      Iter_test_3_1.SetMeshName('MOYEU_1')
-      Iter_test_3_1.SetMeshFile(os.path.join(dircase, 'maill.01.med'))
-      Iter_test_3_1.AssociateHypo('Hypo_test_3')
-      error = Iter_test_3_1.Compute(1, 1)
-      if error :
-        error = 10*num + 1
-        break
-
-  # Creation of the iteration 2
-      IterName = "I_" + Test_Name + "_2"
-      print "-------- Creation of the iteration", IterName
-      Iter_test_3_2 = Iter_test_3_1.NextIteration(IterName)
-      Iter_test_3_2.SetMeshName('MOYEU_2')
-      Iter_test_3_2.SetMeshFile(os.path.join(dircase, 'maill.02.med'))
-      Iter_test_3_2.AssociateHypo('Hypo_test_3')
-      error = Iter_test_3_2.Compute(1, 1)
-      if error :
-        error = 10*num + 2
-        break
-  #
-  # Creation of the schema YACS
-  # ===========================
-      ScriptFile = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script_test.py")
-      ScriptFile = os.path.normpath(ScriptFile)
-      DirName = dircase
-      YACSName = "YACS_" + Test_Name
-      print "-------- Creation of the schema", YACSName
-      YACS_test_3 = Case_test_3.CreateYACSSchema(YACSName, ScriptFile, DirName, MeshFile)
-      YACS_test_3.SetType(2)
-      YACS_test_3.SetMaxIter(2)
-      error = YACS_test_3.Write()
-      if error :
-        error = 10*num + 5
-        break
-
-  # Destructions
-  # ============
-  # Destruction of the schema, sauf a la fin
-      if ( num < n_boucle ) :
-        print "-------- Destruction of the schema", YACS_test_3.GetName()
-        error = YACS_test_3.Delete(1)
-        if error :
-          error = 10*num + 6
-          break
-  # After the first loop, the case is deleted, except the final mesh files
-  # All the iterations are deleted
-      if ( num == 0 ) :
-        print "-------- Destruction of the case", Case_test_3.GetName()
-        error = Case_test_3.Delete(0)
-        if error :
-          break
-  # After the second loop, the iterations are deleted, with the final mesh files
-      elif ( num == 1 ) :
-  # Recursive destruction of the iterations
-        print "-------- Recursive destruction of the iteration", Iter_test_3_1.GetName()
-        error = Iter_test_3_1.Delete(1)
-        if error :
-          error = 10*num + 3
-          break
-  # Destruction and creation of the hypothese
-        if ( num == 1 ) :
-          print "-------- Destruction of the hypothese", Hypo_test_3.GetName()
-          error = Hypo_test_3.Delete()
-          if error :
-            error = 10*num + 4
-            break
-          HypoName = "Hypo_test_3"
-          print "-------- Creation of the hypothesis", HypoName
-          Hypo_test_3 = homard.CreateHypothesis(HypoName)
-          Hypo_test_3.SetUnifRefinUnRef(1)
-  #
-    break
-  #
-  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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file*n_boucle
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_4.apad.02.bilan b/tests/test_4.apad.02.bilan
deleted file mode 100644 (file)
index c1a9ff3..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     MESH                                                                            
-     Date de creation : lundi 2 novembre 2015 a 11 h 32 mn 46 s         
-     Dimension : 3
-     Degre : 1
-     C'est un maillage obtenu apres      2 adaptations.
-     Le niveau minimum actif est   :     0
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-                      |                   |  0.0000    |  600.00    
-                      |                   |  0.0000    |  400.00    
-                      |                   |  0.0000    |  200.00    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *       1389 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *        124 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *        124 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *         54 *
-     * . dont triangles de regions 2D              *         54 *
-     * . dont triangles de bord                    *          0 *
-     * . dont triangles internes aux volumes       *          0 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *         54 *
-     ************************************************************
-
-     ************************************************************
-     *                      Quadrangles                         *
-     ************************************************************
-     * Nombre total                                *        616 *
-     * . dont quadrangles de regions 2D            *          9 *
-     * . dont quadrangles de bord                  *        607 *
-     * . dont quadrangles internes aux volumes     *          0 *
-     ************************************************************
-     * . du niveau   0                             *        503 *
-     * . du niveau   0.5                           *          9 *
-     * . du niveau   1                             *        104 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *        200 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *        192 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *          8 *
-     ************************************************************
-
-     ************************************************************
-     *                      Hexaedres                           *
-     ************************************************************
-     * Nombre total                                *        847 *
-     ************************************************************
-     * . du niveau   0                             *        657 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *        190 *
-     ************************************************************
-
-     ************************************************************
-     *                      Pyramides                           *
-     ************************************************************
-     * Nombre total                                *        454 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *        412 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *         42 *
-     ************************************************************
diff --git a/tests/test_4.apad.03.bilan b/tests/test_4.apad.03.bilan
deleted file mode 100644 (file)
index 9ab79c5..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-ANALYSE DU MAILLAGE
-===================
-
-     Maillage apres adaptation                         
-     MESH                                                                            
-     Date de creation : mardi 3 novembre 2015 a 9 h 1 mn 54 s           
-     Dimension : 3
-     Degre : 1
-     C'est un maillage obtenu apres      3 adaptations.
-     Le niveau minimum actif est   :     0
-     Le niveau maximum atteint est :     2
-
-         Direction    |       Unite       |  Minimum   |  Maximum
-     ---------------------------------------------------------------
-                      |                   |  0.0000    |  600.00    
-                      |                   |  0.0000    |  400.00    
-                      |                   |  0.0000    |  200.00    
-
-
-   NOMBRE D'ENTITES DU CALCUL
-   ==========================
-
-
-     ************************************************************
-     *                      Noeuds                              *
-     ************************************************************
-     * Nombre total                                *       2503 *
-     ************************************************************
-
-     ************************************************************
-     *                      Segments                            *
-     ************************************************************
-     * Nombre total                                *        120 *
-     * . dont aretes isolees                       *          0 *
-     * . dont aretes de bord de regions 2D         *          0 *
-     * . dont aretes internes aux faces/volumes    *        120 *
-     ************************************************************
-
-     ************************************************************
-     *                      Triangles                           *
-     ************************************************************
-     * Nombre total                                *        582 *
-     * . dont triangles de regions 2D              *        582 *
-     * . dont triangles de bord                    *          0 *
-     * . dont triangles internes aux volumes       *          0 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *        558 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *         24 *
-     ************************************************************
-
-     ************************************************************
-     *                      Quadrangles                         *
-     ************************************************************
-     * Nombre total                                *        455 *
-     * . dont quadrangles de regions 2D            *         81 *
-     * . dont quadrangles de bord                  *        374 *
-     * . dont quadrangles internes aux volumes     *          0 *
-     ************************************************************
-     * . du niveau   0                             *        322 *
-     * . du niveau   0.5                           *         81 *
-     * . du niveau   1                             *         52 *
-     ************************************************************
-
-     ************************************************************
-     *                      Tetraedres                          *
-     ************************************************************
-     * Nombre total                                *       1952 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *       1824 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *        128 *
-     ************************************************************
-
-     ************************************************************
-     *                      Hexaedres                           *
-     ************************************************************
-     * Nombre total                                *        523 *
-     ************************************************************
-     * . du niveau   0                             *        283 *
-     * . du niveau   0.5                           *          0 *
-     * . du niveau   1                             *        240 *
-     ************************************************************
-
-     ************************************************************
-     *                      Pyramides                           *
-     ************************************************************
-     * Nombre total                                *       3559 *
-     ************************************************************
-     * . du niveau   0                             *          0 *
-     * . du niveau   0.5                           *       3239 *
-     * . du niveau   1                             *          0 *
-     * . du niveau   1.5                           *        320 *
-     ************************************************************
diff --git a/tests/test_4.en.odt b/tests/test_4.en.odt
deleted file mode 100644 (file)
index af57cf3..0000000
Binary files a/tests/test_4.en.odt and /dev/null differ
diff --git a/tests/test_4.en.pdf b/tests/test_4.en.pdf
deleted file mode 100644 (file)
index f45e2c5..0000000
Binary files a/tests/test_4.en.pdf and /dev/null differ
diff --git a/tests/test_4.odt b/tests/test_4.odt
deleted file mode 100644 (file)
index 841bdf3..0000000
Binary files a/tests/test_4.odt and /dev/null differ
diff --git a/tests/test_4.pdf b/tests/test_4.pdf
deleted file mode 100644 (file)
index a313e82..0000000
Binary files a/tests/test_4.pdf and /dev/null differ
diff --git a/tests/test_4.py b/tests/test_4.py
deleted file mode 100755 (executable)
index 9958501..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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_4
-"""
-__revision__ = "V1.0"
-
-#========================================================================
-Test_Name = "test_4"
-debug=False
-n_iter_test_file = 3
-DX = 600.
-DY = 400.
-DZ = 200.
-#========================================================================
-import os
-import tempfile
-import sys
-import numpy as np
-import salome
-import GEOM
-import SMESH
-import HOMARD
-import MEDCoupling as mc
-import MEDLoader as ml
-#
-# ==================================
-pathHomard = os.getenv('HOMARD_ROOT_DIR')
-# Repertoire des donnees du test
-Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
-Rep_Test = os.path.normpath(Rep_Test)
-sys.path.append(Rep_Test)
-from test_util import remove_dir
-from test_util import test_results
-# 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()
-# ==================================
-
-salome.salome_init()
-
-import SALOMEDS
-from salome.geom import geomBuilder
-from salome.smesh import smeshBuilder
-from salome.StdMeshers import StdMeshersBuilder
-#
-from MEDLoader import MEDLoader
-from MEDCouplingRemapper import MEDCouplingRemapper
-
-import iparameters
-ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
-ipar.append("AP_MODULES_LIST", "Homard")
-#
-#========================================================================
-#========================================================================
-def geom_smesh_exec(theStudy):
-  """
-Python script for GEOM and SMESH
-  """
-  error = 0
-#
-  while not error :
-  #
-    geompy = geomBuilder.New(theStudy)
-  #
-  # Creation of the box
-  # ===================
-    BOX = geompy.MakeBoxDXDYDZ(DX, DY, DZ, "BOX")
-
-  # Creation of the mesh
-  # ====================
-    smesh = smeshBuilder.New(theStudy)
-    MESH = smesh.Mesh(BOX)
-    smesh.SetName(MESH.GetMesh(), 'MESH')
-  #
-  # Creation of the hypotheses
-  # ==========================
-    Regular_1D = MESH.Segment()
-    smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
-    Length = min(DX, DY, DZ) / 5.
-    Local_Length = Regular_1D.LocalLength(Length,None,1e-07)
-    smesh.SetName(Local_Length, 'Local Length')
-  #
-    Quadrangle_2D = MESH.Quadrangle(algo=smeshBuilder.QUADRANGLE)
-    smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
-    Quadrangle_Parameters = Quadrangle_2D.QuadrangleParameters(StdMeshersBuilder.QUAD_STANDARD,-1,[],[])
-    smesh.SetName(Quadrangle_Parameters, 'Quadrangle Parameters')
-  #
-    Hexa_3D = MESH.Hexahedron(algo=smeshBuilder.Hexa)
-    smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
-  #
-  # Computation
-  # ===========
-  #
-    isDone = MESH.Compute()
-    if not isDone :
-      error = 1
-      break
-  #
-  # MED exportation
-  # ===============
-  #
-    try:
-      ficmed = os.path.join(dircase, 'maill.00.med')
-      MESH.ExportMED( ficmed, 0, SMESH.MED_V2_2, 1, None ,1)
-    except Exception, e:
-      raise Exception('ExportToMEDX() failed. '+e.message)
-      error = 2
-  #
-    break
-  #
-  return error
-
-#========================================================================
-#
-#========================================================================
-def field_exec(theStudy, niter):
-  """
-Python script for MEDCoupling
-  """
-  error = 0
-#
-  while not error :
-  #
-  # The mesh
-  # ========
-    ficmed = os.path.join(dircase, 'maill.%02d.med' % niter)
-    meshMEDFileRead = ml.MEDFileMesh.New(ficmed)
-    meshRead0 = meshMEDFileRead.getMeshAtLevel(0)
-  # Valeurs of the field
-  # ====================
-    nbNodes = meshRead0.getNumberOfNodes()
-    valeur = mc.DataArrayDouble(nbNodes)
-    for iaux, taux in enumerate(meshRead0.getCoords()) :
-      #ligne   = "x = %f" % taux[0]
-      #ligne  += ", y = %f" % taux[1]
-      #ligne  += ", z = %f" % taux[2]
-      #print ligne
-      #distance = (taux[0]-DX*0.2)**2 + (taux[1]-DY*0.2)**2 + (taux[2]-DZ*0.4)**2
-      distance = min(abs(taux[0]-DX*0.4), abs(taux[1]-DY*0.2), abs(taux[2]-DZ*0.4))
-      valeur[iaux] = 1.e0 / max ( 1.e-5, np.sqrt(distance) )
-    #print ". valeur", valeur
-    nparr = valeur.toNumPyArray()
-    print ". mini/maxi", nparr.min(), nparr.max()
-  #
-  # Creation of the field
-  # =====================
-    field = ml.MEDCouplingFieldDouble(ml.ON_NODES, ml.ONE_TIME)
-    field.setArray(valeur)
-    field.setMesh(meshRead0)
-    field.setName("DISTANCE")
-  #
-    fMEDFile_ch = ml.MEDFileField1TS()
-    fMEDFile_ch.setFieldNoProfileSBT(field)     # No profile desired on the field, Sort By Type
-    fMEDFile_ch.write(ficmed, 0) # 0 to indicate that we *append* (and no overwrite) to the MED file
-  #
-    break
-  #
-  return error
-
-#========================================================================
-#========================================================================
-def homard_exec(theStudy):
-  """
-Python script for HOMARD
-  """
-  error = 0
-#
-  while not error :
-  #
-    homard.SetCurrentStudy(theStudy)
-  #
-  # Creation of the zones
-  # =====================
-  #
-    epsilon = min(DX, DY, DZ) / 100.
-  # Creation of the box Zone_4_1
-    Zone_4_1 = homard.CreateZoneBox('Zone_4_1', -epsilon, DX/3.+epsilon, DY/4.-epsilon, 3.*DY/4.+epsilon, 4.*DZ/5.-epsilon, DZ+epsilon)
-
-  # Creation of the sphere Zone_4_2
-    rayon = min(DX, DY, DZ) / 4.
-    Zone_4_2 = homard.CreateZoneSphere('Zone_4_2', DX/3., DY*0.3, DZ*0.6, rayon)
-  #
-  # Creation of the hypotheses
-  # ==========================
-    dico = {}
-    dico["1"] = "raffinement"
-    dico["-1"] = "deraffinement"
-  # Creation of the hypothesis Hypo_4_1
-    HypoName_1 = "Zone_1"
-    print "-------- Creation of the hypothesis", HypoName_1
-    Hypo_4_1 = homard.CreateHypothesis(HypoName_1)
-    Hypo_4_1.AddZone('Zone_4_1', 1)
-    Hypo_4_1.SetExtraOutput(2)
-    laux = Hypo_4_1.GetZones()
-    nbzone = len(laux)/2
-    jaux = 0
-    for iaux in range(nbzone) :
-      print HypoName_1, " : ", dico[laux[jaux+1]], "sur la zone", laux[jaux]
-      jaux += 2
-  # Creation of the hypothesis Hypo_4_2
-    HypoName_2 = "Zone_2"
-    print "-------- Creation of the hypothesis", HypoName_2
-    Hypo_4_2 = homard.CreateHypothesis(HypoName_2)
-    Hypo_4_2.AddZone('Zone_4_2', 1)
-    Hypo_4_2.SetExtraOutput(2)
-    laux = Hypo_4_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
-  # Creation of the hypothesis DISTANCE INVERSE
-    HypoName_3 = "DISTANCE INVERSE"
-    print "-------- Creation of the hypothesis", HypoName_3
-    Hypo_4_3 = homard.CreateHypothesis(HypoName_3)
-    Hypo_4_3.SetField('DISTANCE')
-    Hypo_4_3.SetUseComp(0)
-    Hypo_4_3.SetRefinThr(1, 0.3)
-    Hypo_4_3.SetUnRefThr(1, 0.2)
-    Hypo_4_3.AddFieldInterp('DISTANCE')
-    Hypo_4_3.SetExtraOutput(2)
-    print HypoName_3, " : zones utilisées :", Hypo_4_3.GetZones()
-    print HypoName_3, " : champ utilisé :", Hypo_4_3.GetFieldName()
-    print HypoName_3, " : composantes utilisées :", Hypo_4_3.GetComps()
-    if ( len (Hypo_4_3.GetFieldName()) > 0 ) :
-      print ".. caractéristiques de l'adaptation :", Hypo_4_3.GetField()
-    print HypoName_3, " : champs interpolés :", Hypo_4_3.GetFieldInterps()
-  #
-  # Creation of the cases
-  # =====================
-    # Creation of the case
-    CaseName = "Case_" + Test_Name
-    print "-------- Creation of the case", CaseName
-    MeshFile = os.path.join(dircase, 'maill.00.med')
-    Case_test_4 = homard.CreateCase(CaseName, 'MESH', MeshFile)
-    Case_test_4.SetDirName(dircase)
-  #
-  # Creation of the iterations
-  # ==========================
-  # Creation of the iteration 1
-    IterName = "I_" + Test_Name + "_1"
-    print "-------- Creation of the iteration", IterName
-    Iter_test_4_1 = Case_test_4.NextIteration(IterName)
-    Iter_test_4_1.AssociateHypo(HypoName_1)
-    print ". Hypothese :", HypoName_1
-    Iter_test_4_1.SetMeshName('M1')
-    Iter_test_4_1.SetMeshFile(os.path.join(dircase, 'maill.01.med'))
-    error = Iter_test_4_1.Compute(1, 2)
-    if error :
-      error = 1
-      break
-
-  # Creation of the iteration 2
-    IterName = "I_" + Test_Name + "_2"
-    print "-------- Creation of the iteration", IterName
-    Iter_test_4_2 = Iter_test_4_1.NextIteration(IterName)
-    Iter_test_4_2.AssociateHypo(HypoName_2)
-    print ". Hypothese :", HypoName_2
-    Iter_test_4_2.SetMeshName('M2')
-    Iter_test_4_2.SetMeshFile(os.path.join(dircase, 'maill.02.med'))
-    error = Iter_test_4_2.Compute(1, 2)
-    if error :
-      error = 2
-      break
-
-  # Creation of the iteration 3
-  #
-    error = field_exec(theStudy, 2)
-    if error :
-      error = 30
-      break
-  #
-    IterName = "I_" + Test_Name + "_3"
-    print "-------- Creation of the iteration", IterName
-    Iter_test_4_3 = Iter_test_4_2.NextIteration(IterName)
-    Iter_test_4_3.AssociateHypo(HypoName_3)
-    print ". Hypothese :", HypoName_3
-    Iter_test_4_3.SetMeshName('M3')
-    Iter_test_4_3.SetFieldFile(os.path.join(dircase, 'maill.02.med'))
-    Iter_test_4_3.SetMeshFile(os.path.join(dircase, 'maill.03.med'))
-    error = Iter_test_4_3.Compute(1, 2)
-    if error :
-      error = 3
-      break
-  #
-    break
-  #
-  return error
-
-#========================================================================
-#
-# Geometry and Mesh
-#
-try :
-  error_main = geom_smesh_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in geom_smesh_exec')
-except Exception, e:
-  raise Exception('Pb in geom_smesh_exec: '+e.message)
-
-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_main = homard_exec(salome.myStudy)
-  if error_main :
-    raise Exception('Pb in homard_exec at iteration %d' %error_main )
-except Exception, e:
-  raise Exception('Pb in homard_exec: '+e.message)
-#
-# Test of the results
-#
-n_rep_test_file = n_iter_test_file
-destroy_dir = not debug
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
-#
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
-  iparameters.getSession().restoreVisualState(1)
-
diff --git a/tests/test_util.py b/tests/test_util.py
deleted file mode 100755 (executable)
index e572398..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2011-2015  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
-Copyright EDF-R&D 2014
-Test test_1
-"""
-__revision__ = "V1.2"
-
-import os
-#========================================================================
-#========================================================================
-def remove_dir(directory) :
-  """
-Empties, then removes a directory.
-Copyright EDF-R&D 2013
-  """
-#
-  l_aux = os.listdir(directory)
-  for fic in l_aux :
-    fic_a = os.path.join(directory, fic)
-    if os.path.isdir(fic_a) :
-      remove_dir(fic_a)
-    else :
-      os.remove(fic_a)
-  os.rmdir(directory)
-#
-  return
-#
-#========================================================================
-#========================================================================
-def test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir = True) :
-  """
-Test of the result
-Rep_Test: repertoire des tests
-Test_Name: nom du test
-dircase: repertoire des resultats du test
-n_iter_test_file: numero de l'iteration a tester
-n_rep_test_file: numero du repertoire de l'iteration a tester
-destroy_dir: destruction du repertoire de calcul
-Copyright EDF-R&D 2014
-  """
-  #
-  test_file_suff = "apad.%02d.bilan" % n_iter_test_file
-  rep_test_file = "I%02d" % n_rep_test_file
-  #
-  test_file = os.path.join(Rep_Test, Test_Name + "." + test_file_suff)
-  mess_error_ref = "\nReference file: " + test_file
-  try :
-    file = open (test_file, "r")
-    mess_ref = file.readlines()
-    file.close()
-  except :
-    mess_error = mess_error_ref + "\nThis file does not exist.\n"
-    destroy_dir = False
-    raise Exception(mess_error)
-  #
-  test_file = os.path.join(dircase, rep_test_file, test_file_suff)
-  if os.path.isfile (test_file) :
-    file = open (test_file, "r")
-    mess = file.readlines()
-    file.close()
-  else :
-    mess_error  = "\nResult file: " + test_file
-    mess_error += "\nThis file does not exist.\n"
-    destroy_dir = False
-    raise Exception(mess_error)
-
-  nblign = len(mess_ref)
-  if ( len(mess) != nblign ):
-    mess_error = mess_error_ref +  "\nResult file: " + test_file
-    mess_error += "\nThe number of lines of the files are not the same.\n"
-    destroy_dir = False
-    raise Exception(mess_error)
-
-  for num in range(nblign) :
-    if (( "creation" not in mess_ref[num] ) and ( mess_ref[num] != mess[num])) :
-      message_erreur = "\nRefe : " + mess_ref[num]
-      message_erreur += "Test : " + mess[num][:-1]
-      message_erreur += "\nThe test is different from the reference."
-      destroy_dir = False
-      raise Exception(message_erreur)
-  #
-  if destroy_dir:
-    remove_dir(dircase)
-#
-  return
-#
-#========================================================================
-#========================================================================