]> SALOME platform Git repositories - modules/homard.git/commitdiff
Salome HOME
version 5_1_4 HOMARD_SRC V5_1_4 start
authorprascle <prascle>
Thu, 17 Mar 2011 10:44:21 +0000 (10:44 +0000)
committerprascle <prascle>
Thu, 17 Mar 2011 10:44:21 +0000 (10:44 +0000)
240 files changed:
AUTHORS [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
adm_local/unix/Makefile.am [new file with mode: 0644]
adm_local/unix/config_files/README [new file with mode: 0644]
adm_local/unix/config_files/check_GUI.m4 [new file with mode: 0755]
adm_local/unix/config_files/check_Med2.m4 [new file with mode: 0644]
adm_local/unix/config_files/check_sphinx.m4 [new file with mode: 0644]
adm_local/unix/make_common_starter.am [new file with mode: 0644]
bin/VERSION [new file with mode: 0755]
bin/runAppli.in [new file with mode: 0755]
bin/runSalome.py [new file with mode: 0755]
build_configure [new file with mode: 0755]
clean_configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
doc/Makefile.am [new file with mode: 0644]
doc/conf.py [new file with mode: 0644]
doc/files/HOMARD_0.pdf [new file with mode: 0644]
doc/files/tutorial_1.00.med.gz [new file with mode: 0644]
doc/files/tutorial_1.py [new file with mode: 0644]
doc/files/tutorial_2.00.med.gz [new file with mode: 0644]
doc/files/tutorial_2.py [new file with mode: 0644]
doc/files/tutorial_3.00.med.gz [new file with mode: 0644]
doc/files/tutorial_3.01.med.gz [new file with mode: 0644]
doc/files/tutorial_3.py [new file with mode: 0644]
doc/glossaire.rst [new file with mode: 0644]
doc/gui_create_case.rst [new file with mode: 0644]
doc/gui_create_hypothese.rst [new file with mode: 0644]
doc/gui_create_iteration.rst [new file with mode: 0644]
doc/gui_create_zone.rst [new file with mode: 0644]
doc/gui_usage.rst [new file with mode: 0644]
doc/images/HOMARD.png [new file with mode: 0644]
doc/images/create_case_1.png [new file with mode: 0644]
doc/images/create_case_2.png [new file with mode: 0644]
doc/images/create_case_3.png [new file with mode: 0644]
doc/images/create_case_4.png [new file with mode: 0644]
doc/images/create_case_5.png [new file with mode: 0644]
doc/images/create_hypothese_1.png [new file with mode: 0644]
doc/images/create_hypothese_2.png [new file with mode: 0644]
doc/images/create_hypothese_3.png [new file with mode: 0644]
doc/images/create_hypothese_4.png [new file with mode: 0644]
doc/images/create_hypothese_5.png [new file with mode: 0644]
doc/images/create_hypothese_6.png [new file with mode: 0644]
doc/images/create_hypothese_7.png [new file with mode: 0644]
doc/images/create_hypothese_8.png [new file with mode: 0644]
doc/images/create_iteration_1.png [new file with mode: 0644]
doc/images/create_iteration_2.png [new file with mode: 0644]
doc/images/create_iteration_3.png [new file with mode: 0644]
doc/images/create_iteration_4.png [new file with mode: 0644]
doc/images/create_iteration_5.png [new file with mode: 0644]
doc/images/create_iteration_6.png [new file with mode: 0644]
doc/images/create_zone_1.png [new file with mode: 0644]
doc/images/create_zone_2.png [new file with mode: 0644]
doc/images/intro_1.png [new file with mode: 0644]
doc/images/intro_2.png [new file with mode: 0644]
doc/images/lancement_1.png [new file with mode: 0644]
doc/images/menu_1.png [new file with mode: 0644]
doc/images/menu_2.png [new file with mode: 0644]
doc/index.rst [new file with mode: 0644]
doc/intro.rst [new file with mode: 0644]
doc/tui_create_case.rst [new file with mode: 0644]
doc/tui_create_hypothese.rst [new file with mode: 0644]
doc/tui_create_iteration.rst [new file with mode: 0644]
doc/tui_create_zone.rst [new file with mode: 0644]
doc/tui_homard.rst [new file with mode: 0644]
doc/tui_usage.rst [new file with mode: 0644]
doc/tutorial_3.py [new file with mode: 0644]
doc/tutorials.rst [new file with mode: 0644]
idl/HOMARD_Boundary.idl [new file with mode: 0644]
idl/HOMARD_Cas.idl [new file with mode: 0644]
idl/HOMARD_Gen.idl [new file with mode: 0644]
idl/HOMARD_Hypothesis.idl [new file with mode: 0644]
idl/HOMARD_Iteration.idl [new file with mode: 0644]
idl/HOMARD_Zone.idl [new file with mode: 0644]
idl/Makefile.am [new file with mode: 0644]
resources/ExecHOMARD.png [new file with mode: 0644]
resources/HOMARD.png [new file with mode: 0644]
resources/HOMARDCatalog.xml [new file with mode: 0644]
resources/HOMARD_2.png [new file with mode: 0644]
resources/HOMARD_en.ps [new file with mode: 0644]
resources/HOMARD_en.xml [new file with mode: 0644]
resources/HOMARD_fr.xml [new file with mode: 0644]
resources/Makefile.am [new file with mode: 0644]
resources/SalomeApp.xml [new file with mode: 0644]
resources/boxdxyz.png [new file with mode: 0644]
resources/boxdxyz_2.png [new file with mode: 0644]
resources/cas_calcule.png [new file with mode: 0644]
resources/cas_non_calcule.png [new file with mode: 0644]
resources/config [new file with mode: 0644]
resources/cylinderpointvector.png [new file with mode: 0644]
resources/cylinderpointvector_2.png [new file with mode: 0644]
resources/delete.png [new file with mode: 0644]
resources/hypotheses.png [new file with mode: 0644]
resources/iter0.png [new file with mode: 0644]
resources/iter_calculee.png [new file with mode: 0644]
resources/iter_calulee.png [new file with mode: 0644]
resources/iter_next.png [new file with mode: 0644]
resources/iter_non_calculee.png [new file with mode: 0644]
resources/iter_non_calulee.png [new file with mode: 0644]
resources/med.png [new file with mode: 0644]
resources/mesh_compute.png [new file with mode: 0644]
resources/mesh_hypo_edit.png [new file with mode: 0644]
resources/mesh_tree_importedmesh.png [new file with mode: 0644]
resources/mesh_tree_mesh.png [new file with mode: 0644]
resources/mesh_whatis.png [new file with mode: 0644]
resources/spherepoint.png [new file with mode: 0644]
resources/spherepoint_2.png [new file with mode: 0644]
resources/texte.png [new file with mode: 0644]
resources/texte_2.png [new file with mode: 0644]
resources/triangle.png [new file with mode: 0644]
resources/whatis.png [new file with mode: 0644]
resources/zone_boxdxyz.png [new file with mode: 0644]
resources/zone_boxdxyz_2.png [new file with mode: 0644]
resources/zone_icone.png [new file with mode: 0644]
resources/zone_icone_2.png [new file with mode: 0644]
resources/zone_spherepoint.png [new file with mode: 0644]
resources/zone_spherepoint_2.png [new file with mode: 0644]
resources/zones.png [new file with mode: 0644]
src/HOMARD/HOMARD_Boundary.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_Boundary.hxx [new file with mode: 0644]
src/HOMARD/HOMARD_Cas.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_Cas.hxx [new file with mode: 0644]
src/HOMARD/HOMARD_DriverTools.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_DriverTools.hxx [new file with mode: 0644]
src/HOMARD/HOMARD_Gen.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_Gen.hxx [new file with mode: 0644]
src/HOMARD/HOMARD_Hypothesis.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_Hypothesis.hxx [new file with mode: 0644]
src/HOMARD/HOMARD_Iteration.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_Iteration.hxx [new file with mode: 0644]
src/HOMARD/HOMARD_Zone.cxx [new file with mode: 0644]
src/HOMARD/HOMARD_Zone.hxx [new file with mode: 0644]
src/HOMARD/HomardDriver.cxx [new file with mode: 0644]
src/HOMARD/HomardDriver.hxx [new file with mode: 0644]
src/HOMARD/Makefile.am [new file with mode: 0755]
src/HOMARDGUI/CreateBoundaryDi.h [new file with mode: 0644]
src/HOMARDGUI/CreateBoundaryDi.ui [new file with mode: 0644]
src/HOMARDGUI/CreateCase.h [new file with mode: 0644]
src/HOMARDGUI/CreateCase.ui [new file with mode: 0644]
src/HOMARDGUI/CreateHypothesis.h [new file with mode: 0644]
src/HOMARDGUI/CreateHypothesis.ui [new file with mode: 0644]
src/HOMARDGUI/CreateIteration.h [new file with mode: 0644]
src/HOMARDGUI/CreateIteration.ui [new file with mode: 0644]
src/HOMARDGUI/CreateListGroup.h [new file with mode: 0644]
src/HOMARDGUI/CreateListGroup.ui [new file with mode: 0644]
src/HOMARDGUI/CreateZone.h [new file with mode: 0644]
src/HOMARDGUI/CreateZone.ui [new file with mode: 0644]
src/HOMARDGUI/EditFile.h [new file with mode: 0644]
src/HOMARDGUI/EditFile.ui [new file with mode: 0644]
src/HOMARDGUI/HOMARDGUI.cxx [new file with mode: 0644]
src/HOMARDGUI/HOMARDGUI.h [new file with mode: 0644]
src/HOMARDGUI/HOMARDGUI_Utils.cxx [new file with mode: 0644]
src/HOMARDGUI/HOMARDGUI_Utils.h [new file with mode: 0644]
src/HOMARDGUI/HOMARD_icons.po [new file with mode: 0644]
src/HOMARDGUI/HOMARD_msg_en.po [new file with mode: 0644]
src/HOMARDGUI/HOMARD_msg_en.ts [new file with mode: 0644]
src/HOMARDGUI/HOMARD_msg_fr.po [new file with mode: 0644]
src/HOMARDGUI/HOMARD_msg_fr.ts [new file with mode: 0644]
src/HOMARDGUI/HomardConfigFile.cxx [new file with mode: 0644]
src/HOMARDGUI/HomardConfigFile.hxx [new file with mode: 0644]
src/HOMARDGUI/HomardDlg.h [new file with mode: 0644]
src/HOMARDGUI/HomardQtCommun.cxx [new file with mode: 0644]
src/HOMARDGUI/HomardQtCommun.h [new file with mode: 0644]
src/HOMARDGUI/Makefile.am [new file with mode: 0644]
src/HOMARDGUI/MonCreateBoundaryDi.cxx [new file with mode: 0644]
src/HOMARDGUI/MonCreateBoundaryDi.h [new file with mode: 0644]
src/HOMARDGUI/MonCreateCase.cxx [new file with mode: 0644]
src/HOMARDGUI/MonCreateCase.h [new file with mode: 0644]
src/HOMARDGUI/MonCreateHypothesis.cxx [new file with mode: 0644]
src/HOMARDGUI/MonCreateHypothesis.h [new file with mode: 0644]
src/HOMARDGUI/MonCreateIteration.cxx [new file with mode: 0644]
src/HOMARDGUI/MonCreateIteration.h [new file with mode: 0644]
src/HOMARDGUI/MonCreateListGroup.cxx [new file with mode: 0644]
src/HOMARDGUI/MonCreateListGroup.h [new file with mode: 0644]
src/HOMARDGUI/MonCreateZone.cxx [new file with mode: 0644]
src/HOMARDGUI/MonCreateZone.h [new file with mode: 0644]
src/HOMARDGUI/MonEditBoundaryDi.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditBoundaryDi.h [new file with mode: 0644]
src/HOMARDGUI/MonEditCase.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditCase.h [new file with mode: 0644]
src/HOMARDGUI/MonEditFile.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditFile.h [new file with mode: 0644]
src/HOMARDGUI/MonEditHypothesis.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditHypothesis.h [new file with mode: 0644]
src/HOMARDGUI/MonEditIteration.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditIteration.h [new file with mode: 0644]
src/HOMARDGUI/MonEditListGroup.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditListGroup.h [new file with mode: 0644]
src/HOMARDGUI/MonEditZone.cxx [new file with mode: 0644]
src/HOMARDGUI/MonEditZone.h [new file with mode: 0644]
src/HOMARDGUI/MonHomardDlg.cxx [new file with mode: 0644]
src/HOMARDGUI/MonHomardDlg.h [new file with mode: 0644]
src/HOMARDGUI/ui/HomardCas.ui [new file with mode: 0644]
src/HOMARDGUI/ui/HomardDlg.ui [new file with mode: 0644]
src/HOMARDGUI/ui/HomardEditLog.ui [new file with mode: 0644]
src/HOMARDGUI/ui/HomardIteration.ui [new file with mode: 0644]
src/HOMARDGUI/ui/HomardPourLesNuls.ui [new file with mode: 0644]
src/HOMARDGUI/ui/HomardRaffiUniforme.ui [new file with mode: 0644]
src/HOMARD_I/HOMARD_Boundary_i.cxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Boundary_i.hxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Cas_i.cxx [new file with mode: 0755]
src/HOMARD_I/HOMARD_Cas_i.hxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Gen_i.cxx [new file with mode: 0755]
src/HOMARD_I/HOMARD_Gen_i.hxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Hypothesis_i.cxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Hypothesis_i.hxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Iteration_i.cxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Iteration_i.hxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Zone_i.cxx [new file with mode: 0644]
src/HOMARD_I/HOMARD_Zone_i.hxx [new file with mode: 0644]
src/HOMARD_I/HomardMedCommun.cxx [new file with mode: 0644]
src/HOMARD_I/HomardMedCommun.h [new file with mode: 0644]
src/HOMARD_I/Makefile.am [new file with mode: 0644]
src/HOMARD_I/driver_gen_i.cxx [new file with mode: 0644]
src/HOMARD_I/driver_gen_i.h [new file with mode: 0644]
src/HOMARD_SCRIPTS/Makefile.am [new file with mode: 0644]
src/HOMARD_SCRIPTS/testHomard.py [new file with mode: 0644]
src/HOMARD_SCRIPTS/test_homard.py [new file with mode: 0644]
src/HOMARD_SWIG/HOMARD_shared_modules.py [new file with mode: 0644]
src/HOMARD_SWIG/Makefile.am [new file with mode: 0644]
src/HOMARD_SWIG/libHOMARD_Swig.i [new file with mode: 0644]
src/Makefile.am [new file with mode: 0755]
tests/Makefile.am [new file with mode: 0644]
tests/test_1.00.med [new file with mode: 0644]
tests/test_1.01.med [new file with mode: 0644]
tests/test_1.02.med [new file with mode: 0644]
tests/test_1.apad.03.bilan [new file with mode: 0644]
tests/test_1.odt [new file with mode: 0644]
tests/test_1.pdf [new file with mode: 0644]
tests/test_1.png [new file with mode: 0644]
tests/test_1.py [new file with mode: 0644]
tests/test_2.00.med [new file with mode: 0644]
tests/test_2.apad.03.bilan [new file with mode: 0644]
tests/test_2.fr.med [new file with mode: 0644]
tests/test_2.odt [new file with mode: 0644]
tests/test_2.pdf [new file with mode: 0644]
tests/test_2.png [new file with mode: 0644]
tests/test_2.py [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..49498a4
--- /dev/null
@@ -0,0 +1,54 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# -* Makefile *- 
+# Author : Patrick GOLDBRONN (CEA)
+# Date : 28/06/2001
+# Modified by : Alexander BORODIN (OCN) - autotools usage
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+ACLOCAL_AMFLAGS = -I $(top_srcdir)/adm_local/unix/config_files                 \
+                  -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+                  -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+                  -I ${HOMARD_SRC}/adm_local/unix/config_files
+
+SUBDIRS = idl resources src doc tests
+
+DIST_SUBDIRS = idl resources src doc tests
+
+DISTCLEANFILES = a.out aclocal.m4 configure
+
+
+EXTRA_DIST +=          \
+       build_configure \
+       clean_configure 
+
+dist-hook:
+       rm -rf `find $(distdir) -name CVS`
+
+usr_docs:
+       (cd doc && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
+
+docs:usr_docs
+
+dev_docs:
+       (cd doc && $(MAKE) $(AM_MAKEFLAGS) dev_docs)
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adm_local/unix/Makefile.am b/adm_local/unix/Makefile.am
new file mode 100644 (file)
index 0000000..5f6d5f7
--- /dev/null
@@ -0,0 +1,24 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = config_files
diff --git a/adm_local/unix/config_files/README b/adm_local/unix/config_files/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adm_local/unix/config_files/check_GUI.m4 b/adm_local/unix/config_files/check_GUI.m4
new file mode 100755 (executable)
index 0000000..73a026e
--- /dev/null
@@ -0,0 +1,65 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library is distributed in the hope that it will be useful, 
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#------------------------------------------------------------
+#  Check availability of Salome binary distribution
+#
+#  Author : Marc Tajchman (CEA, 2002)
+#------------------------------------------------------------
+
+AC_DEFUN([CHECK_SALOME_GUI],[
+
+AC_CHECKING(for Salome GUI)
+
+SalomeGUI_ok=no
+
+AC_ARG_WITH(gui,
+           --with-salome_gui=DIR root directory path of SALOME GUI installation,
+           SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="")
+
+if test "x$SALOME_GUI_DIR" = "x" ; then
+  if test "x$GUI_ROOT_DIR" != "x" ; then
+    SALOME_GUI_DIR=$GUI_ROOT_DIR
+  else
+    # search Salome binaries in PATH variable
+    AC_PATH_PROG(TEMP, SUITApp)
+    if test "x$TEMP" != "x" ; then
+      SALOME_GUI_BIN_DIR=`dirname $TEMP`
+      SALOME_GUI_DIR=`dirname $SALOME_GUI_BIN_DIR`
+    fi
+  fi
+fi
+
+if test "x$SALOME_GUI_DIR" != "x" ; then
+  if test -f ${SALOME_GUI_DIR}/bin/salome/SUITApp  ; then
+    SalomeGUI_ok=yes
+    AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR})
+    GUI_ROOT_DIR=${SALOME_GUI_DIR}
+  fi
+fi
+if test "x$SalomeGUI_ok" == "xno" ; then
+  AC_MSG_WARN("Cannot find compiled SALOME GUI distribution")
+fi
+  
+AC_SUBST(GUI_ROOT_DIR)
+
+AC_MSG_RESULT(for SALOME GUI: $SalomeGUI_ok)
+])dnl
diff --git a/adm_local/unix/config_files/check_Med2.m4 b/adm_local/unix/config_files/check_Med2.m4
new file mode 100644 (file)
index 0000000..82b1078
--- /dev/null
@@ -0,0 +1,114 @@
+dnl  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+dnl 
+dnl  This library is free software; you can redistribute it and/or 
+dnl  modify it under the terms of the GNU Lesser General Public 
+dnl  License as published by the Free Software Foundation; either 
+dnl  version 2.1 of the License. 
+dnl 
+dnl  This library is distributed in the hope that it will be useful, 
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+dnl  Lesser General Public License for more details. 
+dnl 
+dnl  You should have received a copy of the GNU Lesser General Public 
+dnl  License along with this library; if not, write to the Free Software 
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+dnl 
+dnl  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+dnl
+dnl
+dnl
+
+AC_DEFUN([CHECK_MED2],[
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([CHECK_HDF5])dnl
+
+AC_CHECKING(for MED2)
+
+AC_ARG_WITH(med2,
+    [  --with-med2=DIR                 root directory path to med2 installation ],
+    [MED2HOME="$withval"
+      AC_MSG_RESULT("select $withval as path to med2")
+    ])
+
+AC_SUBST(MED2_INCLUDES)
+AC_SUBST(MED2_LIBS)
+AC_SUBST(MED2_MT_LIBS)
+
+MED2_INCLUDES=""
+MED2_LIBS=""
+MED2_MT_LIBS=""
+
+med2_ok=no
+
+LOCAL_INCLUDES="$HDF5_INCLUDES"
+LOCAL_LIBS="-lmed $HDF5_LIBS"
+
+if test -z $MED2HOME
+then
+   AC_MSG_WARN(undefined MED2HOME variable which specify med2 installation directory)
+   AC_PATH_PROG(MDUMP, mdump)
+   if test "xMDUMP" != "x" ; then
+      MED2HOME=$MDUMP
+      MED2HOME=`echo ${MED2HOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+      MED2HOME=`echo ${MED2HOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+   fi
+fi
+if test ! -z $MED2HOME
+then
+   LOCAL_INCLUDES="$LOCAL_INCLUDES -I$MED2HOME/include"
+   if test "x$MED2HOME" = "x/usr"
+   then
+     LOCAL_LIBS="-lmed  $LOCAL_LIBS"
+   else
+     LOCAL_LIBS="-L$MED2HOME/lib $LOCAL_LIBS"
+   fi
+fi
+
+dnl check med2 header
+
+CPPFLAGS_old="$CPPFLAGS"
+dnl we must test system : linux = -DPCLINUX
+dnl we must test system : Alpha-OSF = -DOSF1
+case $host_os in
+   linux*)
+      CPPFLAGS="$CPPFLAGS -DPCLINUX $LOCAL_INCLUDES"
+      ;;
+   osf*)
+      CPPFLAGS="$CPPFLAGS -DOSF1 $LOCAL_INCLUDES"
+      ;;
+esac
+AC_CHECK_HEADER(med.h,med2_ok=yes ,med2_ok=no)
+CPPFLAGS="$CPPFLAGS_old"
+
+if  test "x$med2_ok" = "xyes"
+then
+
+dnl check med2 library
+
+  LIBS_old="$LIBS"
+  LIBS="$LIBS $LOCAL_LIBS"
+  AC_CHECK_LIB(med,MEDouvrir,med2_ok=yes,med2_ok=no)
+  LIBS="$LIBS_old"
+
+fi
+
+if  test "x$med2_ok" = "xyes"
+then
+case $host_os in
+   linux*)
+        MED2_INCLUDES="-DPCLINUX $LOCAL_INCLUDES"
+      ;;
+   osf*)
+      MED2_INCLUDES="-DOSF1 $LOCAL_INCLUDES"
+      ;;
+esac
+  MED2_LIBS="$LOCAL_LIBS"
+  MED2_MT_LIBS="$LOCAL_LIBS"
+fi
+
+AC_MSG_RESULT(for med2: $med2_ok)
+
+])dnl
diff --git a/adm_local/unix/config_files/check_sphinx.m4 b/adm_local/unix/config_files/check_sphinx.m4
new file mode 100644 (file)
index 0000000..eec1495
--- /dev/null
@@ -0,0 +1,35 @@
+dnl  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+AC_DEFUN([CHECK_SPHINX],[
+
+AC_CHECKING(for sphinx doc generator)
+
+sphinx_ok=yes
+dnl where is sphinx ?
+AC_PATH_PROG(SPHINX,sphinx-build) 
+if test "x$SPHINX" = "x"
+then
+  AC_MSG_WARN(sphinx not found)
+  sphinx_ok=no
+fi
+
+AM_CONDITIONAL(SPHINX_IS_OK, [test x"$sphinx_ok" = xyes])
+
+])dnl
+dnl
diff --git a/adm_local/unix/make_common_starter.am b/adm_local/unix/make_common_starter.am
new file mode 100644 (file)
index 0000000..36ad8c3
--- /dev/null
@@ -0,0 +1,88 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ============================================================
+# This file defines the common definitions used in several
+# Makefile. This file must be included, if needed, by the file
+# Makefile.am.
+# ============================================================
+# Standard directory for installation
+#
+salomeincludedir   = $(includedir)/salome
+libdir             = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome
+bindir             = $(prefix)/bin/salome
+salomescriptdir    = $(bindir)
+salomepythondir    = $(pythondir)/salome
+salomepyexecdir    = $(pyexecdir)/salome
+
+# Directory for installing idl files
+salomeidldir       = $(prefix)/idl/salome
+
+# Directory for installing resource files
+salomeresdir       = $(prefix)/share/salome/resources/@MODULE_NAME@
+
+# Directories for installing admin files
+admlocaldir        = $(prefix)/adm_local
+admlocalunixdir    = $(admlocaldir)/unix
+admlocalm4dir      = $(admlocaldir)/unix/config_files
+
+# Shared modules installation directory
+sharedpkgpythondir = $(salomepythondir)/shared_modules
+
+# Documentation directory
+docdir             = $(datadir)/doc/salome
+
+# common rules
+
+# meta object implementation files generation (moc)
+%_moc.cxx: %.h
+       $(MOC) $< -o $@
+
+# translation (*.qm) files generation (lrelease)
+%.qm: %.ts
+       $(LRELEASE) $< -qm $@
+
+# resource files generation (qrcc)
+qrc_%.cxx: %.qrc
+       $(QRCC) $< -o $@ -name $(*F)
+
+# qt forms files generation (uic)
+ui_%.h: %.ui
+       $(UIC) -o $@ $<
+
+# extra distributed files
+EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(QRC_FILES:qrc_%.cxx=%.qrc) \
+             $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=%.ts)
+
+# customize clean operation
+mostlyclean-local:
+       rm -f @builddir@/*_moc.cxx
+       rm -f @builddir@/*.qm
+       rm -f @builddir@/ui_*.h
+       rm -f @builddir@/qrc_*.cxx
+
+# tests
+tests: unittest
+
+unittest: $(UNIT_TEST_PROG)
+       @if test "x$(UNIT_TEST_PROG)" != "x"; then \
+           $(UNIT_TEST_PROG);                     \
+       fi;
diff --git a/bin/VERSION b/bin/VERSION
new file mode 100755 (executable)
index 0000000..db96e4c
--- /dev/null
@@ -0,0 +1 @@
+THIS IS SALOME PRO - HOMARD VERSION: 0
diff --git a/bin/runAppli.in b/bin/runAppli.in
new file mode 100755 (executable)
index 0000000..9a47b00
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+export KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@
+export PYHELLO_ROOT_DIR=@prefix@
+
+python -i $PYHELLO_ROOT_DIR/bin/salome/runSalome.py --modules=PYHELLO --xterm --containers=cpp,python --killall
+
+
diff --git a/bin/runSalome.py b/bin/runSalome.py
new file mode 100755 (executable)
index 0000000..c7eb2e7
--- /dev/null
@@ -0,0 +1,506 @@
+#!/usr/bin/env python
+
+usage="""USAGE: runSalome.py [options]
+
+[command line options] :
+--help                        : affichage de l'aide
+--gui                         : lancement du GUI
+--logger                     : redirection des messages dans un fichier
+--xterm                              : les serveurs ouvrent une fenêtre xterm et les messages sont affichés dans cette fenêtre
+--modules=module1,module2,... : où modulen est le nom d'un module Salome à charger dans le catalogue
+--containers=cpp,python,superv: lancement des containers cpp, python et de supervision
+--killall                    : arrêt des serveurs de salome
+
+ La variable d'environnement <modulen>_ROOT_DIR doit etre préalablement
+ positionnée (modulen doit etre en majuscule).
+ KERNEL_ROOT_DIR est obligatoire.
+"""
+
+# -----------------------------------------------------------------------------
+#
+# Fonction d'arrêt de salome
+#
+
+def killSalome():
+   print "arret des serveurs SALOME"
+   for pid, cmd in process_id.items():
+      print "arret du process %s : %s"% (pid, cmd[0])
+      try:
+       os.kill(pid,signal.SIGKILL)
+      except:
+         print "  ------------------ process %s : %s inexistant"% (pid, cmd[0])
+   print "arret du naming service"
+   os.system("killall -9 omniNames")
+   
+# -----------------------------------------------------------------------------
+#
+# Fonction message
+#
+
+def message(code, msg=''):
+    if msg: print msg
+    sys.exit(code)
+
+import sys,os,string,glob,time,signal,pickle,getopt
+
+init_time=os.times()
+opts, args=getopt.getopt(sys.argv[1:], 'hmglxck:', ['help','modules=','gui','logger','xterm','containers=','killall'])
+modules_root_dir={}
+process_id={}
+liste_modules={}
+liste_containers={}
+with_gui=0
+with_logger=0
+with_xterm=0
+
+with_container_cpp=0
+with_container_python=0
+with_container_superv=0
+
+try:
+  for o, a in opts:
+    if o in ('-h', '--help'):
+      print usage
+      sys.exit(1)
+    elif o in ('-g', '--gui'):
+      with_gui=1
+    elif o in ('-l', '--logger'):
+      with_logger=1
+    elif o in ('-x', '--xterm'):
+      with_xterm=1
+    elif o in ('-m', '--modules'):
+      liste_modules = [x.upper() for x in a.split(',')]
+    elif o in ('-c', '--containers'):
+      liste_containers = [x.lower() for x in a.split(',')]
+      for r in liste_containers:
+        if r not in ('cpp', 'python', 'superv'):
+          message(1, 'Invalid -c/--containers option: %s' % a)
+      if 'cpp' in liste_containers:
+          with_container_cpp=1
+      else:
+          with_container_cpp=0
+      if 'python' in liste_containers:
+          with_container_python=1
+      else:
+          with_container_python=0
+      if 'superv' in liste_containers:
+          with_container_superv=1
+      else:
+          with_container_superv=0
+    elif o in ('-k', '--killall'):
+      filedict='/tmp/'+os.getenv('USER')+'_SALOME_pidict'
+      #filedict='/tmp/'+os.getlogin()+'_SALOME_pidict'
+      found = 0
+      try:
+         fpid=open(filedict, 'r')
+        found = 1
+      except:
+         print "le fichier %s des process SALOME n'est pas accessible"% filedict
+
+      if found:
+         process_id=pickle.load(fpid)
+         fpid.close()
+         killSalome()
+        process_id={}
+         os.remove(filedict)
+       
+except getopt.error, msg:
+  print usage
+  sys.exit(1)
+
+# -----------------------------------------------------------------------------
+#
+# Vérification des variables d'environnement
+#
+try:
+  kernel_root_dir=os.environ["KERNEL_ROOT_DIR"]
+  modules_root_dir["KERNEL"]=kernel_root_dir
+except:
+  print usage
+  sys.exit(1)
+
+for module in liste_modules :
+   try:
+      module=module.upper()
+      module_root_dir=os.environ[module +"_ROOT_DIR"]
+      modules_root_dir[module]=module_root_dir
+   except:
+      print usage
+      sys.exit(1)
+
+# il faut KERNEL en premier dans la liste des modules
+# - l'ordre des modules dans le catalogue sera identique
+# - la liste des modules presents dans le catalogue est exploitée pour charger les modules CORBA python,
+#   il faut charger les modules python du KERNEL en premier
+
+if "KERNEL" in liste_modules:liste_modules.remove("KERNEL")
+liste_modules[:0]=["KERNEL"]
+#print liste_modules
+#print modules_root_dir
+
+os.environ["SALOMEPATH"]=":".join(modules_root_dir.values())
+if "SUPERV" in liste_modules:with_container_superv=1
+
+
+# -----------------------------------------------------------------------------
+#
+# Définition des classes d'objets pour le lancement des Server CORBA
+#
+
+class Server:
+   CMD=[]
+   if with_xterm:
+       ARGS=['xterm', '-iconic', '-sb', '-sl', '500', '-e']
+   else:
+       ARGS=[] 
+
+   def run(self):
+      args = self.ARGS+self.CMD
+      #print "args = ", args
+      pid = os.spawnvp(os.P_NOWAIT, args[0], args)
+      process_id[pid]=self.CMD
+
+class CatalogServer(Server):
+   SCMD1=['SALOME_ModuleCatalog_Server','-common']
+   SCMD2=['-personal','${HOME}/Salome/resources/CatalogModulePersonnel.xml'] 
+
+   def setpath(self,liste_modules):
+      cata_path=[]
+      for module in liste_modules:
+          module_root_dir=modules_root_dir[module]
+          module_cata=module+"Catalog.xml"
+          print "   ", module_cata
+          cata_path.extend(glob.glob(os.path.join(module_root_dir,"share","salome","resources",module_cata)))
+      self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2
+
+class SalomeDSServer(Server):
+   CMD=['SALOMEDS_Server']
+
+class RegistryServer(Server):
+   CMD=['SALOME_Registry_Server', '--salome_session','theSession']
+
+class ContainerCPPServer(Server):
+   CMD=['SALOME_Container','FactoryServer','-ORBInitRef','NameService=corbaname::localhost']
+
+class ContainerPYServer(Server):
+   CMD=['SALOME_ContainerPy.py','FactoryServerPy','-ORBInitRef','NameService=corbaname::localhost']
+
+class ContainerSUPERVServer(Server):
+   CMD=['SALOME_Container','SuperVisionContainer','-ORBInitRef','NameService=corbaname::localhost']
+
+class LoggerServer(Server):
+   CMD=['SALOME_Logger_Server', 'logger.log']
+
+class SessionLoader(Server):
+   CMD=['SALOME_Session_Loader']
+   if with_container_cpp:
+       CMD=CMD+['CPP']
+   if with_container_python:
+       CMD=CMD+['PY']
+   if with_container_superv:
+       CMD=CMD+['SUPERV']
+   if with_gui:
+       CMD=CMD+['GUI']
+
+class SessionServer(Server):
+   CMD=['SALOME_Session_Server']
+
+class NotifyServer(Server):
+   CMD=['notifd','-c','${KERNEL_ROOT_DIR}/share/salome/resources/channel.cfg -DFactoryIORFileName=/tmp/${LOGNAME}_rdifact.ior -DChannelIORFileName=/tmp/${LOGNAME}_rdichan.ior']
+
+# -----------------------------------------------------------------------------
+#
+# Fonction de test
+#
+
+def test(clt):
+   """
+        Test function that creates an instance of PYHELLO component
+        usage : pyhello=test(clt)
+   """
+   # create an LifeCycleCORBA instance
+   import LifeCycleCORBA 
+   lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
+   import PYHELLO_ORB
+   pyhello = lcc.FindOrLoadComponent("FactoryServerPy", "PYHELLO")
+   return pyhello
+
+# -----------------------------------------------------------------------------
+#
+# Fonctions helper pour ajouter des variables d'environnement
+#
+
+def add_path(directory):
+   os.environ["PATH"]=directory + ":" + os.environ["PATH"]
+
+def add_ld_library_path(directory):
+   os.environ["LD_LIBRARY_PATH"]=directory + ":" + os.environ["LD_LIBRARY_PATH"]
+
+def add_python_path(directory):
+   os.environ["PYTHONPATH"]=directory + ":" + os.environ["PYTHONPATH"]
+   sys.path[:0]=[directory]
+
+# -----------------------------------------------------------------------------
+#
+# initialisation des variables d'environnement
+#
+
+python_version="python%d.%d" % sys.version_info[0:2]
+
+#
+# Ajout du chemin d'acces aux executables de KERNEL dans le PATH
+#
+
+add_path(os.path.join(kernel_root_dir,"bin","salome"))
+#print "PATH=",os.environ["PATH"]
+
+#
+# Ajout des modules dans le LD_LIBRARY_PATH
+#
+for module in liste_modules:
+    module_root_dir=modules_root_dir[module]
+    add_ld_library_path(os.path.join(module_root_dir,"lib","salome"))
+#print "LD_LIBRARY_PATH=",os.environ["LD_LIBRARY_PATH"]
+
+#
+# Ajout des modules dans le PYTHONPATH (KERNEL prioritaire, donc en dernier)
+#
+
+liste_modules_reverse=liste_modules[:]
+liste_modules_reverse.reverse()
+#print liste_modules
+#print liste_modules_reverse
+for module in liste_modules_reverse:
+    module_root_dir=modules_root_dir[module]
+    add_python_path(os.path.join(module_root_dir,"bin","salome"))
+    add_python_path(os.path.join(module_root_dir,"lib",python_version,"site-packages","salome"))
+    add_python_path(os.path.join(module_root_dir,"lib","salome"))
+    add_python_path(os.path.join(module_root_dir,"lib",python_version,"site-packages","salome","shared_modules"))
+
+#print "PYTHONPATH=",sys.path
+
+import orbmodule
+
+#
+# -----------------------------------------------------------------------------
+#
+
+def startGUI():
+  import SALOME
+  session=clt.waitNS("/Kernel/Session",SALOME.Session)
+
+  #
+  # Activation du GUI de Session Server
+  #
+       
+  session.GetInterface()
+  
+#
+# -----------------------------------------------------------------------------
+#
+
+def startSalome():
+
+  #
+  # Lancement Session Loader
+  #
+  SessionLoader().run()
+
+  #
+  # Initialisation ORB et Naming Service
+  #
+  clt=orbmodule.client()
+
+  # (non obligatoire) Lancement Logger Server et attente de sa 
+  #  disponibilite dans le naming service
+  #
+  if with_logger:
+       LoggerServer().run()
+       clt.waitLogger("Logger")
+
+  #
+  # Lancement Registry Server
+  #
+  RegistryServer().run()
+
+  #
+  # Attente de la disponibilité du Registry dans le Naming Service
+  #
+  clt.waitNS("/Registry")
+
+  #
+  # Lancement Catalog Server
+  #
+  cataServer=CatalogServer()
+  cataServer.setpath(liste_modules)
+  cataServer.run()
+
+  #
+  # Attente de la disponibilité du Catalog Server dans le Naming Service
+  #
+  import SALOME_ModuleCatalog
+  clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog)
+
+  #
+  # Lancement SalomeDS Server
+  #
+  os.environ["CSF_PluginDefaults"]=os.path.join(kernel_root_dir,"share","salome","resources")
+  os.environ["CSF_SALOMEDS_ResourcesDefaults"]=os.path.join(kernel_root_dir,"share","salome","resources")
+  SalomeDSServer().run()
+
+  if "GEOM" in liste_modules:
+       print "GEOM OCAF Resources"
+       os.environ["CSF_GEOMDS_ResourcesDefaults"]=os.path.join(modules_root_dir["GEOM"],"share","salome","resources")
+
+
+  #
+  # Attente de la disponibilité du SalomeDS dans le Naming Service
+  #
+  clt.waitNS("/myStudyManager")
+
+  #
+  # Lancement Session Server
+  #
+  SessionServer().run()
+
+  #
+  # Attente de la disponibilité du Session Server dans le Naming Service
+  #
+  import SALOME
+  session=clt.waitNS("/Kernel/Session",SALOME.Session)
+
+  #
+  # Lancement containers
+  #
+  theComputer = os.getenv("HOSTNAME")
+  theComputer = theComputer.split('.')[0]
+
+  #
+  # Lancement Container C++ local
+  #
+  if with_container_cpp:
+         ContainerCPPServer().run()
+         #
+         # Attente de la disponibilité du Container C++ local 
+          # dans le Naming Service
+         #
+         clt.waitNS("/Containers/" + theComputer + "/FactoryServer")
+  #
+  # Lancement Container Python local
+  #
+  if with_container_python:
+         ContainerPYServer().run()
+         #
+         # Attente de la disponibilité du Container Python local 
+          #  dans le Naming Service
+         #
+         clt.waitNS("/Containers/" + theComputer + "/FactoryServerPy")
+
+  if with_container_superv:
+       #
+       # Lancement Container Supervision local
+       #
+       ContainerSUPERVServer().run()
+       #
+       # Attente de la disponibilité du Container Supervision local 
+        # dans le Naming Service
+       #
+       clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer")
+  #
+  # Activation du GUI de Session Server
+  #
+  #session.GetInterface()
+
+  end_time = os.times()
+  print
+  print "Start SALOME, elpased time : %5.1f seconds"% (end_time[4] - init_time[4])
+
+  return clt
+
+#
+# -----------------------------------------------------------------------------
+#
+
+if __name__ == "__main__":
+   clt=None
+   try:
+      clt = startSalome()
+   except:
+      print
+      print
+      print "--- erreur au lancement Salome ---"
+   
+   #print process_id
+   
+   
+   filedict='/tmp/'+os.getenv('USER')+'_SALOME_pidict'
+   #filedict='/tmp/'+os.getlogin()+'_SALOME_pidict'
+   
+   fpid=open(filedict, 'w')
+   pickle.dump(process_id,fpid)
+   fpid.close()
+   
+   print """
+
+Sauvegarde du dictionnaire des process dans , %s
+Pour tuer les process SALOME, executer : python killSalome.py depuis
+une console, ou bien killSalome() depuis le present interpreteur,
+s'il n'est pas fermé.
+
+runSalome, avec l'option --killall, commence par tuer les process restants 
+d'une execution précédente.
+
+Pour lancer uniquement le GUI, executer startGUI() depuis le present interpreteur,
+s'il n'est pas fermé.
+
+""" % filedict
+   
+   #
+   #  Impression arborescence Naming Service
+   #
+   
+   if clt != None:
+     print
+     print " --- registered objects tree in Naming Service ---"
+     clt.showNS()
+     session=clt.waitNS("/Kernel/Session")
+     catalog=clt.waitNS("/Kernel/ModulCatalog")
+     import socket
+     container =  clt.waitNS("/Containers/" + socket.gethostname().split('.')[0] + "/FactoryServerPy")
+   
+   if os.path.isfile("~/.salome/pystartup"):
+      f=open(os.path.expanduser("~/.salome/pystartup"),'w')
+      PYTHONSTARTUP=f.read()
+      f.close()
+   else:
+      PYTHONSTARTUP="""
+# Add auto-completion and a stored history file of commands to your Python
+# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
+# bound to the TAB key by default (you can change it - see readline docs).
+#
+# Store the history in ~/.salome/pyhistory, 
+#
+import atexit
+import os
+import readline
+import rlcompleter
+readline.parse_and_bind('tab: complete')
+
+historyPath = os.path.expanduser("~/.salome/pyhistory")
+
+def save_history(historyPath=historyPath):
+    import readline
+    readline.write_history_file(historyPath)
+
+if os.path.exists(historyPath):
+    readline.read_history_file(historyPath)
+
+atexit.register(save_history)
+del os, atexit, readline, rlcompleter, save_history, historyPath
+"""
+      f=open(os.path.expanduser("~/.salome/pystartup"),'w')
+      f.write(PYTHONSTARTUP)
+      f.close()
+
+   exec PYTHONSTARTUP in {}
+   
diff --git a/build_configure b/build_configure
new file mode 100755 (executable)
index 0000000..2bc6c3d
--- /dev/null
@@ -0,0 +1,129 @@
+#!/bin/bash
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Tool for updating list of .in file for the SALOME project 
+# and regenerating configure script
+# Author : 
+# Modified by : Alexander BORODIN (OCN) - autotools usage
+# Date : 10/10/2002
+#
+ORIG_DIR=`pwd`
+CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+
+########################################################################
+# Test if the KERNEL_ROOT_DIR is set correctly
+
+if test ! -d "${KERNEL_ROOT_DIR}"; then
+    echo "failed : KERNEL_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ! -d "${GUI_ROOT_DIR}"; then
+    echo "failed : GUI_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+
+########################################################################
+# Test if the MED_ROOT_DIR is set correctly
+
+if test ! -d "${MED_ROOT_DIR}"; then
+    echo "failed : MED_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+
+########################################################################
+# Test if the SMESH_ROOT_DIR is set correctly
+
+if test ! -d "${SMESH_ROOT_DIR}"; then
+    echo "failed : SMESH_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+########################################################################
+
+cd ${CONF_DIR}
+ABS_CONF_DIR=`pwd`
+
+mkdir -p salome_adm/unix/config_files
+cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
+
+
+
+# ____________________________________________________________________
+# aclocal creates the aclocal.m4 file from the standard macro and the
+# custom macro embedded in the directory salome_adm/unix/config_files
+# and KERNEL config_files directory.
+# output:
+#   aclocal.m4
+#   autom4te.cache (directory)
+echo "====================================================== aclocal"
+
+aclocal -I adm_local/unix/config_files \
+        -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+        -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+        -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+       -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files || exit 1
+
+# ____________________________________________________________________
+# libtoolize creates some configuration files (ltmain.sh,
+# config.guess and config.sub). It only depends on the libtool
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
+# output:
+#   salome_adm/unix/config_files/config.guess
+#   salome_adm/unix/config_files/config.sub
+#   salome_adm/unix/config_files/ltmain.sh
+#echo "====================================================== libtoolize"
+
+libtoolize --force --copy --automake || exit 1
+
+# ____________________________________________________________________
+# autoconf creates the configure script from the file configure.ac (or
+# configure.in if configure.ac doesn't exist)
+# output:
+#   configure
+echo "====================================================== autoconf"
+
+autoconf
+
+# ____________________________________________________________________
+# automake creates some scripts used in building process
+# (install-sh, missing, ...). It only depends on the automake
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
+# creates the Makefile.in files from the Makefile.am files.
+# output:
+#   salome_adm/unix/config_files/compile
+#   salome_adm/unix/config_files/depcomp
+#   salome_adm/unix/config_files/install-sh
+#   salome_adm/unix/config_files/missing
+#   salome_adm/unix/config_files/py-compile
+#   Makefile.in (from Makefile.am)
+echo "====================================================== automake"
+
+automake --copy --gnu --add-missing
diff --git a/clean_configure b/clean_configure
new file mode 100755 (executable)
index 0000000..6ebb529
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+rm -rf autom4te.cache aclocal.m4 configure make_config
+find . -name "*~" -print -exec rm {} \;
+find . -name "*.pyc" -print -exec rm {} \;
+#exit
+# ==================== ON SORT AVANT
+
+find bin -name Makefile.in | xargs rm -f
+find idl -name Makefile.in | xargs rm -f
+find resources -name Makefile.in | xargs rm -f
+find salome_adm -name Makefile.in | xargs rm -f
+find src -name Makefile.in | xargs rm -f
+rm -f Makefile.in
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..90e8b16
--- /dev/null
@@ -0,0 +1,391 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Marc Tajchman (CEA)
+# Date : 28/06/2001
+# Modified by : Patrick GOLDBRONN (CEA)
+# Modified by : Marc Tajchman (CEA)
+# Modified by : Alexander BORODIN (OCN) - autotools usage
+# Created from configure.in.base
+#
+AC_INIT([Salome2 Project HOMARD module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeHOMARD])
+AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE([-Wno-portability])
+
+XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
+AC_SUBST(XVERSION)
+
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=homard
+AC_SUBST(MODULE_NAME)
+
+echo
+echo ---------------------------------------------
+echo Initialize source and build root directories
+echo ---------------------------------------------
+echo
+
+dnl
+dnl Initialize source and build root directories
+dnl
+
+ROOT_BUILDDIR=`pwd`
+ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+cd $ROOT_SRCDIR
+ROOT_SRCDIR=`pwd`
+cd $ROOT_BUILDDIR
+
+AC_SUBST(ROOT_SRCDIR)
+AC_SUBST(ROOT_BUILDDIR)
+
+echo
+echo Source root directory : $ROOT_SRCDIR
+echo Build  root directory : $ROOT_BUILDDIR
+echo
+echo
+
+if test -z "$AR"; then
+   AC_CHECK_PROGS(AR,ar xar,:,$PATH)
+fi
+AC_SUBST(AR)
+
+dnl Export the AR macro so that it will be placed in the libtool file
+dnl correctly.
+export AR
+
+echo
+echo ---------------------------------------------
+echo testing make
+echo ---------------------------------------------
+echo
+
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+dnl
+dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
+
+echo
+echo ---------------------------------------------
+echo Coniguring production
+echo ---------------------------------------------
+echo
+AC_ENABLE_DEBUG(yes)
+AC_DISABLE_PRODUCTION
+
+echo ---------------------------------------------
+echo testing libtool
+echo ---------------------------------------------
+
+dnl first, we set static to no!
+dnl if we want it, use --enable-static
+AC_ENABLE_STATIC(no)
+
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+
+dnl Fix up the INSTALL macro if it s a relative path. We want the
+dnl full-path to the binary instead.
+case "$INSTALL" in
+   *install-sh*)
+      INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
+      ;;
+esac
+
+echo
+echo ---------------------------------------------
+echo testing C/C++
+echo ---------------------------------------------
+echo
+
+cc_ok=no
+dnl inutil car libtool
+dnl AC_PROG_CC
+AC_PROG_CXX
+AC_CXX_WARNINGS
+AC_CXX_TEMPLATE_OPTIONS
+AC_DEPEND_FLAG
+# AC_CC_WARNINGS([ansi])
+cc_ok=yes
+
+echo
+echo ---------------------------------------------
+echo testing Fortran
+echo ---------------------------------------------
+echo
+
+fortran_ok=no
+AC_PROG_F77
+AC_F77_LIBRARY_LDFLAGS
+AC_PROG_FC
+AC_FC_LIBRARY_LDFLAGS
+if test "X$FC" != "X" ; then
+   fortran_ok=yes
+   F77=$FC
+fi
+
+dnl AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
+
+echo
+
+dnl Library libdl :
+AC_CHECK_LIB(dl,dlopen)
+
+dnl add library libm :
+AC_CHECK_LIB(m,ceil)
+
+dnl
+dnl Well we use sstream which is not in gcc pre-2.95.3
+dnl We must test if it exists. If not, add it in include !
+dnl
+
+AC_CXX_HAVE_SSTREAM
+
+echo
+echo ---------------------------------------------
+echo testing python
+echo ---------------------------------------------
+echo
+
+CHECK_PYTHON
+
+echo
+echo ---------------------------------------------
+echo testing swig
+echo ---------------------------------------------
+echo
+
+AM_PATH_PYTHON(2.3)
+CHECK_SWIG
+
+echo
+echo ---------------------------------------------
+echo testing threads
+echo ---------------------------------------------
+echo
+
+ENABLE_PTHREADS
+
+HOMARD_WITH_GUI=yes
+
+AM_CONDITIONAL(HOMARD_ENABLE_GUI, [test "${HOMARD_WITH_GUI}" = "yes"])
+
+if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
+    echo
+    echo ---------------------------------------------
+    echo testing omniORB
+    echo ---------------------------------------------
+    echo
+
+    CHECK_OMNIORB
+
+    echo
+    echo ---------------------------------------------
+    echo default ORB : omniORB
+    echo ---------------------------------------------
+    echo
+
+    DEFAULT_ORB=omniORB
+
+    echo
+    echo ---------------------------------------------
+    echo testing Corba
+    echo ---------------------------------------------
+    echo
+
+    CHECK_CORBA
+
+    AC_SUBST_FILE(CORBA)
+    corba=make_$ORB
+    CORBA=adm_local/unix/$corba
+
+fi
+
+if test "${HOMARD_WITH_GUI}" = "yes"; then
+    echo
+    echo ---------------------------------------------
+    echo testing openGL
+    echo ---------------------------------------------
+    echo
+
+    CHECK_OPENGL
+
+    echo
+    echo ---------------------------------------------
+    echo testing QT
+    echo ---------------------------------------------
+    echo
+
+    CHECK_QT
+
+    echo
+    echo ---------------------------------------------
+    echo Testing GUI
+    echo ---------------------------------------------
+    echo
+
+    CHECK_SALOME_GUI
+
+    echo
+    echo ---------------------------------------------
+    echo Testing full GUI
+    echo ---------------------------------------------
+    echo
+
+    CHECK_CORBA_IN_GUI
+    if test "x${CORBA_IN_GUI}" != "xyes"; then
+      echo "failed : For configure HOMARD module necessary full GUI !"
+      exit
+    fi
+fi
+
+echo
+echo ---------------------------------------------
+echo testing HDF5
+echo ---------------------------------------------
+echo
+
+CHECK_HDF5
+
+echo
+echo ---------------------------------------------
+echo Testing OpenCascade
+echo ---------------------------------------------
+echo
+
+CHECK_CAS
+
+
+echo
+echo ---------------------------------------------
+echo Testing Kernel
+echo ---------------------------------------------
+echo
+
+CHECK_KERNEL
+CHECK_MPI
+
+echo
+echo ---------------------------------------------
+echo Testing Med
+echo ---------------------------------------------
+echo
+
+CHECK_MED2
+
+
+echo
+echo ---------------------------------------------
+echo Testing Med Module
+echo ---------------------------------------------
+echo
+
+CHECK_MED
+
+echo
+echo ---------------------------------------------
+echo Testing Smesh
+echo ---------------------------------------------
+echo
+
+CHECK_SMESH
+
+
+echo
+echo ---------------------------------------------
+echo Testing sphinx
+echo ---------------------------------------------
+echo
+
+CHECK_SPHINX
+
+
+echo
+echo ---------------------------------------------
+echo Summary
+echo ---------------------------------------------
+echo
+
+echo Configure
+if test "${HOMARD_WITH_GUI}" = "yes"; then
+variables="cc_ok fortran_ok   python_ok swig_ok threads_ok OpenGL_ok qt_ok  hdf5_ok omniORB_ok Kernel_ok med2_ok SalomeGUI_ok Med_ok SMesh_ok  sphinx_ok"
+fi
+
+if test "${HOMARD_WITH_GUI}" = "no"; then
+variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok  doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok  sphinx_ok"
+fi
+
+for var in $variables
+do
+   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+   eval echo \$$var
+done
+
+echo
+echo "Default ORB   : $DEFAULT_ORB"
+echo
+
+dnl We don t need to say when we re entering directories if we re using
+dnl GNU make becuase make does it for us.
+if test "X$GMAKE" = "Xyes"; then
+   AC_SUBST(SETX) SETX=":"
+else
+   AC_SUBST(SETX) SETX="set -x"
+fi
+
+dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
+dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
+dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
+dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
+dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
+dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
+dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
+dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
+
+echo
+echo ---------------------------------------------
+echo generating Makefiles and configure files
+echo ---------------------------------------------
+echo
+
+#AC_OUTPUT_COMMANDS([ \
+#  chmod +x ./bin/*; \
+#  chmod +x ./bin/salome/*; \
+#])
+
+# This list is initiated using autoscan and must be updated manually
+# when adding a new file <filename>.in to manage. When you execute
+# autoscan, the Makefile list is generated in the output file configure.scan.
+# This could be helpfull to update de configuration.
+AC_OUTPUT([ \
+       salome_adm/unix/SALOMEconfig.h \
+       Makefile \
+       idl/Makefile \
+       doc/Makefile \
+       src/Makefile \
+       src/HOMARD_I/Makefile \
+       src/HOMARD/Makefile \
+       src/HOMARDGUI/Makefile \
+       src/HOMARD_SWIG/Makefile \
+       resources/Makefile \
+       tests/Makefile \
+])
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..f6d358d
--- /dev/null
@@ -0,0 +1,65 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  File   : Makefile.in
+#  Author : Vasily Rusyaev (Open Cascade NN)
+#  Module : doc
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+if SPHINX_IS_OK
+
+homarddoc_DATA=html/index.html
+html/index.html:$(RSTFILES)
+       make htm
+endif
+
+homarddocdir=$(docdir)/gui/HOMARD
+
+SPHINXOPTS      =
+SOURCEDIR       = $(srcdir)
+SPHINXBUILD     = sphinx-build
+PAPEROPT_a4     = -D latex_paper_size=a4
+ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
+
+EXTRA_DIST+= images files html $(docdir) $(docdir)/gui $(homarddoc_DATA)
+htm:
+       mkdir -p html doctrees
+       $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) html
+       @echo
+       @echo "Build finished. The HTML pages are in html."
+
+RSTFILES=          \
+index.rst          \
+intro.rst    \
+tutorials.rst
+
+usr_docs: 
+       make install-data-local
+
+docs: usr_docs
+
+install-data-local:
+       $(INSTALL) -d $(DESTDIR)$(homarddocdir)
+       if test -d "html"; then cp -rf html/* $(DESTDIR)$(homarddocdir); fi;
+
+uninstall-local:
+       rm -rf $(DESTDIR)$(homarddocdir)/*
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644 (file)
index 0000000..ca7e356
--- /dev/null
@@ -0,0 +1,198 @@
+# -*- coding: utf-8 -*-
+#
+# HOMARD documentation build configuration file, created by
+# sphinx-quickstart on Tue Jan  5 08:51:14 2010.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.append(os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',  'sphinx.ext.coverage',  'sphinx.ext.ifconfig']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'HOMARD'
+copyright = u'1996, 2010, EDF R&D, G. Nicolas, T. Fouquet, P. Noyret'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '9.6'
+# The full version, including alpha/beta/rc tags.
+release = '9.6'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'HOMARDdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'HOMARD.tex', u'HOMARD Documentation',
+   u'G. NICOLAS et T. FOUQUET', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/doc/files/HOMARD_0.pdf b/doc/files/HOMARD_0.pdf
new file mode 100644 (file)
index 0000000..492f105
Binary files /dev/null and b/doc/files/HOMARD_0.pdf differ
diff --git a/doc/files/tutorial_1.00.med.gz b/doc/files/tutorial_1.00.med.gz
new file mode 100644 (file)
index 0000000..500cd01
Binary files /dev/null and b/doc/files/tutorial_1.00.med.gz differ
diff --git a/doc/files/tutorial_1.py b/doc/files/tutorial_1.py
new file mode 100644 (file)
index 0000000..607f72c
--- /dev/null
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+"""
+Exemple de couplage HOMARD-Salome
+Copyright EDF-R&D 1996, 2010
+"""
+__revision__ = "V1.0"
+#
+import salome
+salome.salome_init()
+import HOMARD
+#
+homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+study_main = salome.myStudyManager.NewStudy("HOMARD")
+homard.SetCurrentStudy(salome.myStudy)
+#
+dircase = "/tmp"
+#
+# Hypothesis "Hypo_0"
+# ===================
+Hypo_0 = homard.CreateHypothesis('Hypo_0')
+Hypo_0.SetAdapRefinUnRef(-1, 1, 0)
+#
+# Case "Case_0"
+# =============
+Case_0 = homard.CreateCase('Case_0', 'MESH', dircase+'/tutorial_1.00.med')
+Case_0.SetDirName(dircase)
+Case_0.SetConfType(1)
+#
+# Iterations
+# ==========
+# Iteration "Iter_0"
+Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name())
+Iter_0.SetMeshName('MESH')
+Iter_0.SetMeshFile(dircase+'/maill.01.med')
+homard.AssociateIterHypo('Iter_0', 'Hypo_0')
+codret = homard.Compute('Iter_0', 1)
+
+# Iteration "Iter_1"
+Iter_1 = homard.CreateIteration('Iter_1', 'Iter_0')
+Iter_1.SetMeshName('MESH')
+Iter_1.SetMeshFile(dircase+'/maill.02.med')
+homard.AssociateIterHypo('Iter_1', 'Hypo_0')
+codret = homard.Compute('Iter_1', 1)
+
+# Iteration "Iter_2"
+Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1')
+Iter_2.SetMeshName('MESH')
+Iter_2.SetMeshFile(dircase+'/maill.03.med')
+homard.AssociateIterHypo('Iter_2', 'Hypo_0')
+codret = homard.Compute('Iter_2', 1)
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/doc/files/tutorial_2.00.med.gz b/doc/files/tutorial_2.00.med.gz
new file mode 100644 (file)
index 0000000..2ad4223
Binary files /dev/null and b/doc/files/tutorial_2.00.med.gz differ
diff --git a/doc/files/tutorial_2.py b/doc/files/tutorial_2.py
new file mode 100644 (file)
index 0000000..d6e7ca8
--- /dev/null
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+"""
+Exemple de couplage HOMARD-Salome
+Copyright EDF-R&D 1996, 2010
+"""
+__revision__ = "V1.0"
+#
+import salome
+salome.salome_init()
+import HOMARD
+#
+homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+study_main = salome.myStudyManager.NewStudy("HOMARD")
+homard.SetCurrentStudy(salome.myStudy)
+#
+dircase = "/tmp"
+#
+# Creation of the zones
+# =====================
+# Box "Zone_0"
+Zone_0 = homard.CreateZone('Zone_0', 2)
+Zone_0.SetBox(-0.1, 1.1, -0.1, 1.1, 0.9, 1.1)
+#
+# Sphere "Zone_1"
+Zone_1 = homard.CreateZone('Zone_1', 4)
+Zone_1.SetSphere(0., 0., 0., 1.05)
+#
+# Box "Zone_2"
+Zone_2 = homard.CreateZone('Zone_2', 2)
+Zone_2.SetBox(-0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
+#
+# Hypothesis "Hypo_0"
+# ===================
+Hypo_0 = homard.CreateHypothesis('Hypo_0')
+Hypo_0.SetAdapRefinUnRef(0, 1, 0)
+homard.AssociateHypoZone('Zone_1', 'Hypo_0')
+homard.AssociateHypoZone('Zone_0', 'Hypo_0')
+#
+# Hypothesis "Hypo_1"
+# ===================
+Hypo_1 = homard.CreateHypothesis('Hypo_1')
+Hypo_1.SetAdapRefinUnRef(0, 1, 0)
+homard.AssociateHypoZone('Zone_0', 'Hypo_1')
+homard.AssociateHypoZone('Zone_2', 'Hypo_1')
+#
+# Case "Case_0"
+# =============
+Case_0 = homard.CreateCase('Case_0', 'MZERO', dircase+'/tutorial_2.00.med')
+Case_0.SetDirName(dircase)
+#
+# Iteration "Iter_0"
+# ==================
+Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name())
+Iter_0.SetMeshName('M_1')
+Iter_0.SetMeshFile(dircase+'/maill.01.med')
+homard.AssociateIterHypo('Iter_0', 'Hypo_0')
+codret = homard.Compute('Iter_0', 1)
+#
+# Iteration "Iter_1"
+# ==================
+Iter_1 = homard.CreateIteration('Iter_1', 'Iter_0')
+Iter_1.SetMeshName('M_2')
+Iter_1.SetMeshFile(dircase+'/maill.02.med')
+homard.AssociateIterHypo('Iter_1', 'Hypo_1')
+codret = homard.Compute('Iter_1', 1)
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/doc/files/tutorial_3.00.med.gz b/doc/files/tutorial_3.00.med.gz
new file mode 100644 (file)
index 0000000..6dd5423
Binary files /dev/null and b/doc/files/tutorial_3.00.med.gz differ
diff --git a/doc/files/tutorial_3.01.med.gz b/doc/files/tutorial_3.01.med.gz
new file mode 100644 (file)
index 0000000..efdae65
Binary files /dev/null and b/doc/files/tutorial_3.01.med.gz differ
diff --git a/doc/files/tutorial_3.py b/doc/files/tutorial_3.py
new file mode 100644 (file)
index 0000000..c9f3cd1
--- /dev/null
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+"""
+Exemple de couplage HOMARD-Salome
+Copyright EDF-R&D 1996, 2010
+"""
+__revision__ = "V1.0"
+#
+import salome
+salome.salome_init()
+import HOMARD
+#
+homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+study_main = salome.myStudyManager.NewStudy("HOMARD")
+homard.SetCurrentStudy(salome.myStudy)
+#
+dircase = "/tmp"
+#
+# Hypothesis "Hypo_0"
+# ===================
+Hypo_0 = homard.CreateHypothesis('Hypo_0')
+Hypo_0.SetAdapRefinUnRef(1, 1, 0)
+# Characterization of the field
+Hypo_0.SetField('SOLU_0__QIRE_ELEM_SIGM__________')
+Hypo_0.SetUseComp(0)
+Hypo_0.AddComp('ERREST          ')
+Hypo_0.SetRefinThr(3, 1.0)
+#
+# Hypothesis "Hypo_1"
+# ===================
+Hypo_1 = homard.CreateHypothesis('Hypo_1')
+Hypo_1.SetAdapRefinUnRef(1, 1, 1)
+# Characterization of the field
+Hypo_1.SetField('SOLU_1__QIRE_ELEM_SIGM__________')
+Hypo_1.SetUseComp(0)
+Hypo_1.AddComp('ERREST          ')
+Hypo_1.SetRefinThr(3, 1.5)
+Hypo_1.SetUnRefThr(3, 6.)
+#
+# Case "Case_0"
+# =============
+Case_0 = homard.CreateCase('Case_0', 'G_0', dircase+'/tutorial_3.00.med')
+Case_0.SetDirName(dircase)
+#
+# Iteration "Iter_0"
+# ==================
+Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name())
+Iter_0.SetMeshName('H_1')
+Iter_0.SetMeshFile(dircase+'/maill.01.med')
+Iter_0.SetField(dircase+'/tutorial_3.00.med', 1, 1)
+homard.AssociateIterHypo('Iter_0', 'Hypo_0')
+codret = homard.Compute('Iter_0', 1)
+#
+# Iteration "Iter_1"
+# ==================
+Iter_1 = homard.CreateIteration('Iter_1', 'Iter_0')
+Iter_1.SetMeshName('H_2')
+Iter_1.SetMeshFile('/tmp/maill.02.med')
+Iter_1.SetField(dircase+'/tutorial_3.01.med', 1, 1)
+homard.AssociateIterHypo('Iter_1', 'Hypo_1')
+codret = homard.Compute('Iter_1', 1)
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/doc/glossaire.rst b/doc/glossaire.rst
new file mode 100644 (file)
index 0000000..1e44872
--- /dev/null
@@ -0,0 +1,34 @@
+.. _glossaire:
+
+Glossaire
+=========
+
+.. glossary::
+   :sorted:
+
+   raffinement
+      Le raffinement est une opération consistant à découper les mailles sélectionnées.
+
+   niveau
+      Le niveau d'une maille est le nombre de découpages qu'il a fallu pour l'obtenir. Les mailles du maillage initial sont du niveau 0 par convention.
+
+   déraffinement
+      Le déraffinement est une opération consistant à supprimer des mailles. Il s'agit en fait d'annuler un précédent découpage : on ne reviendra jamais 'plus haut' que le maillage initial.
+
+   zone
+      Une zone est une région qui définit un pilotage de raffinement : toutes les mailles dont au moins une arête est dans une zone seront raffinées.
+
+   cas
+      Un cas est défini par un maillage initial et une succession d'adaptations.
+
+   itération
+      Une itération est le processus qui permet de passer d'un maillage à un autre au sein d'un cas. Une itération met en oeuvre du raffinement et/ou du déraffinement selon l'hypothèse qui lui est attachée.
+
+   hypothèse
+      Une hypothèse décrit les conditions de passage d'un maillage à un autre : raffinement et/ou déraffinement, mode de pilotage, etc. Une hypothèse est référencée par une ou plusieurs itérations.
+
+   champ
+      Un champ est exprimé sur un maillage, par noeud ou par maille, avec une ou plusieurs composantes. La valeur de ce champ pilote l'adaptation.
+
+   MED
+      C'est le format d'échange des maillages et des champs pour Salome.
\ No newline at end of file
diff --git a/doc/gui_create_case.rst b/doc/gui_create_case.rst
new file mode 100644 (file)
index 0000000..88b3abc
--- /dev/null
@@ -0,0 +1,67 @@
+.. _gui_create_case:
+
+Le cas
+======
+.. index:: single: cas
+La définition du cas se fait par la donnée des informations suivantes :
+
+  - Un nom
+  - Un répertoire
+  - Le fichier du maillage initial
+  - Le type de conformité pour la série d'adaptations envisagées
+
+.. image:: images/create_case_1.png
+   :align: center
+
+
+Le nom du cas
+"""""""""""""
+Un nom de cas est proposé automatiquement : Case_0, Case_1, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour un cas précédent.
+
+Le répertoire
+"""""""""""""
+Le répertoire est celui qui contiendra les fichiers produits par les adaptations successives. Ce répertoire doit exister. Par défaut, Salome propose ``/tmp``. Ce choix peut être modifié, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche. C'est dans ce répertoire que seront exportés les maillages au format MED, dans des fichiers de nom ``maill.xx.med``, où ``xx`` est un numéro d'ordre créé automatiquement ; ces noms de fichiers seront visibles dans l'arbre d'études.
+
+.. image:: images/create_case_2.png
+   :align: center
+
+.. index:: single: maillage;initial
+.. index:: single: MED
+Le maillage initial
+"""""""""""""""""""
+Le maillage initial doit se trouver dans un fichier au format MED. Classiquement, il aura été produit par le logiciel de calcul avec lequel on travaille. Mais il peut également avoir été créé avec le module SMESH et exporté au format MED. Le nom du fichier peut être fourni, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche.
+
+.. image:: images/create_case_3.png
+   :align: center
+
+.. note::
+  Le fichier ne doit contenir qu'un seul maillage.
+
+.. warning::
+  Le maillage ne doit pas être lui-même le produit d'une adaptation de maillage par HOMARD, sous peine de perdre la cohérence entre les différents niveaux de raffinement/déraffinement
+
+.. index:: single: type de conformité
+Le type de conformité
+"""""""""""""""""""""
+Les itérations qui seront définies pour ce cas devront respecter le même comportement vis-à-vis de la conformité.
+
+L'option par défaut, 'conforme', implique que les maillages produits par HOMARD seront conformes au sens des éléments finis. C'est le choix classique de la plupart des logiciels de simulation par éléments finis.
+
+Si le calcul est possible avec des maillages non conforme, on a le choix entre 3 possibilités :
+
+.. image:: images/create_case_4.png
+   :align: center
+
+* 1 noeud par maille : une maille ne peut posséder qu'un seul noeud de non conformité avec ses voisines.
+* 1 noeud par arête : chaque arête d'une maille peut être découpée sans que la maille voisine par cette arête ne le soit.
+* quelconque : aucune limitation sur les raccords de conformité d'une maille à l'autre.
+
+.. index:: single: arbre d'étude
+L'arbre d'étude
+"""""""""""""""
+A l'issue de cette création de cas, l'arbre d'études a été enrichi de ce nouveau cas. On y trouve l'itération initiale, identifiée par le nom du maillage qui a été lu dans le fichier fourni.
+
+.. image:: images/create_case_5.png
+   :align: center
+
+
diff --git a/doc/gui_create_hypothese.rst b/doc/gui_create_hypothese.rst
new file mode 100644 (file)
index 0000000..c3e5c3d
--- /dev/null
@@ -0,0 +1,90 @@
+.. _gui_create_hypothese:
+
+L'hypothèse
+===========
+.. index:: single: hypothèse
+
+L'hypothèse contient toutes les paramètres de pilotage d'une adaptation d'un maillage. Cette opération permet de réaliser l'itération à laquelle elle est attachée. 
+
+Il existe trois classes d'hypothèses :
+
+  - Uniforme sur tout le maillage,
+  - Selon un champ,
+  - En fonction de zone géométrique. 
+
+.. image:: images/create_hypothese_1.png
+   :align: center
+
+
+Nom de l'hypothèse
+""""""""""""""""""
+Un nom de l'hypothèse est proposé automatiquement : Hypo_0, Hypo_1, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour une hypothèse précédente.
+
+Adaptation uniforme
+"""""""""""""""""""
+Par défaut on propose un raffinement uniforme. Quand on part d'un maillage qui a déjà été raffiné, l'option de déraffinement supprimera les mailles produites.
+
+Adaptation selon un champ
+"""""""""""""""""""""""""
+
+.. note::
+  Pour pouvoir adapter le maillage selon un champ il faut avoir au préalable indiqué dans la fenêtre de construction de l'itération le fichier med contenant le champ.
+
+Le nom du fichier qui a été sélectionné est affiché sans modification possible dans cette fenêtre. Le champ voulu est à choisir dans la liste qui s'affiche. 
+
+.. image:: images/create_hypothese_4.png
+   :align: center
+
+Une fois ce champ choisi, la liste des ses composantes s'affiche. Il suffit de désigner la (ou les) composantes désirées. Si l'on choisi une seule composante, par défaut, c'est sa valeur absolue qui sera utilisée, mais il est possible d'utiliser la valeur relative. Dans le cas de plusieurs composantes, par défaut HOMARD utilisera la norme L2 (euclidienne). On peut toutefois choisir d'utiliser la norme infinie (le max des valeurs absolues des composantes).
+
+.. image:: images/create_hypothese_5.png
+   :align: center
+
+Le raffinement se fait selon un seuil qui définit un critère haut de raffinement. Toutes les mailles pour lesquels l’indicateur est supérieur à ce critère seront raffinées.
+Pour le choix du critère, trois variantes sont possibles :
+
+  - selon un pourcentage de mailles à raffiner, nombre réel compris entre 0 et 100 ; HOMARD raffinera les x% des mailles qui ont la plus grande valeur du champ.
+  - selon une valeur relative du champ, nombre compris entre 0 et 100 ; HOMARD raffinera les mailles où le champ est supérieur à x% de l'intervalle [mini,maxi].
+  - selon une valeur absolue ; toutes les mailles avec une valeur de champ supérieure à cette valeur seront raffinées.
+
+La même convention s'applique au déraffinement, en remplaçant supérieur par inférieur. On peut inactiver une des fonctions (raffinement ou déraffinement) en cochant le bouton ad_hoc.
+
+.. image:: images/create_hypothese_6.png
+   :align: center
+
+
+Adaptation selon une zone
+"""""""""""""""""""""""""
+.. index:: single: zone
+
+Au démarrage, il faut créer une première zone par activation du bouton 'New' (voir :ref:`gui_create_zone`) :
+
+.. image:: images/create_hypothese_2.png
+   :align: center
+
+Lorsque des zones ont déjà été créées, la liste apparaît dans la fenêtre ce qui permet de sélectionner les zones voulues. 
+
+.. image:: images/create_hypothese_3.png
+   :align: center
+
+
+Filtrage par les groupes
+""""""""""""""""""""""""
+.. index:: single: zone
+
+Après l'activation du filtrage par les groupes, la liste des groupes de mailles présents dans le maillage est affichée. Il suffit de cocher ceux voulus pour restreindre l'hypothèse d'adaptation.
+
+.. image:: images/create_hypothese_8.png
+   :align: center
+
+
+L'arbre d'étude
+"""""""""""""""
+.. index:: single: arbre d'étude
+
+L'arbre d'études contient les hypothèses créées et les itérations qui les utilisent. La description des zones qui leur sont éventuellement attachées est présente.
+
+.. image:: images/create_hypothese_7.png
+   :align: center
+
+
diff --git a/doc/gui_create_iteration.rst b/doc/gui_create_iteration.rst
new file mode 100644 (file)
index 0000000..6d06757
--- /dev/null
@@ -0,0 +1,74 @@
+.. _gui_create_iteration:
+
+L'itération
+===========
+.. index:: single: itération
+La définition d'une itération se fait par la donnée des informations suivantes :
+
+  - L'itération précédente
+  - Le nom du maillage résultat
+  - L'hypothèse utilisée
+  - Eventuellement, le fichier du champ d'indicateurs d'erreur
+
+.. image:: images/create_iteration_1.png
+   :align: center
+
+
+Le nom de l'itération
+"""""""""""""""""""""
+Un nom de cas est proposé automatiquement : Iter_0, Iter_1, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour une itération précédente.
+
+L'itération précédente
+""""""""""""""""""""""
+L'itération précédente est choisie dans l'arbre d'étude. Le nom du maillage correspondant sera affiché.
+
+.. index:: single: maillage;résultat
+Le nom du maillage résultat
+"""""""""""""""""""""""""""
+L'itération en cours de création produira un maillage. Ce maillage sera connu sous un nom. Ce nom est fourni en le tapant dans la zone de texte. Par défaut, on propose un nom identique à celui de l'itération précédente.
+
+.. index:: single: hypothèse
+L'hypothèse utilisée
+""""""""""""""""""""
+L'itération en cours pilotera l'adaptation par HOMARD selon un scénario défini dans une hypothèse. Celle-ci est choisi dans la liste
+
+Au démarrage, il faut créer une première hypothèse par activation du bouton 'New' (voir :ref:`gui_create_hypothese`) :
+
+.. image:: images/create_iteration_2.png
+   :align: center
+
+Ensuite, il faut éventuellement créer une nouvelle hypothèse par activation du bouton 'New', puis sélectionner celle voulue dans la liste proposée :
+
+.. image:: images/create_iteration_3.png
+   :align: center
+
+
+.. note::
+  Si on envisage une adaptation selon les valeurs d'un champ sur le maillage, il faut avoir renseigné les informations sur ce champ avant de créer une nouvelle hypothèse.
+
+.. index:: single: champ
+.. index:: single: MED
+Le champ
+""""""""
+Pour créer ou utiliser une hypothèse d'adaptation basée sur un champ exprimé sur le maillage, on doit fournir le fichier où se trouve le champ. Ce fichier est au format MED. Classiquement, il aura été produit par le logiciel de calcul avec lequel on travaille. Le nom du fichier peut être fourni, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche.
+
+Les valeurs de 'Time Step' et de 'Rank' sont celles correspondant à la convention MED.
+
+.. image:: images/create_iteration_4.png
+   :align: center
+
+.. index:: single: arbre d'étude
+L'arbre d'étude
+"""""""""""""""
+A l'issue de cette création d'itération, l'arbre d'études a été enrichi. On y trouve l'itération initiale, identifiée par le nom du maillage qui a été lu dans le fichier fourni, l'itération courante, identifiée par son nom. On trouve aussi l'hypothèse qui lui est attachée.
+
+.. image:: images/create_iteration_5.png
+   :align: center
+
+Quand plusieurs itérations s'enchaînent, leur hypothèse est visible dans l'arbre d'étude. On remarquera dans la figure ci-après que deux itérations peuvent partager la même hypothèse.
+
+.. image:: images/create_iteration_6.png
+   :align: center
+
+
+
diff --git a/doc/gui_create_zone.rst b/doc/gui_create_zone.rst
new file mode 100644 (file)
index 0000000..0834383
--- /dev/null
@@ -0,0 +1,40 @@
+.. _gui_create_zone:
+
+La zone
+=======
+.. index:: single: zone
+
+L'objet zone contient toutes les définitions géométriques permettant de décrire une zone à raffiner. 
+
+Il existe deux types de zone :
+
+  - Parallélépipède
+  - Sphère
+
+Nom de la zone
+""""""""""""""
+Un nom de zone est proposé automatiquement : Zone_0, Zone_1, etc. Ce nom peut être modifié. Il ne doit pas avoir été utilisé pour une zone précédente.
+
+Un parallélépipède
+""""""""""""""""""
+.. index:: single: boite
+
+Le parallélépipède est forcément parallèle aux axes de coordonnées, il est défini par ses extrêmes dans chaque direction.
+
+.. image:: images/create_zone_1.png
+   :align: center
+
+Une sphère
+""""""""""
+.. index:: single: sphere
+
+La sphère est définie par son centre et son rayon.
+
+.. image:: images/create_zone_2.png
+   :align: center
+
+.. note::
+  Les valeurs proposées par défaut tiennent compte de la géométrie du maillage. 
+
+
+
diff --git a/doc/gui_usage.rst b/doc/gui_usage.rst
new file mode 100644 (file)
index 0000000..e7a58f8
--- /dev/null
@@ -0,0 +1,39 @@
+Mode d'emploi pour l'interface graphique
+========================================
+.. index:: single: cas
+.. index:: single: itération
+
+Activer le module HOMARD
+""""""""""""""""""""""""
+Pour utiliser le module HOMARD, deux façons existent :
+
+#. en activant l'onglet HOMARD dans la liste des modules,
+#. en cliquant sur le bouton HOMARD dans la barre d'outils.
+
+L'utilisateur a alors le choix entre créer une nouvelle étude ou en ouvrir une qui a été précédemment enregistrée.
+
+Définir une adaptation
+""""""""""""""""""""""
+
+Une fois que HOMARD a été activé, la permière action consiste à créer un cas. Il s'agit de sélectionner le maillage initial de la suite d'adaptations envisagée (voir :ref:`gui_create_case`). A partir de ce cas, on définira les itérations successives (voir :ref:`gui_create_iteration`) à partir des hypothèses (voir :ref:`gui_create_hypothese`).
+
+Récupérer le résultat d'une adaptation
+""""""""""""""""""""""""""""""""""""""
+Le résultat d'une adaptation s'obtient en sélectionnant l'itération à calculer. On sélectionne ensuite *Lancement* dans le menu HOMARD.
+
+.. image:: images/lancement_1.png
+   :align: center
+
+Le fichier contenant le maillage produit est visible dans l'arbre d'études.
+
+Mode d'emploi de la saisie des données
+""""""""""""""""""""""""""""""""""""""
+
+.. toctree::
+   :maxdepth: 2
+
+   gui_create_case
+   gui_create_iteration
+   gui_create_hypothese
+   gui_create_zone
+
diff --git a/doc/images/HOMARD.png b/doc/images/HOMARD.png
new file mode 100644 (file)
index 0000000..9d70b47
Binary files /dev/null and b/doc/images/HOMARD.png differ
diff --git a/doc/images/create_case_1.png b/doc/images/create_case_1.png
new file mode 100644 (file)
index 0000000..c9c88c5
Binary files /dev/null and b/doc/images/create_case_1.png differ
diff --git a/doc/images/create_case_2.png b/doc/images/create_case_2.png
new file mode 100644 (file)
index 0000000..2064078
Binary files /dev/null and b/doc/images/create_case_2.png differ
diff --git a/doc/images/create_case_3.png b/doc/images/create_case_3.png
new file mode 100644 (file)
index 0000000..8f9e051
Binary files /dev/null and b/doc/images/create_case_3.png differ
diff --git a/doc/images/create_case_4.png b/doc/images/create_case_4.png
new file mode 100644 (file)
index 0000000..d4e1089
Binary files /dev/null and b/doc/images/create_case_4.png differ
diff --git a/doc/images/create_case_5.png b/doc/images/create_case_5.png
new file mode 100644 (file)
index 0000000..e607d9b
Binary files /dev/null and b/doc/images/create_case_5.png differ
diff --git a/doc/images/create_hypothese_1.png b/doc/images/create_hypothese_1.png
new file mode 100644 (file)
index 0000000..4239c33
Binary files /dev/null and b/doc/images/create_hypothese_1.png differ
diff --git a/doc/images/create_hypothese_2.png b/doc/images/create_hypothese_2.png
new file mode 100644 (file)
index 0000000..d5a7ee2
Binary files /dev/null and b/doc/images/create_hypothese_2.png differ
diff --git a/doc/images/create_hypothese_3.png b/doc/images/create_hypothese_3.png
new file mode 100644 (file)
index 0000000..d8b6ecd
Binary files /dev/null and b/doc/images/create_hypothese_3.png differ
diff --git a/doc/images/create_hypothese_4.png b/doc/images/create_hypothese_4.png
new file mode 100644 (file)
index 0000000..52b0a3c
Binary files /dev/null and b/doc/images/create_hypothese_4.png differ
diff --git a/doc/images/create_hypothese_5.png b/doc/images/create_hypothese_5.png
new file mode 100644 (file)
index 0000000..76879ad
Binary files /dev/null and b/doc/images/create_hypothese_5.png differ
diff --git a/doc/images/create_hypothese_6.png b/doc/images/create_hypothese_6.png
new file mode 100644 (file)
index 0000000..bed6fce
Binary files /dev/null and b/doc/images/create_hypothese_6.png differ
diff --git a/doc/images/create_hypothese_7.png b/doc/images/create_hypothese_7.png
new file mode 100644 (file)
index 0000000..cdcb199
Binary files /dev/null and b/doc/images/create_hypothese_7.png differ
diff --git a/doc/images/create_hypothese_8.png b/doc/images/create_hypothese_8.png
new file mode 100644 (file)
index 0000000..c1ef185
Binary files /dev/null and b/doc/images/create_hypothese_8.png differ
diff --git a/doc/images/create_iteration_1.png b/doc/images/create_iteration_1.png
new file mode 100644 (file)
index 0000000..3160a9a
Binary files /dev/null and b/doc/images/create_iteration_1.png differ
diff --git a/doc/images/create_iteration_2.png b/doc/images/create_iteration_2.png
new file mode 100644 (file)
index 0000000..f0b4d5a
Binary files /dev/null and b/doc/images/create_iteration_2.png differ
diff --git a/doc/images/create_iteration_3.png b/doc/images/create_iteration_3.png
new file mode 100644 (file)
index 0000000..414c6db
Binary files /dev/null and b/doc/images/create_iteration_3.png differ
diff --git a/doc/images/create_iteration_4.png b/doc/images/create_iteration_4.png
new file mode 100644 (file)
index 0000000..6a277af
Binary files /dev/null and b/doc/images/create_iteration_4.png differ
diff --git a/doc/images/create_iteration_5.png b/doc/images/create_iteration_5.png
new file mode 100644 (file)
index 0000000..51db52b
Binary files /dev/null and b/doc/images/create_iteration_5.png differ
diff --git a/doc/images/create_iteration_6.png b/doc/images/create_iteration_6.png
new file mode 100644 (file)
index 0000000..cdcb199
Binary files /dev/null and b/doc/images/create_iteration_6.png differ
diff --git a/doc/images/create_zone_1.png b/doc/images/create_zone_1.png
new file mode 100644 (file)
index 0000000..e58f862
Binary files /dev/null and b/doc/images/create_zone_1.png differ
diff --git a/doc/images/create_zone_2.png b/doc/images/create_zone_2.png
new file mode 100644 (file)
index 0000000..d856c0b
Binary files /dev/null and b/doc/images/create_zone_2.png differ
diff --git a/doc/images/intro_1.png b/doc/images/intro_1.png
new file mode 100644 (file)
index 0000000..bfc3bd2
Binary files /dev/null and b/doc/images/intro_1.png differ
diff --git a/doc/images/intro_2.png b/doc/images/intro_2.png
new file mode 100644 (file)
index 0000000..f3057f6
Binary files /dev/null and b/doc/images/intro_2.png differ
diff --git a/doc/images/lancement_1.png b/doc/images/lancement_1.png
new file mode 100644 (file)
index 0000000..39fe8c1
Binary files /dev/null and b/doc/images/lancement_1.png differ
diff --git a/doc/images/menu_1.png b/doc/images/menu_1.png
new file mode 100644 (file)
index 0000000..ed5b5c4
Binary files /dev/null and b/doc/images/menu_1.png differ
diff --git a/doc/images/menu_2.png b/doc/images/menu_2.png
new file mode 100644 (file)
index 0000000..405f9a8
Binary files /dev/null and b/doc/images/menu_2.png differ
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644 (file)
index 0000000..bd9da0f
--- /dev/null
@@ -0,0 +1,33 @@
+.. HOMARD documentation master file, created by
+   sphinx-quickstart on Tue Jan  5 08:51:14 2010.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+.. |logo| image:: images/HOMARD.png
+
+Documentation du composant HOMARD |logo|
+----------------------------------------
+
+HOMARD est le composant qui permet l'adaptation de maillage au sein de la plateforme Salome.
+
+*HOMARD est une marque déposée d'EDF.*
+
+Table des matières de ce mode d'emploi
+""""""""""""""""""""""""""""""""""""""
+
+.. toctree::
+   :maxdepth: 2
+
+   intro
+   gui_usage
+   tui_usage
+   tutorials
+
+
+Index et tables
+"""""""""""""""
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+* :ref:`glossaire`
diff --git a/doc/intro.rst b/doc/intro.rst
new file mode 100644 (file)
index 0000000..a526864
--- /dev/null
@@ -0,0 +1,26 @@
+
+Introduction
+============
+Le logiciel HOMARD est destiné à adapter les maillages dans le cadre des codes de calculs par éléments ou volumes finis. Ce logiciel, réalisé par EDF R&D, procède par raffinement et déraffinement des maillages bidimensionnels ou tridimensionnels. Il est conçu pour être utilisé indépendamment du code de calcul auquel il est couplé.
+
+Plusieurs motivations apparaissent pour adapter un maillage :
+
+  - on veut simplifier la réalisation du maillage d'une géométrie complexe : on part d’une version grossière et on confie à un processus automatique la charge de l’affiner.
+  - on veut s’assurer de la convergence de la solution numérique : plutôt que de réaliser à la main des maillages de plus en plus fins, on laisse le logiciel chercher lui-même les endroits où il faudrait affiner le maillage pour augmenter la précision du résultat.
+  - les conditions du calcul changent au cours de son déroulement : les zones qui doivent être maillées finement se déplacent. Si on maille fin partout dès le début, le maillage est trop gros. En adaptant au fur et à mesure, le maillage ne sera fin qu’aux endroits nécessaires : sa taille sera réduite et la qualité de la solution sera bonne.
+
+Dans tous les cas, le principe de l’adaptation de maillage reste le même. Sur le maillage de départ, on réalise le calcul standard. A partir d’une analyse de la solution numérique obtenue, on estime l’erreur qui a été commise par rapport à la solution réelle. Cette estimation se représente par une valeur d’indicateur d’erreur dans chaque maille du calcul. A partir de là, on applique le principe suivant : les mailles où l’indicateur d’erreur est fort devraient être plus petites et réciproquement, les mailles où l’indicateur d’erreur est faible pourraient être plus grandes. Avec cette information, on alimente HOMARD qui va modifier le maillage en conséquence. Sur le nouveau maillage, on recommencera alors le calcul.
+Schématiquement, une itération d’adaptation de maillage se présente ainsi. Le logiciel calcule la solution numérique sur le maillage n°k, puis en déduit les valeurs de l’indicateur d’erreur sur tout le maillage. A partir de la connaissance du maillage n°k et de l’indicateur n°k, HOMARD crée le nouveau maillage n°k+1.
+
+.. image:: images/intro_1.png
+   :align: center
+
+Au final, la chaîne complète part du maillage initial produit par un mailleur. Elle comprend des maillons successifs (calcul d’indicateur / adaptation) comme sur la figure ci-après.
+
+.. image:: images/intro_2.png
+   :align: center
+
+A partir de ce schéma de base, des variantes sont possibles. Si aucun calcul d'erreur n'est disponible dans le logiciel couplé, on peut utiliser un champ pour piloter l'adaptation. Un champ de contraintes en mécaniques peut être utilisé : raffiner là où les contraintes sont importantes est souvent efficace pour améliorer la qualité de la simulation. On peut également adapter en fonction du saut d'une variable d'une maille à sa voisine ou dans une zone connue a priori. Grâce à ses nombreuses options, HOMARD permet d'envisager de nombreux scénarios d'adaptation de maillage.
+
+.. note::
+  Pour une description plus complète, voir :download:`Description générale de HOMARD <files/HOMARD_0.pdf>`.
diff --git a/doc/tui_create_case.rst b/doc/tui_create_case.rst
new file mode 100644 (file)
index 0000000..588c05c
--- /dev/null
@@ -0,0 +1,92 @@
+.. _tui_create_case:
+
+Le cas
+======
+.. index:: single: cas
+.. index:: single: type de conformité
+.. index:: single: maillage;initial
+
+Les variables sont décrites dans :ref:`gui_create_case`.
+
+Méthodes de la classe homard
+""""""""""""""""""""""""""""
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: CreateCase                                        |
+|                                                               |
+| **CreateCase(case_name, mesh_name, mesh_file)**               |
+|     Retourne une instance de la classe cas                    |
+|                                                               |
+|     - ``case_name`` : le nom du cas                           |
+|     - ``mesh_name`` : le nom du maillage initial              |
+|     - ``mesh_file`` : le nom du fichier contenant ce maillage |
+|                                                               |
+| Par défaut :                                                  |
+|                                                               |
+|  * le répertoire des résultats est ``/tmp``                   |
+|  * l'adaptation est conforme                                  |
++---------------------------------------------------------------+
+
+
+Méthodes de la classe cas
+"""""""""""""""""""""""""
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: GetName                                           |
+|                                                               |
+| **GetName()**                                                 |
+|     Retourne le nom du cas                                    |
++---------------------------------------------------------------+
+| .. module:: SetDirName                                        |
+|                                                               |
+| **SetDirName(dirname)**                                       |
+|                                                               |
+|     - ``dirname`` : le nom du répertoire des résutats         |
++---------------------------------------------------------------+
+| .. module:: GetDirName                                        |
+|                                                               |
+| **GetDirName()**                                              |
+|     Retourne le nom du répertoire des résutats associé au cas |
++---------------------------------------------------------------+
+| .. module:: SetConfType                                       |
+|                                                               |
+| **SetConfType(conf_type)**                                    |
+|                                                               |
+|     - ``conf_type`` :  entier précisant le mode de conformité |
+|                                                               |
+|         1. conforme                                           |
+|         2. non conforme avec 1 noeud par maille               |
+|         3. non conforme avec 1 noeud par arete de maille      |
+|         4. non conforme quelconque                            |
++---------------------------------------------------------------+
+| .. module:: GetConfType                                       |
+|                                                               |
+| **GetConfType()**                                             |
+|     Retourne le type de conformité                            |
++---------------------------------------------------------------+
+| .. module:: GetIter0Name                                      |
+|                                                               |
+| **GetIter0Name()**                                            |
+|     Retourne le nom de l'itération 0, associée au maillage    |
+|     initial. Ce nom est mis automatiquement par le module     |
+|     HOMARD et doit être utilisé pour enchaîner les adaptations|
++---------------------------------------------------------------+
+
+
+Exemple
+"""""""
+La création de l'objet case_1 se fait ainsi : ::
+
+    case_name = "CAS_1"
+    mesh_name = "MAILL"
+    mesh_file = "/local00/Salome/Adapt/m0.med"
+    case_1 = homard.CreateCase(case_name, mesh_name, mesh_file)
+    dirname = "/local00/Salome/Adapt/resu"
+    case_1.SetDirName(dirname)
+    case_1.SetConfType(1)
+
+
+
+
diff --git a/doc/tui_create_hypothese.rst b/doc/tui_create_hypothese.rst
new file mode 100644 (file)
index 0000000..29dfe98
--- /dev/null
@@ -0,0 +1,201 @@
+.. _tui_create_hypothese:
+
+L'hypothèse
+===========
+
+.. index:: single: itération
+.. index:: single: hypothèse
+.. index:: single: zone
+
+Les variables sont décrites dans :ref:`gui_create_hypothese`.
+
+Méthodes de la classe homard
+""""""""""""""""""""""""""""
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: CreateHypothesis                                  |
+|                                                               |
+| **CreateHypothesis(hypo_name)**                               |
+|     Retourne une instance de la classe hypothese              |
+|                                                               |
+|     - ``hypo_name`` : le nom de l'hypothèse                   |
++---------------------------------------------------------------+
+| .. module:: AssociateHypoZone                                 |
+|                                                               |
+| **AssociateHypoZone(hypo_name, zone_name)**                   |
+|                                                               |
+|     - ``hypo_name`` : le nom de l'hypothèse                   |
+|     - ``zone_name`` : le nom de la zone à associer            |
++---------------------------------------------------------------+
+
+Méthodes de la classe hypothese
+"""""""""""""""""""""""""""""""
+
+Généralités
+^^^^^^^^^^^
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: GetName                                           |
+|                                                               |
+| **GetName()**                                                 |
+|     Retourne le nom de l'hypothèse                            |
++---------------------------------------------------------------+
+| .. module:: SetAdapRefinUnRef                                 |
+|                                                               |
+| **SetAdapRefinUnRef(Adap, Refin, UnRef)**                     |
+|                                                               |
+|     - ``Adap`` : entier précisant le type d'adaptation        |
+|                                                               |
+|         * -1 : uniforme                                       |
+|         * 0 : selon des zones                                 |
+|         * 1 : selon un champ                                  |
+|                                                               |
+|     - ``Refin`` : entier précisant si le raffinement est actif|
+|                                                               |
+|         0. inactif                                            |
+|         1. actif                                              |
+|                                                               |
+|     - ``UnRef`` : entier précisant si déraffinement est actif |
+|                                                               |
+|         0. inactif                                            |
+|         1. actif                                              |
+|                                                               |
++---------------------------------------------------------------+
+| .. module:: GetAdapType                                       |
+|                                                               |
+| **GetAdapType()**                                             |
+|     Retourne le type d'adaptation                             |
++---------------------------------------------------------------+
+| .. module:: GetRefinType                                      |
+|                                                               |
+| **GetRefinType()**                                            |
+|     Retourne le type de raffinement                           |
++---------------------------------------------------------------+
+| .. module:: GetUnRefType                                      |
+|                                                               |
+| **GetUnRefType()**                                            |
+|     Retourne le type de déraffinement                         |
++---------------------------------------------------------------+
+
+Le champ et les seuils
+^^^^^^^^^^^^^^^^^^^^^^
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: SetFieldName                                      |
+|                                                               |
+| **SetFieldName(field_name)**                                  |
+|                                                               |
+|     - ``field_name`` : le nom du champ                        |
++---------------------------------------------------------------+
+| .. module:: GetFieldName                                      |
+|                                                               |
+| **GetFieldName()**                                            |
+|     Retourne le nom du champ                                  |
++---------------------------------------------------------------+
+| .. module:: SetUseField                                       |
+|                                                               |
+| **SetUseField(use_field)**                                    |
+|                                                               |
+|     - ``use_field`` : entier précisant l'usage du champ       |
+|                                                               |
+|         0. valeur par maille (défaut)                         |
+|         1. saut entre une maille et ses voisines              |
++---------------------------------------------------------------+
+| .. module:: SetRefinThr                                       |
+|                                                               |
+| **SetRefinThr(type_thres, threshold)**                        |
+|                                                               |
+|     - ``type_thres`` : entier précisant le type de seuil en   |
+|       raffinement                                             |
+|                                                               |
+|         1. valeur absolue                                     |
+|         2. valeur relative en %                               |
+|         3. fraction des mailles en %                          |
+|                                                               |
+|     - ``threshold`` : valeur du seuil                         |
++---------------------------------------------------------------+
+| .. module:: GetRefinThrType                                   |
+|                                                               |
+| **GetRefinThrType()**                                         |
+|     Retourne le type de seuil de raffinement                  |
++---------------------------------------------------------------+
+| .. module:: SetUnRefThr                                       |
+|                                                               |
+| **SetUnRefThr(type_thres, threshold)**                        |
+|                                                               |
+|     - ``type_thres`` : entier précisant le type de seuil en   |
+|       déraffinement                                           |
+|                                                               |
+|         1. valeur absolue                                     |
+|         2. valeur relative en %                               |
+|         3. fraction des mailles en %                          |
+|                                                               |
+|     - ``threshold`` : valeur du seuil                         |
++---------------------------------------------------------------+
+| .. module:: GetUnRefThrType                                   |
+|                                                               |
+| **GetUnRefThrType()**                                         |
+|     Retourne le type de seuil de déraffinement                |
++---------------------------------------------------------------+
+
+
+Les composantes du champ
+^^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: AddComp                                           |
+|                                                               |
+| **AddComp(comp_name)**                                        |
+|                                                               |
+|     - ``comp_name`` : nom d'une composante à prendre en       |
+|       compte                                                  |
++---------------------------------------------------------------+
+| .. module:: SetUseComp                                        |
+|                                                               |
+| **SetUseComp(use_comp)**                                      |
+|                                                               |
+|     - ``use_comp`` : entier précisant l'usage des composantes |
+|                                                               |
+|         0. norme L2 (défaut)                                  |
+|         1. norme infinie                                      |
+|         2. valeur relative, uniquement si une seule composante|
++---------------------------------------------------------------+
+| .. module:: GetListComp                                       |
+|                                                               |
+| **GetListComp()**                                             |
+|     Retourne la liste des composantes utilisées               |
++---------------------------------------------------------------+
+
+Le filtrage par les groupes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: AddGroup                                          |
+|                                                               |
+| **AddGroup(group_name)**                                      |
+|                                                               |
+|     - ``group_name`` : nom du groupe à prendre en compte      |
++---------------------------------------------------------------+
+| .. module:: GetGroups                                         |
+|                                                               |
+| **GetGroups()**                                               |
+|     Retourne la liste des groupes utilisés pour le filtrage   |
++---------------------------------------------------------------+
+
+Exemple
+"""""""
+La création de l'objet hypo_1 se fait ainsi : ::
+
+    hypo_1 = homard.CreateHypothesis("HypoField")
+    hypo_1.SetAdapRefinUnRef(1, 1, 0)
+    hypo_1.SetFieldName("INDICATEUR")
+    hypo_1.AddComp("INDX")
+    hypo_1.AddComp("INDZ")
+    hypo_1.SetRefinThr(1, 80.)
+
+
diff --git a/doc/tui_create_iteration.rst b/doc/tui_create_iteration.rst
new file mode 100644 (file)
index 0000000..45f8006
--- /dev/null
@@ -0,0 +1,152 @@
+.. _tui_create_iteration:
+
+L'itération
+===========
+
+.. index:: single: itération
+.. index:: single: hypothèse
+.. index:: single: zone
+
+Les variables sont décrites dans :ref:`gui_create_iteration`.
+
+Méthodes de la classe homard
+""""""""""""""""""""""""""""
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: CreateIteration                                   |
+|                                                               |
+| **CreateIteration(iter_name, iter_parent_name)**              |
+|     Retourne une instance de la classe iteration              |
+|                                                               |
+|     - ``iter_name`` : le nom de l'itération                   |
+|     - ``iter_parent_name`` : le nom de l'itération mère       |
+|                                                               |
+| Par défaut :                                                  |
+|                                                               |
+|  * le maillage produit a le même nom que l'itération          |
++---------------------------------------------------------------+
+| .. module:: AssociateIterHypo                                 |
+|                                                               |
+| **AssociateIterHypo(iter_name, hypo_name)**                   |
+|                                                               |
+|     - ``iter_name`` : le nom de l'itération                   |
+|     - ``hypo_name`` : le nom de l'hypothèse à associer        |
++---------------------------------------------------------------+
+
+Méthodes de la classe iteration
+"""""""""""""""""""""""""""""""
+
+Généralités
+^^^^^^^^^^^
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: GetName                                           |
+|                                                               |
+| **GetName()**                                                 |
+|     Retourne le nom de l'itération                            |
++---------------------------------------------------------------+
+| .. module:: GetNumber                                         |
+|                                                               |
+| **GetNumber()**                                               |
+|     Retourne le numéro de l'itération                         |
++---------------------------------------------------------------+
+| .. module:: GetIterParent                                     |
+|                                                               |
+| **GetIterParent()**                                           |
+|     Retourne le nom de l'itération mère                       |
++---------------------------------------------------------------+
+| .. module:: GetHypoName                                       |
+|                                                               |
+| **GetHypoName()**                                             |
+|     Retourne le nom de l'hypothèse associée                   |
++---------------------------------------------------------------+
+| .. module:: GetCaseName                                       |
+|                                                               |
+| **GetCaseName()**                                             |
+|     Retourne le nom du cas associé                            |
++---------------------------------------------------------------+
+| .. module:: GetState                                          |
+|                                                               |
+| **GetState()**                                                |
+|     Retourne l'état de l'itération                            |
+|                                                               |
+|     - ``0`` : itération non calculée                          |
+|     - ``1`` : itération calculée correctement                 |
++---------------------------------------------------------------+
+
+Informations sur les maillages
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: GetMeshName                                       |
+|                                                               |
+| **GetMeshName()**                                             |
+|     Retourne le nom du maillage produit                       |
++---------------------------------------------------------------+
+| .. module:: SetMeshFile                                       |
+|                                                               |
+| **SetMeshFile(mesh_file)**                                    |
+|                                                               |
+|     - ``mesh_file`` : le nom du fichier qui contiendra        |
+|       le maillage produit                                     |
++---------------------------------------------------------------+
+| .. module:: GetMeshFile                                       |
+|                                                               |
+| **GetMeshFile()**                                             |
+|     Retourne le nom du fichier du maillage produit            |
++---------------------------------------------------------------+
+
+Informations sur le champ
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: SetField                                          |
+|                                                               |
+| **SetField(field_file, TimeStep, Rank)**                      |
+|                                                               |
+|     - ``field_file`` : le nom du fichier contenant le champ   |
+|     - ``TimeStep`` : l'instant où est pris le champ           |
+|     - ``Rank`` : le numéro d'ordre où est pris le champ       |
++---------------------------------------------------------------+
+| .. module:: GetFieldFileName                                  |
+|                                                               |
+| **GetFieldFileName()**                                        |
+|     Retourne le nom du fichier du champ                       |
++---------------------------------------------------------------+
+| .. module:: GetTimeStep                                       |
+|                                                               |
+| **GetTimeStep()**                                             |
+|     Retourne l'instant où est pris le champ                   |
++---------------------------------------------------------------+
+| .. module:: GetRank                                           |
+|                                                               |
+| **GetRank()**                                                 |
+|     Retourne le numéro d'ordre où est pris le champ           |
++---------------------------------------------------------------+
+
+Exemple
+"""""""
+.. index:: single: maillage;initial
+
+Pour la création de la première itération, il faut récupérer le nom qui a été donné à celle qui correspond au maillage initial. Ce nom s'obtient avec la méthode ``GetIter0Name`` appliquée au cas. ::
+
+    iter_name = "Iteration_1"
+    iter_1 = homard.CreateIteration(iter_name, case_1.GetIter0Name())
+    iter_1.SetField(field_file, 0, 0)
+    iter_1.SetMeshName("maill_01")
+    iter_1.SetMeshFile("/local00/M.01.med")
+    homard.AssociateIterHypo(iter_name, "HypoField")
+
+Pour la création d'une itération suivante, on donnera le nom de l'itération parent de laquelle on part. ::
+
+    iter_name = "Iteration_2"
+    iter_1 = homard.CreateIteration(iter_name, "Iteration_1")
+    iter_1.SetField(field_file, 0, 0)
+    iter_1.SetMeshName("maill_02")
+    iter_1.SetMeshFile("/local00/M.02.med")
+    homard.AssociateIterHypo(iter_name, "HypoField")
+
diff --git a/doc/tui_create_zone.rst b/doc/tui_create_zone.rst
new file mode 100644 (file)
index 0000000..e5e34af
--- /dev/null
@@ -0,0 +1,69 @@
+.. _tui_create_zone:
+
+La zone
+=======
+
+.. index:: single: zone
+.. index:: single: boite
+.. index:: single: sphere
+
+Les variables sont décrites dans :ref:`gui_create_zone`.
+
+Méthodes de la classe homard
+""""""""""""""""""""""""""""
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: CreateZone                                        |
+|                                                               |
+| **CreateZone(zone_name)**                                     |
+|                                                               |
+|     - ``zone_name`` : le nom de la zone                       |
++---------------------------------------------------------------+
+
+Méthodes de la classe zone
+""""""""""""""""""""""""""
+
++---------------------------------------------------------------+
++===============================================================+
+| .. module:: GetName                                           |
+|                                                               |
+| **GetName()**                                                 |
+|     Retourne le nom de la zone                                |
++---------------------------------------------------------------+
+| .. module:: SetZoneType                                       |
+|                                                               |
+| **SetZoneType(zone_type)**                                    |
+|                                                               |
+|     - ``zone_type`` : entier précisant le type de zone        |
+|                                                               |
+|         * 2 : parallélépipède                                 |
+|         * 4 : sphère                                          |
++---------------------------------------------------------------+
+| .. module:: SetBox                                            |
+|                                                               |
+| **SetBox(Xmin, Xmax, Ymin, Ymax, Zmin, Zmax)**                |
+|                                                               |
+|     - ``Xmin``, ``Xmax`` : X mini, X maxi                     |
+|     - etc.                                                    |
++---------------------------------------------------------------+
+| .. module:: SetSphere                                         |
+|                                                               |
+| **SetSphere(Xcen, Ycen, Zcen, R)**                            |
+|                                                               |
+|     - ``Xcen`` : X du centre                                  |
+|     - ``Ycen`` : Y du centre                                  |
+|     - ``Zcen`` : Z du centre                                  |
+|     - ``R`` : rayon de la sphère                              |
++---------------------------------------------------------------+
+
+
+Exemple
+"""""""
+La création de l'objet zone_1 se fait ainsi : ::
+
+    zone_1 = homard.CreateZone("Zone_2")
+    zone_1.SetTypeZone(4)
+    zone_1.SetSphere(12.3, 3.4, .56, 6.5)
+
+
diff --git a/doc/tui_homard.rst b/doc/tui_homard.rst
new file mode 100644 (file)
index 0000000..d2ef16f
--- /dev/null
@@ -0,0 +1,37 @@
+.. _tui_homard:
+
+L'adaptation
+============
+
+.. index:: single: itération
+.. index:: single: calcul
+
+Méthodes de la classe homard
+""""""""""""""""""""""""""""
+
++---------------------------------------------------------------+
++===============================================================+
+| .. index:: single: Compute                                    |
+|                                                               |
+| **Compute(iter_name, option)**                                |
+|     Calcule l'adaptation de maillage correspondant à          |
+|     une itération                                             |
+|                                                               |
+|     - ``iter_name`` : le nom de l'itération                   |
+|     - ``option`` : un entier précisant ce qui se passe quand  |
+|     des fichiers de résultats existent déjà                   |
+|         * 0 : arrêt en erreur                                 |
+|         * 1 : écrasement des anciens fichiers                 |
+|                                                               |
+|     Retourne un entier :                                      |
+|         * 0 : adaptation réussie                              |
+|         * autre valeur : problème                             |
++---------------------------------------------------------------+
+
+
+Exemple
+"""""""
+Le calcul de l'itération de nom "Iteration_1" avec écrasement des anciens fichiers de résultat se fait ainsi : ::
+
+    iter_name = "Iteration_1"
+    codret = homard.Compute(iter_name, 1)
diff --git a/doc/tui_usage.rst b/doc/tui_usage.rst
new file mode 100644 (file)
index 0000000..195b258
--- /dev/null
@@ -0,0 +1,12 @@
+Mode d'emploi pour TUI
+======================
+Le module HOMARD peut se lancer à partir d'instructions python. On trouvera ici la description de chacune des fonctions accessibles par l'utilisateur.
+
+.. toctree::
+   :maxdepth: 2
+
+   tui_create_case
+   tui_create_iteration
+   tui_create_hypothese
+   tui_create_zone
+   tui_homard
diff --git a/doc/tutorial_3.py b/doc/tutorial_3.py
new file mode 100644 (file)
index 0000000..264d590
--- /dev/null
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+"""
+Exemple de couplage HOMARD-Salome
+Copyright EDF-R&D 1996, 2010
+"""
+__revision__ = "V1.0"
+#
+import salome
+salome.salome_init()
+import HOMARD
+#
+homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+study_main = salome.myStudyManager.NewStudy("HOMARD")
+homard.SetCurrentStudy(salome.myStudy)
+#
+repcas = "/tmp"
+#
+# Creation of the zones
+# =====================
+# Box "Zone_0"
+Zone_0 = homard.CreateZone('Zone_0', 2)
+Zone_0.SetBox(-0.1, 1.1, -0.1, 1.1, 0.9, 1.1)
+
+# Sphere "Zone_1"
+Zone_1 = homard.CreateZone('Zone_1', 4)
+Zone_1.SetSphere(0., 0., 0., 1.05)
+#
+# Hypothesis "Hypo_0"
+# ===================
+Hypo_0 = homard.CreateHypothesis('Hypo_0')
+Hypo_0.SetAdapRefinUnRef(0, 1, 0)
+homard.AssociateHypoZone('Zone_1', 'Hypo_0')
+homard.AssociateHypoZone('Zone_0', 'Hypo_0')
+#
+# Case "Case_0"
+# =============
+Case_0 = homard.CreateCase('Case_0', 'MZERO', repcas+'/tutorial_2.00.med')
+Case_0.SetDirName(repcas)
+#
+# Iteration "Iter_0"
+# ==================
+Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name())
+Iter_0.SetMeshName('MUN')
+Iter_0.SetMeshFile(repcas+'/maill.01.med')
+homard.AssociateIterHypo('Iter_0', 'Hypo_0')
+codret = homard.Compute('Iter_0', 1)
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/doc/tutorials.rst b/doc/tutorials.rst
new file mode 100644 (file)
index 0000000..653ac99
--- /dev/null
@@ -0,0 +1,187 @@
+Exemples
+========
+.. index:: single: exemple
+.. index:: single: python
+On trouvera ici les instructions python pour quelques configurations caractéristiques. Les fichiers de données associés sont téléchargeables.
+
+Raffinement uniforme
+""""""""""""""""""""
+.. index:: single: raffinement;uniforme
+
+On fera ici trois raffinements uniformes successifs du maillage contenu dans le fichier ``tutorial_1.00.med``. Quelques remarques :
+  * la même hypothèse est utilisée à chaque itération
+  * le maillage produit porte toujours le même nom. Cela ne pose pas de problème car il est stocké dans des fichiers différents.
+
+ ::
+
+  dircase = "/tmp"
+  #
+  # Hypothesis "Hypo_0"
+  # ===================
+  Hypo_0 = homard.CreateHypothesis('Hypo_0')
+  Hypo_0.SetAdapRefinUnRef(-1, 1, 0)
+  #
+  # Case "Case_0"
+  # =============
+  Case_0 = homard.CreateCase('Case_0', 'MAILL', dircase+'/m0.med')
+  Case_0.SetDirName(dircase)
+  Case_0.SetConfType(1)
+  #
+  # Iterations
+  # ==========
+  # Iteration "Iter_0"
+  Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name())
+  Iter_0.SetMeshName('MESH')
+  Iter_0.SetMeshFile(dircase+'/maill.01.med')
+  homard.AssociateIterHypo('Iter_0', 'Hypo_0')
+  codret = homard.Compute('Iter_0', 1)
+
+  # Iteration "Iter_1"
+  Iter_1 = homard.CreateIteration('Iter_1', 'Iter_0')
+  Iter_1.SetMeshName('MESH')
+  Iter_1.SetMeshFile(dircase+'/maill.02.med')
+  homard.AssociateIterHypo('Iter_1', 'Hypo_0')
+  codret = homard.Compute('Iter_1', 1)
+
+  # Iteration "Iter_2"
+  Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1')
+  Iter_2.SetMeshName('MESH')
+  Iter_2.SetMeshFile(dircase+'/maill.03.med')
+  homard.AssociateIterHypo('Iter_2', 'Hypo_0')
+  codret = homard.Compute('Iter_2', 1)
+
+.. note::
+  Téléchargement des fichiers
+
+  * :download:`maillage initial<files/tutorial_1.00.med.gz>`
+  * :download:`commandes python<files/tutorial_1.py>`
+
+
+Raffinement par des zones
+"""""""""""""""""""""""""
+.. index:: single: zone
+
+On procède ici au raffinement selon des zones. Pour passer du maillage initial au maillage 'M_1', on utilise une boîte encadrant le plan z=1 et une sphère centrée sur l'origine de rayon 1.05. Puis pour passer du maillage 'M_1' au maillage 'M_2', on remplace la sphère par une boîte encadrant le cube de côté 0.5, pointant sur l'origine. On notera que le type de raffinement n'a pas été précisé ; par défaut, il sera donc conforme.
+::
+
+  dircase = "/tmp"
+  #
+  # Creation of the zones
+  # =====================
+  # Box "Zone_0"
+  Zone_0 = homard.CreateZone('Zone_0', 2)
+  Zone_0.SetBox(-0.1, 1.1, -0.1, 1.1, 0.9, 1.1)
+  #
+  # Sphere "Zone_1"
+  Zone_1 = homard.CreateZone('Zone_1', 4)
+  Zone_1.SetSphere(0., 0., 0., 1.05)
+  #
+  # Box "Zone_2"
+  Zone_2 = homard.CreateZone('Zone_2', 2)
+  Zone_2.SetBox(-0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
+  #
+  # Hypothesis "Hypo_0"
+  # ===================
+  Hypo_0 = homard.CreateHypothesis('Hypo_0')
+  Hypo_0.SetAdapRefinUnRef(0, 1, 0)
+  homard.AssociateHypoZone('Zone_1', 'Hypo_0')
+  homard.AssociateHypoZone('Zone_0', 'Hypo_0')
+  #
+  # Hypothesis "Hypo_1"
+  # ===================
+  Hypo_1 = homard.CreateHypothesis('Hypo_1')
+  Hypo_1.SetAdapRefinUnRef(0, 1, 0)
+  homard.AssociateHypoZone('Zone_0', 'Hypo_1')
+  homard.AssociateHypoZone('Zone_2', 'Hypo_1')
+  #
+  # Case "Case_0"
+  # =============
+  Case_0 = homard.CreateCase('Case_0', 'MZERO', dircase+'/tutorial_2.00.med')
+  Case_0.SetDirName(dircase)
+  #
+  # Iteration "Iter_0"
+  # ==================
+  Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name())
+  Iter_0.SetMeshName('M_1')
+  Iter_0.SetMeshFile(dircase+'/maill.01.med')
+  homard.AssociateIterHypo('Iter_0', 'Hypo_0')
+  codret = homard.Compute('Iter_0', 1)
+  #
+  # Iteration "Iter_1"
+  # ==================
+  Iter_1 = homard.CreateIteration('Iter_1', 'Iter_0')
+  Iter_1.SetMeshName('M_2')
+  Iter_1.SetMeshFile(dircase+'/maill.02.med')
+  homard.AssociateIterHypo('Iter_1', 'Hypo_1')
+  codret = homard.Compute('Iter_1', 1)
+
+.. note::
+  Téléchargement des fichiers
+
+  * :download:`maillage initial<files/tutorial_2.00.med.gz>`
+  * :download:`commandes python<files/tutorial_2.py>`
+
+
+Raffinement selon un champ
+""""""""""""""""""""""""""
+.. index:: single: champ
+
+On procède ici au raffinement selon un champ. Les hypothèses servent à définir le nom du champ et les seuils de raffinement/déraffinement. La donnée du fichier et des instants est faite dans l'itération.
+::
+
+  dircase = "/tmp"
+  #
+  # Hypothesis "Hypo_0"
+  # ===================
+  Hypo_0 = homard.CreateHypothesis('Hypo_0')
+  Hypo_0.SetAdapRefinUnRef(1, 1, 0)
+  # Characterization of the field
+  Hypo_0.SetField('SOLU_0__QIRE_ELEM_SIGM__________')
+  Hypo_0.SetUseComp(0)
+  Hypo_0.AddComp('ERREST          ')
+  Hypo_0.SetRefinThr(3, 1.0)
+  #
+  # Hypothesis "Hypo_1"
+  # ===================
+  Hypo_1 = homard.CreateHypothesis('Hypo_1')
+  Hypo_1.SetAdapRefinUnRef(1, 1, 1)
+  # Characterization of the field
+  Hypo_1.SetField('SOLU_1__QIRE_ELEM_SIGM__________')
+  Hypo_1.SetUseComp(0)
+  Hypo_1.AddComp('ERREST          ')
+  Hypo_1.SetRefinThr(3, 1.5)
+  Hypo_1.SetUnRefThr(3, 6.)
+  #
+  # Case "Case_0"
+  # =============
+  Case_0 = homard.CreateCase('Case_0', 'G_0', dircase+'/tutorial_3.00.med')
+  Case_0.SetDirName(dircase)
+  #
+  # Iteration "Iter_0"
+  # ==================
+  Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name())
+  Iter_0.SetMeshName('H_1')
+  Iter_0.SetMeshFile(dircase+'/maill.01.med')
+  Iter_0.SetField(dircase+'/tutorial_3.00.med', 1, 1)
+  homard.AssociateIterHypo('Iter_0', 'Hypo_0')
+  codret = homard.Compute('Iter_0', 1)
+  #
+  # Iteration "Iter_1"
+  # ==================
+  Iter_1 = homard.CreateIteration('Iter_1', 'Iter_0')
+  Iter_1.SetMeshName('H_2')
+  Iter_1.SetMeshFile('/tmp/maill.02.med')
+  Iter_1.SetField(dircase+'/tutorial_3.01.med', 1, 1)
+  homard.AssociateIterHypo('Iter_1', 'Hypo_1')
+  codret = homard.Compute('Iter_1', 1)
+
+.. note::
+  Téléchargement des fichiers
+
+  * :download:`maillage et champ étape 0<files/tutorial_3.00.med.gz>`
+  * :download:`maillage et champ étape 1<files/tutorial_3.01.med.gz>`
+  * :download:`commandes python<files/tutorial_3.py>`
+
+
+.. toctree::
+   :maxdepth: 2
diff --git a/idl/HOMARD_Boundary.idl b/idl/HOMARD_Boundary.idl
new file mode 100644 (file)
index 0000000..628b0b0
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef _HOMARD_Boundary_IDL
+#define _HOMARD_Boundary_IDL
+
+#include "SALOME_Exception.idl"
+#include "HOMARD_Cas.idl"
+#include "HOMARD_Zone.idl"
+
+
+module HOMARD
+{
+  interface HOMARD_Boundary
+  {
+
+    void     SetName (in string NomBoundary)               raises (SALOME::SALOME_Exception);
+    string   GetName ()                                    raises (SALOME::SALOME_Exception);
+
+    void     SetBoundaryType (in long BoundaryType)        raises (SALOME::SALOME_Exception);
+    long     GetBoundaryType()                             raises (SALOME::SALOME_Exception);
+
+    void     SetMeshFile(in string MeshFile)               raises (SALOME::SALOME_Exception);
+    string   GetMeshFile()                                 raises (SALOME::SALOME_Exception);
+
+    void     SetMeshName(in string MeshName)               raises (SALOME::SALOME_Exception);
+    string   GetMeshName()                                 raises (SALOME::SALOME_Exception);
+
+    void     SetCylinder (in double Xcentre, in double Ycentre, in double Zcentre,
+                          in double Xaxe, in double Yaxe, in double Zaxe, in double rayon)
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD::double_array GetCylinder()                     raises (SALOME::SALOME_Exception);
+
+    void     SetSphere (in double Xcentre, in double Ycentre, in double Zcentre, in double rayon)
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD::double_array GetSphere()                       raises (SALOME::SALOME_Exception);
+
+    void     SetLimit (in double Xincr, in double Yincr, in double Zincr)
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD::double_array GetLimit()                        raises (SALOME::SALOME_Exception);
+
+    void     SetCaseCreation(in string NomCas)             raises (SALOME::SALOME_Exception);
+    string   GetCaseCreation()                             raises (SALOME::SALOME_Exception);
+
+    void       AddGroup(in string LeGroupe)                raises (SALOME::SALOME_Exception);
+    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
+    void       SetGroups(in ListGroupType ListGroup)       raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+
+  };
+};
+#endif
diff --git a/idl/HOMARD_Cas.idl b/idl/HOMARD_Cas.idl
new file mode 100644 (file)
index 0000000..7804983
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef _HOMARD_CAS_IDL
+#define _HOMARD_CAS_IDL
+
+#include "SALOME_Exception.idl"
+
+module HOMARD
+{
+ typedef sequence<double> extrema ;
+ typedef sequence<string> ListGroupType ;
+ typedef sequence<string> ListBoundaryGroupType ;
+
+
+ interface HOMARD_Cas
+  {
+
+    void     SetName(in string NomCas)                     raises (SALOME::SALOME_Exception);
+    string   GetName()                                     raises (SALOME::SALOME_Exception);
+
+    void     SetDirName(in string NomDir)                  raises (SALOME::SALOME_Exception);
+    string   GetDirName()                                  raises (SALOME::SALOME_Exception);
+
+    void     SetConfType(in long ConfType)                 raises (SALOME::SALOME_Exception);
+    long     GetConfType()                                 raises (SALOME::SALOME_Exception);
+
+    void     AddIteration (in string NomIteration)         raises (SALOME::SALOME_Exception);
+    string   GetIter0Name ()                               raises (SALOME::SALOME_Exception);
+
+    extrema  GetBoundingBox()                              raises (SALOME::SALOME_Exception);
+    void     SetBoundingBox(in extrema LesExtremes)        raises (SALOME::SALOME_Exception);
+
+    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
+    void     SetGroups(in ListGroupType ListGroup)         raises (SALOME::SALOME_Exception);
+    void     AddGroup(in string Group)                     raises (SALOME::SALOME_Exception);
+
+    long     GetNumber()                                   raises (SALOME::SALOME_Exception);
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+
+    ListBoundaryGroupType GetBoundaryGroup()               raises (SALOME::SALOME_Exception);
+    void     AddBoundaryGroup(in string NomBoundary, in string Group)
+                                                           raises (SALOME::SALOME_Exception);
+
+  };
+};
+#endif
diff --git a/idl/HOMARD_Gen.idl b/idl/HOMARD_Gen.idl
new file mode 100644 (file)
index 0000000..a84e176
--- /dev/null
@@ -0,0 +1,77 @@
+#ifndef __HOMARD_GEN__
+#define __HOMARD_GEN__
+
+#include "SALOME_Component.idl"
+#include "SALOME_Exception.idl"
+#include "SALOMEDS.idl"
+
+#include "HOMARD_Cas.idl"
+#include "HOMARD_Hypothesis.idl"
+#include "HOMARD_Iteration.idl"
+#include "HOMARD_Zone.idl"
+#include "HOMARD_Boundary.idl"
+
+module HOMARD
+{
+  typedef sequence<string> listeHypotheses;
+  typedef sequence<string> listeZones;
+  typedef sequence<string> listeIterations;
+  typedef sequence<string> listeCases;
+  typedef sequence<string> listeBoundarys;
+
+  interface HOMARD_Gen : Engines::Component, SALOMEDS::Driver
+  {
+    HOMARD_Cas        CreateCase(in string nomCas, in string MeshName, in string FileName )
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Hypothesis CreateHypothesis(in string nomHypothesis )
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Iteration  CreateIteration(in string nomIter, in string nomIterParent )
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Zone       CreateZone(in string nomZone, in long typeZone)
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Boundary   CreateBoundary(in string nomBoundary, in long typeBoundary)
+                                                           raises (SALOME::SALOME_Exception);
+
+    void AssociateIterIter(in string nomIterParent, in string nomIter)
+                                                           raises (SALOME::SALOME_Exception);
+    void AssociateIterHypo(in string nomIter, in string nomHypothesis)
+                                                           raises (SALOME::SALOME_Exception);
+    void AssociateHypoZone(in string nomZone, in string nomHypothesis)
+                                                           raises (SALOME::SALOME_Exception);
+    void DissociateHypoZone(in string nomZone, in string nomHypothesis)
+                                                           raises (SALOME::SALOME_Exception);
+
+    void InvalideZone (in string nomZone)                  raises (SALOME::SALOME_Exception);
+    void InvalideHypo (in string nomHypo)                  raises (SALOME::SALOME_Exception);
+    void InvalideIter (in string nomIter)                  raises (SALOME::SALOME_Exception);
+
+    boolean  Compute (in string nomIter, in long etatMenage)
+                                                           raises (SALOME::SALOME_Exception);
+
+    boolean  VerifieDir (in string nomIter)                raises (SALOME::SALOME_Exception);
+
+    string  GetCaseName(in string nomIter)                 raises (SALOME::SALOME_Exception);
+
+    void  PublishFileUnderIteration(in string NomIter, in string NomFich, in string Commentaire)
+                                                           raises (SALOME::SALOME_Exception);
+    void  PublishResultInSmesh(in string NomFich, in long IconeType)
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Cas        GetCas(in string nomCas)             raises (SALOME::SALOME_Exception);
+    HOMARD_Boundary   GetBoundary(in string nomBoundary)   raises (SALOME::SALOME_Exception);
+    HOMARD_Zone       GetZone(in string nomZone)           raises (SALOME::SALOME_Exception);
+    HOMARD_Hypothesis GetHypothesis(in string nomHypo)     raises (SALOME::SALOME_Exception);
+    HOMARD_Iteration  GetIteration(in string nomIter)      raises (SALOME::SALOME_Exception);
+
+    listeCases      GetAllCases()                          raises (SALOME::SALOME_Exception);
+    listeBoundarys  GetAllBoundarys()                      raises (SALOME::SALOME_Exception);
+    listeHypotheses GetAllHypotheses()                     raises (SALOME::SALOME_Exception);
+    listeZones      GetAllZones()                          raises (SALOME::SALOME_Exception);
+    listeIterations GetAllIterations()                     raises (SALOME::SALOME_Exception);
+
+    void     SetCurrentStudy(in SALOMEDS::Study theStudy)  raises (SALOME::SALOME_Exception);
+    SALOMEDS::Study GetCurrentStudy()                      raises (SALOME::SALOME_Exception);
+  };
+};
+
+#endif
+
diff --git a/idl/HOMARD_Hypothesis.idl b/idl/HOMARD_Hypothesis.idl
new file mode 100644 (file)
index 0000000..cef2b04
--- /dev/null
@@ -0,0 +1,79 @@
+#ifndef _HOMARD_HYPOTHESIS_IDL
+#define _HOMARD_HYPOTHESIS_IDL
+
+#include "SALOME_Exception.idl"
+#include "HOMARD_Cas.idl"
+
+module HOMARD
+{
+  typedef sequence<string> listeZonesHypo ;
+  typedef sequence<string> listeIters ;
+  typedef sequence<string> listeComposantsHypo ;
+  typedef sequence<long>   listeTypes;
+  typedef sequence<string> listFieldInterpHypo;
+  struct InfosHypo
+  {
+      string FieldName;
+      long UsCmpI;
+      long UsField;
+      long TypeThR;
+      double ThreshR;
+      long TypeThC;
+      double ThreshC;
+  };
+
+  interface HOMARD_Hypothesis
+  {
+
+    void     SetName(in string NomHypothesis)              raises (SALOME::SALOME_Exception);
+    string   GetName()                                     raises (SALOME::SALOME_Exception);
+
+    void     SetCaseCreation(in string NomCas)             raises (SALOME::SALOME_Exception);
+    string   GetCaseCreation()                             raises (SALOME::SALOME_Exception);
+
+    void       SetAdapRefinUnRef(in long Adap, in long Raff, in long Dera)
+                                                           raises (SALOME::SALOME_Exception);
+    listeTypes GetAdapRefinUnRef()                         raises (SALOME::SALOME_Exception);
+    long       GetAdapType()                               raises (SALOME::SALOME_Exception);
+    long       GetRefinType()                              raises (SALOME::SALOME_Exception);
+    long       GetUnRefType()                              raises (SALOME::SALOME_Exception);
+
+    void       SetField(in string FieldName)               raises (SALOME::SALOME_Exception);
+    string     GetFieldName()                              raises (SALOME::SALOME_Exception);
+    void       SetRefinThr(in long TypeThR, in double ThreshR)
+                                                           raises (SALOME::SALOME_Exception);
+    void       SetUnRefThr(in long TypeThC, in double ThreshC)
+                                                           raises (SALOME::SALOME_Exception);
+    long       GetRefinThrType()                           raises (SALOME::SALOME_Exception);
+    long       GetUnRefThrType()                           raises (SALOME::SALOME_Exception);
+    void       SetUseComp(in long UsCmpI)                  raises (SALOME::SALOME_Exception);
+    void       SetUseField(in long UsField)                raises (SALOME::SALOME_Exception);
+    InfosHypo  GetField()                                  raises (SALOME::SALOME_Exception);
+
+    void       AddComp(in string NomComposant)             raises (SALOME::SALOME_Exception);
+    void       SupprComp()                                 raises (SALOME::SALOME_Exception);
+    listeComposantsHypo GetListComp()                      raises (SALOME::SALOME_Exception);
+
+    void       AddZone(in string NomZone)                  raises (SALOME::SALOME_Exception);
+    void       SupprZone(in string NomZone)                raises (SALOME::SALOME_Exception);
+    listeZonesHypo GetZones()                              raises (SALOME::SALOME_Exception);
+
+    listeIters GetIterations()                             raises (SALOME::SALOME_Exception);
+    void       AddIteration(in string NomIteration)        raises (SALOME::SALOME_Exception);
+
+    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
+    void       SetGroups(in ListGroupType ListGroup)       raises (SALOME::SALOME_Exception);
+    void       AddGroup(in string LeGroupe)                raises (SALOME::SALOME_Exception);
+
+    void       SetTypeFieldInterp(in long TypeFieldInterp) raises (SALOME::SALOME_Exception);
+    long       GetTypeFieldInterp()                        raises (SALOME::SALOME_Exception);
+    void       AddFieldInterp(in string FieldInterp)       raises (SALOME::SALOME_Exception);
+    void       SupprFieldInterp()                          raises (SALOME::SALOME_Exception);
+    listFieldInterpHypo GetListFieldInterp()               raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+
+  };
+};
+#endif
diff --git a/idl/HOMARD_Iteration.idl b/idl/HOMARD_Iteration.idl
new file mode 100644 (file)
index 0000000..b6b7341
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef _HOMARD_ITERATION_IDL
+#define _HOMARD_ITERATION_IDL
+
+#include "SALOME_Exception.idl"
+
+module HOMARD
+{
+  typedef sequence<string> listeIterFilles ;
+
+  interface HOMARD_Iteration
+  {
+    void     SetName(in string NomIter)                    raises (SALOME::SALOME_Exception);
+    string   GetName()                                     raises (SALOME::SALOME_Exception);
+
+    void     SetEtat(in boolean State)                     raises (SALOME::SALOME_Exception);
+    boolean  GetEtat()                                     raises (SALOME::SALOME_Exception);
+
+    void     SetNumber(in long NumIter)                    raises (SALOME::SALOME_Exception);
+    long     GetNumber()                                   raises (SALOME::SALOME_Exception);
+
+    void     SetMeshName(in string NomMesh)                raises (SALOME::SALOME_Exception);
+    string   GetMeshName()                                 raises (SALOME::SALOME_Exception);
+    void     SetMeshFile(in string MeshFile)               raises (SALOME::SALOME_Exception);
+    string   GetMeshFile()                                 raises (SALOME::SALOME_Exception);
+
+    void     SetFieldFile(in string FieldFile)             raises (SALOME::SALOME_Exception);
+    string   GetFieldFile()                                raises (SALOME::SALOME_Exception);
+    void     SetTimeStepRank(in long TimeStep, in long Rank)
+                                                           raises (SALOME::SALOME_Exception);
+    long     GetTimeStep()                                 raises (SALOME::SALOME_Exception);
+    long     GetRank()                                     raises (SALOME::SALOME_Exception);
+
+    void     SetIterParent(in string NomIterParent)        raises (SALOME::SALOME_Exception);
+    string   GetIterParent()                               raises (SALOME::SALOME_Exception);
+
+    void     AddIteration(in string NomIter)               raises (SALOME::SALOME_Exception);
+
+    void     SetHypoName(in string NomHypo)                raises (SALOME::SALOME_Exception);
+    string   GetHypoName()                                 raises (SALOME::SALOME_Exception);
+
+    void     SetCaseName(in string NomCas)                 raises (SALOME::SALOME_Exception);
+    string   GetCaseName()                                 raises (SALOME::SALOME_Exception);
+
+    void     SetDirName(in string NomDir)                  raises (SALOME::SALOME_Exception);
+    string   GetDirName()                                  raises (SALOME::SALOME_Exception);
+
+    listeIterFilles GetIterations()                        raises (SALOME::SALOME_Exception);
+
+    void     SetMessFile(in string MessFile)               raises (SALOME::SALOME_Exception);
+    string   GetMessFile()                                 raises (SALOME::SALOME_Exception);
+
+    boolean  Compute()                                     raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+  };
+};
+#endif
diff --git a/idl/HOMARD_Zone.idl b/idl/HOMARD_Zone.idl
new file mode 100644 (file)
index 0000000..cc337b2
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef _HOMARD_Zone_IDL
+#define _HOMARD_Zone_IDL
+
+#include "SALOME_Exception.idl"
+
+module HOMARD
+{
+  typedef sequence<double    > double_array ;
+  typedef sequence<string    > listeHypo ;
+
+  interface HOMARD_Zone
+  {
+
+    void     SetName (in string NomZone)                   raises (SALOME::SALOME_Exception);
+    string   GetName ()                                    raises (SALOME::SALOME_Exception);
+
+    void     SetZoneType (in long ZoneType)                raises (SALOME::SALOME_Exception);
+    long     GetZoneType()                                 raises (SALOME::SALOME_Exception);
+
+    void     SetBox    (in double Xmini, in double Xmaxi, in double Ymini, 
+                        in double Ymaxi, in double Zmini, in double Zmaxi)
+                                                           raises (SALOME::SALOME_Exception);
+    double_array GetBox()                                  raises (SALOME::SALOME_Exception);
+    void     SetSphere (in double Xcentre, in double Ycentre, in double Zcentre, in double rayon)
+                                                           raises (SALOME::SALOME_Exception);
+    double_array GetSphere()                               raises (SALOME::SALOME_Exception);
+    void     SetLimit (in double Xincr, in double Yincr, in double Zincr)
+                                                           raises (SALOME::SALOME_Exception);
+    double_array GetLimit()                                raises (SALOME::SALOME_Exception);
+
+    void     AddHypo(in string NomHypo)                    raises (SALOME::SALOME_Exception);
+    void     SupprHypo(in string NomHypo)                  raises (SALOME::SALOME_Exception);
+    listeHypo GetHypo()                                    raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+
+  };
+};
+#endif
diff --git a/idl/Makefile.am b/idl/Makefile.am
new file mode 100644 (file)
index 0000000..6f0537d
--- /dev/null
@@ -0,0 +1,118 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# This Makefile is responsible of generating the client and server
+# implementation of IDL interfaces for both C++ and python usage.
+# The building process of the C++ files is in charge of each source
+# package and then is not manage here.
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+BASEIDL_FILES = HOMARD_Gen.idl HOMARD_Cas.idl HOMARD_Hypothesis.idl HOMARD_Iteration.idl HOMARD_Zone.idl HOMARD_Boundary.idl
+
+# This variable defines the files to be installed
+dist_salomeidl_DATA = $(BASEIDL_FILES)
+
+# GUI idl common library
+lib_LTLIBRARIES = libSalomeIDLHOMARD.la
+
+# Sources built from idl files
+nodist_libSalomeIDLHOMARD_la_SOURCES = \
+        HOMARD_CasSK.cc \
+        HOMARD_ZoneSK.cc \
+        HOMARD_HypothesisSK.cc \
+        HOMARD_IterationSK.cc \
+        HOMARD_BoundarySK.cc \
+        HOMARD_GenSK.cc
+
+# header files must be exported: other modules have to use this library
+nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh)
+
+libSalomeIDLHOMARD_la_CPPFLAGS =               \
+       $(KERNEL_CXXFLAGS)                      \
+       -I$(top_builddir)/salome_adm/unix       \
+       -I$(top_builddir)/idl                   \
+       $(MED_CXXFLAGS)                         \
+       @CORBA_CXXFLAGS@                        \
+       @CORBA_INCLUDES@
+
+libSalomeIDLHOMARD_la_LDFLAGS = -no-undefined -version-info=0:0:0
+libSalomeIDLHOMARD_la_LIBADD  =                        \
+       $(KERNEL_LDFLAGS) -lSalomeIDLKernel     \
+       @CORBA_LIBS@
+#        $(VISU_LDFLAGS) -lSalomeIDLVisu        
+#        $(MED_LDFLAGS) -lSalomeIDLMed           
+
+# These variables defines the building process of CORBA files
+OMNIORB_IDL         = @OMNIORB_IDL@
+OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
+OMNIORB_IDLPYFLAGS  = \
+       @OMNIORB_IDLPYFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome
+
+IDLCXXFLAGS = \
+       -bcxx \
+       @IDLCXXFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(MED_ROOT_DIR)/idl/salome \
+       -I$(top_builddir)/salome_adm/unix
+IDLPYFLAGS  = \
+       @IDLPYFLAGS@ \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(MED_ROOT_DIR)/idl/salome
+
+# potential problem on parallel make on the following - multiple outputs
+SUFFIXES = .idl .hh SK.cc
+.idlSK.cc:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+.idl.hh:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
+       $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
+       ls $^ | while read file; do \
+         $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
+       done
+
+# uninstall-local removes too much, but it works in distcheck
+uninstall-local:
+       rm -rf $(DESTDIR)$(salomepythondir)/*
+
+mostlyclean-local:
+       -rm -f *.hh *.cc .depidl
+
+# we use cpp to generate dependencies between idl files.
+# option x c tells the preprocessor to consider idl as a c file.
+# if an idl is modified, all idl dependencies are rebuilt
+
+.depidl: $(BASEIDL_FILES)
+       @echo "" > $@
+       @for dep in $^ dummy; do \
+         if [ $$dep != "dummy" ]; then \
+           echo Building dependencies for $$dep; \
+           $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome  -I$(MED_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \
+           sed 's/\.o/\SK.cc/' >>$@; \
+         fi; \
+       done ;
+
+-include .depidl
diff --git a/resources/ExecHOMARD.png b/resources/ExecHOMARD.png
new file mode 100644 (file)
index 0000000..2512923
Binary files /dev/null and b/resources/ExecHOMARD.png differ
diff --git a/resources/HOMARD.png b/resources/HOMARD.png
new file mode 100644 (file)
index 0000000..95b4c13
Binary files /dev/null and b/resources/HOMARD.png differ
diff --git a/resources/HOMARDCatalog.xml b/resources/HOMARDCatalog.xml
new file mode 100644 (file)
index 0000000..659b9ac
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='us-ascii' ?>
+<!-- XML component catalog -->
+<begin-catalog>
+
+<!-- Path prefix information -->
+
+<path-prefix-list>
+</path-prefix-list>
+
+<!-- Component list -->
+<component-list>
+        <component>
+                <!-- Component identification -->
+                <component-name>HOMARD</component-name>
+               <component-username>HOMARD GUI</component-username>
+                <component-type>Data</component-type>
+                <component-author>C. Caremoli</component-author>
+                <component-version> 1.0</component-version>
+                <component-comment>EDF - RD</component-comment>
+                <component-multistudy>1</component-multistudy>
+                <component-icone>HOMARD.png</component-icone>
+                <constraint>'linux' ~ OS</constraint>
+       
+       </component>
+</component-list>
+</begin-catalog>
diff --git a/resources/HOMARD_2.png b/resources/HOMARD_2.png
new file mode 100644 (file)
index 0000000..d007101
Binary files /dev/null and b/resources/HOMARD_2.png differ
diff --git a/resources/HOMARD_en.ps b/resources/HOMARD_en.ps
new file mode 100644 (file)
index 0000000..4d6e36d
--- /dev/null
@@ -0,0 +1,789 @@
+%!PS-Adobe-3.0
+%%Title: PYHELLO_en.xml
+%%For: Nicolas CROUZET - SFME/LGLS
+%%Creator: a2ps version 4.13
+%%CreationDate: Tue Nov  4 17:58:50 2003
+%%BoundingBox: 24 24 588 768
+%%DocumentData: Clean7Bit
+%%Orientation: Landscape
+%%Pages: 1
+%%PageOrder: Ascend
+%%DocumentMedia: Letter 612 792 0 () ()
+%%DocumentNeededResources: font Courier
+%%+ font Courier-Bold
+%%+ font Courier-BoldOblique
+%%+ font Courier-Oblique
+%%+ font Helvetica
+%%+ font Helvetica-Bold
+%%+ font Symbol
+%%+ font Times-Bold
+%%+ font Times-Roman
+%%DocumentProcessColors: Black 
+%%DocumentSuppliedResources: procset a2ps-a2ps-hdr
+%%+ procset a2ps-black+white-Prolog
+%%+ encoding ISO-8859-1Encoding
+%%EndComments
+/a2psdict 200 dict def
+a2psdict begin
+%%BeginProlog
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Check PostScript language level.
+/languagelevel where {
+  pop /gs_languagelevel languagelevel def
+} {
+  /gs_languagelevel 1 def
+} ifelse
+
+% EPSF import as in the Red Book
+/BeginInclude {
+  /b4_Inc_state save def               % Save state for cleanup
+  /dict_count countdictstack def       % Count objects on dict stack
+  /op_count count 1 sub def            % Count objects on operand stack 
+  userdict begin
+    0 setgray 0 setlinecap
+    1 setlinewidth 0 setlinejoin
+    10 setmiterlimit [ ] 0 setdash newpath
+    gs_languagelevel 1 ne {
+      false setstrokeadjust false setoverprint 
+    } if
+} bind def
+
+/EndInclude {
+  count op_count sub { pos } repeat    % Clean up stacks
+  countdictstack dict_count sub { end } repeat
+  b4_Inc_state restore
+} bind def
+
+/BeginEPSF {
+  BeginInclude
+  /showpage { } def
+} bind def
+
+/EndEPSF {
+  EndInclude
+} bind def
+
+% Page prefeed
+/page_prefeed {         % bool -> -
+  statusdict /prefeed known {
+    statusdict exch /prefeed exch put
+  } {
+    pop
+  } ifelse
+} bind def
+
+/deffont {
+  findfont exch scalefont def
+} bind def
+
+/reencode_font {
+  findfont reencode 2 copy definefont pop def
+} bind def
+
+% Function c-show (str => -)
+% centers text only according to x axis.
+/c-show { 
+  dup stringwidth pop
+  2 div neg 0 rmoveto
+  show
+} bind def
+
+% Function l-show (str => -)
+% prints texts so that it ends at currentpoint
+/l-show {
+  dup stringwidth pop neg 
+  0 
+  rmoveto show
+} bind def
+
+% center-fit show (str w => -)
+% show centered, and scale currentfont so that the width is less than w
+/cfshow {
+  exch dup stringwidth pop
+  % If the title is too big, try to make it smaller
+  3 2 roll 2 copy
+  gt
+  { % if, i.e. too big
+    exch div
+    currentfont exch scalefont setfont
+  } { % ifelse
+    pop pop 
+  }
+  ifelse
+  c-show                       % center title
+} bind def
+
+% Return the y size of the current font
+% - => fontsize
+/currentfontsize {
+  currentfont /FontType get 0 eq {
+    currentfont /FontMatrix get 3 get
+  }{
+    currentfont /FontMatrix get 3 get 1000 mul
+  } ifelse
+} bind def
+
+% reencode the font
+% <encoding-vector> <fontdict> -> <newfontdict>
+/reencode { %def
+  dup length 5 add dict begin
+    { %forall
+      1 index /FID ne 
+      { def }{ pop pop } ifelse
+    } forall
+    /Encoding exch def
+
+    % Use the font's bounding box to determine the ascent, descent,
+    % and overall height; don't forget that these values have to be
+    % transformed using the font's matrix.
+    % We use `load' because sometimes BBox is executable, sometimes not.
+    % Since we need 4 numbers an not an array avoid BBox from being executed
+    /FontBBox load aload pop
+    FontMatrix transform /Ascent exch def pop
+    FontMatrix transform /Descent exch def pop
+    /FontHeight Ascent Descent sub def
+
+    % Define these in case they're not in the FontInfo (also, here
+    % they're easier to get to.
+    /UnderlinePosition 1 def
+    /UnderlineThickness 1 def
+    
+    % Get the underline position and thickness if they're defined.
+    currentdict /FontInfo known {
+      FontInfo
+      
+      dup /UnderlinePosition known {
+       dup /UnderlinePosition get
+       0 exch FontMatrix transform exch pop
+       /UnderlinePosition exch def
+      } if
+      
+      dup /UnderlineThickness known {
+       /UnderlineThickness get
+       0 exch FontMatrix transform exch pop
+       /UnderlineThickness exch def
+      } if
+      
+    } if
+    currentdict 
+  end 
+} bind def
+
+% composite fonts for ASCII-EUC mixed string
+% Version 1.2 1/31/1990
+% Orignal Ken'ichi HANDA (handa@etl.go.jp)
+% Modified Norio Katayama (katayama@rd.nacsis.ac.jp),1998
+% Extend & Fix Koji Nakamaru (maru@on.cs.keio.ac.jp), 1999
+% Anyone can freely copy, modify, distribute this program.
+
+/copyfont {    % font-dic extra-entry-count  copyfont  font-dic
+       1 index maxlength add dict begin
+       {       1 index /FID ne 2 index /UniqueID ne and
+               {def} {pop pop} ifelse
+       } forall
+       currentdict
+       end
+} bind def
+
+/compositefont { % ASCIIFontName EUCFontName RomanScale RomanOffset Rot(T/F) compositefont font
+    /RomanRotation exch def
+    /RomanOffset exch def
+    /RomanScale exch def
+    userdict /fixeucfont_dict known not {
+       userdict begin
+           /fixeucfont_dict 2 dict begin
+               /UpperByteEncoding [
+                   16#00 1 16#20 { pop 0 } for
+                   16#21 1 16#28 { 16#20 sub } for
+                   16#29 1 16#2F { pop 0 } for
+                   16#30 1 16#74 { 16#27 sub } for
+                   16#75 1 16#FF { pop 0 } for
+               ] def
+               /LowerByteEncoding [
+                   16#00 1 16#A0 { pop /.notdef } for
+                   16#A1 1 16#FE { 16#80 sub 16 2 string cvrs
+                                   (cXX) dup 1 4 -1 roll
+                                   putinterval cvn } for
+                   /.notdef
+               ] def
+               currentdict
+           end def
+       end
+    } if
+    findfont dup /FontType get 0 eq {
+       14 dict begin
+           %
+           % 7+8 bit EUC font
+           %
+           12 dict begin
+               /EUCFont exch def
+               /FontInfo (7+8 bit EUC font) readonly def
+               /PaintType 0 def
+               /FontType 0 def
+               /FontMatrix matrix def
+               % /FontName
+               /Encoding fixeucfont_dict /UpperByteEncoding get def
+               /FMapType 2 def
+               EUCFont /WMode known
+               { EUCFont /WMode get /WMode exch def }
+               { /WMode 0 def } ifelse
+               /FDepVector [
+                   EUCFont /FDepVector get 0 get
+                   [ 16#21 1 16#28 {} for 16#30 1 16#74 {} for ]
+                   {
+                       13 dict begin
+                           /EUCFont EUCFont def
+                           /UpperByte exch 16#80 add def       
+                           % /FontName
+                           /FontInfo (EUC lower byte font) readonly def
+                           /PaintType 0 def
+                           /FontType 3 def
+                           /FontMatrix matrix def
+                           /FontBBox {0 0 0 0} def
+                           /Encoding
+                               fixeucfont_dict /LowerByteEncoding get def
+                           % /UniqueID
+                           % /WMode
+                           /BuildChar {
+                               gsave
+                               exch dup /EUCFont get setfont
+                               /UpperByte get
+                               2 string
+                               dup 0 4 -1 roll put
+                               dup 1 4 -1 roll put
+                               dup stringwidth setcharwidth
+                               0 0 moveto show
+                               grestore
+                           } bind def
+                           currentdict
+                       end
+                       /lowerbytefont exch definefont
+                   } forall
+               ] def
+               currentdict
+           end
+           /eucfont exch definefont
+           exch
+           findfont 1 copyfont dup begin
+               RomanRotation {
+                       /FontMatrix FontMatrix
+                       [ 0 RomanScale neg RomanScale 0 RomanOffset neg 0 ]
+                       matrix concatmatrix def
+               }{
+                       /FontMatrix FontMatrix
+                       [ RomanScale 0 0 RomanScale 0 RomanOffset ] matrix concatmatrix
+                       def
+                       /CDevProc
+                           {pop pop pop pop 0 exch -1000 exch 2 div 880} def
+               } ifelse
+           end
+           /asciifont exch definefont
+           exch
+           /FDepVector [ 4 2 roll ] def
+           /FontType 0 def
+           /WMode 0 def
+           /FMapType 4 def
+           /FontMatrix matrix def
+           /Encoding [0 1] def
+           /FontBBox {0 0 0 0} def
+%          /FontHeight 1.0 def % XXXX
+           /FontHeight RomanScale 1.0 ge { RomanScale }{ 1.0 } ifelse def
+           /Descent -0.3 def   % XXXX
+           currentdict
+       end
+       /tmpfont exch definefont
+       pop
+       /tmpfont findfont
+    }{
+       pop findfont 0 copyfont
+    } ifelse
+} def  
+
+/slantfont {   % FontName slant-degree  slantfont  font'
+    exch findfont 1 copyfont begin
+    [ 1 0 4 -1 roll 1 0 0 ] FontMatrix exch matrix concatmatrix
+    /FontMatrix exch def
+    currentdict
+    end
+} def
+
+% Function print line number (<string> # -)
+/# {
+  gsave
+    sx cw mul neg 2 div 0 rmoveto
+    f# setfont
+    c-show
+  grestore
+} bind def
+
+% -------- Some routines to enlight plain b/w printings ---------
+
+% Underline
+% width --
+/dounderline {
+  currentpoint
+  gsave
+    moveto
+    0 currentfont /Descent get currentfontsize mul rmoveto
+    0 rlineto
+    stroke
+  grestore
+} bind def
+
+% Underline a string
+% string --
+/dounderlinestring {
+  stringwidth pop
+  dounderline
+} bind def
+
+/UL {
+  /ul exch store
+} bind def
+
+% Draw a box of WIDTH wrt current font
+% width --
+/dobox {
+  currentpoint
+  gsave
+    newpath
+    moveto
+    0 currentfont /Descent get currentfontsize mul rmoveto
+    dup 0 rlineto
+    0 currentfont /FontHeight get currentfontsize mul rlineto
+    neg 0 rlineto
+    closepath
+    stroke
+  grestore
+} bind def
+
+/BX {
+  /bx exch store
+} bind def
+
+% Box a string
+% string --
+/doboxstring {
+  stringwidth pop
+  dobox
+} bind def
+
+%
+% ------------- Color routines ---------------
+%
+/FG /setrgbcolor load def
+
+% Draw the background
+% width --
+/dobackground {
+  currentpoint
+  gsave
+    newpath
+    moveto
+    0 currentfont /Descent get currentfontsize mul rmoveto
+    dup 0 rlineto
+    0 currentfont /FontHeight get currentfontsize mul rlineto
+    neg 0 rlineto
+    closepath
+    bgcolor aload pop setrgbcolor
+    fill
+  grestore
+} bind def
+
+% Draw bg for a string
+% string --
+/dobackgroundstring {
+  stringwidth pop
+  dobackground
+} bind def
+
+
+/BG {
+  dup /bg exch store
+  { mark 4 1 roll ] /bgcolor exch store } if
+} bind def
+
+
+/Show {
+  bg { dup dobackgroundstring } if
+  ul { dup dounderlinestring } if
+  bx { dup doboxstring } if
+  show
+} bind def
+
+% Function T(ab), jumps to the n-th tabulation in the current line
+/T {
+  cw mul x0 add
+  bg { dup currentpoint pop sub dobackground } if
+  ul { dup currentpoint pop sub dounderline } if
+  bx { dup currentpoint pop sub dobox } if
+  y0 moveto
+} bind def
+
+% Function n: move to the next line
+/n {
+  /y0 y0 bfs sub store
+  x0 y0 moveto
+} bind def
+
+% Function N: show and move to the next line
+/N {
+  Show
+  /y0 y0 bfs sub store
+  x0 y0 moveto
+} bind def
+
+/S {
+  Show
+} bind def
+
+%%BeginResource: procset a2ps-a2ps-hdr 2.0 2
+%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+% Function title: prints page header.
+% <ct> <rt> <lt> are passed as argument
+/title { 
+  % 1. Draw the background
+  x v get y v get moveto
+  gsave
+    0 th 2 div neg rmoveto 
+    th setlinewidth
+    0.95 setgray
+    pw 0 rlineto stroke
+  grestore
+  % 2. Border it
+  gsave
+    0.7 setlinewidth
+    pw 0 rlineto
+    0 th neg rlineto
+    pw neg 0 rlineto
+    closepath stroke
+  grestore
+  % stk: ct rt lt
+  x v get y v get th sub 1 add moveto
+%%IncludeResource: font Helvetica
+  fHelvetica fnfs 0.8 mul scalefont setfont
+  % 3. The left title
+  gsave
+    dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+    fnfs 0.8 mul hm rmoveto
+    show                       % left title
+  grestore
+  exch
+  % stk: ct ltw rt
+  % 4. the right title
+  gsave
+    dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
+    dup
+    pw exch stringwidth pop fnfs 0.8 mul add sub
+    hm
+    rmoveto
+    show                       % right title
+  grestore
+  % stk: ct ltw rtw
+  % 5. the center title
+  gsave
+    pw 3 1 roll
+    % stk: ct pw ltw rtw
+    3 copy 
+    % Move to the center of the left room
+    sub add 2 div hm rmoveto
+    % What is the available space in here?
+    add sub fnfs 0.8 mul sub fnfs 0.8 mul sub
+    % stk: ct space_left
+%%IncludeResource: font Helvetica-Bold
+  fHelvetica-Bold fnfs scalefont setfont
+    cfshow
+  grestore
+} bind def
+
+% Function border: prints virtual page border
+/border { %def
+  gsave                                % print four sides
+    0 setgray
+    x v get y v get moveto
+    0.7 setlinewidth           % of the square
+    pw 0 rlineto
+    0 ph neg rlineto
+    pw neg 0 rlineto
+    closepath stroke
+  grestore
+} bind def
+
+% Function water: prints a water mark in background
+/water { %def
+  gsave
+    scx scy moveto rotate
+%%IncludeResource: font Times-Bold
+  fTimes-Bold 100 scalefont setfont
+    .97 setgray
+    dup stringwidth pop 2 div neg -50 rmoveto
+    show
+  grestore
+} bind def
+
+% Function rhead: prints the right header
+/rhead {  %def
+  lx ly moveto
+  fHelvetica fnfs 0.8 mul scalefont setfont
+  l-show
+} bind def
+
+% Function footer (cf rf lf -> -)
+/footer {
+  fHelvetica fnfs 0.8 mul scalefont setfont
+  dx dy moveto
+  show
+
+  snx sny moveto
+  l-show
+  
+  fnx fny moveto
+  c-show
+} bind def
+%%EndResource
+%%BeginResource: procset a2ps-black+white-Prolog 2.0 1
+
+% Function T(ab), jumps to the n-th tabulation in the current line
+/T { 
+  cw mul x0 add y0 moveto
+} bind def
+
+% Function n: move to the next line
+/n { %def
+  /y0 y0 bfs sub store
+  x0 y0 moveto
+} bind def
+
+% Function N: show and move to the next line
+/N {
+  Show
+  /y0 y0 bfs sub store
+  x0 y0 moveto
+}  bind def
+
+/S {
+  Show
+} bind def
+
+/p {
+  false UL
+  false BX
+  fCourier bfs scalefont setfont
+  Show
+} bind def
+
+/sy {
+  false UL
+  false BX
+  fSymbol bfs scalefont setfont
+  Show
+} bind def
+
+/k {
+  false UL
+  false BX
+  fCourier-Oblique bfs scalefont setfont
+  Show
+} bind def
+
+/K {
+  false UL
+  false BX
+  fCourier-Bold bfs scalefont setfont
+  Show
+} bind def
+
+/c {
+  false UL
+  false BX
+  fCourier-Oblique bfs scalefont setfont
+  Show
+} bind def
+
+/C {
+  false UL
+  false BX
+  fCourier-BoldOblique bfs scalefont setfont
+  Show 
+} bind def
+
+/l {
+  false UL
+  false BX
+  fHelvetica bfs scalefont setfont
+  Show
+} bind def
+
+/L {
+  false UL
+  false BX
+  fHelvetica-Bold bfs scalefont setfont
+  Show 
+} bind def
+
+/str{
+  false UL
+  false BX
+  fTimes-Roman bfs scalefont setfont
+  Show
+} bind def
+
+/e{
+  false UL
+  true BX
+  fHelvetica-Bold bfs scalefont setfont
+  Show
+} bind def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%IncludeResource: font Courier
+%%IncludeResource: font Courier-Oblique
+%%IncludeResource: font Courier-Bold
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Symbol
+%%IncludeResource: font Courier-BoldOblique
+%%BeginResource: encoding ISO-8859-1Encoding
+/ISO-8859-1Encoding [
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright 
+/parenleft /parenright /asterisk /plus /comma /minus /period /slash 
+/zero /one /two /three /four /five /six /seven 
+/eight /nine /colon /semicolon /less /equal /greater /question 
+/at /A /B /C /D /E /F /G 
+/H /I /J /K /L /M /N /O 
+/P /Q /R /S /T /U /V /W 
+/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore 
+/quoteleft /a /b /c /d /e /f /g 
+/h /i /j /k /l /m /n /o 
+/p /q /r /s /t /u /v /w 
+/x /y /z /braceleft /bar /braceright /asciitilde /.notdef 
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
+/space /exclamdown /cent /sterling /currency /yen /brokenbar /section 
+/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron 
+/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet 
+/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown 
+/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla 
+/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis 
+/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply 
+/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls 
+/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla 
+/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis 
+/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide 
+/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis 
+] def
+%%EndResource
+% Initialize page description variables.
+/sh 612 def
+/sw 792 def
+/llx 24 def
+/urx 768 def
+/ury 588 def
+/lly 24 def
+/#copies 1 def
+/th 20.000000 def
+/fnfs 15 def
+/bfs 8.000000 def
+/cw 4.800000 def
+
+% Dictionary for ISO-8859-1 support
+/iso1dict 8 dict begin
+  /fCourier ISO-8859-1Encoding /Courier reencode_font
+  /fCourier-Bold ISO-8859-1Encoding /Courier-Bold reencode_font
+  /fCourier-BoldOblique ISO-8859-1Encoding /Courier-BoldOblique reencode_font
+  /fCourier-Oblique ISO-8859-1Encoding /Courier-Oblique reencode_font
+  /fHelvetica ISO-8859-1Encoding /Helvetica reencode_font
+  /fHelvetica-Bold ISO-8859-1Encoding /Helvetica-Bold reencode_font
+  /fTimes-Bold ISO-8859-1Encoding /Times-Bold reencode_font
+  /fTimes-Roman ISO-8859-1Encoding /Times-Roman reencode_font
+currentdict end def
+/bgcolor [ 0 0 0 ] def
+/bg false def
+/ul false def
+/bx false def
+% The font for line numbering
+/f# /Helvetica findfont bfs .6 mul scalefont def
+/fSymbol /Symbol findfont def
+/hm fnfs 0.25 mul def
+/pw
+   cw 154.400000 mul
+def
+/ph
+   517.600000 th add
+def
+/pmw 0 def
+/pmh 0 def
+/v 0 def
+/x [
+  0
+] def
+/y [
+  pmh ph add 0 mul ph add
+] def
+/scx sw 2 div def
+/scy sh 2 div def
+/snx urx def
+/sny lly 2 add def
+/dx llx def
+/dy sny def
+/fnx scx def
+/fny dy def
+/lx snx def
+/ly ury fnfs 0.8 mul sub def
+/sx 0 def
+/tab 8 def
+/x0 0 def
+/y0 0 def
+%%EndSetup
+
+%%Page: (1) 1
+%%BeginPageSetup
+/pagesave save def
+sh 0 translate 90 rotate
+%%EndPageSetup
+iso1dict begin
+gsave
+llx lly 12 add translate
+/v 0 store
+/x0 x v get 3.360000 add sx cw mul add store
+/y0 y v get bfs th add sub store
+x0 y0 moveto
+(<?xml version='1.0' encoding='us-ascii'?>) p n
+(<!DOCTYPE application PUBLIC "" "desktop.dtd">) N
+(<application title="PYHELLO component" date="9/12/2001" author="C Caremoli" appId="PYHELLO" >) N
+(<desktop>) N
+(<!-- ### MENUBAR ###  -->) N
+(<menubar>) N
+( <menu-item label-id="PYHELLO" item-id="90" pos-id="3">) N
+(  <popup-item item-id="941" label-id="Lancer IHM" icon-id="" tooltip-id="Lancer IHM PYHELLO" accel-id="" toggle-id="" execute-action=""/>) N
+( </menu-item>) N
+(</menubar>) N
+(<!-- ### TOOLBAR ###  -->) N
+(<toolbar label-id="PYHELLO">) N
+( <toolbutton-item item-id="941" label-id="Lancer IHM" icon-id="ExecPYHELLO.png" tooltip-id="Lancer IHM PYHELLO" accel-id="" toggle-id="" execute-action=") N
+("/>) N
+(</toolbar>) N
+(</desktop>) N
+(</application>) N
+() N
+(PYHELLO_en.xml) (Page 1/1) (Oct 14, 03 10:41) title
+border
+grestore
+(Printed by Nicolas CROUZET - SFME/LGLS) rhead
+(PYHELLO_en.xml) (1/1) (Tuesday November 04, 2003) footer
+end % of iso1dict
+pagesave restore
+showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/resources/HOMARD_en.xml b/resources/HOMARD_en.xml
new file mode 100644 (file)
index 0000000..02b505b
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE application PUBLIC "" "desktop.dtd">
+<application title="HOMARD component" date="9/12/2001" author="C Caremoli" appId="HOMARD" >
+<desktop>
+<!-- ### MENUBAR ###  -->
+<menubar>
+
+# <menu-item label-id="File" item-id="1" pos-id="">
+#  <submenu label-id="Homard" item-id="19" pos-id="9">
+#   <popup-item item-id="1101" pos-id="" label-id="Information Homard (interactif)" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+#   <popup-item item-id="1102" pos-id="" label-id="Adaptation Homard" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+#   <popup-item item-id="1103" pos-id="Creation d un cas Homard" icon-id="" tooltip-id="Lancer HOMARD" accel-id="" toggle-id="" execute-action=""/>
+#  </submenu>
+#  <endsubmenu />
+# </menu-item>
+
+ <menu-item label-id="HOMARD" item-id="1100" pos-id="3">
+  <popup-item item-id="1104" label-id="Edition d un fichier de commande Homard par Eficas" icon-id="" tooltip-id="Lancer Eficas" accel-id="" toggle-id="" execute-action=""/>
+  <submenu label-id="Avance" item-id="19" pos-id="9">
+  <popup-item item-id="1101" label-id="Information Maillage (interactif)" icon-id="" tooltip-id="Lancer HOMARD" accel-id="" toggle-id="" execute-action=""/>
+  <popup-item item-id="1102" label-id="Adaptation : gestion d une iteration" icon-id="" tooltip-id="Lancer HOMARD" accel-id="" toggle-id="" execute-action=""/>
+  <popup-item item-id="1103" label-id="Adaptation : creation du cas " icon-id="" tooltip-id="Lancer HOMARD" accel-id="" toggle-id="" execute-action=""/>
+  <endsubmenu />
+ </menu-item>
+</menubar>
+<!-- ### TOOLBAR ###  -->
+<!-- ///////////////////////////////////// TOOLBARS ////////////////////////////////////// -->
+<toolbar>
+</toolbar>
+<!-- ################################# POPUP MENU #################################  -->
+
+<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Cas">
+   <popup-item item-id="1201" pos-id="" label-id="Creation du Cas" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+</popupmenu>
+
+</desktop>
+</application>
+
diff --git a/resources/HOMARD_fr.xml b/resources/HOMARD_fr.xml
new file mode 100644 (file)
index 0000000..104871a
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE application PUBLIC "" "desktop.dtd">
+<application title="HOMARD component" date="9/12/2001" author="C Caremoli" appId="HOMARD" >
+<desktop>
+<!-- ### MENUBAR ###  -->
+<menubar>
+
+ <menu-item label-id="File" item-id="1" pos-id="">
+  <submenu label-id="Homard" item-id="19" pos-id="9">
+   <popup-item item-id="1101" pos-id="" label-id="Dialogue Homard" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+  </submenu>
+  <endsubmenu />
+ </menu-item>
+
+ <menu-item label-id="HOMARD" item-id="1100" pos-id="3">
+  <popup-item item-id="1101" label-id="Dialogue Homard" icon-id="" tooltip-id="Lancer HOMARD" accel-id="" toggle-id="" execute-action=""/>
+
+ </menu-item>
+</menubar>
+<!-- ### TOOLBAR ###  -->
+<toolbar label-id="HOMARD">
+ <toolbutton-item item-id="1101" label-id="Dialogue Homard" icon-id="ExecHOMARD.png" tooltip-id="Lancer HOMARD" accel-id="" toggle-id="" execute-action=""/>
+</toolbar>
+</desktop>
+</application>
+
diff --git a/resources/Makefile.am b/resources/Makefile.am
new file mode 100644 (file)
index 0000000..b5b5568
--- /dev/null
@@ -0,0 +1,53 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  $Header$
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+
+dist_salomeres_DATA =   \
+       SalomeApp.xml   \
+       boxdxyz.png \
+       boxdxyz_2.png \
+       cas_calcule.png \
+       cylinderpointvector.png \
+       cylinderpointvector_2.png \
+       HOMARD.png \
+       HOMARD_2.png \
+       hypotheses.png \
+       iter0.png \
+       iter_calculee.png \
+       iter_next.png \
+       iter_non_calculee.png \
+       med.png \
+       mesh_compute.png \
+       mesh_tree_mesh.png \
+       spherepoint.png \
+       spherepoint_2.png \
+       texte.png \
+       texte_2.png \
+       whatis.png \
+       zone_icone.png \
+       zone_icone_2.png
+
+# VSR: little trick to avoid putting if HOMARDCatalog.xml to the distribution archive
+nodist_salomeres_SCRIPTS = HOMARDCatalog.xml
diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml
new file mode 100644 (file)
index 0000000..289cf17
--- /dev/null
@@ -0,0 +1,11 @@
+<document>
+  <section name="HOMARD">
+    <!-- Major module parameters -->
+    <parameter name="name"    value="Homard"/>
+    <parameter name="icon"    value="HOMARD.png"/>
+  </section>
+  <section name="resources">
+    <!-- Module resources -->
+    <parameter name="HOMARD" value="${HOMARD_ROOT_DIR}/share/salome/resources/homard"/>
+  </section>
+</document>
diff --git a/resources/boxdxyz.png b/resources/boxdxyz.png
new file mode 100644 (file)
index 0000000..bc236b7
Binary files /dev/null and b/resources/boxdxyz.png differ
diff --git a/resources/boxdxyz_2.png b/resources/boxdxyz_2.png
new file mode 100644 (file)
index 0000000..7aedf34
Binary files /dev/null and b/resources/boxdxyz_2.png differ
diff --git a/resources/cas_calcule.png b/resources/cas_calcule.png
new file mode 100644 (file)
index 0000000..455b51d
Binary files /dev/null and b/resources/cas_calcule.png differ
diff --git a/resources/cas_non_calcule.png b/resources/cas_non_calcule.png
new file mode 100644 (file)
index 0000000..228f10c
Binary files /dev/null and b/resources/cas_non_calcule.png differ
diff --git a/resources/config b/resources/config
new file mode 100644 (file)
index 0000000..e347112
--- /dev/null
@@ -0,0 +1 @@
+language=en
diff --git a/resources/cylinderpointvector.png b/resources/cylinderpointvector.png
new file mode 100644 (file)
index 0000000..e37f465
Binary files /dev/null and b/resources/cylinderpointvector.png differ
diff --git a/resources/cylinderpointvector_2.png b/resources/cylinderpointvector_2.png
new file mode 100644 (file)
index 0000000..12be58f
Binary files /dev/null and b/resources/cylinderpointvector_2.png differ
diff --git a/resources/delete.png b/resources/delete.png
new file mode 100644 (file)
index 0000000..54dac86
Binary files /dev/null and b/resources/delete.png differ
diff --git a/resources/hypotheses.png b/resources/hypotheses.png
new file mode 100644 (file)
index 0000000..25dbecc
Binary files /dev/null and b/resources/hypotheses.png differ
diff --git a/resources/iter0.png b/resources/iter0.png
new file mode 100644 (file)
index 0000000..8e5806a
Binary files /dev/null and b/resources/iter0.png differ
diff --git a/resources/iter_calculee.png b/resources/iter_calculee.png
new file mode 100644 (file)
index 0000000..7f11432
Binary files /dev/null and b/resources/iter_calculee.png differ
diff --git a/resources/iter_calulee.png b/resources/iter_calulee.png
new file mode 100644 (file)
index 0000000..de69b87
Binary files /dev/null and b/resources/iter_calulee.png differ
diff --git a/resources/iter_next.png b/resources/iter_next.png
new file mode 100644 (file)
index 0000000..3bbcbd6
Binary files /dev/null and b/resources/iter_next.png differ
diff --git a/resources/iter_non_calculee.png b/resources/iter_non_calculee.png
new file mode 100644 (file)
index 0000000..30585cf
Binary files /dev/null and b/resources/iter_non_calculee.png differ
diff --git a/resources/iter_non_calulee.png b/resources/iter_non_calulee.png
new file mode 100644 (file)
index 0000000..228f10c
Binary files /dev/null and b/resources/iter_non_calulee.png differ
diff --git a/resources/med.png b/resources/med.png
new file mode 100644 (file)
index 0000000..c666e89
Binary files /dev/null and b/resources/med.png differ
diff --git a/resources/mesh_compute.png b/resources/mesh_compute.png
new file mode 100644 (file)
index 0000000..6c56a46
Binary files /dev/null and b/resources/mesh_compute.png differ
diff --git a/resources/mesh_hypo_edit.png b/resources/mesh_hypo_edit.png
new file mode 100644 (file)
index 0000000..83d6ca8
Binary files /dev/null and b/resources/mesh_hypo_edit.png differ
diff --git a/resources/mesh_tree_importedmesh.png b/resources/mesh_tree_importedmesh.png
new file mode 100644 (file)
index 0000000..5c690eb
Binary files /dev/null and b/resources/mesh_tree_importedmesh.png differ
diff --git a/resources/mesh_tree_mesh.png b/resources/mesh_tree_mesh.png
new file mode 100644 (file)
index 0000000..bfb20ac
Binary files /dev/null and b/resources/mesh_tree_mesh.png differ
diff --git a/resources/mesh_whatis.png b/resources/mesh_whatis.png
new file mode 100644 (file)
index 0000000..839da8f
Binary files /dev/null and b/resources/mesh_whatis.png differ
diff --git a/resources/spherepoint.png b/resources/spherepoint.png
new file mode 100644 (file)
index 0000000..a942d29
Binary files /dev/null and b/resources/spherepoint.png differ
diff --git a/resources/spherepoint_2.png b/resources/spherepoint_2.png
new file mode 100644 (file)
index 0000000..83fd3a5
Binary files /dev/null and b/resources/spherepoint_2.png differ
diff --git a/resources/texte.png b/resources/texte.png
new file mode 100644 (file)
index 0000000..f46c0da
Binary files /dev/null and b/resources/texte.png differ
diff --git a/resources/texte_2.png b/resources/texte_2.png
new file mode 100644 (file)
index 0000000..c08e7d2
Binary files /dev/null and b/resources/texte_2.png differ
diff --git a/resources/triangle.png b/resources/triangle.png
new file mode 100644 (file)
index 0000000..de69b87
Binary files /dev/null and b/resources/triangle.png differ
diff --git a/resources/whatis.png b/resources/whatis.png
new file mode 100644 (file)
index 0000000..839da8f
Binary files /dev/null and b/resources/whatis.png differ
diff --git a/resources/zone_boxdxyz.png b/resources/zone_boxdxyz.png
new file mode 100644 (file)
index 0000000..bc236b7
Binary files /dev/null and b/resources/zone_boxdxyz.png differ
diff --git a/resources/zone_boxdxyz_2.png b/resources/zone_boxdxyz_2.png
new file mode 100644 (file)
index 0000000..7aedf34
Binary files /dev/null and b/resources/zone_boxdxyz_2.png differ
diff --git a/resources/zone_icone.png b/resources/zone_icone.png
new file mode 100644 (file)
index 0000000..7708619
Binary files /dev/null and b/resources/zone_icone.png differ
diff --git a/resources/zone_icone_2.png b/resources/zone_icone_2.png
new file mode 100644 (file)
index 0000000..7a07997
Binary files /dev/null and b/resources/zone_icone_2.png differ
diff --git a/resources/zone_spherepoint.png b/resources/zone_spherepoint.png
new file mode 100644 (file)
index 0000000..a942d29
Binary files /dev/null and b/resources/zone_spherepoint.png differ
diff --git a/resources/zone_spherepoint_2.png b/resources/zone_spherepoint_2.png
new file mode 100644 (file)
index 0000000..83fd3a5
Binary files /dev/null and b/resources/zone_spherepoint_2.png differ
diff --git a/resources/zones.png b/resources/zones.png
new file mode 100644 (file)
index 0000000..7708619
Binary files /dev/null and b/resources/zones.png differ
diff --git a/src/HOMARD/HOMARD_Boundary.cxx b/src/HOMARD/HOMARD_Boundary.cxx
new file mode 100644 (file)
index 0000000..d819555
--- /dev/null
@@ -0,0 +1,242 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Boundary.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#include "HOMARD_Boundary.hxx"
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  default constructor:
+ */
+//=============================================================================
+HOMARD_Boundary::HOMARD_Boundary():
+  _NomBoundary( "" ),_BoundaryType( 1 ),
+  _Xmin( 0 ), _Xmax( 0 ), _Ymin( 0 ), _Ymax( 0 ), _Zmin( 0 ), _Zmax( 0 ),
+  _Xaxe( 0 ), _Yaxe( 0 ), _Zaxe( 0 ),
+  _Xcentre( 0 ), _Ycentre( 0 ), _Zcentre( 0 ), _rayon( 0 ),
+  _Xincr( 0 ), _Yincr( 0 ), _Zincr( 0 )
+{
+  MESSAGE("HOMARD_Boundary");
+}
+
+//=============================================================================
+HOMARD_Boundary::~HOMARD_Boundary()
+{
+  MESSAGE("~HOMARD_Boundary");
+}
+
+//=============================================================================
+void HOMARD_Boundary::SetName( const char* NomBoundary )
+{
+  MESSAGE("SetName = "<<NomBoundary);
+  _NomBoundary = std::string( NomBoundary );
+}
+
+//=============================================================================
+std::string HOMARD_Boundary::GetName() const
+{
+  return _NomBoundary;
+}
+
+//=============================================================================
+std::string HOMARD_Boundary::GetDumpPython() const
+{
+  std::ostringstream aScript;
+  aScript << "\n# Creation of the ";
+  if ( _BoundaryType == 0 ) { aScript << "discrete boundary " << _NomBoundary << "\n";}
+  if ( _BoundaryType == 1 ) { aScript << "cylinder " << _NomBoundary << "\n";}
+  if ( _BoundaryType == 2 ) { aScript << "sphere " << _NomBoundary << "\n"; }
+
+  aScript << "\t" << _NomBoundary << " = homard.CreateBoundary('" << _NomBoundary ;
+  aScript << "', " << _BoundaryType << ")\n";
+//
+  switch (_BoundaryType)
+  {
+    case 0:
+    {
+      aScript << "\t" <<_NomBoundary << ".SetMeshFile('";
+      aScript << _MeshFile << "')\n";
+      aScript << "\t" <<_NomBoundary << ".SetMeshName('";
+      aScript << _MeshName << "')\n";
+      break;
+    }
+
+    case 1:
+    {
+      aScript << "\t" << _NomBoundary << ".SetCylinder(" ;
+      aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _rayon << ")\n";
+      break;
+    }
+
+    case 2:
+    {
+      aScript << "\t" << _NomBoundary << ".SetSphere(" ;
+      aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n";
+      break;
+    }
+  }
+  aScript << "\t" <<_NomBoundary << ".SetCaseCreation('";
+  aScript << _NomCasCreation << "')\n";
+
+  std::list<std::string>::const_iterator it;
+  for ( it=_ListGroupSelected.begin(); it!=_ListGroupSelected.end();it++)
+       aScript << "\t" << _NomBoundary << ".AddGroup('"  << (*it) <<  "')\n" ;
+
+
+  return aScript.str();
+}
+
+
+//=============================================================================
+void HOMARD_Boundary::SetBoundaryType( int BoundaryType )
+{
+  MESSAGE("SetBoundaryType = "<<BoundaryType);
+  _BoundaryType = BoundaryType;
+}
+
+//=============================================================================
+int HOMARD_Boundary::GetBoundaryType() const
+{
+  return _BoundaryType;
+}
+
+//=============================================================================
+void HOMARD_Boundary::SetMeshFile( const char* MeshFile )
+{
+  _MeshFile = std::string( MeshFile );
+}
+//=============================================================================
+std::string HOMARD_Boundary::GetMeshFile() const
+{
+  return _MeshFile;
+}
+//=============================================================================
+void HOMARD_Boundary::SetMeshName( const char* MeshName )
+{
+  _MeshName = std::string( MeshName );
+}
+//=============================================================================
+std::string HOMARD_Boundary::GetMeshName() const
+{
+  return _MeshName;
+}
+//======================================================================
+void HOMARD_Boundary::SetLimit( double X0, double X1, double X2 )
+{
+  _Xincr = X0; _Yincr = X1; _Zincr = X2;
+}
+//=======================================================================================
+void HOMARD_Boundary::SetCylinder( double X0, double X1, double X2,
+                                   double X3, double X4, double X5, double X6 )
+{
+  _Xcentre = X0; _Ycentre = X1;
+  _Zcentre = X2; _Xaxe = X3;
+  _Yaxe = X4; _Zaxe = X5;
+  _rayon = X6;
+}
+
+//======================================================================
+void HOMARD_Boundary::SetSphere( double X0, double X1, double X2, double X3 )
+{
+  _Xcentre = X0; _Ycentre = X1; _Zcentre = X2;
+  _rayon = X3;
+}
+
+//=======================================================================================
+std::vector<double> HOMARD_Boundary::GetLimit() const
+{
+  std::vector<double> mesLimit;
+  mesLimit.push_back( _Xincr );
+  mesLimit.push_back( _Yincr );
+  mesLimit.push_back( _Zincr );
+  return mesLimit;
+}
+
+//=======================================================================================
+std::vector<double> HOMARD_Boundary::GetCylinder() const
+{
+  std::vector<double> mesCoor;
+  mesCoor.push_back( _Xcentre );
+  mesCoor.push_back( _Ycentre );
+  mesCoor.push_back( _Zcentre );
+  mesCoor.push_back( _Xaxe );
+  mesCoor.push_back( _Yaxe );
+  mesCoor.push_back( _Zaxe );
+  mesCoor.push_back( _rayon );
+  return mesCoor;
+}
+
+//=======================================================================================
+std::vector<double> HOMARD_Boundary::GetSphere() const
+{
+  std::vector<double> mesCoor;
+  mesCoor.push_back( _Xcentre );
+  mesCoor.push_back( _Ycentre );
+  mesCoor.push_back( _Zcentre );
+  mesCoor.push_back( _rayon );
+  return mesCoor;
+}
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Boundary::SetCaseCreation( const char* NomCasCreation )
+{
+  _NomCasCreation = std::string( NomCasCreation );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+const std::list<std::string>& HOMARD_Boundary::GetGroups() const
+{
+  return _ListGroupSelected;
+}
+//=============================================================================
+void HOMARD_Boundary::SetGroups( const std::list<std::string>& ListGroup )
+{
+  _ListGroupSelected.clear();
+  std::list<std::string>::const_iterator it = ListGroup.begin();
+  while(it != ListGroup.end())
+    _ListGroupSelected.push_back((*it++));
+}
+//=============================================================================
+void HOMARD_Boundary::AddGroup( const char* Group)
+{
+  _ListGroupSelected.push_back(Group);
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Boundary::GetCaseCreation() const
+{
+  return _NomCasCreation;
+}
+//=============================================================================
diff --git a/src/HOMARD/HOMARD_Boundary.hxx b/src/HOMARD/HOMARD_Boundary.hxx
new file mode 100644 (file)
index 0000000..50eceed
--- /dev/null
@@ -0,0 +1,87 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Boundary.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#ifndef _HOMARD_Boundary_HXX_
+#define _HOMARD_Boundary_HXX_
+
+#include <vector>
+#include <string>
+#include <list>
+
+class HOMARD_Boundary
+{
+public:
+  HOMARD_Boundary();
+  ~HOMARD_Boundary();
+
+  void                          SetName( const char* NomBoundary );
+  std::string                   GetName() const;
+  std::string                   GetDumpPython() const;
+
+  void                          SetLimit( double X0, double X1, double X2 );
+  std::vector<double>           GetLimit() const;
+
+  void                          SetMeshFile( const char* MeshFile );
+  std::string                   GetMeshFile() const;
+
+  void                          SetMeshName( const char* MeshName );
+  std::string                   GetMeshName() const;
+
+  void                          SetCylinder( double X0, double X1, double X2, double X3,
+                                             double X4, double X5, double X6 );
+  std::vector<double>           GetCylinder() const;
+
+  void                          SetSphere( double X0, double X1, double X2, double X3 );
+  std::vector<double>           GetSphere() const;
+
+  void                          SetBoundaryType( int BoundaryType );
+  int                           GetBoundaryType() const;
+
+  std::string                   GetCaseCreation() const;
+  void                          SetCaseCreation( const char* NomCasCreation );
+
+  void                          AddGroup( const char* LeGroupe);
+  void                          SetGroups(const std::list<std::string>& ListGroup );
+  const std::list<std::string>& GetGroups() const;
+
+private:
+  std::string                   _NomBoundary;
+  std::string                   _NomCasCreation;
+  std::string                   _MeshFile;
+  std::string                   _MeshName;
+  int                           _BoundaryType;
+  double                        _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax;
+  double                        _Xaxe, _Yaxe, _Zaxe;
+  double                        _Xcentre, _Ycentre, _Zcentre, _rayon;
+  double                        _Xincr, _Yincr, _Zincr;
+
+  std::list<std::string>        _ListGroupSelected;
+
+};
+
+
+#endif
diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx
new file mode 100644 (file)
index 0000000..9683beb
--- /dev/null
@@ -0,0 +1,230 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Cas.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#include "HOMARD_Cas.hxx"
+#include "utilities.h"
+#include <iostream>
+
+//=============================================================================
+/*!
+ *  default constructor:
+ *  Par defaut, l'adaptation est conforme, sans suivi de frontiere
+ */
+//=============================================================================
+HOMARD_Cas::HOMARD_Cas():
+  _NomCas(""), _NomDir("/tmp"), _ConfType(1)
+{
+  MESSAGE("HOMARD_Cas");
+}
+//=============================================================================
+HOMARD_Cas::~HOMARD_Cas()
+//=============================================================================
+{
+  MESSAGE("~HOMARD_Cas");
+}
+
+//=============================================================================
+void HOMARD_Cas::SetDirName( const char* NomDir )
+//=============================================================================
+{
+     MESSAGE("SetDirName, NomDir :  "<<NomDir);
+     if (chdir(NomDir) == 0)
+     {
+       _NomDir = std::string( NomDir );
+     }
+    else 
+    {
+       // GERALD -- QMESSAGE BOX
+       // std::cerr << "Pb pour entrer dans le repertoire :  "<<NomDir << std::endl;
+       _NomDir = "/tmp";
+    };
+}
+
+//=============================================================================
+std::string HOMARD_Cas::GetDirName() const
+//=============================================================================
+{
+  return _NomDir;
+}
+
+//=============================================================================
+void HOMARD_Cas::SetName( const char* NomCas )
+//=============================================================================
+{
+  _NomCas = std::string( NomCas );
+}
+
+//=============================================================================
+std::string HOMARD_Cas::GetName() const
+//=============================================================================
+{
+  return _NomCas;
+}
+
+
+//=============================================================================
+std::string HOMARD_Cas::GetDumpPython() const
+//=============================================================================
+{
+  std::ostringstream aScript;
+  aScript << "\t" <<_NomCas << ".SetDirName('";
+  aScript << _NomDir << "')\n";
+  aScript << "\t" <<_NomCas << ".SetConfType(";
+  aScript << _ConfType << ")\n";
+// Suivi de frontieres
+  std::list<std::string>::const_iterator it = _ListBoundaryGroup.begin();
+  while(it != _ListBoundaryGroup.end())
+  {
+    aScript << "\t" <<_NomCas << ".AddBoundaryGroup('";
+    aScript << *it << "', '";
+    it++;
+    aScript << *it << "')\n";
+    it++;
+  }
+  return aScript.str();
+}
+//AddBoundaryGroup( 'cyl_4', 'T2_INT' )
+//=============================================================================
+void HOMARD_Cas::AddIteration( const char* NomIteration )
+//=============================================================================
+{
+  _ListIter.push_back( std::string( NomIteration ) );
+}
+
+//=============================================================================
+const std::list<std::string>& HOMARD_Cas::GetIterations() const
+//=============================================================================
+{
+  return _ListIter;
+}
+
+//=============================================================================
+void HOMARD_Cas::SupprIterations()
+//=============================================================================
+{
+  _ListIter.clear();
+}
+
+//=============================================================================
+std::string HOMARD_Cas::GetIter0Name() const
+//=============================================================================
+{
+// Par construction de la liste, l'iteration a ete mise en tete.
+  return (*(_ListIter.begin()));
+}
+
+//=============================================================================
+void HOMARD_Cas::SetConfType( int Conftype )
+//=============================================================================
+{
+  _ConfType = Conftype;
+}
+//=============================================================================
+const int HOMARD_Cas::GetConfType() const
+//=============================================================================
+{
+  return _ConfType;
+}
+//=============================================================================
+int HOMARD_Cas::GetNumber() 
+//=============================================================================
+
+{
+  return _ListIter.size();
+}
+//
+// La boite englobante
+//
+//=============================================================================
+void HOMARD_Cas::SetBoundingBox( const std::vector<double>& extremas )
+//=============================================================================
+{
+  _Boite.clear();
+  _Boite.resize( extremas.size() );
+  for ( int i = 0; i < extremas.size(); i++ )
+    _Boite[i] = extremas[i];
+}
+
+//=============================================================================
+const std::vector<double>& HOMARD_Cas::GetBoundingBox() const
+//=============================================================================
+{
+  return _Boite;
+}
+//
+// Les groupes
+//
+//=============================================================================
+const std::list<std::string>& HOMARD_Cas::GetGroups() const
+//=============================================================================
+{
+  return _ListGroup;
+}
+//=============================================================================
+void HOMARD_Cas::SupprGroups()
+//=============================================================================
+{
+  _ListGroup.clear();
+}
+//=============================================================================
+void HOMARD_Cas::SetGroups( const std::list<std::string>& ListGroup )
+//=============================================================================
+{
+  _ListGroup.clear();
+  std::list<std::string>::const_iterator it = ListGroup.begin();
+  while(it != ListGroup.end())
+  {
+    _ListGroup.push_back((*it++));
+  }
+}
+//=============================================================================
+void HOMARD_Cas::AddGroup( const char* Group )
+{
+  _ListGroup.push_back(Group);
+}
+//
+// Les frontieres
+//
+//=============================================================================
+const std::list<std::string>& HOMARD_Cas::GetBoundaryGroup() const
+//=============================================================================
+{
+  return _ListBoundaryGroup;
+}
+//=============================================================================
+void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group )
+{
+  _ListBoundaryGroup.push_back( Boundary );
+  _ListBoundaryGroup.push_back( Group    );
+}
+//=============================================================================
+void HOMARD_Cas::SupprBoundaryGroup()
+//=============================================================================
+{
+  _ListBoundaryGroup.clear();
+}
+
diff --git a/src/HOMARD/HOMARD_Cas.hxx b/src/HOMARD/HOMARD_Cas.hxx
new file mode 100644 (file)
index 0000000..68e391f
--- /dev/null
@@ -0,0 +1,87 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Cas.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#ifndef _HOMARD_CAS_HXX_
+#define _HOMARD_CAS_HXX_
+
+#include <string>
+#include <list>
+#include <vector>
+
+class HOMARD_Cas
+{
+public:
+  HOMARD_Cas();
+  ~HOMARD_Cas();
+
+  void                          SetName( const char* NomCas );
+  std::string                   GetName() const;
+
+  void                          SetDirName( const char* NomDir );
+  std::string                   GetDirName() const;
+
+  void                          SetConfType( int ConfType );
+  const int                     GetConfType() const;
+  int                           GetNumber();
+
+  void                          AddIteration( const char* NomIteration );
+  const std::list<std::string>& GetIterations() const;
+  void                          SupprIterations();
+
+  std::string                   GetIter0Name() const;
+  std::string                   GetDumpPython() const;
+
+  void                          SetBoundingBox( const std::vector<double>& extremas );
+  const std::vector<double>&    GetBoundingBox() const;
+
+  void                          SetGroups( const std::list<std::string>& ListGroup );
+
+  void                          AddGroup( const char* Group);
+  const std::list<std::string>& GetGroups() const;
+  void                          SupprGroups();
+
+//   void                          SetBoundary( const std::list<std::string>& ListBoundary );
+
+  void                          AddBoundaryGroup( const char* Boundary, const char* Group );
+  const std::list<std::string>& GetBoundaryGroup() const;
+  void                          SupprBoundaryGroup();
+
+private:
+  std::string                   _NomCas;
+  std::string                   _NomDir;
+  int                           _ConfType;
+
+  std::vector<double>           _Boite;         // cf HomardQTCommun pour structure du vecteur
+  std::list<std::string>        _ListGroup;
+  std::list<std::string>        _ListBoundaryGroup;
+
+  typedef std::string           IterName;
+  typedef std::list<IterName>   IterNames;
+  IterNames                     _ListIter;
+};
+
+#endif
diff --git a/src/HOMARD/HOMARD_DriverTools.cxx b/src/HOMARD/HOMARD_DriverTools.cxx
new file mode 100644 (file)
index 0000000..49dbd12
--- /dev/null
@@ -0,0 +1,692 @@
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+// ----------------------------------------------------------------------------
+//
+//  File   : HOMARD_DriverTools.cxx
+//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+//
+// ----------------------------------------------------------------------------
+
+#include "HOMARD_DriverTools.hxx"
+#include "HOMARD_Boundary.hxx"
+#include "HOMARD_Cas.hxx"
+#include "HOMARD_Hypothesis.hxx"
+#include "HOMARD_Iteration.hxx"
+#include "HOMARD_Zone.hxx"
+#include <sstream>
+#include <cstdlib>
+#include "utilities.h"
+
+namespace HOMARD
+{
+
+  const char* const SEPARATOR = "|";
+
+  /*!
+    \brief Read next chunk of data from the string
+    \internal
+    
+    The function tries to read next chunk of the data from the input string \a str.
+    The parameter \a start specifies the start position of next chunk. If the operation
+    read the chunk successfully, after its completion this parameter will refer to the
+    start position of the next chunk. The function returns resulting chunk as a string.
+    The status of the operation is returned via \a ok parameter.
+    
+    \param str source data stream string
+    \param start start position to get next chunk
+    \param ok in this variable the status of the chunk reading operation is returned
+    \return next chunk read from the string
+  */
+  static std::string getNextChunk( const std::string& str, std::string::size_type& start, bool& ok )
+  {
+    std::string chunk = "";
+    ok = false;
+    if ( start <= str.size() ) {
+      std::string::size_type end = str.find( separator(), start );
+      chunk = str.substr( start, end == std::string::npos ? std::string::npos : end-start );
+      start = end == std::string::npos ? str.size()+1 : end + separator().size();
+      ok = true;
+    }
+    return chunk;
+  }
+
+  /*!
+    \brief Get persistence signature
+    \param type persistence entity type
+    \return persistence signature
+  */
+  std::string GetSignature( SignatureType type )
+  {
+    std::string signature = "";
+    switch ( type ) {
+    case Case:       signature = "CASE"; break;
+    case Zone:       signature = "ZONE"; break;
+    case Hypothesis: signature = "HYPO"; break;
+    case Iteration:  signature = "ITER"; break;
+    case Boundary:   signature = "BOUNDARY"; break;
+    default: break;
+    }
+    signature += separator();
+    return signature;
+  }
+
+  /*!
+    \brief Get data separator
+    \return string that is used to separate data entities in the stream
+  */
+  std::string separator()
+  {
+    return std::string( SEPARATOR );
+  }
+
+// =======================
+// Case
+// =======================
+  /*!
+    \brief Dump case to the string
+    \param cas case being dumped
+    \return string representation of the case
+  */
+  std::string Dump( const HOMARD_Cas& cas )
+  {
+    std::stringstream os;
+    // ...
+    MESSAGE( ". Dump du cas "<<cas.GetName());
+    os << cas.GetName();
+    os << separator() << cas.GetDirName();
+    os << separator() << cas.GetConfType();
+
+    std::vector<double> coor = cas.GetBoundingBox();
+    os << separator() << coor.size();
+    for ( int i = 0; i < coor.size(); i++ )
+          os << separator() << coor[i];
+
+    std::list<std::string> ListString = cas.GetIterations();
+    os << separator() << ListString.size();
+    std::list<std::string>::const_iterator it;
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+          os << separator() << *it;
+
+    ListString = cas.GetGroups();
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+         os << separator() << *it;
+    ListString = cas.GetBoundaryGroup();
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+         os << separator() << *it;
+    return os.str();
+  }
+//
+// Iteration
+// ==========
+//
+  /*!
+    \brief Dump iteration to the string
+    \param iteration iteration being dumped
+    \return string representation of the iteration
+  */
+  std::string Dump( const HOMARD_Iteration& iteration )
+  {
+    std::stringstream os;
+    // ...
+    MESSAGE( ". Dump de l'iteration "<<iteration.GetName());
+    os << iteration.GetName();
+    os << separator() << iteration.GetEtat();
+    os << separator() << iteration.GetNumber();
+    os << separator() << iteration.GetMeshFile();
+    os << separator() << iteration.GetMessFile();
+    os << separator() << iteration.GetMeshName();
+    os << separator() << iteration.GetFieldFile();
+    os << separator() << iteration.GetTimeStep();
+    os << separator() << iteration.GetRank();
+    os << separator() << iteration.GetIterParent();
+    //
+    std::list<std::string> ListString = iteration.GetIterations();
+    os << separator() << ListString.size();
+    std::list<std::string>::const_iterator it;
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+      os << separator() << *it;
+
+    os << separator() << iteration.GetHypoName();
+    os << separator() << iteration.GetCaseName();
+    os << separator() << iteration.GetDirName();
+    return os.str();
+  }
+//
+// hypothese
+// ==============================
+  /*!
+    \brief Dump hypothesis to the string
+    \param hypothesis hypothesis being dumped
+    \return string representation of the hypothesis
+  */
+  std::string Dump( const HOMARD_Hypothesis& hypothesis )
+  {
+    std::stringstream os;
+    // ...
+    MESSAGE( ". Dump de l'hypothese "<<hypothesis.GetName());
+    os << hypothesis.GetName();
+    os << separator() << hypothesis.GetCaseCreation();
+    os << separator() << hypothesis.GetAdapType();
+    os << separator() << hypothesis.GetRefinType();
+    os << separator() << hypothesis.GetUnRefType();
+    os << separator() << hypothesis.GetFieldName();
+    os << separator() << hypothesis.GetRefinThrType();
+    os << separator() << hypothesis.GetThreshR();
+    os << separator() << hypothesis.GetUnRefThrType();
+    os << separator() << hypothesis.GetThreshC();
+    os << separator() << hypothesis.GetUseCompI();
+    os << separator() << hypothesis.GetTypeFieldInterp();
+
+
+    std::list<std::string> ListString = hypothesis.GetIterations();
+    std::list<std::string>::const_iterator it;
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+         os << separator() << *it;
+
+    ListString = hypothesis.GetZones();
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+          os << separator() << *it;
+
+    ListString = hypothesis.GetListComp();
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+         os << separator() << *it;
+
+    ListString = hypothesis.GetGroups();
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+          os << separator() << *it;
+
+    ListString = hypothesis.GetListFieldInterp();
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+          os << separator() << *it;
+    return os.str();
+  }
+//
+// Zone
+// =========================
+
+  /*!
+    \brief Dump zone to the string
+    \param zone zone being dumped
+    \return string representation of the zone
+  */
+  std::string Dump( const HOMARD_Zone& zone )
+  {
+    std::stringstream os;
+    os << zone.GetName();
+    os << separator() << zone.GetZoneType();
+
+    std::vector<double> box = zone.GetBox();
+    for ( int i = 0; i < box.size(); i++ )
+      os << separator() << ( i < box.size() ? box[i] : 0. );
+
+    std::vector<double> sphere = zone.GetSphere();
+    for ( int i = 0; i < 4; i++ )
+      os << separator() << ( i < sphere.size() ? sphere[i] : 0. );
+
+    std::vector<double> limit = zone.GetLimit();
+    for ( int i = 0; i < 3; i++ )
+      os << separator() << ( i < limit.size() ? limit[i] : 0. );
+
+    std::list<std::string> hypos = zone.GetHypo();
+    os << separator() << hypos.size();
+    std::list<std::string>::const_iterator it;
+    for ( it = hypos.begin(); it != hypos.end(); ++it )
+      os << separator() << *it;
+    return os.str();  
+
+
+  }
+//
+// 1.5. Archivage d'une frontiere
+// ==============================
+
+  /*!
+    \brief Dump boundary to the string
+    \param boundary boundary being dumped
+    \return string representation of the boundary
+  */
+  std::string Dump( const HOMARD_Boundary& boundary )
+  {
+    std::stringstream os;
+
+    os << boundary.GetName() ;
+    os << separator() << boundary.GetBoundaryType() ;
+    os << separator() << boundary.GetCaseCreation() ;
+    os << separator() << boundary.GetMeshFile();
+    os << separator() << boundary.GetMeshName();
+
+    std::vector<double> coor = boundary.GetLimit();
+    for ( int i = 0; i < coor.size(); i++ )
+          os << separator() << coor[i];
+
+    coor = boundary.GetCylinder() ; 
+    for ( int i = 0; i < coor.size(); i++ )
+          os << separator() << coor[i];
+
+    coor = boundary.GetSphere() ; 
+    for ( int i = 0; i < coor.size(); i++ )
+          os << separator() << coor[i];
+    return os.str();
+
+    std::list<std::string> ListString = boundary.GetGroups();
+    std::list<std::string>::const_iterator it;
+    os << separator() << ListString.size();
+    for ( it = ListString.begin(); it != ListString.end(); ++it )
+          os << separator() << *it;
+
+  }
+
+//
+// Restauration des objets
+// ==========================
+// Case
+// ==========================
+//
+  /*!
+    \brief Restore case from the string
+    \param cas case being restored
+    \param stream string representation of the case
+    \return \c true if case is correctly restored or \c false otherwise
+  */
+  bool Restore( HOMARD_Cas& cas, const std::string& stream )
+  {
+    std::string::size_type start = 0;
+    std::string chunk, chunkNext;
+    bool ok;
+    // ...
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    cas.SetName( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    cas.SetDirName( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    cas.SetConfType( atoi( chunk.c_str() ) );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+
+    int size = atoi( chunk.c_str() );
+    std::vector<double> boite;
+    boite.resize( size );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      boite[i] = strtod( chunk.c_str(), 0 );
+    }
+    cas.SetBoundingBox( boite );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+
+    size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      cas.AddIteration( chunk.c_str() );
+    }
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) 
+    {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      cas.AddGroup( chunk.c_str() );
+    }
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      i++;
+      chunkNext = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      cas.AddBoundaryGroup( chunk.c_str(), chunkNext.c_str() );
+    }
+    return true;
+  }
+//
+//  Iteration
+// =================================
+  /*!
+    \brief Restore iteration from the string
+    \param iteration iteration being restored
+    \param stream string representation of the iteration
+    \return \c true if iteration is correctly restored or \c false otherwise
+  */
+  bool Restore( HOMARD_Iteration& iteration, const std::string& stream )
+  {
+    std::string::size_type start = 0;
+    std::string chunk;
+    bool ok;
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+
+    iteration.SetName( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetEtat( (bool)atoi( chunk.c_str() ) );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetNumber( atoi( chunk.c_str() ) );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetMeshFile( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetMessFile( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetMeshName( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetFieldFile( chunk.c_str() );
+    // .
+    int timestep, rank;
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    timestep = atoi( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    rank = atoi( chunk.c_str() );
+    iteration.SetTimeStepRank( timestep, rank );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetIterParent( chunk.c_str() );
+    //
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      iteration.AddIteration( chunk.c_str() );
+    }
+    // 
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetHypoName( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetCaseName( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    iteration.SetDirName( chunk.c_str() );
+    return true;
+  }
+
+//
+// hypothese
+// =================================
+  /*!
+    \brief Restore hypothesis from the string
+    \param hypothesis hypothesis being restored
+    \param stream string representation of the hypothesis
+    \return \c true if hypothesis is correctly restored or \c false otherwise
+  */
+  bool Restore( HOMARD_Hypothesis& hypothesis, const std::string& stream )
+  {
+    std::string::size_type start = 0;
+    std::string chunk;
+    bool ok;
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    hypothesis.SetName( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    hypothesis.SetCaseCreation( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    hypothesis.SetAdapType( atoi( chunk.c_str() ) );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int typeraff = atoi( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int typedera = atoi( chunk.c_str() );
+    hypothesis.SetRefinTypeDera( typeraff, typedera );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    hypothesis.SetField( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int typethr = atoi( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    double threshr = strtod( chunk.c_str(), 0 );
+    hypothesis.SetRefinThr( typethr, threshr );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int typethc = atoi( chunk.c_str() );
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    double threshc = strtod( chunk.c_str(), 0 );
+    hypothesis.SetUnRefThr( typethc, threshc );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    hypothesis.SetUseComp(atoi(chunk.c_str()));
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    hypothesis.SetTypeFieldInterp(atoi(chunk.c_str()));
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      hypothesis.AddIteration( chunk.c_str() );
+    }
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      hypothesis.AddZone( chunk.c_str() );
+    }
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      hypothesis.AddComp( chunk.c_str() );
+    }
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      hypothesis.AddGroup( chunk.c_str() );
+    }
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      hypothesis.AddFieldInterp( chunk.c_str() );
+    }
+    return true;
+  }
+
+//
+// Zone
+// ============================
+  /*!
+    \brief Restore zone from the string
+    \param zone zone being restored
+    \param stream string representation of the zone
+    \return \c true if zone is correctly restored or \c false otherwise
+  */
+  bool Restore( HOMARD_Zone& zone, const std::string& stream )
+  {
+    std::string::size_type start = 0;
+    std::string chunk;
+    bool ok;
+    // 
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    zone.SetName( chunk.c_str() );
+    //
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    zone.SetZoneType( atoi( chunk.c_str() ) );
+    //
+    std::vector<double> coords;
+    coords.resize( 6 );
+    for ( int i = 0; i < 6; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      coords[i] = strtod( chunk.c_str(), 0 );
+    }
+    zone.SetBox( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5] );
+    //
+    for ( int i = 0; i < 4; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      coords[i] = strtod( chunk.c_str(), 0 );
+    }
+    zone.SetSphere( coords[0], coords[1], coords[2], coords[3] );
+
+    //
+    for ( int i = 0; i < 3; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      coords[i] = strtod( chunk.c_str(), 0 );
+    }
+    zone.SetLimit( coords[0], coords[1], coords[2]);
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      zone.AddHypo( chunk.c_str() );
+    }
+    return true;
+  }
+
+
+//
+// 2.5. Restauration d'une frontiere
+// =================================
+
+  /*!
+    \brief Restore boundary from the string
+    \param boundary boundary being restored
+    \param stream string representation of the boundary
+    \return \c true if zone is correctly restored or \c false otherwise
+  */
+  bool Restore( HOMARD_Boundary& boundary, const std::string& stream )
+  {
+    std::string::size_type start = 0;
+    std::string chunk;
+    bool ok;
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    boundary.SetName( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    boundary.SetBoundaryType(atoi( chunk.c_str()) );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    boundary.SetCaseCreation( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    boundary.SetMeshFile( chunk.c_str() );
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    boundary.SetMeshName( chunk.c_str() );
+
+
+    std::vector<double> coords;
+    coords.resize( 3 );
+    for ( int i = 0; i < 3; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      coords[i] = strtod( chunk.c_str(), 0 );
+    }
+    boundary.SetLimit( coords[0], coords[1], coords[2]);
+
+    coords.resize( 7 );
+    for ( int i = 0; i < 7; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      coords[i] = strtod( chunk.c_str(), 0 );
+    }
+    boundary.SetCylinder(coords[0],coords[1],coords[2],coords[3],coords[4],coords[5],coords[6]);
+
+    coords.resize( 4 );
+    for ( int i = 0; i < 4; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      coords[i] = strtod( chunk.c_str(), 0 );
+    }
+    boundary.SetSphere( coords[0], coords[1], coords[2], coords[3]);
+
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    int size = atoi( chunk.c_str() );
+    for ( int i = 0; i < size; i++ ) {
+      chunk = getNextChunk( stream, start, ok );
+      if ( !ok ) return false;
+      boundary.AddGroup( chunk.c_str() );
+    }
+
+    return true;
+  }
+
+} // namespace HOMARD /end/
diff --git a/src/HOMARD/HOMARD_DriverTools.hxx b/src/HOMARD/HOMARD_DriverTools.hxx
new file mode 100644 (file)
index 0000000..b5bf323
--- /dev/null
@@ -0,0 +1,72 @@
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+// ----------------------------------------------------------------------------
+//
+//  File   : HOMARD_DriverTools.hxx
+//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+//
+// ----------------------------------------------------------------------------
+
+#ifndef HOMARD_DRIVERTOOLS_H
+#define HOMARD_DRIVERTOOLS_H
+
+#include <string>
+
+class HOMARD_Boundary;
+class HOMARD_Cas;
+class HOMARD_Iteration;
+class HOMARD_Hypothesis;
+class HOMARD_Zone;
+
+namespace HOMARD
+{
+  //! persistence entity type
+  typedef enum { Case, Zone, Hypothesis, Iteration, Boundary } SignatureType;
+
+  //! get persistence signature
+  std::string GetSignature( SignatureType type );
+  
+  //! get data separator
+  std::string separator();
+
+  //! dump boundary to the string
+  std::string Dump( const ::HOMARD_Boundary& boundary );
+  //! dump case to the string
+  std::string Dump( const ::HOMARD_Cas& cas );
+  //! dump iteration to the string
+  std::string Dump( const ::HOMARD_Iteration& iteration );
+  //! dump hypothesis to the string
+  std::string Dump( const ::HOMARD_Hypothesis& hypothesis );
+  //! dump zone to the string
+  std::string Dump( const ::HOMARD_Zone& zone );
+
+  //! restore boundary from the string
+  bool Restore( ::HOMARD_Boundary& boundary, const std::string& stream );
+  //! restore case from the string
+  bool Restore( ::HOMARD_Cas& cas, const std::string& stream );
+  //! restore hypothesis from the string
+  bool Restore( ::HOMARD_Hypothesis& hypothesis, const std::string& stream );
+  //! restore iteration from the string
+  bool Restore( ::HOMARD_Iteration& iteration, const std::string& stream );
+  //! restore zone from the string
+  bool Restore( ::HOMARD_Zone& zone, const std::string& stream );
+};
+
+#endif // HOMARD_DRIVERTOOLS_H
diff --git a/src/HOMARD/HOMARD_Gen.cxx b/src/HOMARD/HOMARD_Gen.cxx
new file mode 100644 (file)
index 0000000..9fa3979
--- /dev/null
@@ -0,0 +1,44 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Gen.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#include "HOMARD_Gen.hxx"
+#include "utilities.h"
+
+//=============================================================================
+//=============================================================================
+HOMARD_Gen::HOMARD_Gen()
+{
+  MESSAGE("HOMARD_Gen");
+}
+
+//=============================================================================
+//=============================================================================
+HOMARD_Gen::~HOMARD_Gen()
+{
+  MESSAGE("~HOMARD_Gen");
+}
+//=============================================================================
diff --git a/src/HOMARD/HOMARD_Gen.hxx b/src/HOMARD/HOMARD_Gen.hxx
new file mode 100644 (file)
index 0000000..5293fe3
--- /dev/null
@@ -0,0 +1,38 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Gen.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#ifndef _HOMARD_GEN_HXX_
+#define _HOMARD_GEN_HXX_
+
+class HOMARD_Gen
+{
+public :
+  HOMARD_Gen();
+  ~HOMARD_Gen();
+};
+
+#endif
diff --git a/src/HOMARD/HOMARD_Hypothesis.cxx b/src/HOMARD/HOMARD_Hypothesis.cxx
new file mode 100644 (file)
index 0000000..4da42dd
--- /dev/null
@@ -0,0 +1,408 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Hypothesis.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#include "HOMARD_Hypothesis.hxx"
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  default constructor:
+ */
+//=============================================================================
+HOMARD_Hypothesis::HOMARD_Hypothesis():
+  _NomHypo(""), _NomCasCreation(""),
+  _TypeAdap(-1), _TypeRaff(0), _TypeDera(0),
+  _Field(""),
+  _TypeThR(0), _ThreshR(0),
+  _TypeThC(0), _ThreshC(0),
+  _UsCmpI(0),  _TypeFieldInterp(0)
+{
+  MESSAGE("HOMARD_Hypothesis");
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+HOMARD_Hypothesis::~HOMARD_Hypothesis()
+{
+  MESSAGE("~HOMARD_Hypothesis");
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Hypothesis::SetCaseCreation( const char* NomCasCreation )
+{
+  _NomCasCreation = std::string( NomCasCreation );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Hypothesis::GetCaseCreation() const
+{
+  return _NomCasCreation;
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::SetName( const char* NomHypo )
+{
+  _NomHypo = std::string( NomHypo );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Hypothesis::GetName() const
+{
+  return _NomHypo;
+}
+//=============================================================================
+std::string HOMARD_Hypothesis::GetDumpPython() const
+{
+  std::ostringstream aScript;
+  aScript << "\n# Creation of the hypothesis " << _NomHypo << "\n" ; 
+  aScript << "\t" << _NomHypo << " = homard.CreateHypothesis('" << _NomHypo << "')\n";
+  aScript << "\t" << _NomHypo << ".SetCaseCreation('" << _NomCasCreation << "')\n";
+  aScript << "\t" << _NomHypo << ".SetAdapRefinUnRef(" << _TypeAdap << ", " << _TypeRaff << ", " << _TypeDera << ")\n";
+
+// Raffinement selon des zones geometriques
+  std::list<std::string>::const_iterator it = _ListZone.begin();
+  while(it != _ListZone.end())
+  {
+      aScript << "\thomard.AssociateHypoZone('"<< *it << "', '" <<_NomHypo << "')\n";
+      it++;
+  }
+
+// Raffinement selon un champ
+  if ( _TypeAdap == 1 )
+  {
+    aScript << "\t" << _NomHypo << ".SetField('" << _Field << "')\n";
+    aScript << "\t" << _NomHypo << ".SetUseComp(" << _UsCmpI << ")\n";
+    std::list<std::string>::const_iterator it_comp = _ListComposant.begin();
+    while(it_comp != _ListComposant.end()) 
+    {
+      aScript << "\t" << _NomHypo << ".AddComp('" << *it_comp << "')\n";
+      it_comp++;
+    }
+    if ( _TypeRaff == 1 )
+    {
+      aScript << "\t" << _NomHypo << ".SetRefinThr(" << _TypeThR;
+      aScript << ", " << _ThreshR << ")\n";
+    }
+    if ( _TypeDera == 1 )
+    {
+      aScript << "\t" << _NomHypo << ".SetUnRefThr(" << _TypeThC;
+      aScript << ", " << _ThreshC << ")\n";
+    }
+  }
+
+// Filtrage du raffinement par des groupes
+   for ( it=_ListGroupSelected.begin(); it!=_ListGroupSelected.end();it++)
+       aScript << "\t" << _NomHypo << ".AddGroup('"  << (*it) <<  "')\n" ;
+
+// Interpolation champ
+  aScript << "\t" << _NomHypo << ".SetTypeFieldInterp(" << _TypeFieldInterp << ")\n";
+  if ( _TypeFieldInterp == 2 )
+  {
+    std::list<std::string>::const_iterator it_champ = _ListFieldInterp.begin();
+    while(it_champ != _ListFieldInterp.end())
+    {
+      aScript << "\t" << _NomHypo << ".AddFieldInterp('" << *it_champ << "')\n";
+      it_champ++;
+    }
+  }
+
+  return aScript.str();
+}
+
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::SetAdapType( int TypeAdap )
+{
+  ASSERT (!((TypeAdap < -1) or (TypeAdap > 1)));
+  _TypeAdap = TypeAdap;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Hypothesis::GetAdapType() const
+{
+  return _TypeAdap;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::SetRefinTypeDera( int TypeRaff, int TypeDera )
+{
+  ASSERT(!(( TypeRaff < 0) or (TypeRaff > 1)));
+  _TypeRaff = TypeRaff;
+  ASSERT(! ((TypeDera < 0) or (TypeDera > 1)));
+  _TypeDera = TypeDera;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Hypothesis::GetRefinType() const
+{
+  return _TypeRaff;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Hypothesis::GetUnRefType() const
+{
+  return _TypeDera;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::SetField( const char* FieldName )
+{
+  _Field = std::string( FieldName );
+  MESSAGE( "dans SetField, FieldName : " << FieldName );
+}
+//=============================================================================
+void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR )
+{
+  ASSERT(!(( TypeThR < 0) or (TypeThR > 3 )));
+  _TypeThR = TypeThR;
+  _ThreshR = ThreshR;
+}
+//=============================================================================
+void HOMARD_Hypothesis::SetUnRefThr( int TypeThC, double ThreshC )
+{
+  ASSERT(!((TypeThC < 0) or (TypeThC > 3)));
+  _TypeThC = TypeThC;
+  _ThreshC = ThreshC;
+}
+//=============================================================================
+void HOMARD_Hypothesis::SetUseComp( int UsCmpI )
+{
+  ASSERT(!((UsCmpI < 0) or (UsCmpI > 2)));
+  _UsCmpI = UsCmpI;
+}
+//=============================================================================
+void HOMARD_Hypothesis::SetUseField( int UsField )
+{
+  ASSERT(!((UsField < 0) or (UsField > 1 )));
+  MESSAGE( "SetUseField a programmer ");
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Hypothesis::GetFieldName() const
+{
+  return _Field;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Hypothesis::GetRefinThrType() const
+{
+  return _TypeThR;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+double HOMARD_Hypothesis::GetThreshR() const
+{
+  return _ThreshR;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Hypothesis::GetUnRefThrType() const
+{
+  return _TypeThC;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+double HOMARD_Hypothesis::GetThreshC() const
+{
+  return _ThreshC;
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Hypothesis::GetUseCompI() const
+{
+  return _UsCmpI;
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::AddIteration( const char* NomIteration )
+{
+  _ListIter.push_back( std::string( NomIteration ) );
+}
+//=============================================================================
+void HOMARD_Hypothesis::SupprIterations()
+{
+  _ListIter.clear();
+}
+//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetIterations() const
+{
+  return _ListIter;
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::AddZone( const char* NomZone )
+{
+  _ListZone.push_back( std::string( NomZone ) );
+}
+//=============================================================================
+void HOMARD_Hypothesis::SupprZone( const char* NomZone )
+{
+  std::list<std::string>::iterator it = find( _ListZone.begin(), _ListZone.end(), NomZone );
+  if ( it != _ListZone.end() )
+  {
+    _ListZone.erase( it );
+  }
+}
+//=============================================================================
+void HOMARD_Hypothesis::SupprZones()
+{
+  _ListZone.clear();
+}
+//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetZones() const
+{
+  return _ListZone;
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::AddComp( const char* NomComposant )
+{
+  _ListComposant.push_back( std::string( NomComposant ) );
+}
+//=============================================================================
+void HOMARD_Hypothesis::SupprComp()
+{
+  std::cerr << "HOMARD_Hypothesis::SupprComp" << std::endl;
+  _ListComposant.clear();
+}
+//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetListComp() const
+{
+  return _ListComposant;
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetGroups() const
+{
+  return _ListGroupSelected;
+}
+//=============================================================================
+void HOMARD_Hypothesis::SetGroups( const std::list<std::string>& ListGroup )
+{
+  _ListGroupSelected.clear();
+  std::list<std::string>::const_iterator it = ListGroup.begin();
+  while(it != ListGroup.end()) 
+    _ListGroupSelected.push_back((*it++));
+}
+//=============================================================================
+void HOMARD_Hypothesis::AddGroup( const char* Group)
+{
+  _ListGroupSelected.push_back(Group);
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::SetTypeFieldInterp( int TypeFieldInterp )
+{
+  ASSERT (!((TypeFieldInterp < -1) or (TypeFieldInterp > 2)));
+  _TypeFieldInterp = TypeFieldInterp;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Hypothesis::GetTypeFieldInterp() const
+{
+  return _TypeFieldInterp;
+}
+/*!
+*/
+//=============================================================================
+void HOMARD_Hypothesis::AddFieldInterp( const char* FieldInterp )
+{
+  _ListFieldInterp.push_back( std::string( FieldInterp ) );
+}
+//=============================================================================
+void HOMARD_Hypothesis::SupprFieldInterp()
+{
+  std::cerr << "HOMARD_Hypothesis::SupprFieldInterpp" << std::endl;
+  _ListFieldInterp.clear();
+}
+//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetListFieldInterp() const
+{
+  return _ListFieldInterp;
+}
+
diff --git a/src/HOMARD/HOMARD_Hypothesis.hxx b/src/HOMARD/HOMARD_Hypothesis.hxx
new file mode 100644 (file)
index 0000000..fbf4232
--- /dev/null
@@ -0,0 +1,119 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Hypothesis.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#ifndef _HOMARD_HYPOTHESIS_HXX_
+#define _HOMARD_HYPOTHESIS_HXX_
+
+#include <string>
+#include <list>
+
+class HOMARD_Hypothesis
+{
+public:
+  HOMARD_Hypothesis();
+  ~HOMARD_Hypothesis();
+
+  void                          SetName( const char* NomHypo );
+  std::string                   GetName() const;
+  void                          SetCaseCreation( const char* NomCasCreation );
+  std::string                   GetCaseCreation() const;
+  std::string                   GetDumpPython() const;
+
+  void                          SetAdapType( int TypeAdap );
+  int                           GetAdapType() const;
+
+  void                          SetRefinTypeDera( int TypeRaff, int TypeDera );
+  int                           GetRefinType() const;
+  int                           GetUnRefType() const;
+
+  void                          SetField( const char* FieldName );
+  void                          SetRefinThr( int TypeThR, double ThreshR );
+  void                          SetUnRefThr( int TypeThC, double ThreshC );
+  void                          SetUseComp( int UsCmpI );
+  void                          SetUseField( int UsField );
+  std::string                   GetFieldName() const;
+  int                           GetRefinThrType()   const;
+  double                        GetThreshR()   const;
+  int                           GetUnRefThrType()   const;
+  double                        GetThreshC()   const;
+  int                           GetUseCompI()    const;
+
+  void                          AddComp( const char* NomComposant );
+  void                          SupprComp();
+  const std::list<std::string>& GetListComp() const;
+
+  void                          AddIteration( const char* NomIter );
+  void                          SupprIterations();
+  const std::list<std::string>& GetIterations() const;
+
+  void                          AddZone( const char* NomZone );
+  void                          SupprZone( const char* NomZone );
+  void                          SupprZones();
+  const std::list<std::string>& GetZones() const;
+
+  void                          AddGroup( const char* LeGroupe);
+  void                          SetGroups(const std::list<std::string>& ListGroup );
+  const std::list<std::string>& GetGroups() const;
+
+  void                          SetTypeFieldInterp( int TypeFieldInterp );
+  int                           GetTypeFieldInterp() const;
+  void                          AddFieldInterp( const char* FieldInterp );
+  void                          SupprFieldInterp();
+  const std::list<std::string>& GetListFieldInterp() const;
+
+
+
+
+private:
+  std::string                   _NomHypo;
+  std::string                   _NomCasCreation;
+
+  int                           _TypeAdap; // -1 pour une adapation Uniforme, 
+                                           //  0 si l adaptation depend des zones, 
+                                           //  1 pour des champs
+
+  int                           _TypeRaff;
+  int                           _TypeDera;
+
+  std::string                   _Field;
+  int                           _TypeThR;
+  int                           _TypeThC;
+  double                        _ThreshR;
+  double                        _ThreshC;
+  int                           _UsCmpI;
+  int                           _TypeFieldInterp; // 0 pour aucune interpolation, 
+                                                  // 1 pour interpolation de tous les champs, 
+                                                  // 2 pour une liste
+
+  std::list<std::string>        _ListIter;
+  std::list<std::string>        _ListZone;
+  std::list<std::string>        _ListComposant;
+  std::list<std::string>        _ListGroupSelected;
+  std::list<std::string>        _ListFieldInterp;
+};
+
+#endif
diff --git a/src/HOMARD/HOMARD_Iteration.cxx b/src/HOMARD/HOMARD_Iteration.cxx
new file mode 100644 (file)
index 0000000..4953f56
--- /dev/null
@@ -0,0 +1,346 @@
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Iteration.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#include "HOMARD_Iteration.hxx"
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  default constructor:
+ */
+//=============================================================================
+HOMARD_Iteration::HOMARD_Iteration():
+  _NomIter( "" ), _Etat( false ),
+ _NumIter( -1 ),
+  _NomMesh( "" ), _MeshFile( "" ),
+  _FieldFile( "" ), _TimeStep( 0 ), _Rank( 0 ),
+  _MessFile( "" ),
+  _IterParent( "" ),
+  _NomHypo( "" ), _NomCas( "" ), _NomDir( "" )
+{
+  MESSAGE("HOMARD_Iter");
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+HOMARD_Iteration::~HOMARD_Iteration()
+{
+  MESSAGE("~HOMARD_Iteration");
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+bool HOMARD_Iteration::Compute()
+{
+  MESSAGE("Compute --> ne fait rien");
+  _Etat=true;
+  return true;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetName( const char* NomIter )
+{
+  _NomIter = std::string( NomIter );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetName() const
+{
+  return _NomIter;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetDumpPython() const
+{
+  if (_IterParent == "") return std::string(" ") ;   // Pas de creation explicite de iteration 0";
+
+  std::ostringstream aScript;
+  aScript << "\n# Creation of the iteration " << _NomIter << "\n";
+  if( _NumIter == 1 )
+  {
+       aScript << "\t" << _NomIter << " = homard.CreateIteration('";
+       aScript <<  _NomIter << "', "<<  _NomCas << ".GetIter0Name() )\n";
+  }
+   else
+  {
+       aScript << "\t" << _NomIter << " = homard.CreateIteration('";
+       aScript <<  _NomIter << "', '" << _IterParent << "')\n";
+  }
+// Le nom du maillage produit
+  aScript << "\t" << _NomIter << ".SetMeshName('" << _NomMesh << "')\n" ;
+// Le fichier du maillage produit
+  aScript << "\t" << _NomIter << ".SetMeshFile('" << _MeshFile << "')\n";
+  if (_FieldFile != "") {
+    aScript << "\t" << _NomIter << ".SetFieldFile('" << _FieldFile << "')\n";
+    aScript << "\t" << _NomIter << ".SetTimeStepRank(" << _Rank << ", " << _TimeStep << ")\n";
+  }
+
+  aScript << "\thomard.AssociateIterHypo('" <<_NomIter << "', '" << _NomHypo << "')\n";
+  if (_Etat == true)
+  {
+     aScript << "\tresult = homard.Compute('" <<_NomIter << "', 1)\n";
+  }
+  else
+  {
+     aScript << "\t# result = homard.Compute('" <<_NomIter << "', 1)\n";
+  }
+
+  return aScript.str();
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetEtat( bool etat )
+{
+  _Etat = etat;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+bool HOMARD_Iteration::GetEtat() const
+{
+  return _Etat;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetNumber( int NumIter )
+{
+  _NumIter = NumIter;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+int HOMARD_Iteration::GetNumber() const
+{
+  return _NumIter;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetMeshName( const char* NomMesh )
+{
+  _NomMesh = std::string( NomMesh );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetMeshName() const
+{
+  return _NomMesh;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetIterParent( const char* IterParent )
+{
+  _IterParent = IterParent;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetIterParent() const
+{
+  return _IterParent;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::AddIteration( const char* NomIteration )
+{
+  _mesIterFilles.push_back( std::string( NomIteration ) );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+const std::list<std::string>& HOMARD_Iteration::GetIterations() const
+{
+  return _mesIterFilles;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SupprIterations()
+{
+  _mesIterFilles.clear();
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetHypoName( const char* NomHypo )
+{
+  _NomHypo = std::string( NomHypo );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetHypoName() const
+{
+  return _NomHypo;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetMeshFile( const char* MeshFile )
+{
+  _MeshFile = std::string( MeshFile );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetMeshFile() const
+{
+  return _MeshFile;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetFieldFile( const char* FieldFile )
+{
+  _FieldFile = std::string( FieldFile );
+}
+//=============================================================================
+std::string HOMARD_Iteration::GetFieldFile() const
+{
+  return _FieldFile;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetTimeStepRank( int TimeStep, int Rank )
+{
+  _TimeStep = TimeStep;
+  _Rank = Rank;
+}
+//=============================================================================
+int HOMARD_Iteration::GetTimeStep() const
+{
+  return _TimeStep;
+}
+//=============================================================================
+int HOMARD_Iteration::GetRank() const
+{
+  return _Rank;
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetCaseName( const char* NomCas )
+{
+  _NomCas = std::string( NomCas );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetCaseName() const
+{
+  return _NomCas;
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetDirName( const char* NomDir )
+{
+  _NomDir = std::string( NomDir );
+}
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetDirName() const
+{
+   return _NomDir;
+}
+/*!
+*/
+//=============================================================================
+void HOMARD_Iteration::SetMessFile( const char* MessFile )
+{
+  _MessFile = std::string( MessFile );
+}
+
+//=============================================================================
+/*!
+*/
+//=============================================================================
+std::string HOMARD_Iteration::GetMessFile() const
+{
+  return _MessFile;
+}
diff --git a/src/HOMARD/HOMARD_Iteration.hxx b/src/HOMARD/HOMARD_Iteration.hxx
new file mode 100644 (file)
index 0000000..6a64be8
--- /dev/null
@@ -0,0 +1,100 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Iteration.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#ifndef _HOMARD_ITER_HXX_
+#define _HOMARD_ITER_HXX_
+
+#include <string>
+#include <list>
+
+class  HOMARD_Iteration
+{
+public:
+  HOMARD_Iteration();
+  ~HOMARD_Iteration();
+
+  bool                          Compute();
+
+  void                          SetName( const char* NomIter );
+  std::string                   GetName() const;
+  std::string                   GetDumpPython() const;
+
+  void                          SetEtat( bool etat );
+  bool                          GetEtat() const;
+
+  void                          SetNumber( int NumIter );
+  int                           GetNumber() const;
+
+  void                          SetMeshFile( const char* MeshFile );
+  std::string                   GetMeshFile() const;
+
+  void                          SetMeshName( const char* NomMesh );
+  std::string                   GetMeshName() const;
+
+  void                          SetFieldFile( const char* FieldFile );
+  std::string                   GetFieldFile() const;
+  void                          SetTimeStepRank( int TimeStep, int Rank );
+  int                           GetTimeStep() const;
+  int                           GetRank() const;
+
+  void                          SetIterParent( const char* iterParent );
+  std::string                   GetIterParent() const;
+
+  void                          AddIteration( const char* iter );
+  const std::list<std::string>& GetIterations() const;
+  void                          SupprIterations();
+
+  void                          SetHypoName( const char* NomHypo );
+  std::string                   GetHypoName() const;
+
+  void                          SetCaseName( const char* NomCas );
+  std::string                   GetCaseName() const;
+
+  void                          SetDirName( const char* NomDir );
+  std::string                   GetDirName() const;
+
+  void                          SetMessFile( const char* MessFile );
+  std::string                   GetMessFile() const;
+
+private:
+  std::string                   _NomIter;
+  bool                          _Etat;
+  int                           _NumIter;
+  std::string                   _NomMesh;
+  std::string                   _MeshFile;
+  std::string                   _FieldFile;
+  int                           _TimeStep;
+  int                           _Rank;
+  std::string                   _MessFile;
+  std::string                   _IterParent;
+  std::string                   _NomHypo;
+  std::string                   _NomCas;
+  std::string                   _NomDir;
+  std::list<std::string>        _mesIterFilles;
+};
+
+#endif
diff --git a/src/HOMARD/HOMARD_Zone.cxx b/src/HOMARD/HOMARD_Zone.cxx
new file mode 100644 (file)
index 0000000..07bd8e9
--- /dev/null
@@ -0,0 +1,185 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Zone.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#include "HOMARD_Zone.hxx"
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  default constructor:
+ */
+//=============================================================================
+HOMARD_Zone::HOMARD_Zone():
+  _NomZone( "" ),_ZoneType( 2 ),
+  _Xmin( 0 ), _Xmax( 0 ), _Ymin( 0 ), _Ymax( 0 ), _Zmin( 0 ), _Zmax( 0 ),
+  _Xcentre( 0 ), _Ycentre( 0 ), _Zcentre( 0 ), _rayon( 0 ),
+  _Xincr( 0 ), _Yincr( 0 ), _Zincr( 0 )
+{
+  MESSAGE("HOMARD_Zone");
+}
+
+//=============================================================================
+HOMARD_Zone::~HOMARD_Zone()
+{
+  MESSAGE("~HOMARD_Zone");
+}
+
+//=============================================================================
+void HOMARD_Zone::SetName( const char* NomZone )
+{
+  _NomZone = std::string( NomZone );
+}
+
+//=============================================================================
+std::string HOMARD_Zone::GetName() const
+{
+  return _NomZone;
+}
+
+//=============================================================================
+std::string HOMARD_Zone::GetDumpPython() const
+{
+  std::ostringstream aScript;
+  aScript << "\n# Creation of the ";
+  if ( _ZoneType == 2 ) { aScript << "box "  << _NomZone << "\n";}
+  if ( _ZoneType == 4 ) { aScript << "sphere " << _NomZone << "\n"; }
+
+  aScript << "\t" << _NomZone << " = homard.CreateZone('" << _NomZone ;
+  aScript << "', " << _ZoneType << ")\n";
+//
+  switch (_ZoneType)
+  {
+    case 2:
+    {
+      aScript << "\t" << _NomZone << ".SetBox(" ;
+      aScript << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ")\n";
+      break;
+    }
+
+    case 4:
+    {
+      aScript << "\t" << _NomZone << ".SetSphere(" ;
+      aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n";
+      break;
+    }
+  }
+
+  return aScript.str();
+}
+
+
+//=============================================================================
+void HOMARD_Zone::SetZoneType( int ZoneType )
+{
+  _ZoneType = ZoneType;
+}
+
+//=============================================================================
+int HOMARD_Zone::GetZoneType() const
+{
+  return _ZoneType;
+}
+
+//======================================================================
+void HOMARD_Zone::SetLimit( double X0, double X1, double X2 )
+{
+  _Xincr = X0; _Yincr = X1; _Zincr = X2;
+}
+//=======================================================================================
+void HOMARD_Zone::SetBox( double X0, double X1, double X2, double X3, double X4, double X5 )
+{
+  _Xmin = X0; _Xmax = X1;
+  _Ymin = X2; _Ymax = X3;
+  _Zmin = X4; _Zmax = X5;
+}
+
+//======================================================================
+void HOMARD_Zone::SetSphere( double X0, double X1, double X2, double X3 )
+{
+  _Xcentre = X0; _Ycentre = X1; _Zcentre = X2;
+  _rayon = X3;
+}
+
+//=======================================================================================
+std::vector<double> HOMARD_Zone::GetLimit() const
+{
+  std::vector<double> mesLimit;
+  mesLimit.push_back( _Xincr );
+  mesLimit.push_back( _Yincr );
+  mesLimit.push_back( _Zincr );
+  return mesLimit;
+}
+
+//=======================================================================================
+std::vector<double> HOMARD_Zone::GetBox() const
+{
+  std::vector<double> mesCoor;
+  mesCoor.push_back( _Xmin ); mesCoor.push_back( _Xmax );
+  mesCoor.push_back( _Ymin ); mesCoor.push_back( _Ymax );
+  mesCoor.push_back( _Zmin ); mesCoor.push_back( _Zmax );
+  return mesCoor;
+}
+
+//=======================================================================================
+std::vector<double> HOMARD_Zone::GetSphere() const
+{
+  std::vector<double> mesCoor;
+  mesCoor.push_back( _Xcentre );
+  mesCoor.push_back( _Ycentre );
+  mesCoor.push_back( _Zcentre ); 
+  mesCoor.push_back( _rayon );
+  return mesCoor;
+}
+
+//=============================================================================
+void HOMARD_Zone::AddHypo( const char* NomHypo )
+{
+  _ListHypo.push_back( std::string( NomHypo ) );
+}
+
+//=============================================================================
+void HOMARD_Zone::SupprHypo( const char* NomHypo )
+{
+  std::list<std::string>::iterator it = find( _ListHypo.begin(), _ListHypo.end(), NomHypo );
+  if ( it != _ListHypo.end() ) 
+  {
+    MESSAGE ("Dans SupprHypo pour " << NomHypo);
+    _ListHypo.erase( it );
+  }
+}
+
+//=============================================================================
+const std::list<std::string>& HOMARD_Zone::GetHypo() const
+{
+  return _ListHypo;
+}
+
+//=============================================================================
+void HOMARD_Zone::SupprHypos()
+{
+  _ListHypo.clear();
+}
diff --git a/src/HOMARD/HOMARD_Zone.hxx b/src/HOMARD/HOMARD_Zone.hxx
new file mode 100644 (file)
index 0000000..1adcfa8
--- /dev/null
@@ -0,0 +1,73 @@
+//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File   : HOMARD_Zone.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+#ifndef _HOMARD_Zone_HXX_
+#define _HOMARD_Zone_HXX_
+
+#include <vector>
+#include <string>
+#include <list>
+
+class HOMARD_Zone
+{
+public:
+  HOMARD_Zone();
+  ~HOMARD_Zone();
+
+  void                          SetName( const char* NomZone );
+  std::string                   GetName() const;
+  std::string                   GetDumpPython() const;
+  
+  void                          SetBox( double X0, double X1, double X2, 
+                                       double X3, double X4, double X5 );
+  std::vector<double>           GetBox() const;
+
+  void                          SetSphere( double X0, double X1,
+                                          double X2, double X3 );
+  std::vector<double>           GetSphere() const;
+
+  void                          SetLimit( double X0, double X1, double X2 );
+  std::vector<double>           GetLimit() const;
+  
+  void                          SetZoneType( int ZoneType );
+  int                           GetZoneType() const;
+  
+  void                          AddHypo( const char* NomHypo );
+  void                          SupprHypo( const char* NomHypo );
+  const std::list<std::string>& GetHypo() const;
+  void                          SupprHypos();
+
+private:
+  std::string                   _NomZone;
+  int                           _ZoneType;
+  std::list<std::string>        _ListHypo;
+  double                        _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax;
+  double                        _Xcentre, _Ycentre, _Zcentre, _rayon;
+  double                        _Xincr, _Yincr, _Zincr;
+};
+
+#endif
diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx
new file mode 100644 (file)
index 0000000..04c4630
--- /dev/null
@@ -0,0 +1,544 @@
+#include <string.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#include "Utils_SALOME_Exception.hxx"
+#include "utilities.h"
+#include "HomardDriver.hxx"
+
+//=============================================================================
+//=============================================================================
+HomardDriver::HomardDriver(const std::string siter, const std::string siterp1):
+  _HOMARD_Exec( "" ), _NomDir( "" ), _NomFichierConfBase( "HOMARD.Configuration" ),
+  _NomFichierConf( "" ), _siter( "" ), _siterp1( "" ),
+  _Texte( "" ), _bLu( false )
+{
+// Memorisation du nom complet de l'executable HOMARD
+  char* dirchar; char* execchar;
+  std::string dir;
+  std::string executable;
+  if ( !(dirchar = getenv("HOMARD_REP_EXE")) )
+    dir = "/logiciels/HOMARD/HOMARD_PUBLIC/Linux64" ;
+  else
+    dir = std::string(dirchar);
+  if ( !(execchar = getenv("HOMARD_EXE")) )
+    executable = "HOMARD";
+  else
+    executable = std::string(execchar);
+  _HOMARD_Exec = dir + "/" + executable ;
+//
+  _siter = siter ;
+  _siterp1 = siterp1 ;
+}
+
+//=============================================================================
+//=============================================================================
+HomardDriver::~HomardDriver()
+{
+}
+
+////=============================================================================
+void HomardDriver::TexteInit( const std::string DirCompute, const std::string DirComputePa, const std::string MessFile )
+{
+
+  _Texte  = "Action   homa\n" ;
+  _Texte += "CCAssoci med\n" ;
+  _Texte += "ModeHOMA 1\n" ;
+  _Texte += "NumeIter " + _siter + "\n" ;
+  _Texte += "ListeStd " + MessFile + "\n" ;
+  _Texte += "# Maillages HOMARD \n" ;
+  _Texte += "HOMaiN__ Mai" + _siter   + " " + DirComputePa + "/maill." + _siter   + ".hom.med\n" ;
+  _Texte += "HOMaiNP1 Mai" + _siterp1 + " " + DirCompute   + "/maill." + _siterp1 + ".hom.med\n" ;
+  _Texte += "RepeTrav " + DirCompute + "\n" ;
+//
+}
+
+////=============================================================================
+void HomardDriver::TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres )
+{
+  std::string saux ;
+  saux = "P1" ;
+  if ( apres < 1 ) { saux = "__" ; }
+
+  _Texte += "# Maillages Med " + saux + "\n" ;
+  _Texte += "CCNoMN" + saux + " \"" + NomMesh  + "\"\n" ;
+  _Texte += "CCMaiN" + saux + " " + MeshFile + "\n" ;
+}
+
+////=============================================================================
+void HomardDriver::TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, int TypeDera )
+{
+//   std::cerr << "Dans HomardDriver::TexteConfRaffDera, ConfType ="<<ConfType << std::endl;
+//   std::cerr << "Dans HomardDriver::TexteConfRaffDera, TypeAdap ="<<TypeAdap << std::endl;
+//   std::cerr << "Dans HomardDriver::TexteConfRaffDera, TypeRaff ="<<TypeRaff << std::endl;
+//   std::cerr << "Dans HomardDriver::TexteConfRaffDera, TypeDera ="<<TypeDera << std::endl;
+//
+// Type de conformite
+//
+  std::string saux ;
+  switch (ConfType)
+  {
+    case 1: //
+    {
+      saux = "conforme" ;
+      break;
+    }
+    case 2: //
+    {
+      saux = "non_conforme_1_noeud" ;
+      break;
+    }
+    case 3: //
+    {
+      saux = "non_conforme_1_arete" ;
+      break;
+    }
+    case 4: //
+    {
+      saux = "non_conforme_indicateur" ;
+      break;
+    }
+  }
+  _Texte += "# Type de conformite\nTypeConf " + saux + "\n" ;
+//
+// Type de raffinement/deraffinement
+//
+  if ( TypeAdap == -1 )
+  {
+    if ( TypeRaff == 1 )
+    {
+      saux = "TypeRaff uniforme\n" ;
+    }
+    else
+    {
+      saux = "TypeRaff non\n" ;
+    }
+    if ( TypeDera == 1 )
+    {
+      saux += "TypeDera uniforme" ;
+    }
+    else
+    {
+      saux += "TypeDera non" ;
+    }
+  }
+  else
+  {
+    if ( TypeRaff == 1 )
+    {
+      saux = "TypeRaff libre\n" ;
+    }
+    else
+    {
+      saux = "TypeRaff non\n" ;
+    }
+    if ( TypeDera == 1 )
+    {
+      saux += "TypeDera libre" ;
+    }
+    else
+    {
+      saux += "TypeDera non" ;
+    }
+  }
+  _Texte += "# Type de raffinement/deraffinement\n" + saux + "\n" ;
+//
+//  std::cerr << "A la fin de TexteConfRaffDera _Texte ="<<_Texte << std::endl;
+}
+////=============================================================================
+void HomardDriver::TexteCompo( int NumeComp, const std::string NompCompo)
+{
+//   std::cerr << "Dans TexteCompo de HomardDriver NompCompo = "<<NompCompo << std::endl;
+  _Texte +="CCCoChaI \"" + NompCompo + "\"\n" ;
+}
+
+////=============================================================================
+void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, double x2, double x3, double x4, double x5 )
+{
+// std::cerr << "Dans TexteZone de HomardDriver NumeZone = "<<NumeZone << std::endl;
+// std::cerr << "Dans TexteZone de HomardDriver ZoneType = "<<ZoneType << std::endl;
+// std::cerr << "Dans TexteZone de HomardDriver coor = "<< x0<<","<<x1<< ","<< x2<< ","<< x3<<","<<x4<<","<<x5 <<std::endl;
+//
+  std::string saux, saux2 ;
+//
+// Type de zones
+//
+  std::stringstream saux1 ;
+  saux1 << NumeZone ;
+  saux2 = saux1.str() ;
+  saux = "#\n# Zone numero " + saux2 + "\n" ;
+//
+  { std::stringstream saux1 ;
+    saux1 << NumeZone << " " << ZoneType ;
+    saux2 = saux1.str() ;
+    saux += "ZoRaType " + saux2 + "\n" ;
+  }
+//
+// Cas du rectangle/parallelepipede
+//
+  if ( ZoneType == 2 )
+  {
+    saux += "# Boite\n" ;
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x0 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaXmin " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x1 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaXmax " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x2 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaYmin " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x3 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaYmax " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x4 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaZmin " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x5 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaZmax " + saux2 + "\n" ;
+    }
+  }
+//
+// Cas du cercle/sphere
+//
+  else if ( ZoneType == 4 )
+  {
+    saux += "# Sphere\n" ;
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x0 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaXCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x1 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaYCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x2 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaZCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeZone << " " << x3 ;
+      saux2 = saux1.str() ;
+      saux += "ZoRaRayo " + saux2 + "\n" ;
+    }
+  }
+//
+  _Texte += saux + "#\n" ;
+//
+//  std::cerr << "A la fin de TexteZone _Texte ="<<_Texte << std::endl;
+}
+
+////=============================================================================
+void HomardDriver::TexteField( const std::string FieldName, const std::string FieldFile, int TimeStep, int Rank,
+               int TypeThR, double ThreshR, int TypeThC, double ThreshC, int UsCmpI )
+{
+  MESSAGE("TexteField, FieldName = "<<FieldName<<", FieldFile = "<<FieldFile);
+  MESSAGE("TexteField, TimeStep = "<<TimeStep<<", Rank = "<<Rank);
+
+  std::string saux, saux2 ;
+//
+//
+  _Texte += "# Champ d'indicateurs\n" ;
+  _Texte += "CCIndica " + FieldFile  + "\n" ;
+  _Texte += "CCNoChaI \"" + FieldName  + "\"\n" ;
+
+//  std::cerr << "HomardDriver::TexteField TimeStep" << TimeStep<<std::endl;
+//  std::cerr << "HomardDriver::TexteField Rank" << Rank<<std::endl;
+// Cas ou on prend le dernier pas de temps
+  if ( TimeStep == -2 )
+  { _Texte += "CCNumPTI Last\n" ; }
+// Cas avec pas de temps
+  else if ( TimeStep >= 0 )
+  {
+    {
+      std::stringstream saux1 ;
+      saux1 << TimeStep ;
+      saux2 = saux1.str() ;
+      _Texte += "CCNumPTI " + saux2  + "\n" ;
+    }
+    {
+      std::stringstream saux1 ;
+      saux1 << Rank ;
+      saux2 = saux1.str() ;
+      _Texte += "CCNumOrI " + saux2  + "\n" ;
+    }
+  }
+//
+  saux = " " ;
+  if ( TypeThR == 1 )
+  { saux = "Hau" ; }
+  if ( TypeThR == 2 )
+  { saux = "HRe" ; }
+  if ( TypeThR == 3 )
+  { saux = "HPE" ; }
+  if ( saux != " " )
+  {
+    std::stringstream saux1 ;
+    saux1 << ThreshR ;
+    saux2 = saux1.str() ;
+    _Texte += "Seuil" + saux + " " + saux2  + "\n" ;
+  }
+//
+  saux = " " ;
+  if ( TypeThC == 1 )
+  { saux = "Bas" ; }
+  if ( TypeThC == 2 )
+  { saux = "BRe" ; }
+  if ( TypeThC == 3 )
+  { saux = "BPE" ; }
+  if ( saux != " " )
+  {
+    std::stringstream saux1 ;
+    saux1 << ThreshC ;
+    saux2 = saux1.str() ;
+    _Texte += "Seuil" + saux + " " + saux2  + "\n" ;
+  }
+//
+  saux = " " ;
+  if ( UsCmpI == 0 )
+  { saux = "L2" ; }
+  if ( UsCmpI == 1 )
+  { saux = "INFINI" ; }
+  if ( UsCmpI == 2 )
+  { saux = "V_RELATIVE" ; }
+  if ( saux != " " )
+  {
+    _Texte += "CCUsCmpI " + saux  + "\n" ;
+  }
+}
+
+////=============================================================================
+void HomardDriver::TexteGroup( const std::string GroupName )
+{
+//   std::cerr << "Dans HomardDriver::TexteGroup NomGroupe  ="<<NomGroupe << std::endl;
+//
+  _Texte += "CCGroAda " + GroupName  + "\n" ;
+//
+}
+////=============================================================================
+void HomardDriver::TexteBoundaryOption( int BoundaryOption )
+{
+//   std::cerr << "Dans HomardDriver::TexteBoundaryOption, BoundaryOption ="<<BoundaryOption << std::endl;
+//
+// Type de suivi de frontiere
+//
+  std::stringstream saux1 ;
+  saux1 << BoundaryOption ;
+  std::string saux = saux1.str() ;
+  _Texte += "SuivFron " + saux + "\n" ;
+//
+//  std::cerr << "A la fin de TexteBoundaryOption _Texte ="<<_Texte << std::endl;
+}
+////=============================================================================
+void HomardDriver::TexteBoundaryDi(  const std::string MeshName, const std::string MeshFile )
+{
+//   std::cerr << "Dans HomardDriver::TexteBoundaryDi, MeshName ="<<MeshName << std::endl;
+//
+  _Texte += "CCNoMFro " + MeshName + "\n" ;
+  _Texte += "CCFronti " + MeshFile + "\n" ;
+//
+//  std::cerr << "A la fin de TexteBoundaryOption _Texte ="<<_Texte << std::endl;
+}
+////=============================================================================
+void HomardDriver::TexteBoundaryAn( int NumeBoundary, int BoundaryType, const std::string Group, double x0, double x1, double x2, double x3, double x4, double x5, double x6 )
+{
+std::cerr << "Dans TexteBoundaryAn de HomardDriver NumeBoundary = "<<NumeBoundary << std::endl;
+std::cerr << "Dans TexteBoundaryAn de HomardDriver BoundaryType = "<<BoundaryType << std::endl;
+std::cerr << "Dans TexteBoundaryAn de HomardDriver coor = "<< x0<<","<<x1<< ","<< x2<< ","<< x3<<","<<x4<<","<<x5<<","<<x6 <<std::endl;
+//
+  std::string saux, saux2 ;
+//
+// Type de zones
+//
+  std::stringstream saux1 ;
+  saux1 << NumeBoundary ;
+  saux2 = saux1.str() ;
+  saux = "#\n# Frontiere numero " + saux2 + "\n" ;
+  if ( BoundaryType == 1 )
+  { saux += "# Cylindre\n" ; }
+  if ( BoundaryType == 2 )
+  { saux += "# Sphere\n" ; }
+//
+  { std::stringstream saux1 ;
+    saux1 << NumeBoundary << " " << BoundaryType ;
+    saux2 = saux1.str() ;
+    saux += "FAType " + saux2 + "\n" ;
+  }
+//
+// Le groupe
+//
+  { std::stringstream saux1 ;
+    saux1 << NumeBoundary ;
+    saux2 = saux1.str() ;
+    saux += "FAGroupe " + saux2 + " '" + Group + "'\n" ;
+  }
+//
+// Cas du cylindre
+//
+  if ( BoundaryType == 1 )
+  {
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x0 ;
+      saux2 = saux1.str() ;
+      saux += "FAXCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x1 ;
+      saux2 = saux1.str() ;
+      saux += "FAYCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x2 ;
+      saux2 = saux1.str() ;
+      saux += "FAZCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x3 ;
+      saux2 = saux1.str() ;
+      saux += "FAXAxe " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x4 ;
+      saux2 = saux1.str() ;
+      saux += "FAYAxe " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x5 ;
+      saux2 = saux1.str() ;
+      saux += "FAZAxe " + saux2 + "\n" ;
+    }
+     { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x6 ;
+      saux2 = saux1.str() ;
+      saux += "FARayon " + saux2 + "\n" ;
+    }
+ }
+//
+// Cas de la sphere
+//
+  else if ( BoundaryType == 2 )
+  {
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x0 ;
+      saux2 = saux1.str() ;
+      saux += "FAXCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x1 ;
+      saux2 = saux1.str() ;
+      saux += "FAYCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x2 ;
+      saux2 = saux1.str() ;
+      saux += "FAZCen " + saux2 + "\n" ;
+    }
+    { std::stringstream saux1 ;
+      saux1 << NumeBoundary << " " << x3 ;
+      saux2 = saux1.str() ;
+      saux += "FARayon " + saux2 + "\n" ;
+    }
+  }
+//
+  _Texte += saux + "#\n" ;
+//
+//  std::cerr << "A la fin de TexteBoundaryAn _Texte ="<<_Texte << std::endl;
+}
+////=============================================================================
+void HomardDriver::TexteFieldInterp( int TypeFieldInterp, const std::string FieldFile, const std::string MeshFile, int TimeStep, int Rank )
+{
+  MESSAGE("TexteFieldInterp, TypeFieldInterp = "<<TypeFieldInterp);
+  MESSAGE("TexteFieldInterp, FieldFile = "<<FieldFile<<", MeshFile = "<<MeshFile);
+  MESSAGE("TexteFieldInterp, TimeStep = "<<TimeStep<<", Rank = "<<Rank);
+//
+// Type d'interpolation
+//
+  _Texte += "# Interpolations des champs\n" ;
+  _Texte += "CCSolN__ " + FieldFile  + "\n" ;
+  _Texte += "CCSolNP1 " + MeshFile  + "\n" ;
+  if ( TypeFieldInterp == 1 )
+  {
+    _Texte += "CCChaTou oui\n" ;
+  }
+//
+  _TimeStep = TimeStep ;
+  _Rank = Rank ;
+//
+//  std::cerr << "A la fin de TexteFieldInterp _Texte ="<<_Texte << std::endl;
+}
+////=============================================================================
+void HomardDriver::TexteFieldInterpName( int NumeChamp, const std::string FieldName)
+{
+  MESSAGE("TexteFieldInterpName, NumeChamp = "<<NumeChamp<<", FieldName = "<<FieldName);
+  std::stringstream saux1 ;
+  saux1 << NumeChamp+1 ;
+  std::string saux = saux1.str() ;
+  _Texte +="CCChaNom " + saux + " \"" + FieldName + "\"\n" ;
+//
+  MESSAGE("TexteFieldInterpName, _TimeStep = "<<_TimeStep<<", _Rank = "<<_Rank);
+  if ( _TimeStep >= 0 )
+  {
+    {
+      std::stringstream saux1 ;
+      saux1 << _TimeStep ;
+      std::string saux2 = saux1.str() ;
+      _Texte += "CCChaPdT " + saux + " " + saux2  + "\n" ;
+    }
+    {
+      std::stringstream saux1 ;
+      saux1 << _Rank ;
+      std::string saux2 = saux1.str() ;
+      _Texte += "CCChaNuO " + saux + " " + saux2  + "\n" ;
+    }
+  }
+}
+
+
+////=============================================================================
+void HomardDriver::CreeFichier( )
+{
+//
+  _NomFichierConf = _NomFichierConfBase + "." + _siter + ".vers." + _siterp1 ;
+//
+  std::ofstream FicConf(_NomFichierConf.c_str(), std::ios::out ) ;
+  if (FicConf.is_open() == true)
+  {
+    FicConf << _Texte << std::endl ;
+  }
+  FicConf.close() ;
+//
+}
+
+////=============================================================================
+int HomardDriver::ExecuteHomard()
+{
+// Copie des Fichiers HOMARD
+  std::string commande= "cp " + _NomFichierConf + " " + _NomFichierConfBase ;
+  system(commande.c_str());
+
+  MESSAGE("ExecuteHomard");
+  int codret = system(_HOMARD_Exec.c_str()) ;
+  if ( codret != 0)
+  {
+      // GERALD -- QMESSAGE BOX
+      MESSAGE ( "Erreur en executant HOMARD : " << codret );
+//       ASSERT("Erreur en executant HOMARD" == 0);
+  };
+
+  return codret ;
+}
diff --git a/src/HOMARD/HomardDriver.hxx b/src/HOMARD/HomardDriver.hxx
new file mode 100644 (file)
index 0000000..5324b06
--- /dev/null
@@ -0,0 +1,61 @@
+# ifndef __HOMARDDRIVER_H__
+# define __HOMARDDRIVER_H__
+
+#include <iostream>
+#include <fstream>
+
+class HomardDriver
+{
+public:
+  HomardDriver(const std::string siter, const std::string siterp1);
+  ~HomardDriver();
+  //
+  void        TexteInit( const std::string DirCompute, const std::string DirComputePa, const std::string MessFile );
+  void        CreeFichier();
+  void        TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres );
+  void        TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, int TypeDera );
+  void        TexteZone( int NumeZone, int ZoneType, double x0, double x1, double x2, double x3, double x4, double x5 );
+  void        TexteGroup( const std::string GroupName );
+  void        TexteField( const std::string FieldName, const std::string FieldFile,
+                          int TimeStep, int Rank,
+                          int TypeThR, double ThreshR, int TypeThC, double ThreshC, int UsCmpI );
+  void        TexteCompo( int NumeComp, const std::string NomCompo);
+
+  void        TexteBoundaryOption( int BoundaryOption );
+  void        TexteBoundaryDi( const std::string MeshName, const std::string MeshFile );
+  void        TexteBoundaryAn( int NumeBoundary, int BoundaryType, const std::string Group, double x0, double x1, double x2, double x3, double x4, double x5, double x6 );
+
+  void        TexteFieldInterp( int TypeFieldInterp, const std::string FieldFile, const std::string MeshFile,
+                                int TimeStep, int Rank );
+  void        TexteFieldInterpName( int NumeChamp, const std::string FieldName);
+  void        CloseFichier();
+  //
+  int         ExecuteHomard();
+  //
+  bool        LireFichier();
+  bool        EcrireFichier();
+  void        SetTexte( const std::string texte );
+  std::string GetTexte();
+  std::string GetFichierInfo();
+  std::string GetFichierBasic();
+  std::string GetFichierResultMed();
+  std::string GetFichierHomard();
+  int         GetFichierNumeroIter();
+
+public:
+  std::string _HOMARD_Exec;
+  std::string _NomDir;
+  std::string _NomFichierConfBase;
+  std::string _NomFichierConf;
+  std::string _siter;
+  std::string _siterp1;
+  std::string _Texte;
+  int         _TimeStep;
+  int         _Rank;
+  bool _bLu;
+
+private :
+  std::string GetStringInTexte( std::string chaineCherchee, int longueur = 9 );
+};
+
+# endif         /* # ifndef __HOMARDDRIVER_H__ */
diff --git a/src/HOMARD/Makefile.am b/src/HOMARD/Makefile.am
new file mode 100755 (executable)
index 0000000..1213d1a
--- /dev/null
@@ -0,0 +1,65 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  SuperVisionTest AddComponent : example of component that adds two numbers
+#  File   : Makefile.in
+#  Author : , CEA
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# header files 
+salomeinclude_HEADERS = \
+       HOMARD_Cas.hxx \
+       HOMARD_Boundary.hxx \
+       HOMARD_Hypothesis.hxx \
+       HOMARD_Iteration.hxx \
+       HOMARD_Zone.hxx \
+       HOMARD_Gen.hxx \
+       HOMARD_DriverTools.hxx \
+       HomardDriver.hxx
+
+# Libraries targets
+lib_LTLIBRARIES = libHOMARDImpl.la
+dist_libHOMARDImpl_la_SOURCES = \
+       HOMARD_Cas.cxx \
+       HOMARD_Boundary.cxx \
+       HOMARD_Hypothesis.cxx \
+       HOMARD_Iteration.cxx \
+       HOMARD_Zone.cxx \
+       HOMARD_Gen.cxx \
+       HOMARD_DriverTools.cxx \
+       HomardDriver.cxx
+
+libHOMARDImpl_la_CPPFLAGS = \
+       $(KERNEL_CXXFLAGS)
+
+libHOMARDImpl_la_LDFLAGS = \
+       $(KERNEL_LDFLAGS) \
+       -lSALOMELocalTrace
+
+check_PROGRAMS = testhomard
+
+TESTS = $(check_PROGRAMS)
+
+testhomard_SOURCES = testhomard.cxx
+
+testhomard_LDADD = libHOMARDImpl.la
diff --git a/src/HOMARDGUI/CreateBoundaryDi.h b/src/HOMARDGUI/CreateBoundaryDi.h
new file mode 100644 (file)
index 0000000..816d59f
--- /dev/null
@@ -0,0 +1,147 @@
+/********************************************************************************
+** Form generated from reading ui file 'CreateBoundaryDi.ui'
+**
+** Created: Thu Nov 18 15:18:52 2010
+**      by: Qt User Interface Compiler version 4.4.3
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef CREATEBOUNDARYDI_H
+#define CREATEBOUNDARYDI_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CreateBoundaryDi
+{
+public:
+    QGridLayout *gridLayout;
+    QLabel *Name;
+    QLineEdit *LEBoundaryName;
+    QLabel *Mesh;
+    QPushButton *PushFichier;
+    QLineEdit *LEFileName;
+    QCheckBox *CBGroupe;
+    QGroupBox *GBButtons;
+    QGridLayout *gridLayout_5;
+    QPushButton *buttonOk;
+    QPushButton *buttonApply;
+    QPushButton *buttonCancel;
+    QPushButton *buttonHelp;
+
+    void setupUi(QDialog *CreateBoundaryDi)
+    {
+    if (CreateBoundaryDi->objectName().isEmpty())
+        CreateBoundaryDi->setObjectName(QString::fromUtf8("CreateBoundaryDi"));
+    CreateBoundaryDi->resize(566, 169);
+    QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    sizePolicy.setHorizontalStretch(0);
+    sizePolicy.setVerticalStretch(0);
+    sizePolicy.setHeightForWidth(CreateBoundaryDi->sizePolicy().hasHeightForWidth());
+    CreateBoundaryDi->setSizePolicy(sizePolicy);
+    CreateBoundaryDi->setAutoFillBackground(false);
+    CreateBoundaryDi->setSizeGripEnabled(true);
+    gridLayout = new QGridLayout(CreateBoundaryDi);
+    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+    Name = new QLabel(CreateBoundaryDi);
+    Name->setObjectName(QString::fromUtf8("Name"));
+
+    gridLayout->addWidget(Name, 0, 0, 1, 1);
+
+    LEBoundaryName = new QLineEdit(CreateBoundaryDi);
+    LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName"));
+    LEBoundaryName->setMinimumSize(QSize(382, 21));
+    LEBoundaryName->setMaxLength(32);
+
+    gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 2);
+
+    Mesh = new QLabel(CreateBoundaryDi);
+    Mesh->setObjectName(QString::fromUtf8("Mesh"));
+
+    gridLayout->addWidget(Mesh, 1, 0, 1, 1);
+
+    PushFichier = new QPushButton(CreateBoundaryDi);
+    PushFichier->setObjectName(QString::fromUtf8("PushFichier"));
+
+    gridLayout->addWidget(PushFichier, 1, 1, 1, 1);
+
+    LEFileName = new QLineEdit(CreateBoundaryDi);
+    LEFileName->setObjectName(QString::fromUtf8("LEFileName"));
+    LEFileName->setMinimumSize(QSize(370, 21));
+
+    gridLayout->addWidget(LEFileName, 1, 2, 1, 1);
+
+    CBGroupe = new QCheckBox(CreateBoundaryDi);
+    CBGroupe->setObjectName(QString::fromUtf8("CBGroupe"));
+
+    gridLayout->addWidget(CBGroupe, 2, 0, 1, 3);
+
+    GBButtons = new QGroupBox(CreateBoundaryDi);
+    GBButtons->setObjectName(QString::fromUtf8("GBButtons"));
+    gridLayout_5 = new QGridLayout(GBButtons);
+    gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
+    buttonOk = new QPushButton(GBButtons);
+    buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+
+    gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1);
+
+    buttonApply = new QPushButton(GBButtons);
+    buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+
+    gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1);
+
+    buttonCancel = new QPushButton(GBButtons);
+    buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+
+    gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1);
+
+    buttonHelp = new QPushButton(GBButtons);
+    buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+
+    gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1);
+
+
+    gridLayout->addWidget(GBButtons, 3, 0, 1, 3);
+
+
+    retranslateUi(CreateBoundaryDi);
+
+    QMetaObject::connectSlotsByName(CreateBoundaryDi);
+    } // setupUi
+
+    void retranslateUi(QDialog *CreateBoundaryDi)
+    {
+    CreateBoundaryDi->setWindowTitle(QApplication::translate("CreateBoundaryDi", "Create Discrete Boundary", 0, QApplication::UnicodeUTF8));
+    Name->setText(QApplication::translate("CreateBoundaryDi", "Name", 0, QApplication::UnicodeUTF8));
+    Mesh->setText(QApplication::translate("CreateBoundaryDi", "Mesh", 0, QApplication::UnicodeUTF8));
+    PushFichier->setText(QString());
+    CBGroupe->setText(QApplication::translate("CreateBoundaryDi", "Filtering with groups", 0, QApplication::UnicodeUTF8));
+    GBButtons->setTitle(QString());
+    buttonOk->setText(QApplication::translate("CreateBoundaryDi", "&Ok", 0, QApplication::UnicodeUTF8));
+    buttonApply->setText(QApplication::translate("CreateBoundaryDi", "&Apply", 0, QApplication::UnicodeUTF8));
+    buttonCancel->setText(QApplication::translate("CreateBoundaryDi", "&Cancel", 0, QApplication::UnicodeUTF8));
+    buttonHelp->setText(QApplication::translate("CreateBoundaryDi", "&Help", 0, QApplication::UnicodeUTF8));
+    Q_UNUSED(CreateBoundaryDi);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class CreateBoundaryDi: public Ui_CreateBoundaryDi {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CREATEBOUNDARYDI_H
diff --git a/src/HOMARDGUI/CreateBoundaryDi.ui b/src/HOMARDGUI/CreateBoundaryDi.ui
new file mode 100644 (file)
index 0000000..b97931d
--- /dev/null
@@ -0,0 +1,120 @@
+<ui version="4.0" >
+ <class>CreateBoundaryDi</class>
+ <widget class="QDialog" name="CreateBoundaryDi" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>566</width>
+    <height>169</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Create Discrete Boundary</string>
+  </property>
+  <property name="autoFillBackground" >
+   <bool>false</bool>
+  </property>
+  <property name="sizeGripEnabled" >
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" >
+    <widget class="QLabel" name="Name" >
+     <property name="text" >
+      <string>Name</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" colspan="2" >
+    <widget class="QLineEdit" name="LEBoundaryName" >
+     <property name="minimumSize" >
+      <size>
+       <width>382</width>
+       <height>21</height>
+      </size>
+     </property>
+     <property name="maxLength" >
+      <number>32</number>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="Mesh" >
+     <property name="text" >
+      <string>Mesh</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" >
+    <widget class="QPushButton" name="PushFichier" >
+     <property name="text" >
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2" >
+    <widget class="QLineEdit" name="LEFileName" >
+     <property name="minimumSize" >
+      <size>
+       <width>370</width>
+       <height>21</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="3" >
+    <widget class="QCheckBox" name="CBGroupe" >
+     <property name="text" >
+      <string>Filtering with groups</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="3" >
+    <widget class="QGroupBox" name="GBButtons" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_5" >
+      <item row="0" column="0" >
+       <widget class="QPushButton" name="buttonOk" >
+        <property name="text" >
+         <string>&amp;Ok</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="buttonApply" >
+        <property name="text" >
+         <string>&amp;Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="buttonCancel" >
+        <property name="text" >
+         <string>&amp;Cancel</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" >
+       <widget class="QPushButton" name="buttonHelp" >
+        <property name="text" >
+         <string>&amp;Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/CreateCase.h b/src/HOMARDGUI/CreateCase.h
new file mode 100644 (file)
index 0000000..f3010cc
--- /dev/null
@@ -0,0 +1,393 @@
+/********************************************************************************
+** Form generated from reading ui file 'CreateCase.ui'
+**
+** Created: Fri Nov 26 13:44:35 2010
+**      by: Qt User Interface Compiler version 4.4.3
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef CREATECASE_H
+#define CREATECASE_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QTableWidget>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CreateCase
+{
+public:
+    QGridLayout *gridLayout_2;
+    QHBoxLayout *horizontalLayout_5;
+    QLabel *Name;
+    QLineEdit *LECaseName;
+    QHBoxLayout *horizontalLayout_4;
+    QLabel *Directory;
+    QPushButton *PushDir;
+    QLineEdit *LEDirName;
+    QHBoxLayout *horizontalLayout_3;
+    QLabel *Mesh_2;
+    QPushButton *PushFichier;
+    QLineEdit *LEFileName;
+    QSpacerItem *verticalSpacer_2;
+    QGroupBox *GBTypeConf;
+    QHBoxLayout *horizontalLayout;
+    QRadioButton *RBConforme;
+    QRadioButton *RBNonConforme;
+    QSpacerItem *verticalSpacer_3;
+    QGroupBox *GBTypeNoConf;
+    QHBoxLayout *horizontalLayout_2;
+    QRadioButton *RB1NpM;
+    QRadioButton *RB1NpA;
+    QRadioButton *RBQuelconque;
+    QSpacerItem *verticalSpacer_4;
+    QHBoxLayout *horizontalLayout_6;
+    QCheckBox *CBBoundaryD;
+    QCheckBox *CBBoundaryA;
+    QSpacerItem *verticalSpacer_7;
+    QGroupBox *GBBoundaryD;
+    QGridLayout *gridLayout_3;
+    QComboBox *CBBoundaryDi;
+    QSpacerItem *spacer_2;
+    QPushButton *PBBoundaryDiEdit;
+    QPushButton *PBBoundaryDiNew;
+    QGroupBox *GBBoundaryA;
+    QTableWidget *TWBoundary;
+    QWidget *layoutWidget;
+    QVBoxLayout *verticalLayout_4;
+    QPushButton *PBBoundaryNew;
+    QPushButton *PBBoundaryEdit;
+    QPushButton *PBBoundaryDelete;
+    QGroupBox *GroupButtons;
+    QGridLayout *gridLayout;
+    QPushButton *buttonOk;
+    QPushButton *buttonApply;
+    QPushButton *buttonCancel;
+    QPushButton *buttonHelp;
+    QSpacerItem *verticalSpacer_5;
+
+    void setupUi(QDialog *CreateCase)
+    {
+    if (CreateCase->objectName().isEmpty())
+        CreateCase->setObjectName(QString::fromUtf8("CreateCase"));
+    CreateCase->resize(589, 675);
+    QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+    sizePolicy.setHorizontalStretch(0);
+    sizePolicy.setVerticalStretch(0);
+    sizePolicy.setHeightForWidth(CreateCase->sizePolicy().hasHeightForWidth());
+    CreateCase->setSizePolicy(sizePolicy);
+    CreateCase->setAutoFillBackground(false);
+    gridLayout_2 = new QGridLayout(CreateCase);
+    gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+    horizontalLayout_5 = new QHBoxLayout();
+    horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5"));
+    Name = new QLabel(CreateCase);
+    Name->setObjectName(QString::fromUtf8("Name"));
+
+    horizontalLayout_5->addWidget(Name);
+
+    LECaseName = new QLineEdit(CreateCase);
+    LECaseName->setObjectName(QString::fromUtf8("LECaseName"));
+    LECaseName->setMinimumSize(QSize(382, 21));
+
+    horizontalLayout_5->addWidget(LECaseName);
+
+
+    gridLayout_2->addLayout(horizontalLayout_5, 0, 0, 1, 2);
+
+    horizontalLayout_4 = new QHBoxLayout();
+    horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
+    Directory = new QLabel(CreateCase);
+    Directory->setObjectName(QString::fromUtf8("Directory"));
+
+    horizontalLayout_4->addWidget(Directory);
+
+    PushDir = new QPushButton(CreateCase);
+    PushDir->setObjectName(QString::fromUtf8("PushDir"));
+    PushDir->setAutoDefault(false);
+
+    horizontalLayout_4->addWidget(PushDir);
+
+    LEDirName = new QLineEdit(CreateCase);
+    LEDirName->setObjectName(QString::fromUtf8("LEDirName"));
+    LEDirName->setMinimumSize(QSize(382, 21));
+
+    horizontalLayout_4->addWidget(LEDirName);
+
+
+    gridLayout_2->addLayout(horizontalLayout_4, 1, 0, 1, 1);
+
+    horizontalLayout_3 = new QHBoxLayout();
+    horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
+    Mesh_2 = new QLabel(CreateCase);
+    Mesh_2->setObjectName(QString::fromUtf8("Mesh_2"));
+
+    horizontalLayout_3->addWidget(Mesh_2);
+
+    PushFichier = new QPushButton(CreateCase);
+    PushFichier->setObjectName(QString::fromUtf8("PushFichier"));
+    PushFichier->setAutoDefault(false);
+
+    horizontalLayout_3->addWidget(PushFichier);
+
+    LEFileName = new QLineEdit(CreateCase);
+    LEFileName->setObjectName(QString::fromUtf8("LEFileName"));
+    LEFileName->setMinimumSize(QSize(382, 21));
+
+    horizontalLayout_3->addWidget(LEFileName);
+
+
+    gridLayout_2->addLayout(horizontalLayout_3, 3, 0, 1, 2);
+
+    verticalSpacer_2 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_2, 4, 0, 1, 1);
+
+    GBTypeConf = new QGroupBox(CreateCase);
+    GBTypeConf->setObjectName(QString::fromUtf8("GBTypeConf"));
+    horizontalLayout = new QHBoxLayout(GBTypeConf);
+    horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+    RBConforme = new QRadioButton(GBTypeConf);
+    RBConforme->setObjectName(QString::fromUtf8("RBConforme"));
+    RBConforme->setChecked(true);
+
+    horizontalLayout->addWidget(RBConforme);
+
+    RBNonConforme = new QRadioButton(GBTypeConf);
+    RBNonConforme->setObjectName(QString::fromUtf8("RBNonConforme"));
+
+    horizontalLayout->addWidget(RBNonConforme);
+
+    RBNonConforme->raise();
+    RBConforme->raise();
+
+    gridLayout_2->addWidget(GBTypeConf, 5, 0, 1, 2);
+
+    verticalSpacer_3 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_3, 6, 0, 1, 1);
+
+    GBTypeNoConf = new QGroupBox(CreateCase);
+    GBTypeNoConf->setObjectName(QString::fromUtf8("GBTypeNoConf"));
+    horizontalLayout_2 = new QHBoxLayout(GBTypeNoConf);
+    horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
+    RB1NpM = new QRadioButton(GBTypeNoConf);
+    RB1NpM->setObjectName(QString::fromUtf8("RB1NpM"));
+
+    horizontalLayout_2->addWidget(RB1NpM);
+
+    RB1NpA = new QRadioButton(GBTypeNoConf);
+    RB1NpA->setObjectName(QString::fromUtf8("RB1NpA"));
+
+    horizontalLayout_2->addWidget(RB1NpA);
+
+    RBQuelconque = new QRadioButton(GBTypeNoConf);
+    RBQuelconque->setObjectName(QString::fromUtf8("RBQuelconque"));
+
+    horizontalLayout_2->addWidget(RBQuelconque);
+
+
+    gridLayout_2->addWidget(GBTypeNoConf, 7, 0, 1, 2);
+
+    verticalSpacer_4 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_4, 8, 0, 1, 1);
+
+    horizontalLayout_6 = new QHBoxLayout();
+    horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
+    CBBoundaryD = new QCheckBox(CreateCase);
+    CBBoundaryD->setObjectName(QString::fromUtf8("CBBoundaryD"));
+
+    horizontalLayout_6->addWidget(CBBoundaryD);
+
+    CBBoundaryA = new QCheckBox(CreateCase);
+    CBBoundaryA->setObjectName(QString::fromUtf8("CBBoundaryA"));
+
+    horizontalLayout_6->addWidget(CBBoundaryA);
+
+
+    gridLayout_2->addLayout(horizontalLayout_6, 9, 0, 1, 1);
+
+    verticalSpacer_7 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_7, 10, 0, 1, 1);
+
+    GBBoundaryD = new QGroupBox(CreateCase);
+    GBBoundaryD->setObjectName(QString::fromUtf8("GBBoundaryD"));
+    sizePolicy.setHeightForWidth(GBBoundaryD->sizePolicy().hasHeightForWidth());
+    GBBoundaryD->setSizePolicy(sizePolicy);
+    gridLayout_3 = new QGridLayout(GBBoundaryD);
+    gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
+    CBBoundaryDi = new QComboBox(GBBoundaryD);
+    CBBoundaryDi->setObjectName(QString::fromUtf8("CBBoundaryDi"));
+    CBBoundaryDi->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+
+    gridLayout_3->addWidget(CBBoundaryDi, 0, 0, 1, 1);
+
+    spacer_2 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+    gridLayout_3->addItem(spacer_2, 0, 1, 1, 1);
+
+    PBBoundaryDiEdit = new QPushButton(GBBoundaryD);
+    PBBoundaryDiEdit->setObjectName(QString::fromUtf8("PBBoundaryDiEdit"));
+    PBBoundaryDiEdit->setAutoDefault(false);
+
+    gridLayout_3->addWidget(PBBoundaryDiEdit, 0, 2, 1, 1);
+
+    PBBoundaryDiNew = new QPushButton(GBBoundaryD);
+    PBBoundaryDiNew->setObjectName(QString::fromUtf8("PBBoundaryDiNew"));
+    PBBoundaryDiNew->setAutoDefault(false);
+
+    gridLayout_3->addWidget(PBBoundaryDiNew, 0, 3, 1, 1);
+
+
+    gridLayout_2->addWidget(GBBoundaryD, 11, 0, 1, 1);
+
+    GBBoundaryA = new QGroupBox(CreateCase);
+    GBBoundaryA->setObjectName(QString::fromUtf8("GBBoundaryA"));
+    GBBoundaryA->setMinimumSize(QSize(548, 150));
+    TWBoundary = new QTableWidget(GBBoundaryA);
+    if (TWBoundary->columnCount() < 2)
+        TWBoundary->setColumnCount(2);
+    QTableWidgetItem *__colItem = new QTableWidgetItem();
+    TWBoundary->setHorizontalHeaderItem(0, __colItem);
+    QTableWidgetItem *__colItem1 = new QTableWidgetItem();
+    TWBoundary->setHorizontalHeaderItem(1, __colItem1);
+    TWBoundary->setObjectName(QString::fromUtf8("TWBoundary"));
+    TWBoundary->setGeometry(QRect(4, 20, 371, 121));
+    TWBoundary->setAutoScrollMargin(16);
+    TWBoundary->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked);
+    TWBoundary->setShowGrid(true);
+    TWBoundary->setRowCount(0);
+    TWBoundary->setColumnCount(2);
+    layoutWidget = new QWidget(GBBoundaryA);
+    layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
+    layoutWidget->setGeometry(QRect(410, 20, 120, 110));
+    verticalLayout_4 = new QVBoxLayout(layoutWidget);
+    verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
+    verticalLayout_4->setContentsMargins(0, 0, 0, 0);
+    PBBoundaryNew = new QPushButton(layoutWidget);
+    PBBoundaryNew->setObjectName(QString::fromUtf8("PBBoundaryNew"));
+    PBBoundaryNew->setAutoDefault(false);
+
+    verticalLayout_4->addWidget(PBBoundaryNew);
+
+    PBBoundaryEdit = new QPushButton(layoutWidget);
+    PBBoundaryEdit->setObjectName(QString::fromUtf8("PBBoundaryEdit"));
+    PBBoundaryEdit->setAutoDefault(false);
+
+    verticalLayout_4->addWidget(PBBoundaryEdit);
+
+    PBBoundaryDelete = new QPushButton(layoutWidget);
+    PBBoundaryDelete->setObjectName(QString::fromUtf8("PBBoundaryDelete"));
+    PBBoundaryDelete->setAutoDefault(false);
+
+    verticalLayout_4->addWidget(PBBoundaryDelete);
+
+
+    gridLayout_2->addWidget(GBBoundaryA, 12, 0, 1, 2);
+
+    GroupButtons = new QGroupBox(CreateCase);
+    GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
+    gridLayout = new QGridLayout(GroupButtons);
+    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+    buttonOk = new QPushButton(GroupButtons);
+    buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+    buttonOk->setAutoDefault(false);
+
+    gridLayout->addWidget(buttonOk, 0, 0, 1, 1);
+
+    buttonApply = new QPushButton(GroupButtons);
+    buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+    buttonApply->setAutoDefault(false);
+
+    gridLayout->addWidget(buttonApply, 0, 1, 1, 1);
+
+    buttonCancel = new QPushButton(GroupButtons);
+    buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+    buttonCancel->setAutoDefault(false);
+
+    gridLayout->addWidget(buttonCancel, 0, 2, 1, 1);
+
+    buttonHelp = new QPushButton(GroupButtons);
+    buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+    buttonHelp->setAutoDefault(false);
+
+    gridLayout->addWidget(buttonHelp, 0, 3, 1, 1);
+
+
+    gridLayout_2->addWidget(GroupButtons, 13, 0, 1, 2);
+
+    verticalSpacer_5 = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_5, 2, 1, 1, 1);
+
+
+    retranslateUi(CreateCase);
+
+    CBBoundaryDi->setCurrentIndex(-1);
+
+
+    QMetaObject::connectSlotsByName(CreateCase);
+    } // setupUi
+
+    void retranslateUi(QDialog *CreateCase)
+    {
+    CreateCase->setWindowTitle(QApplication::translate("CreateCase", "Create Case", 0, QApplication::UnicodeUTF8));
+    Name->setText(QApplication::translate("CreateCase", "Name", 0, QApplication::UnicodeUTF8));
+    Directory->setText(QApplication::translate("CreateCase", "Directory", 0, QApplication::UnicodeUTF8));
+    PushDir->setText(QString());
+    Mesh_2->setText(QApplication::translate("CreateCase", "Mesh", 0, QApplication::UnicodeUTF8));
+    PushFichier->setText(QString());
+    GBTypeConf->setTitle(QApplication::translate("CreateCase", "Conformity Type", 0, QApplication::UnicodeUTF8));
+    RBConforme->setText(QApplication::translate("CreateCase", "Conformal", 0, QApplication::UnicodeUTF8));
+    RBNonConforme->setText(QApplication::translate("CreateCase", "Non conformal", 0, QApplication::UnicodeUTF8));
+    GBTypeNoConf->setTitle(QApplication::translate("CreateCase", "Non Conformal option", 0, QApplication::UnicodeUTF8));
+    RB1NpM->setText(QApplication::translate("CreateCase", "1 hanging node per mesh", 0, QApplication::UnicodeUTF8));
+    RB1NpA->setText(QApplication::translate("CreateCase", "1 node per edge", 0, QApplication::UnicodeUTF8));
+    RBQuelconque->setText(QApplication::translate("CreateCase", "free", 0, QApplication::UnicodeUTF8));
+    CBBoundaryD->setText(QApplication::translate("CreateCase", "Discrete Boundary ", 0, QApplication::UnicodeUTF8));
+    CBBoundaryA->setText(QApplication::translate("CreateCase", "Analytic Boundary ", 0, QApplication::UnicodeUTF8));
+    GBBoundaryD->setTitle(QApplication::translate("CreateCase", "Discrete Boundary", 0, QApplication::UnicodeUTF8));
+    PBBoundaryDiEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8));
+    PBBoundaryDiNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8));
+    GBBoundaryA->setTitle(QApplication::translate("CreateCase", "Analytic Boundary", 0, QApplication::UnicodeUTF8));
+    TWBoundary->horizontalHeaderItem(0)->setText(QApplication::translate("CreateCase", "Group", 0, QApplication::UnicodeUTF8));
+    TWBoundary->horizontalHeaderItem(1)->setText(QApplication::translate("CreateCase", "Boundary", 0, QApplication::UnicodeUTF8));
+    PBBoundaryNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8));
+    PBBoundaryEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8));
+    PBBoundaryDelete->setText(QString());
+    GroupButtons->setTitle(QString());
+    buttonOk->setText(QApplication::translate("CreateCase", "&Ok", 0, QApplication::UnicodeUTF8));
+    buttonApply->setText(QApplication::translate("CreateCase", "&Apply", 0, QApplication::UnicodeUTF8));
+    buttonCancel->setText(QApplication::translate("CreateCase", "&Cancel", 0, QApplication::UnicodeUTF8));
+    buttonHelp->setText(QApplication::translate("CreateCase", "&Help", 0, QApplication::UnicodeUTF8));
+    Q_UNUSED(CreateCase);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class CreateCase: public Ui_CreateCase {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CREATECASE_H
diff --git a/src/HOMARDGUI/CreateCase.ui b/src/HOMARDGUI/CreateCase.ui
new file mode 100644 (file)
index 0000000..abfe1cf
--- /dev/null
@@ -0,0 +1,453 @@
+<ui version="4.0" >
+ <class>CreateCase</class>
+ <widget class="QDialog" name="CreateCase" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>589</width>
+    <height>675</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Create Case</string>
+  </property>
+  <property name="autoFillBackground" >
+   <bool>false</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2" >
+   <item row="0" column="0" colspan="2" >
+    <layout class="QHBoxLayout" name="horizontalLayout_5" >
+     <item>
+      <widget class="QLabel" name="Name" >
+       <property name="text" >
+        <string>Name</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LECaseName" >
+       <property name="minimumSize" >
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0" >
+    <layout class="QHBoxLayout" name="horizontalLayout_4" >
+     <item>
+      <widget class="QLabel" name="Directory" >
+       <property name="text" >
+        <string>Directory</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PushDir" >
+       <property name="text" >
+        <string/>
+       </property>
+       <property name="autoDefault" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LEDirName" >
+       <property name="minimumSize" >
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="3" column="0" colspan="2" >
+    <layout class="QHBoxLayout" name="horizontalLayout_3" >
+     <item>
+      <widget class="QLabel" name="Mesh_2" >
+       <property name="text" >
+        <string>Mesh</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PushFichier" >
+       <property name="text" >
+        <string/>
+       </property>
+       <property name="autoDefault" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LEFileName" >
+       <property name="minimumSize" >
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="4" column="0" >
+    <spacer name="verticalSpacer_2" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="5" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBTypeConf" >
+     <property name="title" >
+      <string>Conformity Type</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout" >
+      <item>
+       <widget class="QRadioButton" name="RBConforme" >
+        <property name="text" >
+         <string>Conformal</string>
+        </property>
+        <property name="checked" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBNonConforme" >
+        <property name="text" >
+         <string>Non conformal</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+     <zorder>RBNonConforme</zorder>
+     <zorder>RBConforme</zorder>
+    </widget>
+   </item>
+   <item row="6" column="0" >
+    <spacer name="verticalSpacer_3" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>1</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="7" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBTypeNoConf" >
+     <property name="title" >
+      <string>Non Conformal option</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2" >
+      <item>
+       <widget class="QRadioButton" name="RB1NpM" >
+        <property name="text" >
+         <string>1 hanging node per mesh</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RB1NpA" >
+        <property name="text" >
+         <string>1 node per edge</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBQuelconque" >
+        <property name="text" >
+         <string>free</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="8" column="0" >
+    <spacer name="verticalSpacer_4" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="9" column="0" >
+    <layout class="QHBoxLayout" name="horizontalLayout_6" >
+     <item>
+      <widget class="QCheckBox" name="CBBoundaryD" >
+       <property name="text" >
+        <string>Discrete Boundary </string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="CBBoundaryA" >
+       <property name="text" >
+        <string>Analytic Boundary </string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="10" column="0" >
+    <spacer name="verticalSpacer_7" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="11" column="0" >
+    <widget class="QGroupBox" name="GBBoundaryD" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string>Discrete Boundary</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3" >
+      <item row="0" column="0" >
+       <widget class="QComboBox" name="CBBoundaryDi" >
+        <property name="currentIndex" >
+         <number>-1</number>
+        </property>
+        <property name="sizeAdjustPolicy" >
+         <enum>QComboBox::AdjustToContents</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <spacer name="spacer_2" >
+        <property name="orientation" >
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeType" >
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>40</width>
+          <height>13</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="PBBoundaryDiEdit" >
+        <property name="text" >
+         <string>Edit</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" >
+       <widget class="QPushButton" name="PBBoundaryDiNew" >
+        <property name="text" >
+         <string>New</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="12" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBBoundaryA" >
+     <property name="minimumSize" >
+      <size>
+       <width>548</width>
+       <height>150</height>
+      </size>
+     </property>
+     <property name="title" >
+      <string>Analytic Boundary</string>
+     </property>
+     <widget class="QTableWidget" name="TWBoundary" >
+      <property name="geometry" >
+       <rect>
+        <x>4</x>
+        <y>20</y>
+        <width>371</width>
+        <height>121</height>
+       </rect>
+      </property>
+      <property name="autoScrollMargin" >
+       <number>16</number>
+      </property>
+      <property name="editTriggers" >
+       <set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
+      </property>
+      <property name="showGrid" >
+       <bool>true</bool>
+      </property>
+      <property name="rowCount" >
+       <number>0</number>
+      </property>
+      <property name="columnCount" >
+       <number>2</number>
+      </property>
+      <column>
+       <property name="text" >
+        <string>Group</string>
+       </property>
+      </column>
+      <column>
+       <property name="text" >
+        <string>Boundary</string>
+       </property>
+      </column>
+     </widget>
+     <widget class="QWidget" name="layoutWidget" >
+      <property name="geometry" >
+       <rect>
+        <x>410</x>
+        <y>20</y>
+        <width>120</width>
+        <height>110</height>
+       </rect>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_4" >
+       <item>
+        <widget class="QPushButton" name="PBBoundaryNew" >
+         <property name="text" >
+          <string>New</string>
+         </property>
+         <property name="autoDefault" >
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="PBBoundaryEdit" >
+         <property name="text" >
+          <string>Edit</string>
+         </property>
+         <property name="autoDefault" >
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="PBBoundaryDelete" >
+         <property name="text" >
+          <string/>
+         </property>
+         <property name="autoDefault" >
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item row="13" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GroupButtons" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout" >
+      <item row="0" column="0" >
+       <widget class="QPushButton" name="buttonOk" >
+        <property name="text" >
+         <string>&amp;Ok</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="buttonApply" >
+        <property name="text" >
+         <string>&amp;Apply</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="buttonCancel" >
+        <property name="text" >
+         <string>&amp;Cancel</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" >
+       <widget class="QPushButton" name="buttonHelp" >
+        <property name="text" >
+         <string>&amp;Help</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="1" >
+    <spacer name="verticalSpacer_5" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>18</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/CreateHypothesis.h b/src/HOMARDGUI/CreateHypothesis.h
new file mode 100644 (file)
index 0000000..1d10a3f
--- /dev/null
@@ -0,0 +1,589 @@
+/********************************************************************************
+** Form generated from reading ui file 'CreateHypothesis.ui'
+**
+** Created: Thu Nov 18 15:21:42 2010
+**      by: Qt User Interface Compiler version 4.4.3
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef CREATEHYPOTHESIS_H
+#define CREATEHYPOTHESIS_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QDialog>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QTableWidget>
+#include <QtGui/QVBoxLayout>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CreateHypothesis
+{
+public:
+    QGridLayout *gridLayout_10;
+    QLabel *Name;
+    QLineEdit *LEHypothesisName;
+    QGroupBox *GBTypeAdaptation;
+    QHBoxLayout *horizontalLayout;
+    QRadioButton *RBUniforme;
+    QRadioButton *RBChamp;
+    QRadioButton *RBZone;
+    QGroupBox *GBUniform;
+    QGridLayout *gridLayout_2;
+    QRadioButton *RBUniDera;
+    QRadioButton *RBUniRaff;
+    QGroupBox *GBFieldFile;
+    QGridLayout *gridLayout_9;
+    QLabel *FieldFile;
+    QLineEdit *LEFieldFile;
+    QGroupBox *GBFieldManagement;
+    QGridLayout *gridLayout_6;
+    QHBoxLayout *horizontalLayout_6;
+    QLabel *FieldName;
+    QComboBox *CBFieldName;
+    QSpacerItem *horizontalSpacer_3;
+    QHBoxLayout *horizontalLayout_7;
+    QTableWidget *TWCMP;
+    QSpacerItem *horizontalSpacer_4;
+    QVBoxLayout *verticalLayout_3;
+    QHBoxLayout *horizontalLayout_3;
+    QRadioButton *RBL2;
+    QRadioButton *RBInf;
+    QHBoxLayout *horizontalLayout_2;
+    QGroupBox *GBRefinementThresholds;
+    QGridLayout *gridLayout;
+    QRadioButton *RBRPE;
+    QDoubleSpinBox *SpinBox_RPE;
+    QRadioButton *RBRRel;
+    QDoubleSpinBox *SpinBox_RRel;
+    QRadioButton *RBRAbs;
+    QDoubleSpinBox *SpinBox_RAbs;
+    QRadioButton *RBRNo;
+    QGroupBox *GBCoarseningThresholds;
+    QGridLayout *gridLayout_4;
+    QRadioButton *RBCPE;
+    QDoubleSpinBox *SpinBox_CPE;
+    QRadioButton *RBCRel;
+    QDoubleSpinBox *SpinBox_CRel;
+    QRadioButton *RBCAbs;
+    QDoubleSpinBox *SpinBox_CAbs;
+    QRadioButton *RBCNo;
+    QGroupBox *GBAreaManagement;
+    QGridLayout *gridLayout_3;
+    QTableWidget *TWZone;
+    QVBoxLayout *verticalLayout_2;
+    QVBoxLayout *verticalLayout;
+    QPushButton *PBZoneNew;
+    QPushButton *PBZoneEdit;
+    QPushButton *PBZoneDelete;
+    QSpacerItem *verticalSpacer;
+    QGroupBox *GBField;
+    QGridLayout *gridLayout_8;
+    QGridLayout *gridLayout_7;
+    QRadioButton *RBFieldNo;
+    QRadioButton *RBFieldAll;
+    QRadioButton *RBFieldChosen;
+    QTableWidget *TWField;
+    QCheckBox *CBGroupe;
+    QGroupBox *GBButtons;
+    QGridLayout *gridLayout_5;
+    QPushButton *buttonOk;
+    QPushButton *buttonApply;
+    QPushButton *buttonCancel;
+    QPushButton *buttonHelp;
+
+    void setupUi(QDialog *CreateHypothesis)
+    {
+    if (CreateHypothesis->objectName().isEmpty())
+        CreateHypothesis->setObjectName(QString::fromUtf8("CreateHypothesis"));
+    CreateHypothesis->resize(717, 1005);
+    QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    sizePolicy.setHorizontalStretch(0);
+    sizePolicy.setVerticalStretch(0);
+    sizePolicy.setHeightForWidth(CreateHypothesis->sizePolicy().hasHeightForWidth());
+    CreateHypothesis->setSizePolicy(sizePolicy);
+    CreateHypothesis->setAutoFillBackground(false);
+    CreateHypothesis->setSizeGripEnabled(true);
+    gridLayout_10 = new QGridLayout(CreateHypothesis);
+    gridLayout_10->setObjectName(QString::fromUtf8("gridLayout_10"));
+    Name = new QLabel(CreateHypothesis);
+    Name->setObjectName(QString::fromUtf8("Name"));
+
+    gridLayout_10->addWidget(Name, 0, 0, 1, 1);
+
+    LEHypothesisName = new QLineEdit(CreateHypothesis);
+    LEHypothesisName->setObjectName(QString::fromUtf8("LEHypothesisName"));
+    LEHypothesisName->setMinimumSize(QSize(382, 31));
+    LEHypothesisName->setMaxLength(32);
+
+    gridLayout_10->addWidget(LEHypothesisName, 0, 1, 1, 1);
+
+    GBTypeAdaptation = new QGroupBox(CreateHypothesis);
+    GBTypeAdaptation->setObjectName(QString::fromUtf8("GBTypeAdaptation"));
+    horizontalLayout = new QHBoxLayout(GBTypeAdaptation);
+    horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+    RBUniforme = new QRadioButton(GBTypeAdaptation);
+    RBUniforme->setObjectName(QString::fromUtf8("RBUniforme"));
+    RBUniforme->setCheckable(true);
+
+    horizontalLayout->addWidget(RBUniforme);
+
+    RBChamp = new QRadioButton(GBTypeAdaptation);
+    RBChamp->setObjectName(QString::fromUtf8("RBChamp"));
+
+    horizontalLayout->addWidget(RBChamp);
+
+    RBZone = new QRadioButton(GBTypeAdaptation);
+    RBZone->setObjectName(QString::fromUtf8("RBZone"));
+
+    horizontalLayout->addWidget(RBZone);
+
+
+    gridLayout_10->addWidget(GBTypeAdaptation, 1, 0, 1, 2);
+
+    GBUniform = new QGroupBox(CreateHypothesis);
+    GBUniform->setObjectName(QString::fromUtf8("GBUniform"));
+    gridLayout_2 = new QGridLayout(GBUniform);
+    gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+    RBUniDera = new QRadioButton(GBUniform);
+    RBUniDera->setObjectName(QString::fromUtf8("RBUniDera"));
+
+    gridLayout_2->addWidget(RBUniDera, 0, 1, 1, 1);
+
+    RBUniRaff = new QRadioButton(GBUniform);
+    RBUniRaff->setObjectName(QString::fromUtf8("RBUniRaff"));
+    RBUniRaff->setChecked(true);
+
+    gridLayout_2->addWidget(RBUniRaff, 0, 0, 1, 1);
+
+
+    gridLayout_10->addWidget(GBUniform, 2, 0, 1, 2);
+
+    GBFieldFile = new QGroupBox(CreateHypothesis);
+    GBFieldFile->setObjectName(QString::fromUtf8("GBFieldFile"));
+    gridLayout_9 = new QGridLayout(GBFieldFile);
+    gridLayout_9->setObjectName(QString::fromUtf8("gridLayout_9"));
+    FieldFile = new QLabel(GBFieldFile);
+    FieldFile->setObjectName(QString::fromUtf8("FieldFile"));
+
+    gridLayout_9->addWidget(FieldFile, 0, 0, 1, 1);
+
+    LEFieldFile = new QLineEdit(GBFieldFile);
+    LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile"));
+    LEFieldFile->setMinimumSize(QSize(282, 31));
+
+    gridLayout_9->addWidget(LEFieldFile, 0, 1, 1, 1);
+
+
+    gridLayout_10->addWidget(GBFieldFile, 3, 0, 1, 2);
+
+    GBFieldManagement = new QGroupBox(CreateHypothesis);
+    GBFieldManagement->setObjectName(QString::fromUtf8("GBFieldManagement"));
+    sizePolicy.setHeightForWidth(GBFieldManagement->sizePolicy().hasHeightForWidth());
+    GBFieldManagement->setSizePolicy(sizePolicy);
+    gridLayout_6 = new QGridLayout(GBFieldManagement);
+    gridLayout_6->setObjectName(QString::fromUtf8("gridLayout_6"));
+    horizontalLayout_6 = new QHBoxLayout();
+    horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
+    FieldName = new QLabel(GBFieldManagement);
+    FieldName->setObjectName(QString::fromUtf8("FieldName"));
+
+    horizontalLayout_6->addWidget(FieldName);
+
+    CBFieldName = new QComboBox(GBFieldManagement);
+    CBFieldName->setObjectName(QString::fromUtf8("CBFieldName"));
+    QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Fixed);
+    sizePolicy1.setHorizontalStretch(0);
+    sizePolicy1.setVerticalStretch(0);
+    sizePolicy1.setHeightForWidth(CBFieldName->sizePolicy().hasHeightForWidth());
+    CBFieldName->setSizePolicy(sizePolicy1);
+    CBFieldName->setEditable(false);
+    CBFieldName->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+
+    horizontalLayout_6->addWidget(CBFieldName);
+
+    horizontalSpacer_3 = new QSpacerItem(48, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+    horizontalLayout_6->addItem(horizontalSpacer_3);
+
+
+    gridLayout_6->addLayout(horizontalLayout_6, 0, 0, 1, 1);
+
+    horizontalLayout_7 = new QHBoxLayout();
+    horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7"));
+    TWCMP = new QTableWidget(GBFieldManagement);
+    if (TWCMP->columnCount() < 2)
+        TWCMP->setColumnCount(2);
+    QTableWidgetItem *__colItem = new QTableWidgetItem();
+    TWCMP->setHorizontalHeaderItem(0, __colItem);
+    QTableWidgetItem *__colItem1 = new QTableWidgetItem();
+    TWCMP->setHorizontalHeaderItem(1, __colItem1);
+    TWCMP->setObjectName(QString::fromUtf8("TWCMP"));
+    TWCMP->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked);
+    TWCMP->setShowGrid(true);
+    TWCMP->setRowCount(0);
+    TWCMP->setColumnCount(2);
+
+    horizontalLayout_7->addWidget(TWCMP);
+
+    horizontalSpacer_4 = new QSpacerItem(60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+    horizontalLayout_7->addItem(horizontalSpacer_4);
+
+    verticalLayout_3 = new QVBoxLayout();
+    verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
+    horizontalLayout_3 = new QHBoxLayout();
+    horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
+    RBL2 = new QRadioButton(GBFieldManagement);
+    RBL2->setObjectName(QString::fromUtf8("RBL2"));
+    RBL2->setChecked(true);
+
+    horizontalLayout_3->addWidget(RBL2);
+
+    RBInf = new QRadioButton(GBFieldManagement);
+    RBInf->setObjectName(QString::fromUtf8("RBInf"));
+    RBInf->setChecked(false);
+
+    horizontalLayout_3->addWidget(RBInf);
+
+
+    verticalLayout_3->addLayout(horizontalLayout_3);
+
+
+    horizontalLayout_7->addLayout(verticalLayout_3);
+
+
+    gridLayout_6->addLayout(horizontalLayout_7, 1, 0, 1, 1);
+
+    horizontalLayout_2 = new QHBoxLayout();
+    horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
+    GBRefinementThresholds = new QGroupBox(GBFieldManagement);
+    GBRefinementThresholds->setObjectName(QString::fromUtf8("GBRefinementThresholds"));
+    sizePolicy.setHeightForWidth(GBRefinementThresholds->sizePolicy().hasHeightForWidth());
+    GBRefinementThresholds->setSizePolicy(sizePolicy);
+    gridLayout = new QGridLayout(GBRefinementThresholds);
+    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+    RBRPE = new QRadioButton(GBRefinementThresholds);
+    RBRPE->setObjectName(QString::fromUtf8("RBRPE"));
+    RBRPE->setCheckable(true);
+    RBRPE->setChecked(true);
+
+    gridLayout->addWidget(RBRPE, 0, 0, 1, 1);
+
+    SpinBox_RPE = new QDoubleSpinBox(GBRefinementThresholds);
+    SpinBox_RPE->setObjectName(QString::fromUtf8("SpinBox_RPE"));
+    SpinBox_RPE->setDecimals(3);
+    SpinBox_RPE->setMaximum(100);
+    SpinBox_RPE->setSingleStep(0.1);
+    SpinBox_RPE->setValue(3);
+
+    gridLayout->addWidget(SpinBox_RPE, 0, 1, 1, 1);
+
+    RBRRel = new QRadioButton(GBRefinementThresholds);
+    RBRRel->setObjectName(QString::fromUtf8("RBRRel"));
+
+    gridLayout->addWidget(RBRRel, 1, 0, 1, 1);
+
+    SpinBox_RRel = new QDoubleSpinBox(GBRefinementThresholds);
+    SpinBox_RRel->setObjectName(QString::fromUtf8("SpinBox_RRel"));
+    SpinBox_RRel->setEnabled(false);
+    SpinBox_RRel->setDecimals(3);
+    SpinBox_RRel->setMaximum(100);
+    SpinBox_RRel->setSingleStep(0.1);
+
+    gridLayout->addWidget(SpinBox_RRel, 1, 1, 1, 1);
+
+    RBRAbs = new QRadioButton(GBRefinementThresholds);
+    RBRAbs->setObjectName(QString::fromUtf8("RBRAbs"));
+
+    gridLayout->addWidget(RBRAbs, 2, 0, 1, 1);
+
+    SpinBox_RAbs = new QDoubleSpinBox(GBRefinementThresholds);
+    SpinBox_RAbs->setObjectName(QString::fromUtf8("SpinBox_RAbs"));
+    SpinBox_RAbs->setEnabled(false);
+    SpinBox_RAbs->setDecimals(3);
+    SpinBox_RAbs->setMaximum(100);
+    SpinBox_RAbs->setSingleStep(0.1);
+
+    gridLayout->addWidget(SpinBox_RAbs, 2, 1, 1, 1);
+
+    RBRNo = new QRadioButton(GBRefinementThresholds);
+    RBRNo->setObjectName(QString::fromUtf8("RBRNo"));
+
+    gridLayout->addWidget(RBRNo, 3, 0, 1, 1);
+
+
+    horizontalLayout_2->addWidget(GBRefinementThresholds);
+
+    GBCoarseningThresholds = new QGroupBox(GBFieldManagement);
+    GBCoarseningThresholds->setObjectName(QString::fromUtf8("GBCoarseningThresholds"));
+    gridLayout_4 = new QGridLayout(GBCoarseningThresholds);
+    gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
+    RBCPE = new QRadioButton(GBCoarseningThresholds);
+    RBCPE->setObjectName(QString::fromUtf8("RBCPE"));
+    RBCPE->setCheckable(true);
+    RBCPE->setChecked(false);
+
+    gridLayout_4->addWidget(RBCPE, 0, 0, 1, 1);
+
+    SpinBox_CPE = new QDoubleSpinBox(GBCoarseningThresholds);
+    SpinBox_CPE->setObjectName(QString::fromUtf8("SpinBox_CPE"));
+    SpinBox_CPE->setEnabled(false);
+    SpinBox_CPE->setDecimals(3);
+    SpinBox_CPE->setMaximum(100);
+    SpinBox_CPE->setSingleStep(0.1);
+
+    gridLayout_4->addWidget(SpinBox_CPE, 0, 1, 1, 1);
+
+    RBCRel = new QRadioButton(GBCoarseningThresholds);
+    RBCRel->setObjectName(QString::fromUtf8("RBCRel"));
+
+    gridLayout_4->addWidget(RBCRel, 1, 0, 1, 1);
+
+    SpinBox_CRel = new QDoubleSpinBox(GBCoarseningThresholds);
+    SpinBox_CRel->setObjectName(QString::fromUtf8("SpinBox_CRel"));
+    SpinBox_CRel->setEnabled(false);
+    SpinBox_CRel->setDecimals(3);
+    SpinBox_CRel->setMaximum(100);
+    SpinBox_CRel->setSingleStep(0.1);
+
+    gridLayout_4->addWidget(SpinBox_CRel, 1, 1, 1, 1);
+
+    RBCAbs = new QRadioButton(GBCoarseningThresholds);
+    RBCAbs->setObjectName(QString::fromUtf8("RBCAbs"));
+
+    gridLayout_4->addWidget(RBCAbs, 2, 0, 1, 1);
+
+    SpinBox_CAbs = new QDoubleSpinBox(GBCoarseningThresholds);
+    SpinBox_CAbs->setObjectName(QString::fromUtf8("SpinBox_CAbs"));
+    SpinBox_CAbs->setEnabled(false);
+    SpinBox_CAbs->setDecimals(3);
+    SpinBox_CAbs->setMaximum(100);
+    SpinBox_CAbs->setSingleStep(0.1);
+
+    gridLayout_4->addWidget(SpinBox_CAbs, 2, 1, 1, 1);
+
+    RBCNo = new QRadioButton(GBCoarseningThresholds);
+    RBCNo->setObjectName(QString::fromUtf8("RBCNo"));
+    RBCNo->setChecked(true);
+
+    gridLayout_4->addWidget(RBCNo, 3, 0, 1, 1);
+
+
+    horizontalLayout_2->addWidget(GBCoarseningThresholds);
+
+
+    gridLayout_6->addLayout(horizontalLayout_2, 2, 0, 1, 1);
+
+
+    gridLayout_10->addWidget(GBFieldManagement, 4, 0, 1, 2);
+
+    GBAreaManagement = new QGroupBox(CreateHypothesis);
+    GBAreaManagement->setObjectName(QString::fromUtf8("GBAreaManagement"));
+    sizePolicy.setHeightForWidth(GBAreaManagement->sizePolicy().hasHeightForWidth());
+    GBAreaManagement->setSizePolicy(sizePolicy);
+    gridLayout_3 = new QGridLayout(GBAreaManagement);
+    gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
+    TWZone = new QTableWidget(GBAreaManagement);
+    if (TWZone->columnCount() < 2)
+        TWZone->setColumnCount(2);
+    QTableWidgetItem *__colItem2 = new QTableWidgetItem();
+    TWZone->setHorizontalHeaderItem(0, __colItem2);
+    QTableWidgetItem *__colItem3 = new QTableWidgetItem();
+    TWZone->setHorizontalHeaderItem(1, __colItem3);
+    TWZone->setObjectName(QString::fromUtf8("TWZone"));
+    TWZone->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked);
+    TWZone->setShowGrid(true);
+    TWZone->setRowCount(0);
+    TWZone->setColumnCount(2);
+
+    gridLayout_3->addWidget(TWZone, 0, 0, 1, 1);
+
+    verticalLayout_2 = new QVBoxLayout();
+    verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
+    verticalLayout = new QVBoxLayout();
+    verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+    PBZoneNew = new QPushButton(GBAreaManagement);
+    PBZoneNew->setObjectName(QString::fromUtf8("PBZoneNew"));
+
+    verticalLayout->addWidget(PBZoneNew);
+
+    PBZoneEdit = new QPushButton(GBAreaManagement);
+    PBZoneEdit->setObjectName(QString::fromUtf8("PBZoneEdit"));
+
+    verticalLayout->addWidget(PBZoneEdit);
+
+    PBZoneDelete = new QPushButton(GBAreaManagement);
+    PBZoneDelete->setObjectName(QString::fromUtf8("PBZoneDelete"));
+
+    verticalLayout->addWidget(PBZoneDelete);
+
+
+    verticalLayout_2->addLayout(verticalLayout);
+
+    verticalSpacer = new QSpacerItem(20, 48, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    verticalLayout_2->addItem(verticalSpacer);
+
+
+    gridLayout_3->addLayout(verticalLayout_2, 0, 1, 1, 1);
+
+
+    gridLayout_10->addWidget(GBAreaManagement, 5, 0, 1, 2);
+
+    GBField = new QGroupBox(CreateHypothesis);
+    GBField->setObjectName(QString::fromUtf8("GBField"));
+    gridLayout_8 = new QGridLayout(GBField);
+    gridLayout_8->setObjectName(QString::fromUtf8("gridLayout_8"));
+    gridLayout_7 = new QGridLayout();
+    gridLayout_7->setObjectName(QString::fromUtf8("gridLayout_7"));
+    RBFieldNo = new QRadioButton(GBField);
+    RBFieldNo->setObjectName(QString::fromUtf8("RBFieldNo"));
+    RBFieldNo->setChecked(true);
+
+    gridLayout_7->addWidget(RBFieldNo, 0, 0, 1, 1);
+
+    RBFieldAll = new QRadioButton(GBField);
+    RBFieldAll->setObjectName(QString::fromUtf8("RBFieldAll"));
+    RBFieldAll->setChecked(false);
+
+    gridLayout_7->addWidget(RBFieldAll, 0, 1, 1, 1);
+
+    RBFieldChosen = new QRadioButton(GBField);
+    RBFieldChosen->setObjectName(QString::fromUtf8("RBFieldChosen"));
+    RBFieldChosen->setChecked(false);
+
+    gridLayout_7->addWidget(RBFieldChosen, 0, 2, 1, 1);
+
+
+    gridLayout_8->addLayout(gridLayout_7, 0, 0, 1, 1);
+
+    TWField = new QTableWidget(GBField);
+    if (TWField->columnCount() < 2)
+        TWField->setColumnCount(2);
+    QTableWidgetItem *__colItem4 = new QTableWidgetItem();
+    TWField->setHorizontalHeaderItem(0, __colItem4);
+    QTableWidgetItem *__colItem5 = new QTableWidgetItem();
+    TWField->setHorizontalHeaderItem(1, __colItem5);
+    TWField->setObjectName(QString::fromUtf8("TWField"));
+
+    gridLayout_8->addWidget(TWField, 1, 0, 1, 1);
+
+
+    gridLayout_10->addWidget(GBField, 6, 0, 1, 2);
+
+    CBGroupe = new QCheckBox(CreateHypothesis);
+    CBGroupe->setObjectName(QString::fromUtf8("CBGroupe"));
+
+    gridLayout_10->addWidget(CBGroupe, 7, 0, 1, 2);
+
+    GBButtons = new QGroupBox(CreateHypothesis);
+    GBButtons->setObjectName(QString::fromUtf8("GBButtons"));
+    gridLayout_5 = new QGridLayout(GBButtons);
+    gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
+    buttonOk = new QPushButton(GBButtons);
+    buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+
+    gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1);
+
+    buttonApply = new QPushButton(GBButtons);
+    buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+
+    gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1);
+
+    buttonCancel = new QPushButton(GBButtons);
+    buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+
+    gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1);
+
+    buttonHelp = new QPushButton(GBButtons);
+    buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+
+    gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1);
+
+
+    gridLayout_10->addWidget(GBButtons, 8, 0, 1, 2);
+
+
+    retranslateUi(CreateHypothesis);
+
+    QMetaObject::connectSlotsByName(CreateHypothesis);
+    } // setupUi
+
+    void retranslateUi(QDialog *CreateHypothesis)
+    {
+    CreateHypothesis->setWindowTitle(QApplication::translate("CreateHypothesis", "Create Hypothesis", 0, QApplication::UnicodeUTF8));
+    Name->setText(QApplication::translate("CreateHypothesis", "Name", 0, QApplication::UnicodeUTF8));
+    GBTypeAdaptation->setTitle(QApplication::translate("CreateHypothesis", "Type of adaptation", 0, QApplication::UnicodeUTF8));
+    RBUniforme->setText(QApplication::translate("CreateHypothesis", "Uniform", 0, QApplication::UnicodeUTF8));
+    RBChamp->setText(QApplication::translate("CreateHypothesis", "Following a field", 0, QApplication::UnicodeUTF8));
+    RBZone->setText(QApplication::translate("CreateHypothesis", "With geometrical zones", 0, QApplication::UnicodeUTF8));
+    GBUniform->setTitle(QApplication::translate("CreateHypothesis", "Uniform adaptation", 0, QApplication::UnicodeUTF8));
+    RBUniDera->setText(QApplication::translate("CreateHypothesis", "Coarsening", 0, QApplication::UnicodeUTF8));
+    RBUniRaff->setText(QApplication::translate("CreateHypothesis", "Refinement", 0, QApplication::UnicodeUTF8));
+    GBFieldFile->setTitle(QString());
+    FieldFile->setText(QApplication::translate("CreateHypothesis", "File of the fields", 0, QApplication::UnicodeUTF8));
+    GBFieldManagement->setTitle(QApplication::translate("CreateHypothesis", "Governing field for the adaptation", 0, QApplication::UnicodeUTF8));
+    FieldName->setText(QApplication::translate("CreateHypothesis", "Field Name", 0, QApplication::UnicodeUTF8));
+    TWCMP->horizontalHeaderItem(0)->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8));
+    TWCMP->horizontalHeaderItem(1)->setText(QApplication::translate("CreateHypothesis", "Component", 0, QApplication::UnicodeUTF8));
+    RBL2->setText(QApplication::translate("CreateHypothesis", "L2 norm", 0, QApplication::UnicodeUTF8));
+    RBInf->setText(QApplication::translate("CreateHypothesis", "Infinite norm", 0, QApplication::UnicodeUTF8));
+    GBRefinementThresholds->setTitle(QApplication::translate("CreateHypothesis", "Refinement thresholds", 0, QApplication::UnicodeUTF8));
+    RBRPE->setText(QApplication::translate("CreateHypothesis", "Percentage of meshes", 0, QApplication::UnicodeUTF8));
+    SpinBox_RPE->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8));
+    RBRRel->setText(QApplication::translate("CreateHypothesis", "Relative", 0, QApplication::UnicodeUTF8));
+    SpinBox_RRel->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8));
+    RBRAbs->setText(QApplication::translate("CreateHypothesis", "Absolute", 0, QApplication::UnicodeUTF8));
+    RBRNo->setText(QApplication::translate("CreateHypothesis", "No refinement", 0, QApplication::UnicodeUTF8));
+    GBCoarseningThresholds->setTitle(QApplication::translate("CreateHypothesis", "Coarsening thresholds", 0, QApplication::UnicodeUTF8));
+    RBCPE->setText(QApplication::translate("CreateHypothesis", "Percentage of meshes", 0, QApplication::UnicodeUTF8));
+    SpinBox_CPE->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8));
+    RBCRel->setText(QApplication::translate("CreateHypothesis", "Relative", 0, QApplication::UnicodeUTF8));
+    SpinBox_CRel->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8));
+    RBCAbs->setText(QApplication::translate("CreateHypothesis", "Absolute", 0, QApplication::UnicodeUTF8));
+    RBCNo->setText(QApplication::translate("CreateHypothesis", "No coarsening", 0, QApplication::UnicodeUTF8));
+    GBAreaManagement->setTitle(QApplication::translate("CreateHypothesis", "Area management", 0, QApplication::UnicodeUTF8));
+    TWZone->horizontalHeaderItem(0)->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8));
+    TWZone->horizontalHeaderItem(1)->setText(QApplication::translate("CreateHypothesis", "Zone name", 0, QApplication::UnicodeUTF8));
+    PBZoneNew->setText(QApplication::translate("CreateHypothesis", "New", 0, QApplication::UnicodeUTF8));
+    PBZoneEdit->setText(QApplication::translate("CreateHypothesis", "Edit", 0, QApplication::UnicodeUTF8));
+    PBZoneDelete->setText(QString());
+    GBField->setTitle(QApplication::translate("CreateHypothesis", "Field Interpolation", 0, QApplication::UnicodeUTF8));
+    RBFieldNo->setText(QApplication::translate("CreateHypothesis", "None", 0, QApplication::UnicodeUTF8));
+    RBFieldAll->setText(QApplication::translate("CreateHypothesis", "All", 0, QApplication::UnicodeUTF8));
+    RBFieldChosen->setText(QApplication::translate("CreateHypothesis", "Chosen", 0, QApplication::UnicodeUTF8));
+    TWField->horizontalHeaderItem(0)->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8));
+    TWField->horizontalHeaderItem(1)->setText(QApplication::translate("CreateHypothesis", "Field Name", 0, QApplication::UnicodeUTF8));
+    CBGroupe->setText(QApplication::translate("CreateHypothesis", "Filtering with groups", 0, QApplication::UnicodeUTF8));
+    GBButtons->setTitle(QString());
+    buttonOk->setText(QApplication::translate("CreateHypothesis", "&Ok", 0, QApplication::UnicodeUTF8));
+    buttonApply->setText(QApplication::translate("CreateHypothesis", "&Apply", 0, QApplication::UnicodeUTF8));
+    buttonCancel->setText(QApplication::translate("CreateHypothesis", "&Cancel", 0, QApplication::UnicodeUTF8));
+    buttonHelp->setText(QApplication::translate("CreateHypothesis", "&Help", 0, QApplication::UnicodeUTF8));
+    Q_UNUSED(CreateHypothesis);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class CreateHypothesis: public Ui_CreateHypothesis {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CREATEHYPOTHESIS_H
diff --git a/src/HOMARDGUI/CreateHypothesis.ui b/src/HOMARDGUI/CreateHypothesis.ui
new file mode 100644 (file)
index 0000000..7e5bc80
--- /dev/null
@@ -0,0 +1,654 @@
+<ui version="4.0" >
+ <class>CreateHypothesis</class>
+ <widget class="QDialog" name="CreateHypothesis" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>717</width>
+    <height>1005</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Create Hypothesis</string>
+  </property>
+  <property name="autoFillBackground" >
+   <bool>false</bool>
+  </property>
+  <property name="sizeGripEnabled" >
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_10" >
+   <item row="0" column="0" >
+    <widget class="QLabel" name="Name" >
+     <property name="text" >
+      <string>Name</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" >
+    <widget class="QLineEdit" name="LEHypothesisName" >
+     <property name="minimumSize" >
+      <size>
+       <width>382</width>
+       <height>31</height>
+      </size>
+     </property>
+     <property name="maxLength" >
+      <number>32</number>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBTypeAdaptation" >
+     <property name="title" >
+      <string>Type of adaptation</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout" >
+      <item>
+       <widget class="QRadioButton" name="RBUniforme" >
+        <property name="text" >
+         <string>Uniform</string>
+        </property>
+        <property name="checkable" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBChamp" >
+        <property name="text" >
+         <string>Following a field</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBZone" >
+        <property name="text" >
+         <string>With geometrical zones</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBUniform" >
+     <property name="title" >
+      <string>Uniform adaptation</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2" >
+      <item row="0" column="1" >
+       <widget class="QRadioButton" name="RBUniDera" >
+        <property name="text" >
+         <string>Coarsening</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QRadioButton" name="RBUniRaff" >
+        <property name="text" >
+         <string>Refinement</string>
+        </property>
+        <property name="checked" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBFieldFile" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_9" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="FieldFile" >
+        <property name="text" >
+         <string>File of the fields</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QLineEdit" name="LEFieldFile" >
+        <property name="minimumSize" >
+         <size>
+          <width>282</width>
+          <height>31</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBFieldManagement" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string>Governing field for the adaptation</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_6" >
+      <item row="0" column="0" >
+       <layout class="QHBoxLayout" name="horizontalLayout_6" >
+        <item>
+         <widget class="QLabel" name="FieldName" >
+          <property name="text" >
+           <string>Field Name</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QComboBox" name="CBFieldName" >
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="editable" >
+           <bool>false</bool>
+          </property>
+          <property name="sizeAdjustPolicy" >
+           <enum>QComboBox::AdjustToContents</enum>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_3" >
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>48</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0" >
+       <layout class="QHBoxLayout" name="horizontalLayout_7" >
+        <item>
+         <widget class="QTableWidget" name="TWCMP" >
+          <property name="editTriggers" >
+           <set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
+          </property>
+          <property name="showGrid" >
+           <bool>true</bool>
+          </property>
+          <property name="rowCount" >
+           <number>0</number>
+          </property>
+          <property name="columnCount" >
+           <number>2</number>
+          </property>
+          <column>
+           <property name="text" >
+            <string>Selection</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Component</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_4" >
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>60</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_3" >
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_3" >
+            <item>
+             <widget class="QRadioButton" name="RBL2" >
+              <property name="text" >
+               <string>L2 norm</string>
+              </property>
+              <property name="checked" >
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QRadioButton" name="RBInf" >
+              <property name="text" >
+               <string>Infinite norm</string>
+              </property>
+              <property name="checked" >
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+      <item row="2" column="0" >
+       <layout class="QHBoxLayout" name="horizontalLayout_2" >
+        <item>
+         <widget class="QGroupBox" name="GBRefinementThresholds" >
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="title" >
+           <string>Refinement thresholds</string>
+          </property>
+          <layout class="QGridLayout" name="gridLayout" >
+           <item row="0" column="0" >
+            <widget class="QRadioButton" name="RBRPE" >
+             <property name="text" >
+              <string>Percentage of meshes</string>
+             </property>
+             <property name="checkable" >
+              <bool>true</bool>
+             </property>
+             <property name="checked" >
+              <bool>true</bool>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1" >
+            <widget class="QDoubleSpinBox" name="SpinBox_RPE" >
+             <property name="suffix" >
+              <string> %</string>
+             </property>
+             <property name="decimals" >
+              <number>3</number>
+             </property>
+             <property name="maximum" >
+              <double>100.000000000000000</double>
+             </property>
+             <property name="singleStep" >
+              <double>0.100000000000000</double>
+             </property>
+             <property name="value" >
+              <double>3.000000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0" >
+            <widget class="QRadioButton" name="RBRRel" >
+             <property name="text" >
+              <string>Relative</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1" >
+            <widget class="QDoubleSpinBox" name="SpinBox_RRel" >
+             <property name="enabled" >
+              <bool>false</bool>
+             </property>
+             <property name="suffix" >
+              <string> %</string>
+             </property>
+             <property name="decimals" >
+              <number>3</number>
+             </property>
+             <property name="maximum" >
+              <double>100.000000000000000</double>
+             </property>
+             <property name="singleStep" >
+              <double>0.100000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0" >
+            <widget class="QRadioButton" name="RBRAbs" >
+             <property name="text" >
+              <string>Absolute</string>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="1" >
+            <widget class="QDoubleSpinBox" name="SpinBox_RAbs" >
+             <property name="enabled" >
+              <bool>false</bool>
+             </property>
+             <property name="decimals" >
+              <number>3</number>
+             </property>
+             <property name="maximum" >
+              <double>100.000000000000000</double>
+             </property>
+             <property name="singleStep" >
+              <double>0.100000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="0" >
+            <widget class="QRadioButton" name="RBRNo" >
+             <property name="text" >
+              <string>No refinement</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <widget class="QGroupBox" name="GBCoarseningThresholds" >
+          <property name="title" >
+           <string>Coarsening thresholds</string>
+          </property>
+          <layout class="QGridLayout" name="gridLayout_4" >
+           <item row="0" column="0" >
+            <widget class="QRadioButton" name="RBCPE" >
+             <property name="text" >
+              <string>Percentage of meshes</string>
+             </property>
+             <property name="checkable" >
+              <bool>true</bool>
+             </property>
+             <property name="checked" >
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1" >
+            <widget class="QDoubleSpinBox" name="SpinBox_CPE" >
+             <property name="enabled" >
+              <bool>false</bool>
+             </property>
+             <property name="suffix" >
+              <string> %</string>
+             </property>
+             <property name="decimals" >
+              <number>3</number>
+             </property>
+             <property name="maximum" >
+              <double>100.000000000000000</double>
+             </property>
+             <property name="singleStep" >
+              <double>0.100000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0" >
+            <widget class="QRadioButton" name="RBCRel" >
+             <property name="text" >
+              <string>Relative</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1" >
+            <widget class="QDoubleSpinBox" name="SpinBox_CRel" >
+             <property name="enabled" >
+              <bool>false</bool>
+             </property>
+             <property name="suffix" >
+              <string> %</string>
+             </property>
+             <property name="decimals" >
+              <number>3</number>
+             </property>
+             <property name="maximum" >
+              <double>100.000000000000000</double>
+             </property>
+             <property name="singleStep" >
+              <double>0.100000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0" >
+            <widget class="QRadioButton" name="RBCAbs" >
+             <property name="text" >
+              <string>Absolute</string>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="1" >
+            <widget class="QDoubleSpinBox" name="SpinBox_CAbs" >
+             <property name="enabled" >
+              <bool>false</bool>
+             </property>
+             <property name="decimals" >
+              <number>3</number>
+             </property>
+             <property name="maximum" >
+              <double>100.000000000000000</double>
+             </property>
+             <property name="singleStep" >
+              <double>0.100000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="0" >
+            <widget class="QRadioButton" name="RBCNo" >
+             <property name="text" >
+              <string>No coarsening</string>
+             </property>
+             <property name="checked" >
+              <bool>true</bool>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="5" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBAreaManagement" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string>Area management</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3" >
+      <item row="0" column="0" >
+       <widget class="QTableWidget" name="TWZone" >
+        <property name="editTriggers" >
+         <set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
+        </property>
+        <property name="showGrid" >
+         <bool>true</bool>
+        </property>
+        <property name="rowCount" >
+         <number>0</number>
+        </property>
+        <property name="columnCount" >
+         <number>2</number>
+        </property>
+        <column>
+         <property name="text" >
+          <string>Selection</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Zone name</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <layout class="QVBoxLayout" name="verticalLayout_2" >
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout" >
+          <item>
+           <widget class="QPushButton" name="PBZoneNew" >
+            <property name="text" >
+             <string>New</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="PBZoneEdit" >
+            <property name="text" >
+             <string>Edit</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="PBZoneDelete" >
+            <property name="text" >
+             <string/>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer name="verticalSpacer" >
+          <property name="orientation" >
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>20</width>
+            <height>48</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="6" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBField" >
+     <property name="title" >
+      <string>Field Interpolation</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_8" >
+      <item row="0" column="0" >
+       <layout class="QGridLayout" name="gridLayout_7" >
+        <item row="0" column="0" >
+         <widget class="QRadioButton" name="RBFieldNo" >
+          <property name="text" >
+           <string>None</string>
+          </property>
+          <property name="checked" >
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QRadioButton" name="RBFieldAll" >
+          <property name="text" >
+           <string>All</string>
+          </property>
+          <property name="checked" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2" >
+         <widget class="QRadioButton" name="RBFieldChosen" >
+          <property name="text" >
+           <string>Chosen</string>
+          </property>
+          <property name="checked" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QTableWidget" name="TWField" >
+        <column>
+         <property name="text" >
+          <string>Selection</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Field Name</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="7" column="0" colspan="2" >
+    <widget class="QCheckBox" name="CBGroupe" >
+     <property name="text" >
+      <string>Filtering with groups</string>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="0" colspan="2" >
+    <widget class="QGroupBox" name="GBButtons" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_5" >
+      <item row="0" column="0" >
+       <widget class="QPushButton" name="buttonOk" >
+        <property name="text" >
+         <string>&amp;Ok</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="buttonApply" >
+        <property name="text" >
+         <string>&amp;Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="buttonCancel" >
+        <property name="text" >
+         <string>&amp;Cancel</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" >
+       <widget class="QPushButton" name="buttonHelp" >
+        <property name="text" >
+         <string>&amp;Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/CreateIteration.h b/src/HOMARDGUI/CreateIteration.h
new file mode 100644 (file)
index 0000000..a1d6548
--- /dev/null
@@ -0,0 +1,348 @@
+/********************************************************************************
+** Form generated from reading ui file 'CreateIteration.ui'
+**
+** Created: Thu Nov 18 15:59:09 2010
+**      by: Qt User Interface Compiler version 4.4.3
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef CREATEITERATION_H
+#define CREATEITERATION_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QComboBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QSpinBox>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CreateIteration
+{
+public:
+    QGridLayout *gridLayout_2;
+    QLabel *Iteration_Name;
+    QLineEdit *LEIterationName;
+    QLabel *Iter_Parent;
+    QSpacerItem *verticalSpacer;
+    QPushButton *PBIterParent;
+    QLineEdit *LEIterationParentName;
+    QLabel *Mesh_n;
+    QSpacerItem *verticalSpacer_6;
+    QLineEdit *LEMeshName_n;
+    QSpacerItem *verticalSpacer_1;
+    QLabel *Mesh_np1;
+    QLineEdit *LEMeshName_np1;
+    QSpacerItem *verticalSpacer_3;
+    QGroupBox *GBField;
+    QGridLayout *gridLayout;
+    QLabel *FieldFile;
+    QPushButton *PushFieldFile;
+    QLineEdit *LEFieldFile;
+    QSpacerItem *verticalSpacer_7;
+    QRadioButton *RBNo;
+    QRadioButton *RBLast;
+    QRadioButton *RBChosen;
+    QSpacerItem *verticalSpacer_4;
+    QLabel *TimeStep;
+    QSpinBox *SpinBox_TimeStep;
+    QSpacerItem *spacer;
+    QLabel *Rank;
+    QSpinBox *SpinBox_Rank;
+    QSpacerItem *spacer_3;
+    QSpacerItem *verticalSpacer_2;
+    QGroupBox *Hypothese;
+    QGridLayout *gridLayout_3;
+    QComboBox *CBHypothese;
+    QSpacerItem *spacer_2;
+    QPushButton *PBHypoEdit;
+    QPushButton *PBHypoNew;
+    QSpacerItem *verticalSpacer_5;
+    QGroupBox *GroupButtons;
+    QGridLayout *gridLayout_4;
+    QPushButton *buttonOk;
+    QPushButton *buttonApply;
+    QPushButton *buttonCancel;
+    QPushButton *buttonHelp;
+
+    void setupUi(QWidget *CreateIteration)
+    {
+    if (CreateIteration->objectName().isEmpty())
+        CreateIteration->setObjectName(QString::fromUtf8("CreateIteration"));
+    CreateIteration->resize(587, 598);
+    gridLayout_2 = new QGridLayout(CreateIteration);
+    gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+    Iteration_Name = new QLabel(CreateIteration);
+    Iteration_Name->setObjectName(QString::fromUtf8("Iteration_Name"));
+
+    gridLayout_2->addWidget(Iteration_Name, 0, 0, 1, 2);
+
+    LEIterationName = new QLineEdit(CreateIteration);
+    LEIterationName->setObjectName(QString::fromUtf8("LEIterationName"));
+    LEIterationName->setMinimumSize(QSize(290, 21));
+    LEIterationName->setMaxLength(200);
+
+    gridLayout_2->addWidget(LEIterationName, 0, 2, 1, 2);
+
+    Iter_Parent = new QLabel(CreateIteration);
+    Iter_Parent->setObjectName(QString::fromUtf8("Iter_Parent"));
+
+    gridLayout_2->addWidget(Iter_Parent, 1, 0, 1, 1);
+
+    verticalSpacer = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer, 1, 1, 1, 1);
+
+    PBIterParent = new QPushButton(CreateIteration);
+    PBIterParent->setObjectName(QString::fromUtf8("PBIterParent"));
+    PBIterParent->setEnabled(true);
+    PBIterParent->setMaximumSize(QSize(50, 27));
+
+    gridLayout_2->addWidget(PBIterParent, 1, 2, 1, 1);
+
+    LEIterationParentName = new QLineEdit(CreateIteration);
+    LEIterationParentName->setObjectName(QString::fromUtf8("LEIterationParentName"));
+    LEIterationParentName->setMinimumSize(QSize(0, 21));
+    LEIterationParentName->setMaxLength(200);
+    LEIterationParentName->setReadOnly(true);
+
+    gridLayout_2->addWidget(LEIterationParentName, 1, 3, 1, 1);
+
+    Mesh_n = new QLabel(CreateIteration);
+    Mesh_n->setObjectName(QString::fromUtf8("Mesh_n"));
+
+    gridLayout_2->addWidget(Mesh_n, 2, 0, 1, 1);
+
+    verticalSpacer_6 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_6, 2, 1, 1, 1);
+
+    LEMeshName_n = new QLineEdit(CreateIteration);
+    LEMeshName_n->setObjectName(QString::fromUtf8("LEMeshName_n"));
+    LEMeshName_n->setMinimumSize(QSize(290, 21));
+    LEMeshName_n->setMaxLength(32);
+    LEMeshName_n->setReadOnly(true);
+
+    gridLayout_2->addWidget(LEMeshName_n, 2, 2, 1, 2);
+
+    verticalSpacer_1 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_1, 3, 1, 1, 1);
+
+    Mesh_np1 = new QLabel(CreateIteration);
+    Mesh_np1->setObjectName(QString::fromUtf8("Mesh_np1"));
+
+    gridLayout_2->addWidget(Mesh_np1, 4, 0, 1, 2);
+
+    LEMeshName_np1 = new QLineEdit(CreateIteration);
+    LEMeshName_np1->setObjectName(QString::fromUtf8("LEMeshName_np1"));
+    LEMeshName_np1->setMinimumSize(QSize(290, 21));
+    LEMeshName_np1->setMaxLength(32);
+
+    gridLayout_2->addWidget(LEMeshName_np1, 4, 2, 1, 2);
+
+    verticalSpacer_3 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_3, 5, 1, 1, 1);
+
+    GBField = new QGroupBox(CreateIteration);
+    GBField->setObjectName(QString::fromUtf8("GBField"));
+    gridLayout = new QGridLayout(GBField);
+    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+    FieldFile = new QLabel(GBField);
+    FieldFile->setObjectName(QString::fromUtf8("FieldFile"));
+
+    gridLayout->addWidget(FieldFile, 0, 0, 1, 1);
+
+    PushFieldFile = new QPushButton(GBField);
+    PushFieldFile->setObjectName(QString::fromUtf8("PushFieldFile"));
+
+    gridLayout->addWidget(PushFieldFile, 0, 1, 1, 1);
+
+    LEFieldFile = new QLineEdit(GBField);
+    LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile"));
+    LEFieldFile->setMinimumSize(QSize(282, 21));
+
+    gridLayout->addWidget(LEFieldFile, 0, 2, 1, 6);
+
+    verticalSpacer_7 = new QSpacerItem(138, 18, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout->addItem(verticalSpacer_7, 1, 3, 1, 4);
+
+    RBNo = new QRadioButton(GBField);
+    RBNo->setObjectName(QString::fromUtf8("RBNo"));
+    RBNo->setCheckable(true);
+    RBNo->setChecked(true);
+
+    gridLayout->addWidget(RBNo, 2, 0, 1, 3);
+
+    RBLast = new QRadioButton(GBField);
+    RBLast->setObjectName(QString::fromUtf8("RBLast"));
+
+    gridLayout->addWidget(RBLast, 2, 3, 1, 3);
+
+    RBChosen = new QRadioButton(GBField);
+    RBChosen->setObjectName(QString::fromUtf8("RBChosen"));
+
+    gridLayout->addWidget(RBChosen, 2, 7, 1, 1);
+
+    verticalSpacer_4 = new QSpacerItem(138, 28, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout->addItem(verticalSpacer_4, 3, 0, 1, 4);
+
+    TimeStep = new QLabel(GBField);
+    TimeStep->setObjectName(QString::fromUtf8("TimeStep"));
+
+    gridLayout->addWidget(TimeStep, 4, 0, 1, 1);
+
+    SpinBox_TimeStep = new QSpinBox(GBField);
+    SpinBox_TimeStep->setObjectName(QString::fromUtf8("SpinBox_TimeStep"));
+    SpinBox_TimeStep->setMinimum(-2);
+    SpinBox_TimeStep->setMaximum(100000);
+    SpinBox_TimeStep->setValue(-1);
+
+    gridLayout->addWidget(SpinBox_TimeStep, 4, 1, 1, 1);
+
+    spacer = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+    gridLayout->addItem(spacer, 4, 2, 1, 2);
+
+    Rank = new QLabel(GBField);
+    Rank->setObjectName(QString::fromUtf8("Rank"));
+
+    gridLayout->addWidget(Rank, 4, 4, 1, 1);
+
+    SpinBox_Rank = new QSpinBox(GBField);
+    SpinBox_Rank->setObjectName(QString::fromUtf8("SpinBox_Rank"));
+    SpinBox_Rank->setMinimum(-1);
+    SpinBox_Rank->setMaximum(1010000);
+    SpinBox_Rank->setValue(1);
+
+    gridLayout->addWidget(SpinBox_Rank, 4, 5, 1, 1);
+
+    spacer_3 = new QSpacerItem(255, 13, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+    gridLayout->addItem(spacer_3, 4, 6, 1, 2);
+
+
+    gridLayout_2->addWidget(GBField, 6, 0, 1, 4);
+
+    verticalSpacer_2 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_2, 7, 1, 1, 1);
+
+    Hypothese = new QGroupBox(CreateIteration);
+    Hypothese->setObjectName(QString::fromUtf8("Hypothese"));
+    gridLayout_3 = new QGridLayout(Hypothese);
+    gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
+    CBHypothese = new QComboBox(Hypothese);
+    CBHypothese->setObjectName(QString::fromUtf8("CBHypothese"));
+    CBHypothese->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+
+    gridLayout_3->addWidget(CBHypothese, 0, 0, 1, 1);
+
+    spacer_2 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+    gridLayout_3->addItem(spacer_2, 0, 1, 1, 1);
+
+    PBHypoEdit = new QPushButton(Hypothese);
+    PBHypoEdit->setObjectName(QString::fromUtf8("PBHypoEdit"));
+
+    gridLayout_3->addWidget(PBHypoEdit, 0, 2, 1, 1);
+
+    PBHypoNew = new QPushButton(Hypothese);
+    PBHypoNew->setObjectName(QString::fromUtf8("PBHypoNew"));
+
+    gridLayout_3->addWidget(PBHypoNew, 0, 3, 1, 1);
+
+
+    gridLayout_2->addWidget(Hypothese, 8, 0, 1, 4);
+
+    verticalSpacer_5 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout_2->addItem(verticalSpacer_5, 9, 0, 1, 2);
+
+    GroupButtons = new QGroupBox(CreateIteration);
+    GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
+    gridLayout_4 = new QGridLayout(GroupButtons);
+    gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
+    buttonOk = new QPushButton(GroupButtons);
+    buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+    buttonOk->setAutoDefault(false);
+    buttonOk->setDefault(false);
+
+    gridLayout_4->addWidget(buttonOk, 0, 0, 1, 1);
+
+    buttonApply = new QPushButton(GroupButtons);
+    buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+
+    gridLayout_4->addWidget(buttonApply, 0, 1, 1, 1);
+
+    buttonCancel = new QPushButton(GroupButtons);
+    buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+
+    gridLayout_4->addWidget(buttonCancel, 0, 2, 1, 1);
+
+    buttonHelp = new QPushButton(GroupButtons);
+    buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+
+    gridLayout_4->addWidget(buttonHelp, 0, 3, 1, 1);
+
+
+    gridLayout_2->addWidget(GroupButtons, 10, 0, 1, 4);
+
+
+    retranslateUi(CreateIteration);
+
+    CBHypothese->setCurrentIndex(-1);
+
+
+    QMetaObject::connectSlotsByName(CreateIteration);
+    } // setupUi
+
+    void retranslateUi(QWidget *CreateIteration)
+    {
+    CreateIteration->setWindowTitle(QApplication::translate("CreateIteration", "Create_Iteration", 0, QApplication::UnicodeUTF8));
+    Iteration_Name->setText(QApplication::translate("CreateIteration", "Iteration Name", 0, QApplication::UnicodeUTF8));
+    Iter_Parent->setText(QApplication::translate("CreateIteration", "Previous iteration", 0, QApplication::UnicodeUTF8));
+    PBIterParent->setText(QString());
+    Mesh_n->setText(QApplication::translate("CreateIteration", "Mesh n", 0, QApplication::UnicodeUTF8));
+    Mesh_np1->setText(QApplication::translate("CreateIteration", "Mesh n+1", 0, QApplication::UnicodeUTF8));
+    GBField->setTitle(QApplication::translate("CreateIteration", "Field information", 0, QApplication::UnicodeUTF8));
+    FieldFile->setText(QApplication::translate("CreateIteration", "Field File", 0, QApplication::UnicodeUTF8));
+    PushFieldFile->setText(QString());
+    RBNo->setText(QApplication::translate("CreateIteration", "No Time Step", 0, QApplication::UnicodeUTF8));
+    RBLast->setText(QApplication::translate("CreateIteration", "Last Time Step", 0, QApplication::UnicodeUTF8));
+    RBChosen->setText(QApplication::translate("CreateIteration", "Chosen time step", 0, QApplication::UnicodeUTF8));
+    TimeStep->setText(QApplication::translate("CreateIteration", "Time Step", 0, QApplication::UnicodeUTF8));
+    Rank->setText(QApplication::translate("CreateIteration", "Rank", 0, QApplication::UnicodeUTF8));
+    Hypothese->setTitle(QApplication::translate("CreateIteration", "Hypothesis", 0, QApplication::UnicodeUTF8));
+    PBHypoEdit->setText(QApplication::translate("CreateIteration", "Edit", 0, QApplication::UnicodeUTF8));
+    PBHypoNew->setText(QApplication::translate("CreateIteration", "New", 0, QApplication::UnicodeUTF8));
+    GroupButtons->setTitle(QString());
+    buttonOk->setText(QApplication::translate("CreateIteration", "&Ok", 0, QApplication::UnicodeUTF8));
+    buttonApply->setText(QApplication::translate("CreateIteration", "&Apply", 0, QApplication::UnicodeUTF8));
+    buttonCancel->setText(QApplication::translate("CreateIteration", "&Cancel", 0, QApplication::UnicodeUTF8));
+    buttonHelp->setText(QApplication::translate("CreateIteration", "&Help", 0, QApplication::UnicodeUTF8));
+    Q_UNUSED(CreateIteration);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class CreateIteration: public Ui_CreateIteration {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CREATEITERATION_H
diff --git a/src/HOMARDGUI/CreateIteration.ui b/src/HOMARDGUI/CreateIteration.ui
new file mode 100644 (file)
index 0000000..dbe973d
--- /dev/null
@@ -0,0 +1,450 @@
+<ui version="4.0" >
+ <class>CreateIteration</class>
+ <widget class="QWidget" name="CreateIteration" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>587</width>
+    <height>598</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Create_Iteration</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2" >
+   <item row="0" column="0" colspan="2" >
+    <widget class="QLabel" name="Iteration_Name" >
+     <property name="text" >
+      <string>Iteration Name</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2" colspan="2" >
+    <widget class="QLineEdit" name="LEIterationName" >
+     <property name="minimumSize" >
+      <size>
+       <width>290</width>
+       <height>21</height>
+      </size>
+     </property>
+     <property name="maxLength" >
+      <number>200</number>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="Iter_Parent" >
+     <property name="text" >
+      <string>Previous iteration</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" >
+    <spacer name="verticalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>24</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="2" >
+    <widget class="QPushButton" name="PBIterParent" >
+     <property name="enabled" >
+      <bool>true</bool>
+     </property>
+     <property name="maximumSize" >
+      <size>
+       <width>50</width>
+       <height>27</height>
+      </size>
+     </property>
+     <property name="text" >
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3" >
+    <widget class="QLineEdit" name="LEIterationParentName" >
+     <property name="minimumSize" >
+      <size>
+       <width>0</width>
+       <height>21</height>
+      </size>
+     </property>
+     <property name="maxLength" >
+      <number>200</number>
+     </property>
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QLabel" name="Mesh_n" >
+     <property name="text" >
+      <string>Mesh n</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1" >
+    <spacer name="verticalSpacer_6" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>21</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="2" colspan="2" >
+    <widget class="QLineEdit" name="LEMeshName_n" >
+     <property name="minimumSize" >
+      <size>
+       <width>290</width>
+       <height>21</height>
+      </size>
+     </property>
+     <property name="maxLength" >
+      <number>32</number>
+     </property>
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1" >
+    <spacer name="verticalSpacer_1" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>22</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="4" column="0" colspan="2" >
+    <widget class="QLabel" name="Mesh_np1" >
+     <property name="text" >
+      <string>Mesh n+1</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="2" colspan="2" >
+    <widget class="QLineEdit" name="LEMeshName_np1" >
+     <property name="minimumSize" >
+      <size>
+       <width>290</width>
+       <height>21</height>
+      </size>
+     </property>
+     <property name="maxLength" >
+      <number>32</number>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1" >
+    <spacer name="verticalSpacer_3" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>21</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="6" column="0" colspan="4" >
+    <widget class="QGroupBox" name="GBField" >
+     <property name="title" >
+      <string>Field information</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="FieldFile" >
+        <property name="text" >
+         <string>Field File</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="PushFieldFile" >
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" colspan="6" >
+       <widget class="QLineEdit" name="LEFieldFile" >
+        <property name="minimumSize" >
+         <size>
+          <width>282</width>
+          <height>21</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3" colspan="4" >
+       <spacer name="verticalSpacer_7" >
+        <property name="orientation" >
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>138</width>
+          <height>18</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="2" column="0" colspan="3" >
+       <widget class="QRadioButton" name="RBNo" >
+        <property name="text" >
+         <string>No Time Step</string>
+        </property>
+        <property name="checkable" >
+         <bool>true</bool>
+        </property>
+        <property name="checked" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="3" colspan="3" >
+       <widget class="QRadioButton" name="RBLast" >
+        <property name="text" >
+         <string>Last Time Step</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="7" >
+       <widget class="QRadioButton" name="RBChosen" >
+        <property name="text" >
+         <string>Chosen time step</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="4" >
+       <spacer name="verticalSpacer_4" >
+        <property name="orientation" >
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>138</width>
+          <height>28</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="4" column="0" >
+       <widget class="QLabel" name="TimeStep" >
+        <property name="text" >
+         <string>Time Step</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" >
+       <widget class="QSpinBox" name="SpinBox_TimeStep" >
+        <property name="minimum" >
+         <number>-2</number>
+        </property>
+        <property name="maximum" >
+         <number>100000</number>
+        </property>
+        <property name="value" >
+         <number>-1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2" colspan="2" >
+       <spacer name="spacer" >
+        <property name="orientation" >
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeType" >
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>40</width>
+          <height>13</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="4" column="4" >
+       <widget class="QLabel" name="Rank" >
+        <property name="text" >
+         <string>Rank</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="5" >
+       <widget class="QSpinBox" name="SpinBox_Rank" >
+        <property name="minimum" >
+         <number>-1</number>
+        </property>
+        <property name="maximum" >
+         <number>1010000</number>
+        </property>
+        <property name="value" >
+         <number>1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="6" colspan="2" >
+       <spacer name="spacer_3" >
+        <property name="orientation" >
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeType" >
+         <enum>QSizePolicy::Expanding</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>255</width>
+          <height>13</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="7" column="1" >
+    <spacer name="verticalSpacer_2" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>22</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="8" column="0" colspan="4" >
+    <widget class="QGroupBox" name="Hypothese" >
+     <property name="title" >
+      <string>Hypothesis</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3" >
+      <item row="0" column="0" >
+       <widget class="QComboBox" name="CBHypothese" >
+        <property name="currentIndex" >
+         <number>-1</number>
+        </property>
+        <property name="sizeAdjustPolicy" >
+         <enum>QComboBox::AdjustToContents</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <spacer name="spacer_2" >
+        <property name="orientation" >
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeType" >
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>40</width>
+          <height>13</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="PBHypoEdit" >
+        <property name="text" >
+         <string>Edit</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" >
+       <widget class="QPushButton" name="PBHypoNew" >
+        <property name="text" >
+         <string>New</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="9" column="0" colspan="2" >
+    <spacer name="verticalSpacer_5" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>21</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="10" column="0" colspan="4" >
+    <widget class="QGroupBox" name="GroupButtons" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_4" >
+      <item row="0" column="0" >
+       <widget class="QPushButton" name="buttonOk" >
+        <property name="text" >
+         <string>&amp;Ok</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>false</bool>
+        </property>
+        <property name="default" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="buttonApply" >
+        <property name="text" >
+         <string>&amp;Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="buttonCancel" >
+        <property name="text" >
+         <string>&amp;Cancel</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" >
+       <widget class="QPushButton" name="buttonHelp" >
+        <property name="text" >
+         <string>&amp;Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/CreateListGroup.h b/src/HOMARDGUI/CreateListGroup.h
new file mode 100644 (file)
index 0000000..cf645bc
--- /dev/null
@@ -0,0 +1,132 @@
+/********************************************************************************
+** Form generated from reading ui file 'CreateListGroup.ui'
+**
+** Created: Thu Nov 18 16:31:34 2010
+**      by: Qt User Interface Compiler version 4.5.2
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef CREATELISTGROUP_H
+#define CREATELISTGROUP_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHeaderView>
+#include <QtGui/QPushButton>
+#include <QtGui/QTableWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CreateListGroup
+{
+public:
+    QGridLayout *gridLayout;
+    QGroupBox *GBOptions;
+    QGridLayout *gridLayout_7;
+    QTableWidget *TWGroupe;
+    QGroupBox *GBButtons;
+    QGridLayout *gridLayout_5;
+    QPushButton *buttonOk;
+    QPushButton *buttonApply;
+    QPushButton *buttonCancel;
+    QPushButton *buttonHelp;
+
+    void setupUi(QDialog *CreateListGroup)
+    {
+        if (CreateListGroup->objectName().isEmpty())
+            CreateListGroup->setObjectName(QString::fromUtf8("CreateListGroup"));
+        CreateListGroup->resize(717, 600);
+        QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+        sizePolicy.setHorizontalStretch(0);
+        sizePolicy.setVerticalStretch(0);
+        sizePolicy.setHeightForWidth(CreateListGroup->sizePolicy().hasHeightForWidth());
+        CreateListGroup->setSizePolicy(sizePolicy);
+        CreateListGroup->setAutoFillBackground(false);
+        CreateListGroup->setSizeGripEnabled(true);
+        gridLayout = new QGridLayout(CreateListGroup);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        GBOptions = new QGroupBox(CreateListGroup);
+        GBOptions->setObjectName(QString::fromUtf8("GBOptions"));
+        gridLayout_7 = new QGridLayout(GBOptions);
+        gridLayout_7->setObjectName(QString::fromUtf8("gridLayout_7"));
+        TWGroupe = new QTableWidget(GBOptions);
+        if (TWGroupe->columnCount() < 2)
+            TWGroupe->setColumnCount(2);
+        QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem();
+        TWGroupe->setHorizontalHeaderItem(0, __qtablewidgetitem);
+        QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem();
+        TWGroupe->setHorizontalHeaderItem(1, __qtablewidgetitem1);
+        TWGroupe->setObjectName(QString::fromUtf8("TWGroupe"));
+        TWGroupe->setShowGrid(true);
+        TWGroupe->setRowCount(0);
+        TWGroupe->setColumnCount(2);
+
+        gridLayout_7->addWidget(TWGroupe, 0, 0, 1, 1);
+
+
+        gridLayout->addWidget(GBOptions, 0, 0, 1, 1);
+
+        GBButtons = new QGroupBox(CreateListGroup);
+        GBButtons->setObjectName(QString::fromUtf8("GBButtons"));
+        gridLayout_5 = new QGridLayout(GBButtons);
+        gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
+        buttonOk = new QPushButton(GBButtons);
+        buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+
+        gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1);
+
+        buttonApply = new QPushButton(GBButtons);
+        buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+
+        gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1);
+
+        buttonCancel = new QPushButton(GBButtons);
+        buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+
+        gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1);
+
+        buttonHelp = new QPushButton(GBButtons);
+        buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+
+        gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1);
+
+
+        gridLayout->addWidget(GBButtons, 1, 0, 1, 1);
+
+
+        retranslateUi(CreateListGroup);
+
+        QMetaObject::connectSlotsByName(CreateListGroup);
+    } // setupUi
+
+    void retranslateUi(QDialog *CreateListGroup)
+    {
+        CreateListGroup->setWindowTitle(QApplication::translate("CreateListGroup", "Create Hypothesis - Group selection", 0, QApplication::UnicodeUTF8));
+        GBOptions->setTitle(QApplication::translate("CreateListGroup", "Selected groups", 0, QApplication::UnicodeUTF8));
+        QTableWidgetItem *___qtablewidgetitem = TWGroupe->horizontalHeaderItem(0);
+        ___qtablewidgetitem->setText(QApplication::translate("CreateListGroup", "Selection", 0, QApplication::UnicodeUTF8));
+        QTableWidgetItem *___qtablewidgetitem1 = TWGroupe->horizontalHeaderItem(1);
+        ___qtablewidgetitem1->setText(QApplication::translate("CreateListGroup", "Group", 0, QApplication::UnicodeUTF8));
+        GBButtons->setTitle(QString());
+        buttonOk->setText(QApplication::translate("CreateListGroup", "&Ok", 0, QApplication::UnicodeUTF8));
+        buttonApply->setText(QApplication::translate("CreateListGroup", "&Apply", 0, QApplication::UnicodeUTF8));
+        buttonCancel->setText(QApplication::translate("CreateListGroup", "&Cancel", 0, QApplication::UnicodeUTF8));
+        buttonHelp->setText(QApplication::translate("CreateListGroup", "&Help", 0, QApplication::UnicodeUTF8));
+        Q_UNUSED(CreateListGroup);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class CreateListGroup: public Ui_CreateListGroup {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CREATELISTGROUP_H
diff --git a/src/HOMARDGUI/CreateListGroup.ui b/src/HOMARDGUI/CreateListGroup.ui
new file mode 100644 (file)
index 0000000..f496638
--- /dev/null
@@ -0,0 +1,101 @@
+<ui version="4.0" >
+ <class>CreateListGroup</class>
+ <widget class="QDialog" name="CreateListGroup" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>717</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Create Hypothesis - Group selection</string>
+  </property>
+  <property name="autoFillBackground" >
+   <bool>false</bool>
+  </property>
+  <property name="sizeGripEnabled" >
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GBOptions" >
+     <property name="title" >
+      <string>Selected groups</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_7" >
+      <item row="0" column="0" >
+       <widget class="QTableWidget" name="TWGroupe" >
+        <property name="showGrid" >
+         <bool>true</bool>
+        </property>
+        <property name="rowCount" >
+         <number>0</number>
+        </property>
+        <property name="columnCount" >
+         <number>2</number>
+        </property>
+        <column>
+         <property name="text" >
+          <string>Selection</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Group</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QGroupBox" name="GBButtons" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_5" >
+      <item row="0" column="0" >
+       <widget class="QPushButton" name="buttonOk" >
+        <property name="text" >
+         <string>&amp;Ok</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="buttonApply" >
+        <property name="text" >
+         <string>&amp;Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="buttonCancel" >
+        <property name="text" >
+         <string>&amp;Cancel</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3" >
+       <widget class="QPushButton" name="buttonHelp" >
+        <property name="text" >
+         <string>&amp;Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/CreateZone.h b/src/HOMARDGUI/CreateZone.h
new file mode 100644 (file)
index 0000000..bce2565
--- /dev/null
@@ -0,0 +1,386 @@
+/********************************************************************************
+** Form generated from reading ui file 'CreateZone.ui'
+**
+** Created: Mon Sep 27 14:45:47 2010
+**      by: Qt User Interface Compiler version 4.5.2
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef CREATEZONE_H
+#define CREATEZONE_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QDialog>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CreateZone
+{
+public:
+    QGridLayout *gridLayout_3;
+    QLabel *Name;
+    QLineEdit *LEZoneName;
+    QGroupBox *TypeZone;
+    QHBoxLayout *horizontalLayout;
+    QRadioButton *RBBox;
+    QRadioButton *RBSphere;
+    QGroupBox *gBBox;
+    QGridLayout *gridLayout;
+    QLabel *TLXmini;
+    QDoubleSpinBox *SpinBox_Xmini;
+    QLabel *TLYmini;
+    QDoubleSpinBox *SpinBox_Ymini;
+    QLabel *TLZmini;
+    QDoubleSpinBox *SpinBox_Zmini;
+    QLabel *TLXmaxi;
+    QLabel *TLZmaxi;
+    QDoubleSpinBox *SpinBox_Zmaxi;
+    QLabel *TLYmaxi;
+    QDoubleSpinBox *SpinBox_Xmaxi;
+    QDoubleSpinBox *SpinBox_Ymaxi;
+    QGroupBox *gBSphere;
+    QGridLayout *gridLayout_2;
+    QLabel *TLXcentre;
+    QDoubleSpinBox *SpinBox_Xcentre;
+    QLabel *TLYcentre;
+    QDoubleSpinBox *SpinBox_Ycentre;
+    QLabel *TLRayon;
+    QDoubleSpinBox *SpinBox_Rayon;
+    QLabel *TLZcentre;
+    QDoubleSpinBox *SpinBox_Zcentre;
+    QGroupBox *GBButtons;
+    QHBoxLayout *hboxLayout;
+    QPushButton *buttonOk;
+    QPushButton *buttonApply;
+    QPushButton *buttonCancel;
+    QPushButton *buttonHelp;
+
+    void setupUi(QDialog *CreateZone)
+    {
+        if (CreateZone->objectName().isEmpty())
+            CreateZone->setObjectName(QString::fromUtf8("CreateZone"));
+        CreateZone->resize(415, 472);
+        CreateZone->setAutoFillBackground(false);
+        CreateZone->setSizeGripEnabled(true);
+        gridLayout_3 = new QGridLayout(CreateZone);
+        gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
+        Name = new QLabel(CreateZone);
+        Name->setObjectName(QString::fromUtf8("Name"));
+
+        gridLayout_3->addWidget(Name, 0, 0, 1, 1);
+
+        LEZoneName = new QLineEdit(CreateZone);
+        LEZoneName->setObjectName(QString::fromUtf8("LEZoneName"));
+        LEZoneName->setMaxLength(32);
+
+        gridLayout_3->addWidget(LEZoneName, 0, 1, 1, 1);
+
+        TypeZone = new QGroupBox(CreateZone);
+        TypeZone->setObjectName(QString::fromUtf8("TypeZone"));
+        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+        sizePolicy.setHorizontalStretch(0);
+        sizePolicy.setVerticalStretch(0);
+        sizePolicy.setHeightForWidth(TypeZone->sizePolicy().hasHeightForWidth());
+        TypeZone->setSizePolicy(sizePolicy);
+        TypeZone->setMinimumSize(QSize(340, 0));
+        horizontalLayout = new QHBoxLayout(TypeZone);
+        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+        RBBox = new QRadioButton(TypeZone);
+        RBBox->setObjectName(QString::fromUtf8("RBBox"));
+        QIcon icon;
+        icon.addFile(QString::fromUtf8("../../resources/zone_boxdxyz.png"), QSize(), QIcon::Normal, QIcon::Off);
+        RBBox->setIcon(icon);
+        RBBox->setCheckable(true);
+        RBBox->setChecked(true);
+
+        horizontalLayout->addWidget(RBBox);
+
+        RBSphere = new QRadioButton(TypeZone);
+        RBSphere->setObjectName(QString::fromUtf8("RBSphere"));
+        QIcon icon1;
+        icon1.addFile(QString::fromUtf8("../../resources/zone_spherepoint.png"), QSize(), QIcon::Normal, QIcon::Off);
+        RBSphere->setIcon(icon1);
+
+        horizontalLayout->addWidget(RBSphere);
+
+
+        gridLayout_3->addWidget(TypeZone, 1, 0, 1, 2);
+
+        gBBox = new QGroupBox(CreateZone);
+        gBBox->setObjectName(QString::fromUtf8("gBBox"));
+        sizePolicy.setHeightForWidth(gBBox->sizePolicy().hasHeightForWidth());
+        gBBox->setSizePolicy(sizePolicy);
+        gridLayout = new QGridLayout(gBBox);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        TLXmini = new QLabel(gBBox);
+        TLXmini->setObjectName(QString::fromUtf8("TLXmini"));
+        sizePolicy.setHeightForWidth(TLXmini->sizePolicy().hasHeightForWidth());
+        TLXmini->setSizePolicy(sizePolicy);
+        TLXmini->setWordWrap(false);
+
+        gridLayout->addWidget(TLXmini, 0, 0, 1, 1);
+
+        SpinBox_Xmini = new QDoubleSpinBox(gBBox);
+        SpinBox_Xmini->setObjectName(QString::fromUtf8("SpinBox_Xmini"));
+        SpinBox_Xmini->setDecimals(5);
+        SpinBox_Xmini->setMinimum(-1e+09);
+        SpinBox_Xmini->setMaximum(1e+09);
+        SpinBox_Xmini->setValue(0);
+
+        gridLayout->addWidget(SpinBox_Xmini, 0, 1, 1, 1);
+
+        TLYmini = new QLabel(gBBox);
+        TLYmini->setObjectName(QString::fromUtf8("TLYmini"));
+        sizePolicy.setHeightForWidth(TLYmini->sizePolicy().hasHeightForWidth());
+        TLYmini->setSizePolicy(sizePolicy);
+        TLYmini->setWordWrap(false);
+
+        gridLayout->addWidget(TLYmini, 1, 0, 1, 1);
+
+        SpinBox_Ymini = new QDoubleSpinBox(gBBox);
+        SpinBox_Ymini->setObjectName(QString::fromUtf8("SpinBox_Ymini"));
+        SpinBox_Ymini->setDecimals(5);
+        SpinBox_Ymini->setMinimum(-1e+09);
+        SpinBox_Ymini->setMaximum(1e+09);
+        SpinBox_Ymini->setValue(0);
+
+        gridLayout->addWidget(SpinBox_Ymini, 1, 1, 1, 1);
+
+        TLZmini = new QLabel(gBBox);
+        TLZmini->setObjectName(QString::fromUtf8("TLZmini"));
+        sizePolicy.setHeightForWidth(TLZmini->sizePolicy().hasHeightForWidth());
+        TLZmini->setSizePolicy(sizePolicy);
+        TLZmini->setWordWrap(false);
+
+        gridLayout->addWidget(TLZmini, 2, 0, 1, 1);
+
+        SpinBox_Zmini = new QDoubleSpinBox(gBBox);
+        SpinBox_Zmini->setObjectName(QString::fromUtf8("SpinBox_Zmini"));
+        SpinBox_Zmini->setDecimals(5);
+        SpinBox_Zmini->setMinimum(-1e+09);
+        SpinBox_Zmini->setMaximum(1e+09);
+        SpinBox_Zmini->setValue(0);
+
+        gridLayout->addWidget(SpinBox_Zmini, 2, 1, 1, 1);
+
+        TLXmaxi = new QLabel(gBBox);
+        TLXmaxi->setObjectName(QString::fromUtf8("TLXmaxi"));
+        sizePolicy.setHeightForWidth(TLXmaxi->sizePolicy().hasHeightForWidth());
+        TLXmaxi->setSizePolicy(sizePolicy);
+        TLXmaxi->setWordWrap(false);
+
+        gridLayout->addWidget(TLXmaxi, 0, 2, 1, 1);
+
+        TLZmaxi = new QLabel(gBBox);
+        TLZmaxi->setObjectName(QString::fromUtf8("TLZmaxi"));
+        sizePolicy.setHeightForWidth(TLZmaxi->sizePolicy().hasHeightForWidth());
+        TLZmaxi->setSizePolicy(sizePolicy);
+        TLZmaxi->setWordWrap(false);
+
+        gridLayout->addWidget(TLZmaxi, 2, 2, 1, 1);
+
+        SpinBox_Zmaxi = new QDoubleSpinBox(gBBox);
+        SpinBox_Zmaxi->setObjectName(QString::fromUtf8("SpinBox_Zmaxi"));
+        SpinBox_Zmaxi->setDecimals(5);
+        SpinBox_Zmaxi->setMinimum(-1e+09);
+        SpinBox_Zmaxi->setMaximum(1e+09);
+        SpinBox_Zmaxi->setValue(0);
+
+        gridLayout->addWidget(SpinBox_Zmaxi, 2, 3, 1, 1);
+
+        TLYmaxi = new QLabel(gBBox);
+        TLYmaxi->setObjectName(QString::fromUtf8("TLYmaxi"));
+        sizePolicy.setHeightForWidth(TLYmaxi->sizePolicy().hasHeightForWidth());
+        TLYmaxi->setSizePolicy(sizePolicy);
+        TLYmaxi->setWordWrap(false);
+
+        gridLayout->addWidget(TLYmaxi, 1, 2, 1, 1);
+
+        SpinBox_Xmaxi = new QDoubleSpinBox(gBBox);
+        SpinBox_Xmaxi->setObjectName(QString::fromUtf8("SpinBox_Xmaxi"));
+        SpinBox_Xmaxi->setDecimals(5);
+        SpinBox_Xmaxi->setMinimum(-1e+09);
+        SpinBox_Xmaxi->setMaximum(1e+09);
+        SpinBox_Xmaxi->setValue(0);
+
+        gridLayout->addWidget(SpinBox_Xmaxi, 0, 3, 1, 1);
+
+        SpinBox_Ymaxi = new QDoubleSpinBox(gBBox);
+        SpinBox_Ymaxi->setObjectName(QString::fromUtf8("SpinBox_Ymaxi"));
+        SpinBox_Ymaxi->setDecimals(5);
+        SpinBox_Ymaxi->setMinimum(-1e+09);
+        SpinBox_Ymaxi->setMaximum(1e+09);
+        SpinBox_Ymaxi->setValue(0);
+
+        gridLayout->addWidget(SpinBox_Ymaxi, 1, 3, 1, 1);
+
+
+        gridLayout_3->addWidget(gBBox, 2, 0, 1, 2);
+
+        gBSphere = new QGroupBox(CreateZone);
+        gBSphere->setObjectName(QString::fromUtf8("gBSphere"));
+        sizePolicy.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth());
+        gBSphere->setSizePolicy(sizePolicy);
+        gridLayout_2 = new QGridLayout(gBSphere);
+        gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+        TLXcentre = new QLabel(gBSphere);
+        TLXcentre->setObjectName(QString::fromUtf8("TLXcentre"));
+        sizePolicy.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth());
+        TLXcentre->setSizePolicy(sizePolicy);
+        TLXcentre->setWordWrap(false);
+
+        gridLayout_2->addWidget(TLXcentre, 0, 0, 1, 1);
+
+        SpinBox_Xcentre = new QDoubleSpinBox(gBSphere);
+        SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre"));
+        SpinBox_Xcentre->setDecimals(5);
+        SpinBox_Xcentre->setMinimum(-1e+09);
+        SpinBox_Xcentre->setMaximum(1e+09);
+        SpinBox_Xcentre->setValue(0);
+
+        gridLayout_2->addWidget(SpinBox_Xcentre, 0, 1, 1, 1);
+
+        TLYcentre = new QLabel(gBSphere);
+        TLYcentre->setObjectName(QString::fromUtf8("TLYcentre"));
+        sizePolicy.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth());
+        TLYcentre->setSizePolicy(sizePolicy);
+        TLYcentre->setWordWrap(false);
+
+        gridLayout_2->addWidget(TLYcentre, 1, 0, 1, 1);
+
+        SpinBox_Ycentre = new QDoubleSpinBox(gBSphere);
+        SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre"));
+        SpinBox_Ycentre->setDecimals(5);
+        SpinBox_Ycentre->setMinimum(-1e+09);
+        SpinBox_Ycentre->setMaximum(1e+09);
+        SpinBox_Ycentre->setValue(0);
+
+        gridLayout_2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1);
+
+        TLRayon = new QLabel(gBSphere);
+        TLRayon->setObjectName(QString::fromUtf8("TLRayon"));
+        sizePolicy.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth());
+        TLRayon->setSizePolicy(sizePolicy);
+        TLRayon->setWordWrap(false);
+
+        gridLayout_2->addWidget(TLRayon, 1, 2, 1, 1);
+
+        SpinBox_Rayon = new QDoubleSpinBox(gBSphere);
+        SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon"));
+        SpinBox_Rayon->setDecimals(5);
+        SpinBox_Rayon->setMinimum(-1e+09);
+        SpinBox_Rayon->setMaximum(1e+09);
+        SpinBox_Rayon->setValue(0);
+
+        gridLayout_2->addWidget(SpinBox_Rayon, 1, 3, 1, 1);
+
+        TLZcentre = new QLabel(gBSphere);
+        TLZcentre->setObjectName(QString::fromUtf8("TLZcentre"));
+        sizePolicy.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth());
+        TLZcentre->setSizePolicy(sizePolicy);
+        TLZcentre->setWordWrap(false);
+
+        gridLayout_2->addWidget(TLZcentre, 2, 0, 1, 1);
+
+        SpinBox_Zcentre = new QDoubleSpinBox(gBSphere);
+        SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre"));
+        SpinBox_Zcentre->setDecimals(5);
+        SpinBox_Zcentre->setMinimum(-1e+09);
+        SpinBox_Zcentre->setMaximum(1e+09);
+        SpinBox_Zcentre->setValue(0);
+
+        gridLayout_2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1);
+
+
+        gridLayout_3->addWidget(gBSphere, 3, 0, 1, 2);
+
+        GBButtons = new QGroupBox(CreateZone);
+        GBButtons->setObjectName(QString::fromUtf8("GBButtons"));
+        sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth());
+        GBButtons->setSizePolicy(sizePolicy);
+        hboxLayout = new QHBoxLayout(GBButtons);
+#ifndef Q_OS_MAC
+        hboxLayout->setSpacing(6);
+#endif
+#ifndef Q_OS_MAC
+        hboxLayout->setMargin(9);
+#endif
+        hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
+        buttonOk = new QPushButton(GBButtons);
+        buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+
+        hboxLayout->addWidget(buttonOk);
+
+        buttonApply = new QPushButton(GBButtons);
+        buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+
+        hboxLayout->addWidget(buttonApply);
+
+        buttonCancel = new QPushButton(GBButtons);
+        buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+
+        hboxLayout->addWidget(buttonCancel);
+
+        buttonHelp = new QPushButton(GBButtons);
+        buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+
+        hboxLayout->addWidget(buttonHelp);
+
+
+        gridLayout_3->addWidget(GBButtons, 4, 0, 1, 2);
+
+
+        retranslateUi(CreateZone);
+
+        QMetaObject::connectSlotsByName(CreateZone);
+    } // setupUi
+
+    void retranslateUi(QDialog *CreateZone)
+    {
+        CreateZone->setWindowTitle(QApplication::translate("CreateZone", "Create Zone", 0, QApplication::UnicodeUTF8));
+        Name->setText(QApplication::translate("CreateZone", "Name", 0, QApplication::UnicodeUTF8));
+        TypeZone->setTitle(QApplication::translate("CreateZone", "Type of zone", 0, QApplication::UnicodeUTF8));
+        RBBox->setText(QString());
+        RBSphere->setText(QString());
+        gBBox->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8));
+        TLXmini->setText(QApplication::translate("CreateZone", "X mini", 0, QApplication::UnicodeUTF8));
+        TLYmini->setText(QApplication::translate("CreateZone", "Y mini", 0, QApplication::UnicodeUTF8));
+        TLZmini->setText(QApplication::translate("CreateZone", "Z mini", 0, QApplication::UnicodeUTF8));
+        TLXmaxi->setText(QApplication::translate("CreateZone", "X maxi", 0, QApplication::UnicodeUTF8));
+        TLZmaxi->setText(QApplication::translate("CreateZone", "Z maxi", 0, QApplication::UnicodeUTF8));
+        TLYmaxi->setText(QApplication::translate("CreateZone", "Y maxi", 0, QApplication::UnicodeUTF8));
+        gBSphere->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8));
+        TLXcentre->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8));
+        TLYcentre->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8));
+        TLRayon->setText(QApplication::translate("CreateZone", "Radius", 0, QApplication::UnicodeUTF8));
+        TLZcentre->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8));
+        GBButtons->setTitle(QString());
+        buttonOk->setText(QApplication::translate("CreateZone", "&Ok", 0, QApplication::UnicodeUTF8));
+        buttonApply->setText(QApplication::translate("CreateZone", "&Apply", 0, QApplication::UnicodeUTF8));
+        buttonCancel->setText(QApplication::translate("CreateZone", "&Cancel", 0, QApplication::UnicodeUTF8));
+        buttonHelp->setText(QApplication::translate("CreateZone", "&Help", 0, QApplication::UnicodeUTF8));
+        Q_UNUSED(CreateZone);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class CreateZone: public Ui_CreateZone {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CREATEZONE_H
diff --git a/src/HOMARDGUI/CreateZone.ui b/src/HOMARDGUI/CreateZone.ui
new file mode 100644 (file)
index 0000000..0c98d28
--- /dev/null
@@ -0,0 +1,489 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CreateZone</class>
+ <widget class="QDialog" name="CreateZone">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>415</width>
+    <height>472</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Create Zone</string>
+  </property>
+  <property name="autoFillBackground">
+   <bool>false</bool>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_3">
+   <item row="0" column="0">
+    <widget class="QLabel" name="Name">
+     <property name="text">
+      <string>Name</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLineEdit" name="LEZoneName">
+     <property name="maxLength">
+      <number>32</number>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2">
+    <widget class="QGroupBox" name="TypeZone">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>340</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="title">
+      <string>Type of zone</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QRadioButton" name="RBBox">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="icon">
+         <iconset>
+          <normaloff>../../resources/zone_boxdxyz.png</normaloff>../../resources/zone_boxdxyz.png</iconset>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBSphere">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="icon">
+         <iconset>
+          <normaloff>../../resources/zone_spherepoint.png</normaloff>../../resources/zone_spherepoint.png</iconset>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="2">
+    <widget class="QGroupBox" name="gBBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Coordinates</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TLXmini">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>X mini</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBox_Xmini">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TLYmini">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Y mini</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBox_Ymini">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TLZmini">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Z mini</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBox_Zmini">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QLabel" name="TLXmaxi">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>X maxi</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QLabel" name="TLZmaxi">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Z maxi</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBox_Zmaxi">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLabel" name="TLYmaxi">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Y maxi</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBox_Xmaxi">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBox_Ymaxi">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <widget class="QGroupBox" name="gBSphere">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Coordinates</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="TLXcentre">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>X centre</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBox_Xcentre">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TLYcentre">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Y centre</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBox_Ycentre">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QLabel" name="TLRayon">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Radius</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QDoubleSpinBox" name="SpinBox_Rayon">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="TLZcentre">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Z centre</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QDoubleSpinBox" name="SpinBox_Zcentre">
+        <property name="decimals">
+         <number>5</number>
+        </property>
+        <property name="minimum">
+         <double>-999999999.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>999999999.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="2">
+    <widget class="QGroupBox" name="GBButtons">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QHBoxLayout">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <item>
+       <widget class="QPushButton" name="buttonOk">
+        <property name="text">
+         <string>&amp;Ok</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="buttonApply">
+        <property name="text">
+         <string>&amp;Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="buttonCancel">
+        <property name="text">
+         <string>&amp;Cancel</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="buttonHelp">
+        <property name="text">
+         <string>&amp;Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/EditFile.h b/src/HOMARDGUI/EditFile.h
new file mode 100644 (file)
index 0000000..d6c0f9a
--- /dev/null
@@ -0,0 +1,113 @@
+/********************************************************************************
+** Form generated from reading ui file 'EditFile.ui'
+**
+** Created: Mon Sep 27 14:45:55 2010
+**      by: Qt User Interface Compiler version 4.5.2
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef EDITFILE_H
+#define EDITFILE_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHeaderView>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QTextBrowser>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_EditFile
+{
+public:
+    QGridLayout *gridLayout_2;
+    QTextBrowser *QTBEditFile;
+    QSpacerItem *verticalSpacer;
+    QGroupBox *GroupButtons;
+    QGridLayout *gridLayout;
+    QPushButton *buttonQuit;
+    QPushButton *buttonPrint;
+    QPushButton *buttonHelp;
+    QSpacerItem *horizontalSpacer;
+
+    void setupUi(QWidget *EditFile)
+    {
+        if (EditFile->objectName().isEmpty())
+            EditFile->setObjectName(QString::fromUtf8("EditFile"));
+        EditFile->resize(548, 901);
+        gridLayout_2 = new QGridLayout(EditFile);
+        gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+        QTBEditFile = new QTextBrowser(EditFile);
+        QTBEditFile->setObjectName(QString::fromUtf8("QTBEditFile"));
+        QTBEditFile->setMinimumSize(QSize(530, 800));
+        QFont font;
+        font.setFamily(QString::fromUtf8("Courier New"));
+        QTBEditFile->setFont(font);
+
+        gridLayout_2->addWidget(QTBEditFile, 0, 0, 1, 2);
+
+        verticalSpacer = new QSpacerItem(20, 14, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        gridLayout_2->addItem(verticalSpacer, 1, 0, 1, 1);
+
+        GroupButtons = new QGroupBox(EditFile);
+        GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
+        gridLayout = new QGridLayout(GroupButtons);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        buttonQuit = new QPushButton(GroupButtons);
+        buttonQuit->setObjectName(QString::fromUtf8("buttonQuit"));
+        buttonQuit->setAutoDefault(true);
+        buttonQuit->setDefault(true);
+        buttonQuit->setFlat(true);
+
+        gridLayout->addWidget(buttonQuit, 0, 0, 1, 1);
+
+        buttonPrint = new QPushButton(GroupButtons);
+        buttonPrint->setObjectName(QString::fromUtf8("buttonPrint"));
+
+        gridLayout->addWidget(buttonPrint, 0, 1, 1, 1);
+
+        buttonHelp = new QPushButton(GroupButtons);
+        buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+
+        gridLayout->addWidget(buttonHelp, 0, 2, 1, 1);
+
+
+        gridLayout_2->addWidget(GroupButtons, 2, 0, 1, 1);
+
+        horizontalSpacer = new QSpacerItem(249, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        gridLayout_2->addItem(horizontalSpacer, 2, 1, 1, 1);
+
+
+        retranslateUi(EditFile);
+
+        QMetaObject::connectSlotsByName(EditFile);
+    } // setupUi
+
+    void retranslateUi(QWidget *EditFile)
+    {
+        EditFile->setWindowTitle(QApplication::translate("EditFile", "Edit File", 0, QApplication::UnicodeUTF8));
+        GroupButtons->setTitle(QString());
+        buttonQuit->setText(QApplication::translate("EditFile", "&Quit", 0, QApplication::UnicodeUTF8));
+        buttonPrint->setText(QApplication::translate("EditFile", "&Print", 0, QApplication::UnicodeUTF8));
+        buttonHelp->setText(QApplication::translate("EditFile", "&Help", 0, QApplication::UnicodeUTF8));
+        Q_UNUSED(EditFile);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class EditFile: public Ui_EditFile {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // EDITFILE_H
diff --git a/src/HOMARDGUI/EditFile.ui b/src/HOMARDGUI/EditFile.ui
new file mode 100644 (file)
index 0000000..cccd2d7
--- /dev/null
@@ -0,0 +1,100 @@
+<ui version="4.0" >
+ <class>EditFile</class>
+ <widget class="QWidget" name="EditFile" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>548</width>
+    <height>901</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Edit File</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2" >
+   <item row="0" column="0" colspan="2" >
+    <widget class="QTextBrowser" name="QTBEditFile" >
+     <property name="minimumSize" >
+      <size>
+       <width>530</width>
+       <height>800</height>
+      </size>
+     </property>
+     <property name="font" >
+      <font>
+       <family>Courier New</family>
+      </font>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <spacer name="verticalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>14</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QGroupBox" name="GroupButtons" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout" >
+      <item row="0" column="0" >
+       <widget class="QPushButton" name="buttonQuit" >
+        <property name="text" >
+         <string>&amp;Quit</string>
+        </property>
+        <property name="autoDefault" >
+         <bool>true</bool>
+        </property>
+        <property name="default" >
+         <bool>true</bool>
+        </property>
+        <property name="flat" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="buttonPrint" >
+        <property name="text" >
+         <string>&amp;Print</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="buttonHelp" >
+        <property name="text" >
+         <string>&amp;Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="1" >
+    <spacer name="horizontalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>249</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/HOMARDGUI.cxx b/src/HOMARDGUI/HOMARDGUI.cxx
new file mode 100644 (file)
index 0000000..cd7a585
--- /dev/null
@@ -0,0 +1,523 @@
+//  File   : HOMARDGUI.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+
+using namespace std;
+#include "HOMARDGUI.h"
+
+// SALOME Includes
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
+#include "SALOME_LifeCycleCORBA.hxx"
+
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_Session.h"
+#include "SUIT_ViewWindow.h"
+#include "SUIT_ViewManager.h"
+#include <SUIT_Desktop.h>
+
+#include "CAM_Module.h"
+#include "OB_Browser.h"
+
+#include "SALOME_ListIO.hxx"
+#include "SALOME_ListIteratorOfListIO.hxx"
+
+#include "SalomeApp_Application.h"
+#include "SalomeApp_DataModel.h"
+#include "SalomeApp_Study.h"
+#include "LightApp_SelectionMgr.h"
+#include "LightApp_Selection.h"
+#include <LightApp_Preferences.h>
+#include "SalomeApp_Module.h"
+#include "SALOMEconfig.h"
+#include <SALOME_LifeCycleCORBA.hxx>
+
+#include <utilities.h>
+
+
+// QT Includes
+#include <QMenu>
+#include "MonCreateCase.h"
+#include "MonCreateIteration.h"
+#include "MonEditFile.h"
+#include "MonEditCase.h"
+#include "MonEditIteration.h"
+#include "MonEditHypothesis.h"
+#include "MonEditZone.h"
+#include "MonEditBoundaryDi.h"
+#include "HomardQtCommun.h"
+
+// BOOST Includes
+#include <boost/shared_ptr.hpp>
+
+//Pour le _CAST
+#include "SALOMEDS_Study.hxx"
+#include "HOMARDGUI_Utils.h"
+
+static CORBA::ORB_var _orb;
+
+//=======================================================================
+// function : HOMARDGUI()
+// purpose  : Constructor
+//=======================================================================
+HOMARDGUI::HOMARDGUI(const QString&) :
+           SalomeApp_Module( "HOMARD" ), // default name
+           LightApp_Module( "HOMARD" )
+{
+}
+
+
+//=======================================================================
+// function : ~HOMARDGUI()
+// purpose  : Destructor
+//=======================================================================
+HOMARDGUI::~HOMARDGUI()
+{
+}
+
+//=======================================================================
+// function : InitHOMARDGen
+// launch HOMARD component and return a handle
+//=======================================================================
+HOMARD::HOMARD_Gen_var HOMARDGUI::InitHOMARDGen(SalomeApp_Application* app)
+{
+  Engines::Component_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer","HOMARD" );
+  HOMARD::HOMARD_Gen_var clr = HOMARD::HOMARD_Gen::_narrow(comp);
+  ASSERT(!CORBA::is_nil(clr));
+  return clr;
+}
+
+//=======================================================================
+// Module's initialization
+void HOMARDGUI::initialize( CAM_Application* app )
+//=======================================================================
+{
+  SalomeApp_Module::initialize( app );
+  InitHOMARDGen(dynamic_cast<SalomeApp_Application*>( app ));
+  anId = 0;
+  createActions();
+  createMenus();
+}
+
+//================================================
+// function : createHOMARDAction
+// create an item in status bar and Homard menu
+//================================================
+void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle  )
+{
+  QIcon icon;
+  QWidget* parent = application()->desktop();
+  SUIT_ResourceMgr* resMgr = application()->resourceMgr();
+  QPixmap pix;
+  if ( icon_id.length() )
+     pix = resMgr->loadPixmap( "HOMARD", tr( icon_id .toLatin1().data()) );
+  else
+     pix = resMgr->loadPixmap( "HOMARD", tr( QString( "ICO_%1" ).arg( po_id ).toLatin1().data() ), false );
+  if ( !pix.isNull() )
+      icon = QIcon( pix );
+
+  QString tooltip    = tr( QString( "TOP_%1" ).arg( po_id ).toLatin1().data() ),
+          menu       = tr( QString( "MEN_%1" ).arg( po_id ).toLatin1().data() ),
+          status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() );
+
+  createAction( id, tooltip, icon, menu, status_bar, key, parent, toggle, this, SLOT( OnGUIEvent() )  );
+}
+
+//================================================
+// function : createAction
+// constructs Homard menu
+// calls createHOMARDAction for each item
+//================================================
+void HOMARDGUI::createActions(){
+//
+  createHOMARDAction( 1101, "NEW_CASE",       "cas_calcule.png"  );
+  createHOMARDAction( 1102, "NEW_ITERATION",  "iter_next.png"    );
+  createHOMARDAction( 1111, "COMPUTE",        "mesh_compute.png" );
+  createHOMARDAction( 1120, "EDIT_CASE",      "whatis.png"       );
+  createHOMARDAction( 1121, "EDIT_ITERATION", "whatis.png"       );
+  createHOMARDAction( 1122, "EDIT_HYPO",      "whatis.png"       );
+  createHOMARDAction( 1123, "EDIT_ZONE",      "whatis.png"       );
+  createHOMARDAction( 1124, "EDIT_BOUNDARY",  "whatis.png"       );
+  createHOMARDAction( 1130, "EDIT_MESS_FILE", "texte.png"        );
+//
+}
+
+//================================================
+// function : createPreferences
+// No preferences for Homard
+// Just a test
+//================================================
+void HOMARDGUI::createPreferences(){
+   QString toto = tr( "PREF_GROUP_GENERAL" );
+   int tabId  = addPreference( tr( "PREF_GROUP_GENERAL" ) );
+   int genGroup = addPreference( tr( "PREF_TAB_SETTINGS" ), tabId );
+   addPreference( tr( "PREF_TEST" ), genGroup, LightApp_Preferences::Color, "Homard", "shading_color" );
+}
+
+
+//================================================
+// function : createMenus
+//                Verifier l'avant dernier nombre passe en parametre
+//================================================
+void HOMARDGUI::createMenus(){
+  int HOMARD_Id  = createMenu( tr( "HOMARD" ),  -1,  5, 10 );
+  createMenu( 1101, HOMARD_Id, -1 ); //Create_Case
+  createMenu( 1102, HOMARD_Id, -1 ); //Create_Iteration
+  createMenu( 1111, HOMARD_Id, -1 ); //COMPUTE
+  createMenu( separator(), HOMARD_Id,-1);
+  createMenu( 1120, HOMARD_Id, -1 ); //Edit_Case
+  createMenu( 1121, HOMARD_Id, -1 ); //Edit_Iteration
+  createMenu( 1122, HOMARD_Id, -1 ); //Edit Hypo
+  createMenu( 1123, HOMARD_Id, -1 ); //Edit_Zone
+  createMenu( 1124, HOMARD_Id, -1 ); //Edit_Boundary
+  createMenu( separator(), HOMARD_Id,-1);
+  createMenu( 1130, HOMARD_Id, -1 ); //EditAsciiFile pour le fichier listeStd ou bilan
+}
+
+//================================================
+void HOMARDGUI::OnGUIEvent()
+//================================================
+{
+  MESSAGE("HOMARDGUI::OnGUIEvent()")
+  setOrb();
+  const QObject* obj = sender();
+  if ( !obj || !obj->inherits( "QAction" ) )
+       return;
+  int id = actionId((QAction*)obj);
+  bool ret;
+  if ( id != -1 )
+      ret = OnGUIEvent( id );
+  MESSAGE("************** End of HOMARDGUI::OnGUIEvent()");
+}
+
+//=======================================================================
+// Method OnGUIEvent pour Homard
+//=======================================================================
+bool HOMARDGUI::OnGUIEvent (int theCommandID)
+{
+  MESSAGE("HOMARDGUI::OnGUIEvent(int)");
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( application() );
+  if ( !app ) return false;
+
+  SalomeApp_Study* stud = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !stud ) {
+    MESSAGE ( "FAILED to cast active study to SalomeApp_Study" );
+    return false;
+  }
+
+  SUIT_Desktop* parent = application()->desktop();
+  HOMARD::HOMARD_Gen_var homardGen = HOMARDGUI::InitHOMARDGen(app);
+
+  if (!CORBA::is_nil(homardGen))
+  {
+    // Set current study
+    SalomeApp_Study* aSAStudy =dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+    _PTR(Study) aStudy = aSAStudy->studyDS();
+    SALOMEDS::Study_ptr aStudyDS;
+    if (aStudy)
+      aStudyDS = _CAST(Study,aStudy)->GetStudy();
+      homardGen->SetCurrentStudy(aStudyDS);
+   }
+  getApp()->updateObjectBrowser();
+
+  SCRUTE(theCommandID);
+  switch (theCommandID)
+  {
+    case 1101: // Creation d un Cas
+    {
+      MESSAGE("command " << theCommandID << " activated");
+      MonCreateCase *aDlg = new MonCreateCase( parent, TRUE, 
+                            HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ;
+      aDlg->show();
+      break;
+    }
+
+    case 1102: // Creation d une Iteration
+    {
+      MESSAGE("command " << theCommandID << " activated");
+      QString IterParentName=HOMARD_QT_COMMUN::SelectionArbreEtude(QString("IterationHomard"), 0);
+      MESSAGE("IterParentName " << IterParentName.toStdString().c_str() << " choisi dans arbre");
+      MonCreateIteration *IterDlg = new MonCreateIteration( parent, true, 
+                                     HOMARD::HOMARD_Gen::_duplicate(homardGen), IterParentName ) ;
+      IterDlg->show();
+      break;
+    }
+
+    case 1111: // Compute une Iteration
+    {
+      MESSAGE("command " << theCommandID << " activated");
+      QString monIter=HOMARD_QT_COMMUN::SelectionArbreEtude(QString("IterationHomard"), 1);
+      if (monIter == QString("")) break;
+      try
+      {
+        homardGen->Compute(monIter.toStdString().c_str(), 0);
+      }
+      catch( SALOME::SALOME_Exception& S_ex )
+      {
+        QMessageBox::information( 0, "Error",
+                    QString(CORBA::string_dup(S_ex.details.text)),
+                    QMessageBox::Ok + QMessageBox::Default );
+        getApp()->updateObjectBrowser();
+        return false;
+      }
+      break;
+    }
+
+    case 1120: // Edition d un cas
+    {
+      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      _PTR(SObject) obj = chercheMonObjet();
+      if ((obj) and (HOMARD_UTILS::isCase(obj)))
+      {
+          MonEditCase *aDlg = new MonEditCase(parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName ) ;
+          aDlg->show();
+      }
+    }
+
+    case 1121: // Edition d une iteration
+    {
+      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      _PTR(SObject) obj = chercheMonObjet();
+      if ((obj) and (HOMARD_UTILS::isIter(obj)))
+      {
+          MonEditIteration *aDlg = new MonEditIteration(parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          aDlg->show();
+      }
+    }
+
+    case 1122: // Edition d une hypothese
+    {
+      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      _PTR(SObject) obj = chercheMonObjet();
+      if ((obj) and (HOMARD_UTILS::isHypo(obj)))
+      {
+          MonEditHypothesis *aDlg = new MonEditHypothesis(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen),  _ObjectName, QString(""), QString("")) ;
+          aDlg->show();
+      }
+    }
+
+    case 1123: // Edition d une zone
+    {
+      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      _PTR(SObject) obj = chercheMonObjet();
+      if ((obj) and (HOMARD_UTILS::isZone(obj)))
+      {
+          MonEditZone *aDlg = new MonEditZone(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          aDlg->show();
+      }
+    }
+
+    case 1124: // Edition d une frontiere
+    {
+      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      _PTR(SObject) obj = chercheMonObjet();
+      if ((obj) and (HOMARD_UTILS::isBoundaryDi(obj)))
+      {
+          MESSAGE(".. Lancement de MonEditBoundaryDi" );
+          MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          aDlg->show();
+      }
+    }
+
+    case 1130: // Edition du fichier mess
+    {
+      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      _PTR(SObject) obj = chercheMonObjet();
+      if ((obj) and ((HOMARD_UTILS::isFileMess(obj) or HOMARD_UTILS::isFileSummary(obj))))
+      {
+          MonEditFile *aDlg = new MonEditFile( 0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName ) ;
+          aDlg->show();
+      }
+     }
+  }
+  getApp()->updateObjectBrowser();
+  return true;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+// Module's engine IOR
+//=============================================================================
+QString HOMARDGUI::engineIOR() const
+//=============================================================================
+{
+  CORBA::String_var anIOR = getApp()->orb()->object_to_string( InitHOMARDGen(getApp()) );
+  return QString( anIOR.in() );
+}
+
+// Module's activation
+//=============================================================================
+bool HOMARDGUI::activateModule( SUIT_Study* theStudy )
+//=============================================================================
+{
+  bool bOk = SalomeApp_Module::activateModule( theStudy );
+
+  setMenuShown( true );
+  setToolShown( true );
+
+  return bOk;
+}
+
+// Module's deactivation
+//=============================================================================
+bool HOMARDGUI::deactivateModule( SUIT_Study* theStudy )
+//=============================================================================
+{
+  setMenuShown( false );
+  setToolShown( false );
+
+  return SalomeApp_Module::deactivateModule( theStudy );
+}
+
+// Default windows
+//=============================================================================
+void HOMARDGUI::windows( QMap<int, int>& theMap ) const
+//=============================================================================
+{
+  theMap.clear();
+  theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+  theMap.insert( SalomeApp_Application::WT_PyConsole,     Qt::BottomDockWidgetArea );
+}
+
+//=============================================================================
+void HOMARDGUI::setOrb()
+//=============================================================================
+{
+  try 
+  {
+     ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance();
+     ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
+     _orb = init( 0 , 0 );
+  } 
+  catch (...) 
+  {
+     INFOS("internal error : orb not found");
+     _orb = 0;
+  }
+           ASSERT(! CORBA::is_nil(_orb));
+}
+//========================================
+_PTR(SObject) HOMARDGUI::chercheMonObjet()
+//========================================
+{
+
+    SALOMEDSClient_SObject* aSO = NULL;
+    _PTR(SObject) obj;
+    SALOME_ListIO lst;
+    getApp()->selectionMgr()->selectedObjects( lst );
+    if (  lst.Extent() == 1 ) 
+    {
+       Handle(SALOME_InteractiveObject) io = lst.First();
+       SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
+       _PTR(Study) study = appStudy->studyDS();
+       _PTR(SObject) obj = study->FindObjectID( io->getEntry() );
+       _ObjectName = QString( obj->GetName().c_str() );
+        return obj;
+     }
+     else
+         return _PTR(SObject)(aSO);
+}
+//=============================================================================
+void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& title )
+//=============================================================================
+{
+  MESSAGE("Debut de contextMenuPopup");
+  _PTR(SObject) obj = chercheMonObjet();
+  if ( obj )
+  {
+    title = QString( obj->GetName().c_str() );
+    _ObjectName = title;
+    SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+//
+    if ( HOMARD_UTILS::isBoundaryDi(obj) )
+    {
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
+      menu->addAction(QIcon(pix), "Edit boundary", this,SLOT(EditBoDi()));
+    }
+    else if ( HOMARD_UTILS::isZone(obj) )
+    {
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
+      menu->addAction(QIcon(pix), "Edit zone", this,SLOT(EditZone()));
+    }
+    else if ( HOMARD_UTILS::isHypo(obj) )
+    {
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
+      menu->addAction(QIcon(pix), "Edit hypothesis", this,SLOT(EditHypo()));
+    }
+    else if ( HOMARD_UTILS::isIter(obj) )
+    {
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "iter_next.png" );
+      menu->addAction(QIcon(pix), "Next iteration", this,SLOT(NextIter()));
+      QPixmap pix1 = resMgr->loadPixmap( "HOMARD", "whatis.png" );
+      menu->addAction(QIcon(pix1), "Edit iteration", this,SLOT(EditIter()));
+      QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "mesh_compute.png" );
+      menu->addAction(QIcon(pix2), "Compute", this,SLOT(LanceCalcul()));
+    }
+    else if ( HOMARD_UTILS::isCase(obj) )
+    {
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
+      menu->addAction(QIcon(pix), "Edit case", this,SLOT(EditCase()));
+    }
+    else if ( HOMARD_UTILS::isFileMess(obj) or HOMARD_UTILS::isFileSummary(obj) )
+    {
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "texte.png" );
+      menu->addAction(QIcon(pix), "Show file", this,SLOT(EditAsciiFile()));
+    }
+  }
+}
+
+void HOMARDGUI::NextIter()
+{
+  this->OnGUIEvent(1102);
+}
+
+void HOMARDGUI::LanceCalcul()
+{
+  this->OnGUIEvent(1111);
+}
+
+void HOMARDGUI::EditCase()
+{
+  this->OnGUIEvent(1120);
+}
+
+void HOMARDGUI::EditIter() 
+{
+  this->OnGUIEvent(1121); 
+}
+
+void HOMARDGUI::EditHypo()
+{
+  this->OnGUIEvent(1122);
+}
+
+void HOMARDGUI::EditZone()
+{
+  this->OnGUIEvent(1123);
+}
+
+void HOMARDGUI::EditBoDi()
+{
+  this->OnGUIEvent(1124);
+}
+
+void HOMARDGUI::EditAsciiFile()
+{
+  this->OnGUIEvent(1130);
+}
+//
+//=============================================================================
+// Export the module
+//=============================================================================
+extern "C" {
+  Standard_EXPORT CAM_Module* createModule()
+  {
+    return new HOMARDGUI("");
+  }
+}
+
diff --git a/src/HOMARDGUI/HOMARDGUI.h b/src/HOMARDGUI/HOMARDGUI.h
new file mode 100644 (file)
index 0000000..9fe03d6
--- /dev/null
@@ -0,0 +1,75 @@
+//  HOMARDGUI : HOMARD component GUI implemetation 
+//
+
+#ifndef _HOMARDGUI_H_
+#define _HOMARDGUI_H_
+
+#include <SalomeApp_Module.h>
+#include "SalomeApp_Study.h"
+
+#include <SALOMEconfig.h>
+#include <SALOME_LifeCycleCORBA.hxx>
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+#include CORBA_CLIENT_HEADER(HOMARD_Hypothesis)
+
+#include <QtCore/QString>
+
+class SalomeApp_Application;
+
+class HOMARDGUI: public SalomeApp_Module 
+{
+  Q_OBJECT
+
+public:
+   HOMARDGUI(const QString&);
+  ~HOMARDGUI();
+
+
+
+  virtual bool OnGUIEvent (int theCommandID);
+  void    initialize( CAM_Application* );
+  QString engineIOR() const;
+  void    windows( QMap<int, int>& ) const;
+
+  static HOMARD::HOMARD_Gen_var InitHOMARDGen(SalomeApp_Application* );
+
+
+public slots:
+    bool    deactivateModule( SUIT_Study* );
+    bool    activateModule( SUIT_Study* );
+    static void setOrb();
+
+private slots:
+    void OnGUIEvent();
+    void EditBoDi();
+    void EditZone();
+    void EditHypo();
+    void EditIter();
+    void EditCase();
+    void EditAsciiFile();
+    void LanceCalcul();
+    void NextIter();
+    void XmGraceFichier();
+
+public:
+   virtual void  contextMenuPopup( const QString&, QMenu*, QString& );
+
+
+private:
+   void createHOMARDAction( const int id, const QString& po_id, const QString& icon_id = QString(""),
+                            const int key = 0, const bool toggle = false );
+   void createActions();
+   void createMenus();
+   void createPopupMenus();
+   _PTR(SObject)  chercheMonObjet();
+
+   virtual void createPreferences();
+   HOMARD::HOMARD_Gen_var myComponentHomard;
+   SALOMEDS::Study_var       myStudy;
+
+   int anId;
+   QString _ObjectName;
+};
+
+#endif
diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.cxx b/src/HOMARDGUI/HOMARDGUI_Utils.cxx
new file mode 100644 (file)
index 0000000..2db82b8
--- /dev/null
@@ -0,0 +1,372 @@
+
+#include "HOMARDGUI_Utils.h"
+
+#include "OB_Browser.h"
+
+#include "SUIT_Desktop.h"
+#include "SUIT_Application.h"
+#include "SUIT_Session.h"
+
+#include "LightApp_SelectionMgr.h"
+#include "SalomeApp_Application.h"
+#include "SalomeApp_Module.h"
+#include "SalomeApp_Study.h"
+
+#include "SALOME_ListIO.hxx"
+#include "SALOME_ListIteratorOfListIO.hxx"
+
+#include "SALOMEconfig.h"
+#include "utilities.h"
+#include <string>
+#include <HOMARDGUI.h>
+
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <sys/stat.h>
+#include <dirent.h>
+
+SALOME_ListIO HOMARD_UTILS::mySelected;
+
+//================================================================
+// Function : GetCStudy
+// Returne un pointeur sur l'etude courante
+//================================================================
+ _PTR(Study) HOMARD_UTILS::GetCStudy(const SalomeApp_Study* theStudy)
+{
+    return theStudy->studyDS();
+}
+    
+    
+//================================================================
+// Function : GetActiveStudy
+// Returne un pointeur sur l'etude active
+//================================================================
+SUIT_Study* HOMARD_UTILS::GetActiveStudy()
+{
+    SUIT_Application* app = SUIT_Session::session()->activeApplication();
+    if (app)
+      return app->activeStudy();
+    else
+      return NULL;
+}
+    
+//================================================================
+// Function : GetActiveStudyDocument
+// Returne un pointeur sur l'etude active
+//================================================================
+_PTR(Study) HOMARD_UTILS::GetActiveStudyDocument()
+{
+    SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(GetActiveStudy());
+    if (aStudy){
+      return aStudy->studyDS();
+    }
+    else
+      return _PTR(Study)();
+}
+    
+//================================================================
+// Function : updateObjBrowser
+// Purpose  : met a jour l arbre d 'etude pour Homard
+//================================================================
+void HOMARD_UTILS::updateObjBrowser()
+{
+    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
+    if (app) {
+      //  Le nom identifiant doit etre la valeur du parametre
+      // name de la section HOMARD du fichier SalomeApp.xml 
+      CAM_Module* module = app->module("Homard" );
+      SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>( module );
+      if ( appMod ) {
+        app->updateObjectBrowser();
+        appMod->updateObjBrowser( true );
+      }
+      else 
+        MESSAGE( "---   HOMARD::updateObjBrowser: appMod = NULL");
+    }
+}
+
+//================================================================
+// Function : selectedIO
+// Return the list of selected SALOME_InteractiveObject's
+//================================================================
+const SALOME_ListIO& HOMARD_UTILS::selectedIO()
+{
+      SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* > ( SUIT_Session::session()->activeApplication() );
+      LightApp_SelectionMgr* aSelectionMgr = app->selectionMgr();
+      if( aSelectionMgr )
+      {
+             aSelectionMgr->selectedObjects( mySelected );
+              for (SALOME_ListIteratorOfListIO it (mySelected); it.More(); it.Next()) 
+                SCRUTE(it.Value()->getEntry());
+      };
+      return mySelected;
+              
+}
+    
+//================================================================
+// Function : IObjectCount
+// Return the number of selected objects
+//================================================================
+int HOMARD_UTILS::IObjectCount()
+{
+      SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+      LightApp_SelectionMgr* aSelectionMgr = app->selectionMgr();
+      if( aSelectionMgr )
+      {
+             aSelectionMgr->selectedObjects( mySelected );
+             SCRUTE(mySelected.Extent());
+              return mySelected.Extent();
+      }
+      return 0;
+}
+    
+//================================================================
+// Function : firstIObject
+// Purpose  :  Return the first selected object in the selected object list
+//================================================================
+Handle(SALOME_InteractiveObject) HOMARD_UTILS::firstIObject()
+{
+      const SALOME_ListIO& aList = selectedIO();
+      return aList.Extent() > 0 ? aList.First() : Handle(SALOME_InteractiveObject)();
+}
+
+//================================================================
+// Function : lastIObject
+// Return the last selected object in the selected object list
+//================================================================
+Handle(SALOME_InteractiveObject) HOMARD_UTILS::lastIObject()
+{
+      const SALOME_ListIO& aList = selectedIO();
+      return aList.Extent() > 0 ? aList.Last() : Handle(SALOME_InteractiveObject)();
+}
+
+//================================================================
+// Function : isXmgrace
+// Retourne vrai si le fichier associe est de type ASCII
+//================================================================
+bool HOMARD_UTILS::isXmgrace(_PTR(SObject) MonObj)
+{
+   _PTR(GenericAttribute) anAttr;
+   if (!MonObj->FindAttribute(anAttr, "AttributeComment")) return false;
+   _PTR(AttributeComment) aFileComment (anAttr);
+   std::string Type = aFileComment->Value();
+   if (QString(Type.c_str()) == QString("HomardOuputQual")) return true;
+   return false;
+}
+//================================================================
+// Retourne vrai si l objet est du type voulu
+// . Dans le cas d'un cas, d'une hypothese, d'une zone, on se contente
+// d'une comparaison simple entre le type stocke et TypeObject.
+// . Pour l'iteration, le type stocke en attribut est sous la forme
+// "IterationHomard" + le nom de l'iteration precedente.
+// Il faut donc regarder si la chaine commence par TypeObject.
+// . Idem pour le fichier de messages : "Mess " + numero d'iteration
+//
+// On filtre ce genre de situation avec option :
+//  -1 : comparaison totale
+//   0 : comparaison sur le debut de la chaine
+//================================================================
+bool HOMARD_UTILS::isObject(_PTR(SObject) MonObj, QString TypeObject, int option)
+{
+//   MESSAGE("isObject, TypeObject = "<<TypeObject.toStdString().c_str()<<", option = "<<option);
+// Existence d'un attribut ?
+  _PTR(GenericAttribute) anAttr;
+  if ( !MonObj->FindAttribute(anAttr, "AttributeComment") ) return false;
+// Quel type ?
+  _PTR(AttributeComment) aComment (anAttr);
+  QString Type = QString(aComment->Value().c_str());
+//   MESSAGE("Type = "<<Type.toStdString().c_str());
+// Est-ce le bon ?
+  bool bOK = false ;
+  if ( option == 0 )
+  {
+    int position = Type.lastIndexOf(TypeObject);
+    if ( position == 0 ) { bOK = true ; }
+  }
+  else
+  {
+    if ( Type == TypeObject ) { bOK = true ; }
+  }
+  return bOK ;
+}
+//================================================================
+// Retourne vrai si l objet est une frontiere discrete
+//================================================================
+bool HOMARD_UTILS::isBoundaryDi(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("BoundaryDiHomard"), -1 ) ;
+}
+//================================================================
+// Retourne vrai si l objet est une zone
+//================================================================
+bool HOMARD_UTILS::isZone(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("ZoneHomard"), -1 ) ;
+}
+//================================================================
+// Retourne vrai si l objet est une Hypothese
+//================================================================
+bool HOMARD_UTILS::isHypo(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("HypoHomard"), -1 ) ;
+}
+//================================================================
+// Retourne vrai si l objet est une iteration
+//================================================================
+bool HOMARD_UTILS::isIter(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("IterationHomard"), 0 ) ;
+}
+//================================================================
+// Retourne vrai si l objet est un cas
+//================================================================
+bool HOMARD_UTILS::isCase(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("CasHomard"), -1 ) ;
+}
+//================================================================
+// Retourne vrai si l objet est un fichier de messages
+//================================================================
+bool HOMARD_UTILS::isFileMess(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("Mess"), 0 ) ;
+}
+//================================================================
+// Retourne vrai si l objet est un fichier de bilan
+//================================================================
+bool HOMARD_UTILS::isFileSummary(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("Summary"), 0 ) ;
+}
+//================================================================
+// Function : ChercheFileDansSelection
+// Retourne Le nom du fichier associe
+//================================================================
+QString HOMARD_UTILS::ChercheFileDansSelection()
+{
+   MESSAGE("ChercheFileDansSelection");
+   int nbSel = HOMARD_UTILS::IObjectCount() ;
+   if (nbSel > 1 or nbSel == 0) return QString::null;
+
+   Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject();
+   ASSERT(aIO);
+   if (!( aIO->hasEntry())) return QString::null; 
+
+   _PTR(Study) myStudy = HOMARD_UTILS::GetActiveStudyDocument();
+   _PTR(SObject) aSObj ( myStudy->FindObjectID( aIO->getEntry() ) );
+   if (!aSObj) return QString::null;
+
+   _PTR(GenericAttribute) anAttr;
+   if (!aSObj->FindAttribute(anAttr, "AttributeExternalFileDef")) return QString::null;
+   _PTR(AttributeExternalFileDef) aFileName (anAttr);
+   std::string aFile = aFileName->Value();
+   SCRUTE(aFile);
+   return QString(aFile.c_str());
+}
+
+//============================================================
+// Function ChercheDansDir
+// Cherche tous les fichiers dans la directory qui correspondent 
+// a la fois a la base et au numero d iteration, numero d iteration +1
+// exple info.00.bilan
+// ou qual.tetr.00.dat
+//================================================================================
+QStringList HOMARD_UTILS::ChercheDansDir(QString direct, QString base, int numIter)
+//================================================================================
+{
+    QStringList liste;
+
+
+    QString strNum = QString("");
+    if (numIter != -1) strNum = HOMARD_UTILS::Transforme(numIter);
+    QString strNum1 = QString("");
+    if (numIter != -1) strNum1 = HOMARD_UTILS::Transforme(numIter+1);
+
+    struct dirent **namelist;
+    int n = scandir(direct.toLatin1(), &namelist, 0, alphasort);
+    while(n--) 
+    {
+       QString fich =QString( namelist[n]->d_name);
+       if (fich.contains(base) > 0) 
+       {
+        if (numIter != -1)
+        {
+          if ((fich.contains(strNum)>0) or (fich.contains(strNum1)>0))
+             liste.append(fich);
+         }
+        else
+        {
+          liste.append(fich);
+         }
+       }
+    }
+    return liste;
+}
+
+QString HOMARD_UTILS::Transforme(int num)
+{
+    std::ostringstream nb ;
+    nb << std::setw(2) << std::setfill('0') << num ;
+    QString retour= QString(nb.str().c_str());
+    return retour;
+
+}
+
+//=============================================================================
+void HOMARD_UTILS::AddNewRoot(int Tag, QString Racine)
+//=============================================================================
+{
+     _PTR(Study) myStudy = HOMARD_UTILS::GetActiveStudyDocument();
+     ASSERT(myStudy);
+     _PTR(StudyBuilder) myBuilder( myStudy->NewBuilder() );
+     ASSERT(myBuilder);
+     _PTR(SComponent)  aFather=myStudy->FindComponent("HOMARD");
+     ASSERT(aFather);
+    
+     _PTR(SObject) InfoRoot = myBuilder->NewObjectToTag (aFather, Tag);
+     _PTR(GenericAttribute) anAttr;
+    anAttr = myBuilder->FindOrCreateAttribute(InfoRoot, "AttributeName");
+    _PTR(AttributeName) aName (anAttr);
+    aName->SetValue(Racine.toStdString());
+}
+//=============================================================================
+void HOMARD_UTILS::RangeSousTag(int Tag,QString FileName, int TagFichier, QString Comment,QString FileDir)
+//=============================================================================
+{
+    _PTR(SObject) Root;
+     _PTR(Study) myStudy = HOMARD_UTILS::GetActiveStudyDocument();
+     ASSERT(myStudy);
+     _PTR(StudyBuilder) myBuilder( myStudy->NewBuilder() );
+     ASSERT(myBuilder);
+     _PTR(SComponent)  aFather=myStudy->FindComponent("HOMARD");
+     ASSERT(aFather);
+     bool found = aFather->FindSubObject(Tag,Root);
+     ASSERT(found);
+
+     _PTR(SObject) MonInfo = myBuilder->NewObjectToTag (Root, TagFichier);
+     ASSERT(MonInfo);
+     _PTR(GenericAttribute) anAttr;
+     anAttr = myBuilder->FindOrCreateAttribute(MonInfo, "AttributeName");
+    _PTR(AttributeName) aName (anAttr);
+     aName->SetValue(FileName.toStdString());
+     QString FileComplet = FileDir +QString("/") +FileName;
+     anAttr = myBuilder->FindOrCreateAttribute(MonInfo, "AttributeExternalFileDef");
+    _PTR(AttributeExternalFileDef) aFile (anAttr);
+     aFile->SetValue((FileComplet).toStdString());
+     anAttr = myBuilder->FindOrCreateAttribute(MonInfo, "AttributeComment");
+    _PTR(AttributeComment) aComment (anAttr);
+     aComment->SetValue(Comment.toStdString());
+}
+
+//=========================================================================================================
+void HOMARD_UTILS::PushOnHelp(QString monFichierAide)
+{
+     LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+     if (app) {
+        HOMARDGUI* aHomardGUI = dynamic_cast<HOMARDGUI*>( app->module( "Homard" ) );
+        app->onHelpContextModule(aHomardGUI ? app->moduleName(aHomardGUI->moduleName()) : QString(""), monFichierAide);
+     }
+
+}
+//=========================================================================================================
diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.h b/src/HOMARDGUI/HOMARDGUI_Utils.h
new file mode 100644 (file)
index 0000000..54fe680
--- /dev/null
@@ -0,0 +1,97 @@
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+
+#ifndef HOMARD_H_UTILS
+#define HOMARD_H_UTILS
+
+
+#include <SALOMEconfig.h>
+
+#include <CORBA.h>
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include "SALOMEDSClient_definitions.hxx"
+#include "SALOME_InteractiveObject.hxx"
+#include "LightApp_DataOwner.h"
+#include "SalomeApp_Application.h"
+#include <SALOME_ListIO.hxx>
+
+class QString;
+class QStringList;
+
+class SUIT_ViewWindow;
+class SUIT_Desktop;
+class SUIT_Study;
+class SUIT_ResourceMgr;
+
+class CAM_Module;
+
+class SALOMEDSClient_Study;
+class SALOMEDSClient_SObject;
+
+class SalomeApp_Study;
+class SalomeApp_Module;
+class LightApp_SelectionMgr;
+
+namespace HOMARD_UTILS {
+  
+  _PTR(Study)
+  GetCStudy(const SalomeApp_Study* theStudy);
+  SUIT_Study* GetActiveStudy();
+  _PTR(Study) GetActiveStudyDocument();
+
+  void updateObjBrowser();
+  
+  const SALOME_ListIO& selectedIO();    // Function returns a list of SALOME_InteractiveObject's from
+                                        // selection manager in GUI
+
+  int   IObjectCount() ;                // Function returns the number of selected objects
+  
+  Handle(SALOME_InteractiveObject) firstIObject() ;
+                                        // Function returns the first selected object in the list
+                                        // of selected objects
+
+  Handle(SALOME_InteractiveObject) lastIObject() ;
+                                      // Function returns the last selected object in the list
+                                       // of selected objects
+
+  bool isXmgrace(_PTR(SObject)  MonObj);
+  bool isBoundaryDi(_PTR(SObject)  MonObj);
+  bool isZone(_PTR(SObject)  MonObj);
+  bool isHypo(_PTR(SObject)  MonObj);
+  bool isIter(_PTR(SObject)  MonObj);
+  bool isCase(_PTR(SObject)  MonObj);
+  bool isFileMess(_PTR(SObject)  MonObj);
+  bool isFileSummary(_PTR(SObject)  MonObj);
+  bool isObject(_PTR(SObject)  MonObj, QString TypeObject, int option );
+
+  QString ChercheFileDansSelection();
+  QStringList ChercheDansDir (QString direct, QString base, int numIter);
+  void RangeSousTag          (int Tag,QString FileName, int TagFichier, QString Comment,QString FileDir);
+
+  void PushOnHelp(QString monFichierAide);
+
+  QString Transforme(int num);
+
+  void AddNewRoot(int Tag, QString Racine);
+  extern SALOME_ListIO mySelected;
+}
+
+#endif // ifndef HOMARD_H_UTILS
diff --git a/src/HOMARDGUI/HOMARD_icons.po b/src/HOMARDGUI/HOMARD_icons.po
new file mode 100644 (file)
index 0000000..b386757
--- /dev/null
@@ -0,0 +1,11 @@
+# This is a Qt message file in .po format.  Each msgid starts with
+# a scope.  This scope should *NOT* be translated - eg. "Foo::Bar"
+# would be translated to "Pub", not "Foo::Pub".
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
+"PO-Revision-Date: YYYY-MM-DD\n"
+"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+
diff --git a/src/HOMARDGUI/HOMARD_msg_en.po b/src/HOMARDGUI/HOMARD_msg_en.po
new file mode 100644 (file)
index 0000000..eea471a
--- /dev/null
@@ -0,0 +1,111 @@
+# This is a Qt message file in .po format.  Each msgid starts with
+# a scope.  This scope should *NOT* be translated - eg. translating
+# from French to English, "Foo::Bar" would be translated to "Pub",
+# not "Foo::Pub".
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2003-11-19 03:10:19 PM CET\n"
+"PO-Revision-Date: YYYY-MM-DD\n"
+"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+
+#: HOMARDGUI.cxx:76
+msgid "HOMARDGUI::BUT_OK"
+msgstr "OK"
+
+#: HOMARDGUI.cxx:76
+msgid "HOMARDGUI::INF_HOMARD_BANNER"
+msgstr "HOMARD Information"
+
+#: HOMARDGUI.cxx:76
+msgid "HOMARDGUI::INF_HOMARD_MENU"
+msgstr "This is just a test"
+
+#: HOMARDGUI.cxx:57
+msgid "HOMARDGUI::QUE_HOMARD_LABEL"
+msgstr "Name Import"
+
+#: HOMARDGUI.cxx:57
+msgid "HOMARDGUI::QUE_HOMARD_NAME"
+msgstr "Please, Enter your name"
+
+msgid "PREF_GROUP_GENERAL"
+msgstr "General"
+
+msgid "PREF_TAB_SETTINGS"
+msgstr "Settings"
+
+msgid "PREF_TEST"
+msgstr "Pascale"
+
+
+#-------------------------------------------------------------------------
+# MEN
+#-------------------------------------------------------------------------
+
+msgid "MEN_HOMARD"
+msgstr "HOMARD"
+
+msgid "ROOT_INFO"
+msgstr "Informations"
+
+#-----------   Menu   bar   ----------#
+#------ MEN -----#
+msgid "MEN_EDIT"
+msgstr "Edition d un fichier de commande Homard par Eficas"
+
+msgid "MEN_INFO"
+msgstr "Information Maillage (interactif)"
+
+msgid "MEN_ADAPT_GESTION"
+msgstr "Adaptation : gestion d une iteration"
+
+msgid "MEN_ADAPT_CREATION"
+msgstr "Adaptation : creation du cas"
+
+msgid "MEN_UNIFORME"
+msgstr "Raffiment Uniforme"
+
+msgid "MEN_POURLESNULS"
+msgstr "Homard Pour Les Nuls"
+
+msgid "SSM_AVANCE"
+msgstr "Utilisation Avancee"
+
+#-----------   Menu   bar   ----------#
+#------ MEN -----#
+msgid "MEN_EDIT"
+msgstr "Edition d un fichier de commande Homard par Eficas"
+
+msgid "MEN_INFO"
+msgstr "Information Maillage (interactif)"
+
+msgid "MEN_ADAPT_GESTION"
+msgstr "Adaptation : gestion d une iteration"
+
+msgid "MEN_ADAPT_CREATION"
+msgstr "Adaptation : creation du cas"
+
+
+#------ STB -----#
+msgid "STB_EDIT"
+msgstr "Lance Eficas pour editer le fichier de commande Homard"
+
+msgid "STB_INFO"
+msgstr "Information Homard (interactif)"
+
+msgid "STB_ADAPT_GESTION"
+msgstr "Adaptation Homard"
+
+msgid "STB_ADAPT_CREATION"
+msgstr "Creation d un cas Homard"
+
+
+#-------Popup Menu ----------------#
+msgid "MEN_FILE_EDIT"
+msgstr "Edition"
+msgid "TOP_FILE_EDIT"
+msgstr "Edition"
+msgid "MEN_FILE_EDIT"
+msgstr "Edition"
diff --git a/src/HOMARDGUI/HOMARD_msg_en.ts b/src/HOMARDGUI/HOMARD_msg_en.ts
new file mode 100644 (file)
index 0000000..bcc2452
--- /dev/null
@@ -0,0 +1,69 @@
+<!DOCTYPE TS>
+<!--
+  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>MEN_HOMARD</source>
+            <translation>HOMARD</translation>
+        </message>
+        <message>
+            <source>MEN_NEW_CASE</source>
+            <translation>New case</translation>
+        </message>
+        <message>
+            <source>MEN_NEW_ITERATION</source>
+            <translation>Next iteration</translation>
+        </message>
+        <message>
+            <source>MEN_COMPUTE</source>
+            <translation>Compute</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_CASE</source>
+            <translation>Edit case</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_ITERATION</source>
+            <translation>Edit iteration</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_HYPO</source>
+            <translation>Edit hypothesis</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_ZONE</source>
+            <translation>Edit zone</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_BOUNDARY</source>
+            <translation>Edit boundary</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_MESS_FILE</source>
+            <translation>Show file</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/HOMARDGUI/HOMARD_msg_fr.po b/src/HOMARDGUI/HOMARD_msg_fr.po
new file mode 100644 (file)
index 0000000..9023c6a
--- /dev/null
@@ -0,0 +1,31 @@
+# This is a Qt message file in .po format.  Each msgid starts with
+# a scope.  This scope should *NOT* be translated - eg. translating
+# from French to English, "Foo::Bar" would be translated to "Pub",
+# not "Foo::Pub".
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2003-11-19 03:10:25 PM CET\n"
+"PO-Revision-Date: YYYY-MM-DD\n"
+"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+
+#: HOMARDGUI.cxx:76
+msgid "HOMARDGUI::BUT_OK"
+msgstr "OK"
+
+#: HOMARDGUI.cxx:76
+msgid "HOMARDGUI::INF_HOMARD_BANNER"
+msgstr "Information HOMARD"
+
+#: HOMARDGUI.cxx:76
+msgid "HOMARDGUI::INF_HOMARD_MENU"
+msgstr "Ceci est un simple test"
+
+#: HOMARDGUI.cxx:57
+msgid "HOMARDGUI::QUE_HOMARD_LABEL"
+msgstr "Import Prénom"
+
+#: HOMARDGUI.cxx:57
+msgid "HOMARDGUI::QUE_HOMARD_NAME"
+msgstr "Entrez votre prénom, s'il vous plait"
diff --git a/src/HOMARDGUI/HOMARD_msg_fr.ts b/src/HOMARDGUI/HOMARD_msg_fr.ts
new file mode 100644 (file)
index 0000000..9a1a427
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE TS>
+<!--
+  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>MEN_HOMARD</source>
+            <translation>HOMARD</translation>
+        </message>
+        <message>
+            <source>MEN_NEW_CASE</source>
+            <translation>New case</translation>
+        </message>
+        <message>
+            <source>MEN_NEW_ITERATION</source>
+            <translation>New iteration</translation>
+        </message>
+        <message>
+            <source>MEN_COMPUTE</source>
+            <translation>Compute</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_CASE</source>
+            <translation>Edit case</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_ITERATION</source>
+            <translation>Edit iteration</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_HYPO</source>
+            <translation>Edit hypothesis</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_ZONE</source>
+            <translation>Edit zone</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_BOUNDARY</source>
+            <translation>Edit boundary</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/HOMARDGUI/HomardConfigFile.cxx b/src/HOMARDGUI/HomardConfigFile.cxx
new file mode 100644 (file)
index 0000000..834472d
--- /dev/null
@@ -0,0 +1,195 @@
+//
+//  File   : HomardConfigFile.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : HOMARD
+//  cree un fichier de configuration HOMARD
+    
+using namespace std;
+
+#include "HomardConfigFile.hxx"
+#include "utilities.h"
+#include <iostream>
+#include <fstream>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+HomardConfigFile::HomardConfigFile():
+                       _nomFichier(string("HOMARD.Configuration")),
+                        _prefix(string(""))
+ {
+
+        string t1[] = {string("CCMaiN__"), string("CCNoMN__"), string("CCSolN__"), string("CCFronti"), 
+                       string("HOMaiN__"), string("RenumN__"), string("ListeStd"), string("PPBasFic"),
+                      string("CCAssoci"), string("NumeIter"), string("CCMaiNP1"), string("CCNoMNP1"),
+                      string("TypeElem"), string("TypeRaff"), string("TypeDera"), string("HOMaiN__"),
+                      string("HOMaiNP1"), string("CCNoChaI"), string("CCCoChaI"), string("CCNumOrI"),
+                      string("CCNumPTI"), string("SeuilBPE"), string("SeuilHPE"), string("CCIndica")};
+        std::list<motcle> l1(t1,t1+24);
+        _motscle_ss_valeur=l1;
+
+        string t2[] = {string("Aucun0__"), string("Nb_Enti2"), string("Interpe3"), string("Qualite5"),
+                       string("Nb_Enti7"), string("Connex11"), string("Taille13") };
+        std::list<motcle> l2(t2,t2+7);
+        _motscle_oui_non=l2;
+
+        string t3[] = {string("ModeHOMA"), string("EcriFiHO")};
+        std::list<motcle> l3(t3,t3+2);
+        _motscle_autre=l3;
+
+       _dictValeur[string("Nb_Enti2")]=string("oui") ;
+
+        _dictValeuroui[string("Aucun0__")]=0;
+        _dictValeuroui[string("Nb_Enti2")]=2;
+        _dictValeuroui[string("Interpe3")]=3;
+        _dictValeuroui[string("Qualite5")]=5;
+        _dictValeuroui[string("Nb_Enti7")]=7;
+        _dictValeuroui[string("Connex11")]=11;
+        _dictValeuroui[string("Taille13")]=13;
+
+ }
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+HomardConfigFile::~HomardConfigFile()
+{
+}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+void HomardConfigFile::setBilan(bool etat)
+{
+       _bBilan = etat;
+}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+bool HomardConfigFile::initVal(const string motclef ,const string valeur)
+{
+       //SCRUTE(motclef);
+       //SCRUTE(valeur);
+        bool ok = false;
+        if ( cherche_dans_liste(_motscle_ss_valeur, motclef))
+        {
+          _dictValeur[motclef]=valeur;
+           ok = true;
+        }
+       else
+        {
+           if ( cherche_dans_liste(_motscle_oui_non,motclef))
+          {    
+               if (valeur =="oui" || valeur == "non")
+               {
+                  _dictValeur[motclef]=valeur;
+                   ok = true;
+               }
+           }
+           else
+              if ( cherche_dans_liste(_motscle_autre,motclef))
+             // Il faudrait avoir un mecanisme de verification de la valeur //
+             // passee, non mis en place actuellement avec des strings ?    //
+             { 
+                  _dictValeur[motclef]=valeur;
+                   ok = true;
+             } 
+        }
+        return ok;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+bool HomardConfigFile::cherche_dans_liste(std::list<motcle> & liste,  const motcle motclef )
+{
+     bool ok = false;
+     std::list<motcle>::iterator it =liste.begin();
+     while ( it != liste.end())
+     {
+       if ( *it == motclef)
+        {
+           ok = true;
+           break;
+        }
+        it ++;
+     }
+     return ok;
+}
+    
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+string HomardConfigFile::getMyDir()
+{
+       return _myDir;
+}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+bool HomardConfigFile::createFile()
+{
+    bool ok = true;
+
+    const char *a = "/tmp/ed.XXXXXX";
+    char * cible = new char[15];
+    strcpy(cible,a) ;
+    mkdtemp(cible);
+   
+    _myDir = string(cible);
+    string myfile=_myDir+string("/HOMARD.Configuration");
+
+    try
+    {
+       
+        ofstream ficHomard( myfile.c_str()) ;
+        int typeBilan = 1;
+
+        std::map<motcle,valeur>::iterator it = _dictValeur.begin();
+        for (; it != _dictValeur.end(); it++)
+        {
+           motcle motclef=(*it).first;
+           valeur valmot =(*it).second;
+           if ( cherche_dans_liste(_motscle_oui_non,motclef))
+           {
+               if (valmot== "oui")
+                {
+                 typeBilan=typeBilan*_dictValeuroui[motclef]; 
+                 }
+           }
+           else
+            ficHomard << motclef << " " << valmot << std::endl ; 
+        }
+               
+        if (_bBilan  == true)
+        {
+          ficHomard << "TypeBila "<< typeBilan << std::endl ;
+        }
+        ficHomard.close();
+    }
+    catch (...)
+    {
+       ok = false;
+    }
+  return ok;
+   
+}
diff --git a/src/HOMARDGUI/HomardConfigFile.hxx b/src/HOMARDGUI/HomardConfigFile.hxx
new file mode 100644 (file)
index 0000000..0c3de37
--- /dev/null
@@ -0,0 +1,45 @@
+//
+//  File   : HomardConfigFile.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : SMESH
+
+
+#ifndef _HOMARD_CONFIG_FILE
+#define _HOMARD_CONFIG_FILE
+
+#include <string>
+#include <map>
+#include <list>
+
+using namespace std;
+
+class HomardConfigFile
+{
+       typedef string motcle;
+       typedef string valeur;
+
+public  :
+       HomardConfigFile();
+       ~HomardConfigFile();
+         bool initVal(const string motclef ,const string valeur);
+         bool createFile();
+         void setBilan(bool etat);
+         string getMyDir();
+
+protected :
+
+       std::list<motcle> _motscle_ss_valeur;
+       std::list<motcle> _motscle_oui_non ;
+       std::list<motcle> _motscle_autre;
+
+       std::map <motcle,valeur> _dictValeur;
+       std::map <motcle,int>    _dictValeuroui;
+
+        string _nomFichier;
+        string _prefix;
+        bool   _bBilan;
+        string _myDir;
+
+        bool cherche_dans_liste(std::list<motcle> & liste , const motcle motclef);
+} ;
+#endif 
diff --git a/src/HOMARDGUI/HomardDlg.h b/src/HOMARDGUI/HomardDlg.h
new file mode 100644 (file)
index 0000000..c4a1134
--- /dev/null
@@ -0,0 +1,181 @@
+/********************************************************************************
+** Form generated from reading ui file 'HomardDlg.ui'
+**
+** Created: Fri Jan 16 19:12:09 2009
+**      by: Qt User Interface Compiler version 4.4.3
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef HOMARDDLG_H
+#define HOMARDDLG_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_HomardDlg
+{
+public:
+    QGroupBox *groupBox;
+    QLabel *label;
+    QLabel *label_2;
+    QComboBox *ListeMeshName;
+    QPushButton *PushFichier;
+    QLineEdit *NomFichier;
+    QGroupBox *groupBox_3;
+    QWidget *widget;
+    QGridLayout *gridLayout;
+    QCheckBox *NbEntites;
+    QSpacerItem *verticalSpacer;
+    QCheckBox *Volumes;
+    QSpacerItem *horizontalSpacer;
+    QCheckBox *Inter;
+    QCheckBox *Qualite;
+    QCheckBox *Connexite;
+    QGroupBox *groupBox_2;
+    QCheckBox *Histo;
+    QCheckBox *Bilan;
+    QGroupBox *groupBox_4;
+    QPushButton *lancement;
+    QPushButton *terminer;
+
+    void setupUi(QWidget *HomardDlg)
+    {
+    if (HomardDlg->objectName().isEmpty())
+        HomardDlg->setObjectName(QString::fromUtf8("HomardDlg"));
+    HomardDlg->resize(632, 372);
+    groupBox = new QGroupBox(HomardDlg);
+    groupBox->setObjectName(QString::fromUtf8("groupBox"));
+    groupBox->setGeometry(QRect(10, 0, 614, 131));
+    label = new QLabel(groupBox);
+    label->setObjectName(QString::fromUtf8("label"));
+    label->setGeometry(QRect(20, 20, 57, 17));
+    label_2 = new QLabel(groupBox);
+    label_2->setObjectName(QString::fromUtf8("label_2"));
+    label_2->setGeometry(QRect(20, 90, 57, 17));
+    ListeMeshName = new QComboBox(groupBox);
+    ListeMeshName->setObjectName(QString::fromUtf8("ListeMeshName"));
+    ListeMeshName->setGeometry(QRect(100, 70, 501, 41));
+    PushFichier = new QPushButton(groupBox);
+    PushFichier->setObjectName(QString::fromUtf8("PushFichier"));
+    PushFichier->setGeometry(QRect(100, 20, 51, 31));
+    NomFichier = new QLineEdit(groupBox);
+    NomFichier->setObjectName(QString::fromUtf8("NomFichier"));
+    NomFichier->setGeometry(QRect(170, 10, 431, 51));
+    groupBox_3 = new QGroupBox(HomardDlg);
+    groupBox_3->setObjectName(QString::fromUtf8("groupBox_3"));
+    groupBox_3->setGeometry(QRect(10, 140, 614, 78));
+    widget = new QWidget(groupBox_3);
+    widget->setObjectName(QString::fromUtf8("widget"));
+    widget->setGeometry(QRect(21, 10, 445, 92));
+    gridLayout = new QGridLayout(widget);
+    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+    gridLayout->setContentsMargins(0, 0, 0, 0);
+    NbEntites = new QCheckBox(widget);
+    NbEntites->setObjectName(QString::fromUtf8("NbEntites"));
+    NbEntites->setChecked(true);
+
+    gridLayout->addWidget(NbEntites, 0, 0, 3, 2);
+
+    verticalSpacer = new QSpacerItem(20, 58, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    gridLayout->addItem(verticalSpacer, 0, 2, 4, 1);
+
+    Volumes = new QCheckBox(widget);
+    Volumes->setObjectName(QString::fromUtf8("Volumes"));
+    Volumes->setChecked(true);
+
+    gridLayout->addWidget(Volumes, 0, 3, 2, 1);
+
+    horizontalSpacer = new QSpacerItem(198, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+    gridLayout->addItem(horizontalSpacer, 1, 1, 2, 1);
+
+    Inter = new QCheckBox(widget);
+    Inter->setObjectName(QString::fromUtf8("Inter"));
+    Inter->setChecked(false);
+
+    gridLayout->addWidget(Inter, 2, 3, 2, 1);
+
+    Qualite = new QCheckBox(widget);
+    Qualite->setObjectName(QString::fromUtf8("Qualite"));
+    Qualite->setChecked(true);
+
+    gridLayout->addWidget(Qualite, 3, 0, 1, 2);
+
+    Connexite = new QCheckBox(widget);
+    Connexite->setObjectName(QString::fromUtf8("Connexite"));
+    Connexite->setChecked(true);
+
+    gridLayout->addWidget(Connexite, 4, 0, 1, 2);
+
+    groupBox_2 = new QGroupBox(HomardDlg);
+    groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
+    groupBox_2->setGeometry(QRect(10, 220, 614, 78));
+    Histo = new QCheckBox(groupBox_2);
+    Histo->setObjectName(QString::fromUtf8("Histo"));
+    Histo->setGeometry(QRect(330, 30, 171, 22));
+    Histo->setChecked(true);
+    Bilan = new QCheckBox(groupBox_2);
+    Bilan->setObjectName(QString::fromUtf8("Bilan"));
+    Bilan->setGeometry(QRect(10, 30, 171, 22));
+    Bilan->setChecked(true);
+    groupBox_4 = new QGroupBox(HomardDlg);
+    groupBox_4->setObjectName(QString::fromUtf8("groupBox_4"));
+    groupBox_4->setGeometry(QRect(10, 310, 614, 51));
+    lancement = new QPushButton(groupBox_4);
+    lancement->setObjectName(QString::fromUtf8("lancement"));
+    lancement->setGeometry(QRect(430, 10, 83, 31));
+    terminer = new QPushButton(groupBox_4);
+    terminer->setObjectName(QString::fromUtf8("terminer"));
+    terminer->setGeometry(QRect(520, 10, 83, 31));
+
+    retranslateUi(HomardDlg);
+
+    QMetaObject::connectSlotsByName(HomardDlg);
+    } // setupUi
+
+    void retranslateUi(QWidget *HomardDlg)
+    {
+    HomardDlg->setWindowTitle(QApplication::translate("HomardDlg", "Homard : Analyse de maillage", 0, QApplication::UnicodeUTF8));
+    groupBox->setTitle(QString());
+    label->setText(QApplication::translate("HomardDlg", "MED File", 0, QApplication::UnicodeUTF8));
+    label_2->setText(QApplication::translate("HomardDlg", "Mesh", 0, QApplication::UnicodeUTF8));
+    PushFichier->setText(QApplication::translate("HomardDlg", "Icon", 0, QApplication::UnicodeUTF8));
+    groupBox_3->setTitle(QApplication::translate("HomardDlg", "Options", 0, QApplication::UnicodeUTF8));
+    NbEntites->setText(QApplication::translate("HomardDlg", "Nombre d'entit\303\251s", 0, QApplication::UnicodeUTF8));
+    Volumes->setText(QApplication::translate("HomardDlg", "Volumes/Surfaces/Longueurs", 0, QApplication::UnicodeUTF8));
+    Inter->setText(QApplication::translate("HomardDlg", "Interp\303\251n\303\251tration", 0, QApplication::UnicodeUTF8));
+    Qualite->setText(QApplication::translate("HomardDlg", "Qualit\303\251", 0, QApplication::UnicodeUTF8));
+    Connexite->setText(QApplication::translate("HomardDlg", "Connexit\303\251", 0, QApplication::UnicodeUTF8));
+    groupBox_2->setTitle(QApplication::translate("HomardDlg", "Conservation des r\303\251sultats", 0, QApplication::UnicodeUTF8));
+    Histo->setText(QApplication::translate("HomardDlg", "Histogramme Qualit\303\251", 0, QApplication::UnicodeUTF8));
+    Bilan->setText(QApplication::translate("HomardDlg", "Bilan", 0, QApplication::UnicodeUTF8));
+    groupBox_4->setTitle(QString());
+    lancement->setText(QApplication::translate("HomardDlg", "Ok", 0, QApplication::UnicodeUTF8));
+    terminer->setText(QApplication::translate("HomardDlg", "Cancel", 0, QApplication::UnicodeUTF8));
+    Q_UNUSED(HomardDlg);
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class HomardDlg: public Ui_HomardDlg {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // HOMARDDLG_H
diff --git a/src/HOMARDGUI/HomardQtCommun.cxx b/src/HOMARDGUI/HomardQtCommun.cxx
new file mode 100644 (file)
index 0000000..08ae65d
--- /dev/null
@@ -0,0 +1,413 @@
+#include "HomardQtCommun.h"
+#include "HOMARDGUI_Utils.h"
+
+#include <utilities.h>
+
+#include <qmessagebox.h>
+#include <qcombobox.h>
+#include <qfiledialog.h>
+#include <qstring.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+
+#include "SalomeApp_Tools.h"
+
+using namespace std;
+extern "C" 
+{
+#include <med.h>
+}
+
+
+// ============================================================================
+QString HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int grave )
+// ============================================================================
+// Regarde si l'objet selectionne correspond a un objet de tyoe
+// commentaire. si c'est le cas, retourne le nom de  cet objet,
+// sinon retourne une QString("")
+// Si grave = 0, ce n'est pas grave de ne rien trouver et pas de message
+// Si grave = 1, ce n'est pas grave de ne rien trouver mais on emet un message
+{
+   int nbSel = HOMARD_UTILS::IObjectCount() ;
+   if ( nbSel == 0 )
+   {
+      if ( grave == 1 )
+      {
+        QMessageBox::information( 0, "Bad selection",
+                                  QString("Select an object."),
+        QMessageBox::Ok + QMessageBox::Default );
+      }
+      return QString("");
+    }
+   if ( nbSel > 1 )
+   {
+      QMessageBox::information( 0, "Bad selection",
+                                QString("Select one object only."),
+      QMessageBox::Ok + QMessageBox::Default );
+      return QString("");
+    }
+
+    Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject();
+    if ( aIO->hasEntry() )
+    {
+      _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument();
+      _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) );
+      _PTR(GenericAttribute) anAttr;
+      if (aSO->FindAttribute(anAttr, "AttributeComment") )
+      {
+           _PTR(AttributeComment) attributComment = anAttr;
+           QString aComment= QString(attributComment->Value().data());
+           int iteration = aComment.lastIndexOf(commentaire);
+           if ( iteration !=0  )
+           {
+                  QString message=QString("Select an object : ");
+                  message += commentaire;
+                  QMessageBox::information( 0, "Bad selection", message,
+                  QMessageBox::Ok + QMessageBox::Default );
+                  return QString("");
+           }
+           if (aSO->FindAttribute(anAttr, "AttributeName") )
+           {
+                _PTR(AttributeName) attributName = anAttr;
+                 QString aName= QString(attributName->Value().data());
+                 return aName;
+           }
+      }
+    }
+    return QString("");
+}
+
+// =======================================================================
+QString HOMARD_QT_COMMUN::SelectionCasEtude()
+// =======================================================================
+{
+   QString aName    = QString("");
+   int nbSel = HOMARD_UTILS::IObjectCount() ;
+   if ((nbSel > 1) or ( nbSel == 0 )) 
+   {
+      QMessageBox::information( 0, "Bad selection",
+                                QString("Select one object only"),
+                               QMessageBox::Ok + QMessageBox::Default );
+      return QString("");
+    }
+    Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject();
+    if ( aIO->hasEntry() )
+    {
+        _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument();
+        _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) );
+         _PTR(SObject) aSObjCas = aSO->GetFather();
+        _PTR(GenericAttribute) anAttr;
+         if (aSObjCas->FindAttribute(anAttr, "AttributeName") )
+          {
+             _PTR(AttributeName) attributName = anAttr;
+             aName= QString(attributName->Value().data());
+          }
+          return aName;
+      }
+      return QString("");
+}
+
+// =======================================================================
+QString HOMARD_QT_COMMUN::PushNomFichier(bool avertir)
+// =======================================================================
+// Gestion les boutons qui permettent  de 
+// 1) retourne le nom d'un fichier par une fenetre de dialogue si aucun
+//    objet est selectionne dans l arbre d etude
+// 2) retourne le nom du fichier asocie a l objet 
+//    selectionne dans l arbre d etude
+{
+   MESSAGE("HOMARD_QT_COMMUN::PushNomFichier");
+   QString aFile=QString::null;
+   int nbSel = HOMARD_UTILS::IObjectCount() ;
+   if ( nbSel == 0 )
+   {
+      aFile = QFileDialog::getOpenFileName(0,QString("File Selection"),QString("") ,QString("Med files (*.med);;all (*) ") );
+   }
+   if (nbSel > 1)
+   {
+      QMessageBox::information( 0, "Bad selection",
+                                QString("Select one file only"),
+                               QMessageBox::Ok + QMessageBox::Default );
+   }
+   if (nbSel == 1)
+   {
+      Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject();
+      if ( aIO->hasEntry() )
+      {
+        _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument();
+        _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) );
+        _PTR(GenericAttribute) anAttr;
+        _PTR(AttributeFileType) aFileType;
+        _PTR(AttributeExternalFileDef) aFileName;
+        if (aSO) {
+           if (aSO->FindAttribute(anAttr, "AttributeFileType") ) {
+              aFileType=anAttr;
+              QString fileType=QString(aFileType->Value().data());
+              if ( fileType==QString("FICHIERMED")) {
+                  if (aSO->FindAttribute(anAttr,"AttributeExternalFileDef")) {
+                      aFileName=anAttr;
+                     aFile= QString(aFileName->Value().data()); } } } } }
+       
+      if ( aFile==QString::null )
+      {
+         if (avertir ) { 
+         QMessageBox::information( 0, "Bad selection",
+                QString(" Select a study object with associated MED file \n or a MED file"),
+               QMessageBox::Ok + QMessageBox::Default );
+          }
+         aFile = QFileDialog::getOpenFileName();
+         if (!aFile.isEmpty())
+         {
+            aFile=aFile;
+         }
+      }
+   }
+   return aFile;
+
+}
+
+
+// =======================================================================
+int HOMARD_QT_COMMUN::OuvrirFichier(QString aFile)
+// =======================================================================
+// renvoie le medId associe au fichier Med apres ouverture
+{
+   int MedIdt = MEDouvrir(const_cast<char *>(aFile.toStdString().c_str()),MED_LECTURE);
+   if (MedIdt <0)
+   {
+      QMessageBox::information( 0, "Bad selection",
+      QString("MED File is unreadable"),
+      QMessageBox::Ok + QMessageBox::Default );
+   }
+   return MedIdt;
+}
+
+// ======================================================
+QString HOMARD_QT_COMMUN::LireNomMaillage(QString aFile)
+// ========================================================
+{
+    
+    int MedIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile);
+    int numberOfMeshes = MEDnMaa(MedIdt) ;
+    if (numberOfMeshes != 1 )
+    {
+      QMessageBox::information( 0, "Bad selection",
+      QString("MED File contains more than one mesh"),
+      QMessageBox::Ok + QMessageBox::Default );
+    }
+
+    QString nomMaillage= HOMARD_QT_COMMUN::LireNomMaillage(MedIdt,1);
+    MEDfermer(MedIdt);
+    return nomMaillage;
+}
+// =======================================================================
+QString HOMARD_QT_COMMUN::LireNomMaillage(int MedIdt ,int MeshId)
+// =======================================================================
+{
+     QString NomMaillage=QString::null;
+     char maa[MED_TAILLE_NOM+1];
+     char desc[MED_TAILLE_DESC+1];
+     med_int mdim;
+     med_maillage type;
+
+     if ( MEDmaaInfo(MedIdt,MeshId,maa,&mdim,&type,desc) < 0 )
+     {
+          QMessageBox::information( 0, "Bad selection",
+          QString("Error : Mesh is unreadable"),
+          QMessageBox::Ok + QMessageBox::Default );
+     }
+     else
+     {
+        NomMaillage=QString(maa);  
+     }
+     return NomMaillage;
+}
+
+
+// =======================================================================
+std::list<QString> HOMARD_QT_COMMUN::GetListeChamps(QString aFile)
+// =======================================================================
+{
+// Il faut voir si plusieurs maillages
+
+   MESSAGE("HOMARD_QT_COMMUN::GetListeChamps");
+   std::list<QString> ListeChamp;
+
+   char *comp, *unit;
+   char nomcha  [MED_TAILLE_NOM+1];
+   med_type_champ typcha;
+   med_int ncomp;
+
+   SCRUTE(aFile.toStdString());
+   int MedIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile);
+   if ( MedIdt < 0 ) { return ListeChamp; }
+   
+   // Le fichier Med est lisible
+   // Lecture du maillage
+
+   // Lecture du nombre de champs
+   med_int ncha = MEDnChamp(MedIdt, 0) ;
+   if (ncha < 1 )
+   {
+          QMessageBox::information( 0, "Bad selection",
+                     QString(" Error : Fields are unreadable"),
+                     QMessageBox::Ok + QMessageBox::Default );
+         MEDfermer(MedIdt);
+         return ListeChamp;
+   }
+
+   for (int i=0; i< ncha; i++)
+   {
+       if ((ncomp = MEDnChamp(MedIdt,i+1)) < 0)  
+       {
+            QMessageBox::information( 0, "Bad selection",
+                     QString("Error : field's componants are unreadable"),
+                     QMessageBox::Ok + QMessageBox::Default );
+            MEDfermer(MedIdt);
+           return ListeChamp;
+        }
+
+   /* Lecture du type du champ, des noms des composantes et du nom de l'unite*/
+        comp = (char*) malloc(ncomp*MED_TAILLE_PNOM+1);
+        unit = (char*) malloc(ncomp*MED_TAILLE_PNOM+1);
+        if ( MEDchampInfo(MedIdt,i+1,nomcha,&typcha,comp,unit,ncomp) < 0 ) 
+        {
+             QMessageBox::information( 0, "Bad selection",
+                      QString(" Error : Fields are unreadable"),
+                      QMessageBox::Ok + QMessageBox::Default );
+           MEDfermer(MedIdt);
+            return ListeChamp;
+         }
+
+      ListeChamp.push_back(QString(nomcha));
+      free(comp);
+      free(unit);
+   }
+   MEDfermer(MedIdt);
+   return ListeChamp;
+}
+
+// ======================================================================================
+std::list<QString> HOMARD_QT_COMMUN::GetListeComposants(QString aFile, QString aChamp)
+// ======================================================================================
+{
+   MESSAGE ( "GetListeComposants pour le fichier " << aFile.toStdString().c_str());
+   MESSAGE ( "GetListeComposants pour le champ " << aChamp.toStdString().c_str());
+
+   std::list<QString> ListeComposants;
+
+   char *comp, *unit;
+   char nomcha  [MED_TAILLE_NOM+1];
+   med_type_champ typcha;
+   med_int ncomp;
+
+   int MedIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile);
+   if ( MedIdt < 0 ) { return ListeComposants; }
+   
+
+   // Lecture du nombre de champs
+   med_int ncha = MEDnChamp(MedIdt, 0) ;
+   if (ncha < 1 )
+   {
+          QMessageBox::information( 0, "Bad selection",
+                      QString(" Error : Fields are unreadable"),
+                      QMessageBox::Ok + QMessageBox::Default );
+         MEDfermer(MedIdt);
+         return ListeComposants;
+   }
+
+   for (int i=0; i< ncha; i++)
+   {
+     if ((ncomp = MEDnChamp(MedIdt,i+1)) < 0)  
+     {
+          QMessageBox::information( 0, "Bad selection",
+                     QString("Error : field's componants are unreadable"),
+                     QMessageBox::Ok + QMessageBox::Default );
+         MEDfermer(MedIdt);
+         return ListeComposants;
+      }
+
+   /* Lecture du type du champ, des noms des composantes et du nom de l'unite*/
+      comp = (char*) malloc(ncomp*MED_TAILLE_PNOM+1);
+      unit = (char*) malloc(ncomp*MED_TAILLE_PNOM+1);
+
+      if ( MEDchampInfo(MedIdt,i+1,nomcha,&typcha,comp,unit,ncomp) < 0 ) 
+      {
+          QMessageBox::information( 0, "Bad selection",
+                      QString(" Error : Fields are unreadable"),
+                      QMessageBox::Ok + QMessageBox::Default );
+          MEDfermer(MedIdt);
+           return ListeComposants;
+       }
+       if ( QString(nomcha) != aChamp ) {
+         free(comp);
+          free (unit);
+          continue;}
+
+       for (int j = 0; j <ncomp; j++) 
+       { 
+             char cible[MED_TAILLE_PNOM +1];
+             strncpy(cible,comp+j*MED_TAILLE_PNOM,MED_TAILLE_PNOM );
+             cible[MED_TAILLE_PNOM ]='\0';
+             ListeComposants.push_back(QString(cible));
+       }
+       break;
+   }
+   free(comp);
+   free(unit);
+   MEDfermer(MedIdt);
+   return ListeComposants;
+}
+
+// =======================================================================
+void HOMARD_QT_COMMUN::Recopie(QString aDir, QString aFichier)
+// =======================================================================
+{
+   if (chdir(aDir.toLatin1()) != 0)
+   {
+       if (mkdir(aDir.toLatin1(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
+        {
+          QMessageBox::information( 0, "ERROR",
+                    QString("Unable to create directory."),
+                    QMessageBox::Ok + QMessageBox::Default );
+                    return;
+          //ASSERT("Pb a la creation de la directory" == 0);
+        }
+       if (chdir(aDir.toLatin1()) != 0)
+        {
+          QMessageBox::information( 0, "ERROR",
+                    QString("Unable to access directory."),
+                    QMessageBox::Ok + QMessageBox::Default );
+                    return;
+          //ASSERT("Pb pour acceder la directory" == 0);
+        }
+   }
+   QString copie = QString("cp ")+aFichier+QString(" ")+aDir;
+   system(copie.toLatin1());
+}
+
+// =======================================================================
+void HOMARD_QT_COMMUN::Creetmp()
+// =======================================================================
+{
+   QString aDir=QString("/tmp/Homard/");
+   if (chdir(aDir.toLatin1()) != 0)
+   {
+       if (mkdir(aDir.toLatin1(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
+        {
+          QMessageBox::information( 0, "ERROR",
+                    QString("Unable to create directory /tmp/Homard."),
+                    QMessageBox::Ok + QMessageBox::Default );
+                    return;
+         }
+       if (chdir(aDir.toLatin1()) != 0)
+        {
+          QMessageBox::information( 0, "ERROR",
+                    QString("Unable to access directory /tmp/Homard."),
+                    QMessageBox::Ok + QMessageBox::Default );
+                    return;
+         }
+   }
+}
diff --git a/src/HOMARDGUI/HomardQtCommun.h b/src/HOMARDGUI/HomardQtCommun.h
new file mode 100644 (file)
index 0000000..a7538b9
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef HOMARDQTCOMMUN_H
+#define HOMARDQTCOMMUN_H
+
+
+#include <SALOMEconfig.h>
+#include "SALOME_Selection.h"
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+
+#include <qstring.h>
+#include <vector>
+#include <set>
+extern "C"
+{
+#include <med.h>
+}
+
+class QComboBox;
+
+
+namespace HOMARD_QT_COMMUN
+{
+    QString PushNomFichier(bool avertir=true);
+    QString LireNomMaillage(int Medidt,int MeshId);
+    QString LireNomMaillage(QString aFile);
+
+    int     OuvrirFichier(QString aFile);
+
+    std::list<QString> GetListeChamps(QString aFile);
+    std::list<QString> GetListeComposants(QString aFile, QString aChamp);
+
+    void    Recopie(QString aDir, QString aFichier);
+    void    Creetmp();
+
+    QString SelectionArbreEtude(QString commentaire, int grave );
+    QString SelectionCasEtude();
+
+};
+
+#endif // HOMARDQTCOMMUN_H
diff --git a/src/HOMARDGUI/Makefile.am b/src/HOMARDGUI/Makefile.am
new file mode 100644 (file)
index 0000000..940c38e
--- /dev/null
@@ -0,0 +1,128 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# -* Makefile *- 
+# Author : 
+# Modified by : Alexander BORODIN (OCN) - autotools usage
+#
+# header files 
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+salomeinclude_HEADERS =       \
+       MonCreateBoundaryDi.h \
+       CreateBoundaryDi.h    \
+       MonEditBoundaryDi.h   \
+       MonCreateCase.h       \
+       CreateCase.h          \
+       MonEditCase.h         \
+       MonCreateZone.h       \
+       CreateZone.h          \
+       MonEditZone.h         \
+       MonCreateHypothesis.h \
+       CreateHypothesis.h    \
+       MonEditHypothesis.h   \
+       MonCreateListGroup.h  \
+       MonEditListGroup.h    \
+       MonCreateIteration.h  \
+       CreateIteration.h     \
+       MonEditIteration.h    \
+       HOMARDGUI.h           \
+       HOMARDGUI_Utils.h     \
+       HomardDlg.h           \
+       EditFile.h            \
+       MonEditFile.h         \
+       HomardQtCommun.h
+
+
+# Libraries targets
+lib_LTLIBRARIES = libHOMARD.la
+
+dist_libHOMARD_la_SOURCES =     \
+       HOMARDGUI.cxx           \
+       HOMARDGUI_Utils.cxx     \
+       HomardConfigFile.cxx    \
+       MonCreateBoundaryDi.cxx \
+       MonEditBoundaryDi.cxx \
+       MonCreateCase.cxx       \
+       MonEditCase.cxx         \
+       MonCreateHypothesis.cxx \
+       MonEditHypothesis.cxx   \
+       MonCreateListGroup.cxx \
+       MonEditListGroup.cxx \
+       MonCreateIteration.cxx  \
+       MonEditIteration.cxx    \
+       MonCreateZone.cxx       \
+       MonEditZone.cxx         \
+       MonEditFile.cxx         \
+       HomardQtCommun.cxx
+
+# MOC pre-processing
+MOC_FILES =                         \
+       HOMARDGUI_moc.cxx           \
+       MonCreateBoundaryDi_moc.cxx \
+       MonEditBoundaryDi_moc.cxx   \
+       MonCreateCase_moc.cxx       \
+       MonEditCase_moc.cxx         \
+       MonCreateZone_moc.cxx       \
+       MonEditZone_moc.cxx         \
+       MonCreateHypothesis_moc.cxx \
+       MonEditHypothesis_moc.cxx   \
+       MonCreateListGroup_moc.cxx  \
+       MonEditListGroup_moc.cxx    \
+       MonCreateIteration_moc.cxx  \
+       MonEditIteration_moc.cxx    \
+       MonEditFile_moc.cxx
+
+nodist_libHOMARD_la_SOURCES = $(MOC_FILES)
+
+libHOMARD_la_CPPFLAGS =          \
+       $(QT_INCLUDES)           \
+       $(CAS_CPPFLAGS)          \
+       $(PYTHON_INCLUDES)       \
+       $(MED2_INCLUDES)         \
+       $(HDF5_INCLUDES)         \
+       $(CORBA_CXXFLAGS)        \
+       $(CORBA_INCLUDES)        \
+       $(KERNEL_CXXFLAGS)       \
+       $(GUI_CXXFLAGS)          \
+       -I$(srcdir)/../HOMARD    \
+       -I$(srcdir)/../HOMARD_I  \
+       -I$(top_builddir)/idl    \
+       -I$(VISU_ROOT_DIR)/include/salome  \
+       -I$(MED_ROOT_DIR)/include/salome   \
+       -I$(top_builddir)/salome_adm/unix
+
+libHOMARD_la_LDFLAGS  =                 \
+       ../../idl/libSalomeIDLHOMARD.la \
+       ../HOMARD_I/libHOMARDEngine.la  \
+       $(KERNEL_LDFLAGS)               \
+       $(MED2_LIBS)                    \
+        -lSalomeLifeCycleCORBA          \
+       $(GUI_LDFLAGS)                  \
+       -lSalomeApp                     \
+        -lSalomePyQtGUI
+
+# resources files
+nodist_salomeres_DATA =  \
+       HOMARD_msg_en.qm
+#      HOMARD_msg_fr.qm 
+#      HOMARD_icons.qm
diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.cxx b/src/HOMARDGUI/MonCreateBoundaryDi.cxx
new file mode 100644 (file)
index 0000000..db1edcd
--- /dev/null
@@ -0,0 +1,198 @@
+using namespace std;
+
+#include "MonCreateBoundaryDi.h"
+#include "MonCreateListGroup.h"
+#include "MonCreateCase.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+// -------------------------------------------------------------------------------
+MonCreateBoundaryDi::MonCreateBoundaryDi(MonCreateCase* parent, bool modal,
+                                         HOMARD::HOMARD_Gen_var myHomardGen,
+                                         QString caseName, QString aBoundaryName)
+// ---------------------------------------------------------------------------------
+/* Constructs a MonCreateBoundaryDi */
+    :
+    QDialog(0), Ui_CreateBoundaryDi(),
+    _parent(parent), _aBoundaryName(aBoundaryName),
+    _myHomardGen(HOMARD::HOMARD_Gen::_duplicate(myHomardGen)),
+    _aCaseName(caseName)
+    {
+      MESSAGE("Constructeur") ;
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+     if ( _aBoundaryName == QString("") ) {SetNewBoundaryName();};
+    }
+
+// ------------------------------------------------------------------------
+MonCreateBoundaryDi::~MonCreateBoundaryDi()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryDi::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( PushFichier,  SIGNAL(pressed()), this, SLOT(SetMeshFile()));
+    connect( buttonOk,     SIGNAL(pressed()), this, SLOT( PushOnOK()));
+    connect( buttonApply,  SIGNAL(pressed()), this, SLOT( PushOnApply()));
+    connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,   SIGNAL(pressed()), this, SLOT( PushOnHelp()));
+    connect( CBGroupe,     SIGNAL(stateChanged(int)), this, SLOT( SetFiltrage()));
+}
+
+// ------------------------------------------------------------------------
+bool MonCreateBoundaryDi::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+// Verifications
+
+  QString aBoundaryName=LEBoundaryName->text().trimmed();
+  if (aBoundaryName=="") {
+    QMessageBox::information( 0, "Error",
+                              "The boundary must be named.",
+                              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+//  Le maillage de la frontiere discrete
+  QString aMeshFile=LEFileName->text().trimmed();
+  if (aMeshFile ==QString(""))
+  {
+    QMessageBox::information( 0, "Error",
+              QString("The mesh of the boundary must be selected."),
+              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+//  Le nom du maillage de la frontiere discrete
+  QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aMeshFile);
+  if (aMeshName == "" )
+  {
+    QMessageBox::information( 0, "Error",
+              QString("no mesh in mesh file"),
+              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+// Creation de l'objet CORBA si ce n'est pas deja fait sous le meme nom
+  if ( _aBoundaryName != aBoundaryName )
+  {
+   try 
+   {
+     _aBoundaryName=aBoundaryName;
+     _aBoundary=_myHomardGen->CreateBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str()),0);
+     _parent->addBoundaryDi(_aBoundaryName);
+     _aBoundary->SetCaseCreation(_aCaseName.toStdString().c_str());
+   }
+   catch( SALOME::SALOME_Exception& S_ex )
+   {
+      QMessageBox::information( 0, "Error",
+                  QString(CORBA::string_dup(S_ex.details.text)),
+                  QMessageBox::Ok + QMessageBox::Default );
+      return false;
+   }
+  }
+
+// Mise en place des attributs
+  _aBoundary->SetMeshFile(aMeshFile.toStdString().c_str());
+  _aBoundary->SetMeshName(aMeshName.toStdString().c_str());
+  AssocieLesGroupes();
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateBoundaryDi::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+     if ( _parent ) { _parent->raise(); _parent->activateWindow(); };
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryDi::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"));
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryDi::AssocieLesGroupes()
+// ------------------------------------------------------------------------
+{
+  HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType;
+  aSeqGroupe->length(_listeGroupesBoundary.size());
+  QStringList::const_iterator it;
+  int i=0;
+  for (it = _listeGroupesBoundary.constBegin(); it != _listeGroupesBoundary.constEnd(); it++)
+     aSeqGroupe[i++]=(*it).toStdString().c_str();
+  _aBoundary->SetGroups(aSeqGroupe);
+
+}
+
+// -------------------------------------------------
+void MonCreateBoundaryDi::SetNewBoundaryName()
+// --------------------------------------------------
+{
+
+  HOMARD::listeBoundarys_var  MyBoundarys = _myHomardGen->GetAllBoundarys();
+  int num = 0; QString aBoundaryName="";
+  while (aBoundaryName == QString("") )
+  {
+    aBoundaryName.setNum(num+1) ;
+    aBoundaryName.insert(0, QString("Boun_")) ;
+    for ( int i=0; i<MyBoundarys->length(); i++)
+    {
+      if ( aBoundaryName ==  QString(MyBoundarys[i]))
+      {
+          num=num+1;
+          aBoundaryName="";
+          break;
+      }
+   }
+  }
+  LEBoundaryName->setText(aBoundaryName);
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryDi::SetMeshFile()
+// ------------------------------------------------------------------------
+{
+  QString aMeshFile = HOMARD_QT_COMMUN::PushNomFichier();
+  if (!(aMeshFile.isEmpty())) LEFileName->setText(aMeshFile);
+}
+
+// ------------------------------------------------------------------------
+void MonCreateBoundaryDi::setGroups (QStringList listGroup)
+// ------------------------------------------------------------------------
+{
+    _listeGroupesBoundary = listGroup;
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryDi::SetFiltrage()
+// // ------------------------------------------------------------------------
+{
+   if (!CBGroupe->isChecked()) return;
+   if (_aCaseName.toStdString().c_str() == QString()) {
+        QMessageBox::information( 0, "Error",
+                              "Case MeshFile unknowned.",
+                              QMessageBox::Ok + QMessageBox::Default );
+        return;
+   }
+
+   MonCreateListGroup *aDlg = new MonCreateListGroup(NULL,this,  TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),
+                              _aCaseName, _listeGroupesBoundary) ;
+  aDlg->show();
+}
+
diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.h b/src/HOMARDGUI/MonCreateBoundaryDi.h
new file mode 100644 (file)
index 0000000..9b37ac4
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef MON_CREATEBOUNDARYDI_H
+#define MON_CREATEBOUNDARYDI_H
+
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Boundary)
+
+#include <CreateBoundaryDi.h>
+#include <QDialog>
+
+class MonCreateCase;
+class MonCreateBoundaryDi : public QDialog, public Ui_CreateBoundaryDi
+{
+    Q_OBJECT
+
+public:
+    MonCreateBoundaryDi( MonCreateCase* parent, bool modal,
+                         HOMARD::HOMARD_Gen_var myHomardGen,
+                         QString caseName, QString BoundaryName );
+    ~MonCreateBoundaryDi();
+    virtual void setGroups (QStringList listGroup);
+
+protected :
+
+    MonCreateCase *_parent;
+
+    QString _aBoundaryName;
+    QString _aCaseName;
+
+
+    HOMARD::HOMARD_Boundary_var _aBoundary;
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+    QStringList  _listeGroupesBoundary;
+
+    virtual void AssocieLesGroupes();
+    virtual void InitConnect();
+    virtual void SetNewBoundaryName();
+
+public slots:
+
+    virtual void SetMeshFile();
+    virtual void SetFiltrage();
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+};
+
+#endif // MON_CREATEBOUNDARYDI_H
diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx
new file mode 100644 (file)
index 0000000..f84c53f
--- /dev/null
@@ -0,0 +1,325 @@
+using namespace std;
+
+#include "MonCreateCase.h"
+#include "MonCreateBoundaryDi.h"
+#include "MonEditBoundaryDi.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -----------------------------------------------------------------------------------------
+MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen)
+// -----------------------------------------------------------------------------------------
+/* Constructs a MonCreateCase
+ * Inherits from CasHomard
+ * Sets attributes to default values
+ */
+    :
+    Ui_CreateCase(), 
+    _aCaseName(""),_aDirName(""), _ConfType(1)
+    {
+      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+      SetNewCaseName() ;
+      GBBoundaryA->setVisible(0);
+      GBBoundaryD->setVisible(0);
+      GBTypeNoConf->setVisible(0);
+      adjustSize();
+      GetBoundarys();
+
+    }
+
+// ------------------------------------------------------------------------
+MonCreateCase::~MonCreateCase()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( PushDir,        SIGNAL(pressed()), this, SLOT(SetDirName()));
+    connect( PushFichier,    SIGNAL(pressed()), this, SLOT(SetFileName()));
+
+    connect( RBConforme,     SIGNAL(clicked()), this, SLOT(SetConforme()));
+    connect( RBNonConforme,  SIGNAL(clicked()), this, SLOT(SetNonConforme()));
+    connect( RB1NpM,         SIGNAL(clicked()), this, SLOT(Set1NpM()));
+    connect( RB1NpA,         SIGNAL(clicked()), this, SLOT(Set1NpA()));
+    connect( RBQuelconque,   SIGNAL(clicked()), this, SLOT(SetQuelconque()));
+
+    connect( CBBoundaryD,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
+    connect( PBBoundaryDiNew,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
+    connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
+    connect( CBBoundaryA,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
+
+    connect( buttonOk,       SIGNAL(pressed()), this, SLOT(PushOnOK()));
+    connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply()));
+    connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
+    connect( LECaseName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::GetBoundarys()
+// ------------------------------------------------------------------------
+{
+     HOMARD::HOMARD_Boundary_var myBoundary ;
+     HOMARD::listeBoundarys_var  mesBoundarys = _myHomardGen->GetAllBoundarys();
+     for (int i=0; i<mesBoundarys->length(); i++)
+     {
+         myBoundary = _myHomardGen->GetBoundary(mesBoundarys[i]);
+         int type_obj = myBoundary->GetBoundaryType() ;
+         if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
+     }
+}
+
+// -------------------------------
+bool MonCreateCase::PushOnApply()
+// --------------------------------
+{
+  MESSAGE("PushOnApply");
+  QString aCaseName=LECaseName->text().trimmed();
+  if ( aCaseName == "" )
+  {
+    QMessageBox::information( 0, "Error",
+            QString("The case must be named"),
+            QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  QString aDirName=LEDirName->text().trimmed();
+  if (aDirName == QString(""))
+  {
+    QMessageBox::information( 0, "Error",
+              QString("A directory for the case must be selected."),
+              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+  if ((aDirName != _aDirName) and (_myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false))
+  {
+    QMessageBox::information( 0, "Error",
+              QString("This directory is already used"),
+              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+  if (chdir(aDirName.toStdString().c_str()) != 0)
+  {
+    QMessageBox::information( 0, "Error",
+              QString("A valid directory for the case must be selected."),
+              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  QString aFileName=LEFileName->text().trimmed();
+  if (aFileName ==QString(""))
+  {
+    QMessageBox::information( 0, "Error",
+              QString("The initial mesh must be selected."),
+              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aFileName);
+  if (aMeshName == "" )
+  {
+    QMessageBox::information( 0, "Error",
+              QString("no mesh in mesh file"),
+              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  if (aCaseName != _aCaseName )
+  {
+    _aCaseName = aCaseName;
+    try
+    {
+    aCase = _myHomardGen->CreateCase( \
+            CORBA::string_dup(_aCaseName.toStdString().c_str()),  \
+            CORBA::string_dup(aMeshName.toStdString().c_str()),  \
+            CORBA::string_dup(aFileName.toStdString().c_str()) );
+    }
+    catch( SALOME::SALOME_Exception& S_ex ) 
+    {
+     QMessageBox::information( 0, "Error",
+            QString(CORBA::string_dup(S_ex.details.text)),
+            QMessageBox::Ok + QMessageBox::Default );
+      try
+      {
+          aCase = _myHomardGen->GetCas(_aCaseName.toStdString().c_str());
+          string iter0 = aCase->GetIter0Name();
+          HOMARD::HOMARD_Iteration_var aIter =  _myHomardGen->GetIteration(iter0.c_str());
+          QString aFileName = aIter->GetMeshFile();
+          LEFileName->setText(aFileName);
+          LEFileName->setReadOnly(true);
+          PushFichier->hide();
+      }
+      catch( SALOME::SALOME_Exception& S_ex )  {};
+      return false;
+    }
+    LEFileName->setReadOnly(true);
+    PushFichier->hide();
+  }
+
+  aCase->SetDirName(aDirName.toStdString().c_str());
+  _aDirName=aDirName;
+  aCase->SetConfType(_ConfType);
+
+  if (CBBoundaryD->isChecked())
+  {
+    QString monBoundaryDiName=CBBoundaryDi->currentText();
+    if (monBoundaryDiName != "" )
+    {
+      aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), " ");
+    }
+  }
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+// ---------------------------
+void MonCreateCase::PushOnOK()
+// ---------------------------
+{
+     bool bOK = PushOnApply();
+     if ( bOK )  this->close();
+}
+//------------------------------
+void MonCreateCase::PushOnHelp()
+//-------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"));
+}
+// ---------------------------------
+void MonCreateCase::SetNewCaseName()
+// ------------------------------
+{
+  HOMARD::listeCases_var  MyCases = _myHomardGen->GetAllCases();
+  int num = 0; QString aCaseName="";
+  while (aCaseName=="" )
+  {
+    aCaseName.setNum(num+1) ;
+    aCaseName.insert(0, QString("Case_")) ;
+    for ( int i=0; i<MyCases->length(); i++)
+    {
+      if ( aCaseName ==  QString((MyCases)[i]))
+      {
+          num=num+1;
+          aCaseName="";
+          break;
+      }
+   }
+  }
+  LECaseName->clear() ;
+  LECaseName->insert(aCaseName);
+}
+
+// ------------------------------------------------------------------------
+void MonCreateCase::SetDirName()
+// ------------------------------------------------------------------------
+{
+  QString aDirName=QFileDialog::getExistingDirectory ();
+  if (!(aDirName.isEmpty()))LEDirName->setText(aDirName);
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetFileName()
+// ------------------------------------------------------------------------
+{
+  QString fileName = HOMARD_QT_COMMUN::PushNomFichier();
+  if (!(fileName.isEmpty())) LEFileName->setText(fileName);
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetConforme()
+// ------------------------------------------------------------------------
+{
+  GBTypeNoConf->setVisible(0);
+  adjustSize();
+  _ConfType=1;
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetNonConforme()
+// ------------------------------------------------------------------------
+{
+  GBTypeNoConf->setVisible(1);
+  RB1NpM->setChecked(true);
+  adjustSize();
+  _ConfType=2;
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::Set1NpM()
+// ------------------------------------------------------------------------
+{
+  _ConfType=2;
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::Set1NpA()
+// ------------------------------------------------------------------------
+{
+  _ConfType=3;
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetQuelconque()
+// ------------------------------------------------------------------------
+{
+  _ConfType=4;
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryD()
+// ------------------------------------------------------------------------
+{
+  if (CBBoundaryD->isChecked())
+  { GBBoundaryD->setVisible(1); }
+  else
+  { GBBoundaryD->setVisible(0); }
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::addBoundaryDi(QString newBoundary)
+// ------------------------------------------------------------------------
+{
+  CBBoundaryDi->insertItem(0,newBoundary);
+  CBBoundaryDi->setCurrentIndex(0);
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryDiNew()
+// ------------------------------------------------------------------------
+{
+   MonCreateBoundaryDi *BoundaryDlg = new MonCreateBoundaryDi(this, true, 
+                HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName, "") ;
+   BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryDiEdit()
+// ------------------------------------------------------------------------
+{
+  if (CBBoundaryDi->currentText() == QString(""))  return;
+  MonEditBoundaryDi *BoundaryDlg = new MonEditBoundaryDi(this, true, 
+       HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName, CBBoundaryDi->currentText() ) ;
+  BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryA()
+// ------------------------------------------------------------------------
+{
+  if    (CBBoundaryA->isChecked()) { GBBoundaryA->setVisible(1); }
+  else { GBBoundaryA->setVisible(0); }
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::CaseNameChanged()
+// ------------------------------------------------------------------------
+{
+    if (_aCaseName != LECaseName->text().trimmed())
+    {
+       LEFileName->setReadOnly(false);
+       PushFichier->show();
+    }
+}
diff --git a/src/HOMARDGUI/MonCreateCase.h b/src/HOMARDGUI/MonCreateCase.h
new file mode 100644 (file)
index 0000000..1cf0e4d
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef MON_CREATECASE_H
+#define MON_CREATECASE_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+
+#include <CreateCase.h>
+#include <QWidget>
+
+class MonCreateCase : public QDialog, public Ui_CreateCase
+{
+    Q_OBJECT
+
+public:
+    MonCreateCase( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen);
+    ~MonCreateCase();
+
+    void addBoundaryDi(QString newBoundary);
+
+protected :
+    QString _aCaseName;
+    QString _aDirName;
+
+    int _ConfType;
+
+
+    HOMARD::HOMARD_Cas_var aCase ;
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+    virtual void InitConnect();
+    virtual void GetBoundarys();
+    virtual void SetNewCaseName();
+
+public slots:
+    virtual void SetDirName();
+    virtual void SetFileName();
+
+    virtual void SetConforme();
+    virtual void SetNonConforme();
+    virtual void Set1NpM();
+    virtual void Set1NpA();
+    virtual void SetQuelconque();
+
+    virtual void SetBoundaryD();
+    virtual void PushBoundaryDiNew();
+    virtual void PushBoundaryDiEdit();
+    virtual void SetBoundaryA();
+
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+    virtual void CaseNameChanged();
+};
+
+#endif // MON_CREATECASE_H
diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx
new file mode 100644 (file)
index 0000000..60bd6c8
--- /dev/null
@@ -0,0 +1,716 @@
+using namespace std;
+
+#include "MonCreateHypothesis.h"
+#include "MonCreateListGroup.h"
+#include "MonCreateIteration.h"
+#include "MonCreateZone.h"
+#include "MonEditZone.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+// -------------------------------------------------------------------------------
+MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal,
+                                         HOMARD::HOMARD_Gen_var myHomardGen,
+                                         QString aHypothesisName,
+                                         QString caseName, QString aFieldFile)
+// ---------------------------------------------------------------------------------
+/* Constructs a MonCreateHypothesis */
+    :
+    QDialog(0), Ui_CreateHypothesis(),
+    _parent(parent), _aHypothesisName(aHypothesisName),
+    _aCaseName(caseName), _aFieldFile(aFieldFile), 
+    _aFieldName(""),
+    _aTypeAdap(-2), _aTypeRaff(1), _aTypeDera(0),
+    _TypeThR(3), _ThreshR(0),
+    _TypeThC(0), _ThreshC(0),
+    _UsCmpI(0), _TypeFieldInterp(0)
+{
+      MESSAGE("Constructeur") ;
+      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+      SetNewHypothesisName();
+      if (_aFieldFile != QString("")) {
+          RBChamp->setChecked(1);
+          SetChamp();
+      } else {
+          RBUniforme->setChecked(1);
+          SetUniforme();
+      }
+      SetFieldNo();
+}
+
+// ------------------------------------------------------------------------
+MonCreateHypothesis::~MonCreateHypothesis()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( RBUniforme,   SIGNAL(clicked()), this, SLOT(SetUniforme()));
+    connect( RBChamp,      SIGNAL(clicked()), this, SLOT(SetChamp()));
+    connect( RBZone,       SIGNAL(clicked()), this, SLOT(SetZone()));
+    connect( RBUniRaff,    SIGNAL(clicked()), this, SLOT(SetUniRaff()));
+    connect( RBUniDera,    SIGNAL(clicked()), this, SLOT(SetUniDera()));
+    connect( CBFieldName,  SIGNAL(activated(int)), this, SLOT( SetFieldName()));
+    connect( RBRPE,        SIGNAL(clicked()), this, SLOT(SetRPE()));
+    connect( RBRRel,       SIGNAL(clicked()), this, SLOT(SetRRel()));
+    connect( RBRAbs,       SIGNAL(clicked()), this, SLOT(SetRAbs()));
+    connect( RBRNo,        SIGNAL(clicked()), this, SLOT(SetRNo()));
+    connect( RBCPE,        SIGNAL(clicked()), this, SLOT(SetCPE()));
+    connect( RBCRel,       SIGNAL(clicked()), this, SLOT(SetCRel()));
+    connect( RBCAbs,       SIGNAL(clicked()), this, SLOT(SetCAbs()));
+    connect( RBCNo,        SIGNAL(clicked()), this, SLOT(SetCNo()));
+    connect( RBL2,         SIGNAL(clicked()), this, SLOT(SetUCL2()));
+    connect( RBInf,        SIGNAL(clicked()), this, SLOT(SetUCInf()));
+    connect( PBZoneNew,    SIGNAL(pressed()), this, SLOT(PushZoneNew()));
+    connect( PBZoneEdit,   SIGNAL(pressed()), this, SLOT(PushZoneEdit()) );
+    connect( PBZoneDelete, SIGNAL(pressed()), this, SLOT(PushZoneDelete()) );
+    connect( CBGroupe,     SIGNAL(stateChanged(int)), this, SLOT(SetFiltrage()));
+    connect( RBFieldNo,    SIGNAL(clicked()), this, SLOT(SetFieldNo()));
+    connect( RBFieldAll,   SIGNAL(clicked()), this, SLOT(SetFieldAll()));
+    connect( RBFieldChosen,SIGNAL(clicked()), this, SLOT(SetFieldChosen()));
+    connect( buttonOk,     SIGNAL(pressed()), this, SLOT( PushOnOK()));
+    connect( buttonApply,  SIGNAL(pressed()), this, SLOT( PushOnApply()));
+    connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,   SIGNAL(pressed()), this, SLOT( PushOnHelp()));
+}
+
+// ------------------------------------------------------------------------
+bool MonCreateHypothesis::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+// Verifications
+
+
+  if (LEHypothesisName->text().trimmed()=="") {
+    QMessageBox::information( 0, "Error",
+                              "The hypothesis must be named.",
+                              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  if (VerifieZone()     == false)  return false;
+  if (VerifieComposant() == false)  return false;
+
+// Creation de l'objet CORBA si ce n'est pas deja fait sous le meme nom
+  if (LEHypothesisName->text().trimmed() != _aHypothesisName)
+  {
+    _aHypothesisName=LEHypothesisName->text().trimmed();
+    try
+    {
+     _aHypothesis=_myHomardGen->CreateHypothesis(CORBA::string_dup(_aHypothesisName.toStdString().c_str()) );
+     _parent->addHypothese(_aHypothesisName);
+    }
+    catch( SALOME::SALOME_Exception& S_ex )
+    {
+      QMessageBox::information( 0, "Error",
+                  QString(CORBA::string_dup(S_ex.details.text)),
+                  QMessageBox::Ok + QMessageBox::Default );
+      return false;
+    }
+  }
+
+// Mise en place des attributs
+  _aHypothesis->SetAdapRefinUnRef(_aTypeAdap,_aTypeRaff,_aTypeDera);
+  _aHypothesis->SetTypeFieldInterp(_TypeFieldInterp);
+  _aHypothesis->SetCaseCreation(_aCaseName.toStdString().c_str());
+
+  AssocieLesZones();
+  AssocieComposants();
+  AssocieLesGroupes();
+  AssocieFieldInterp();
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+     if ( _parent ) { _parent->raise(); _parent->activateWindow(); };
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"));
+}
+// -------------------------------------------------
+void MonCreateHypothesis::SetNewHypothesisName()
+// --------------------------------------------------
+{
+
+  HOMARD::listeHypotheses_var  MyHypos = _myHomardGen->GetAllHypotheses();
+  int num = 0;// 
+  QString aHypothesisName="";
+  while (aHypothesisName=="" )
+  {
+    aHypothesisName.setNum(num+1) ;
+    aHypothesisName.insert(0, QString("Hypo_")) ;
+    for ( int i=0; i<MyHypos->length(); i++)
+    {
+      if ( aHypothesisName ==  QString(MyHypos[i]))
+      {
+          num=num+1;
+          aHypothesisName="";
+          break;
+      }
+    }
+  }
+  LEHypothesisName->setText(aHypothesisName);
+}
+
+//
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetUniforme()
+// ------------------------------------------------------------------------
+{
+  GBFieldManagement->setVisible(0);
+  if ( _TypeFieldInterp == 0 ) { GBFieldFile->setVisible(0); }
+  else                         { GBFieldFile->setVisible(1); }
+  GBAreaManagement->setVisible(0);
+  GBUniform->setVisible(1);
+  adjustSize();
+  _aTypeAdap = -1 ;
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetChamp()
+// ------------------------------------------------------------------------
+{
+  if (_aFieldFile == QString(""))
+  {
+     QMessageBox::information( 0, "Error",
+                              QString("Enter FieldFile please "),
+                              QMessageBox::Ok + QMessageBox::Default );
+     close();
+     if ( _parent ) { _parent->raise(); _parent->activateWindow(); };
+     return;
+  }
+  LEFieldFile->setText(_aFieldFile);
+  LEFieldFile->setReadOnly(1);
+  InitFields();
+  GBUniform->setVisible(0);
+  GBAreaManagement->setVisible(0);
+  GBFieldManagement->setVisible(1);
+  GBFieldFile->setVisible(1);
+
+  GBUniform->adjustSize();
+  GBAreaManagement->adjustSize();
+  GBFieldManagement->adjustSize();
+  GBFieldFile->adjustSize();
+  adjustSize();
+
+  _aTypeAdap = 1 ;
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetZone()
+// ------------------------------------------------------------------------
+{
+  GetAllZones();
+  GBUniform->setVisible(0);
+  GBFieldManagement->setVisible(0);
+  if ( _TypeFieldInterp == 0 ) { GBFieldFile->setVisible(0); }
+  else                         { GBFieldFile->setVisible(1); }
+  GBAreaManagement->setVisible(1);
+  adjustSize();
+  _aTypeRaff = 1 ;
+  _aTypeDera = 0 ;
+  _aTypeAdap = 0 ;
+}
+
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::PushZoneNew()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de PushZoneNew")
+  MonCreateZone *aDlg = new MonCreateZone(this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName) ;
+  aDlg->show();
+}
+
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::PushZoneEdit()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de PushZoneEdit")
+  int colonne = TWZone->currentColumn();
+  QTableWidgetItem * monItem = TWZone->currentItem();
+  if (colonne !=1  or monItem == NULL) 
+  {
+    QMessageBox::information( 0, "Error",
+                              "Please, Select a Zone",
+                              QMessageBox::Ok + QMessageBox::Default );
+    return;
+  }
+  QString zoneName = monItem->text().trimmed();
+  MonEditZone *aDlg = new MonEditZone(this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName, zoneName) ;
+  aDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::PushZoneDelete()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de PushZoneDelete")
+  QMessageBox::information( 0, "Error",
+                            "Inactive button.",
+                            QMessageBox::Ok + QMessageBox::Default );
+  return;
+}
+
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::GetAllZones()
+// ------------------------------------------------------------------------
+// Recuperation de toutes les zones enregistrees dans l'arbre d'etude
+{
+  HOMARD::listeZones_var  mesZones = _myHomardGen->GetAllZones();
+  TWZone->clear();
+  int stop=TWZone->rowCount();
+  for ( int row=0; row< stop; row++)
+  {
+     TWZone->removeRow(row);
+  }
+  TWZone->setRowCount(0);
+  int row=0;
+  for (int i=0; i<mesZones->length(); i++)
+  {
+    TWZone->insertRow(row);
+    TWZone->setItem( row, 0, new QTableWidgetItem( QString ("") ) );
+    TWZone->item( row, 0 )->setFlags( 0 );
+    TWZone->item( row, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
+    TWZone->item( row, 0 )->setCheckState( Qt::Unchecked );
+    TWZone->setItem( row, 1, new QTableWidgetItem(QString(mesZones[i])));
+    TWZone->item( row, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+    row=row+1;
+  }
+  TWZone->resizeColumnsToContents();
+  TWZone->resizeRowsToContents();
+  TWZone->clearSelection();
+}
+    
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::addZone(QString newZone)
+// ------------------------------------------------------------------------
+{
+  int row = TWZone->rowCount() ;
+  TWZone->setRowCount( row+1 );
+  TWZone->setItem( row, 0, new QTableWidgetItem( 0 ) );
+  TWZone->item( row, 0 )->setFlags( Qt::ItemIsEditable|Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
+  TWZone->item( row, 0 )->setCheckState( Qt::Checked );
+  TWZone->setItem( row, 1, new QTableWidgetItem( newZone ) );
+  TWZone->scrollToItem( TWZone->item( row, 1 ) );
+  TWZone->resizeRowsToContents();
+  TWZone->resizeColumnToContents(1);
+  TWZone->clearSelection();
+  TWZone->item( row, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+}
+
+// ------------------------------------------------------------------------
+QStringList MonCreateHypothesis::GetZonesChecked()
+// ------------------------------------------------------------------------
+// Retourne les zones enregistrees
+{
+  QStringList ListeZone ;
+  for ( int row=0; row< TWZone->rowCount(); row++)
+  {
+      if ( TWZone->item( row, 0 )->checkState() ==  Qt::Checked )
+          ListeZone.insert(0, QString(TWZone->item(row, 1)->text()) ) ;
+  }
+  return ListeZone ;
+}
+
+// ------------------------------------------------------------------------
+QStringList MonCreateHypothesis::GetListCompChecked()
+// ------------------------------------------------------------------------
+// Retourne les composantes retenues
+{
+  MESSAGE( "Dans GetListCompChecked" );
+  QStringList ListeComposant ;
+
+  ListeComposant.clear();
+  for ( int row=0; row< TWCMP->rowCount(); row++)
+      if ( TWCMP->item( row, 0 )->checkState() ==  Qt::Checked )
+          ListeComposant.insert(0, QString(TWCMP->item(row, 1)->text()) ) ;
+  // Choix du texte des radio-boutons selon 1 ou plusieurs composantes
+  if ( ListeComposant.count() < 2 )
+  { RBL2->setText(QString("Absolute value"));
+    RBInf->setText(QString("Relative value"));
+  }
+  else
+  { RBL2->setText(QString("L2 norm"));
+    RBInf->setText(QString("Infinite Norm"));
+  }
+  return ListeComposant ;
+//
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::AssocieFieldInterp()
+// ------------------------------------------------------------------------
+{
+  if ( _TypeFieldInterp != 2 ) return;
+  for ( int row=0; row< TWField->rowCount(); row++)
+      if ( TWField->item( row, 0 )->checkState() ==  Qt::Checked )
+      { _aHypothesis->AddFieldInterp(TWField->item(row, 1)->text().toStdString().c_str()); }
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetUniRaff()
+// ------------------------------------------------------------------------
+{
+  _aTypeRaff = 1 ;
+  _aTypeDera = 0 ;
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetUniDera()
+// ------------------------------------------------------------------------
+{
+  _aTypeRaff = 0 ;
+  _aTypeDera = 1 ;
+}
+
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::InitFields()
+// ------------------------------------------------------------------------
+{
+  CBFieldName->clear();
+  std::list<QString> listeChamp = HOMARD_QT_COMMUN::GetListeChamps(QString(_aFieldFile) );
+  // Mise en place de la liste dans le menu pour l'indicateur d'erreur
+  std:: list<QString>::const_iterator it;
+  for ( it=listeChamp.begin() ; it != listeChamp.end(); it++)
+  {
+       CBFieldName->insertItem(0,QString(*it));
+  }
+  SetFieldName();
+}
+// ---------------------------------------
+void MonCreateHypothesis::SetFieldName()
+// -------------------------------------------
+{
+  _aFieldName=CBFieldName->currentText();
+  if (QString(_aFieldFile) == QString("") or QString(_aFieldName) == QString("") ) { return; }
+
+  for ( int row=0; row < TWCMP->rowCount() ; row++)
+  {
+     TWCMP->removeRow(row);
+  }
+  //TWCMP->setRowCount(0);
+  //TWCMP->resizeRowsToContents();
+
+  std::list<QString>  maListe =HOMARD_QT_COMMUN::GetListeComposants(_aFieldFile, _aFieldName);
+  std::list<QString>::const_iterator it;
+  for ( it=maListe.begin() ; it != maListe.end(); it++)
+  {
+       TWCMP->insertRow(0);
+       TWCMP->setItem( 0, 0, new QTableWidgetItem( QString ("") ) );
+       TWCMP->item( 0, 0 )->setFlags( 0 );
+       TWCMP->item( 0, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
+       TWCMP->item( 0, 0 )->setCheckState( Qt::Checked );
+       TWCMP->setItem( 0, 1, new QTableWidgetItem(QString((*it))));
+       TWCMP->item( 0, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+  }
+  TWCMP->resizeColumnsToContents();
+  TWCMP->resizeRowsToContents();
+  TWCMP->clearSelection();
+  // Choix du texte des radio-boutons selon 1 ou plusieurs composantes
+  if ( TWCMP->rowCount() == 1 )
+  { RBL2->setText(QString("Absolute value"));
+    RBInf->setText(QString("Relative value"));
+  }
+  else
+  { RBL2->setText(QString("L2 norm"));
+    RBInf->setText(QString("Infinite Norm"));
+  }
+  // Par defaut, on propose la valeur absolue / norme L2
+  SetUCL2();
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetRPE()
+// ------------------------------------------------------------------------
+{
+  _aTypeRaff = 1 ;
+  _TypeThR = 3 ;
+  RBRPE->setChecked(true);
+  SpinBox_RPE->setEnabled(true);
+  SpinBox_RRel->setEnabled(false);
+  SpinBox_RAbs->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetRRel()
+// ------------------------------------------------------------------------
+{
+  _aTypeRaff = 1 ;
+  _TypeThR = 2 ;
+  RBRRel->setChecked(true);
+  SpinBox_RPE->setEnabled(false);
+  SpinBox_RRel->setEnabled(true);
+  SpinBox_RAbs->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetRAbs()
+// ------------------------------------------------------------------------
+{
+  _aTypeRaff = 1 ;
+  _TypeThR = 1 ;
+  RBRAbs->setChecked(true);
+  SpinBox_RPE->setEnabled(false);
+  SpinBox_RRel->setEnabled(false);
+  SpinBox_RAbs->setEnabled(true);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetRNo()
+// ------------------------------------------------------------------------
+{
+  _aTypeRaff = 0 ;
+  _TypeThR = 0;
+  RBRNo->setChecked(true);
+  SpinBox_RPE->setEnabled(false);
+  SpinBox_RRel->setEnabled(false);
+  SpinBox_RAbs->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetCPE()
+// ------------------------------------------------------------------------
+{
+  _aTypeDera = 1 ;
+  _TypeThC = 3 ;
+  RBCPE->setChecked(true);
+  SpinBox_CPE->setEnabled(true);
+  SpinBox_CRel->setEnabled(false);
+  SpinBox_CAbs->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetCRel()
+// ------------------------------------------------------------------------
+{
+  _aTypeDera = 1 ;
+  _TypeThC = 2 ;
+  RBCRel->setChecked(true);
+  SpinBox_CPE->setEnabled(false);
+  SpinBox_CRel->setEnabled(true);
+  SpinBox_CAbs->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetCAbs()
+// ------------------------------------------------------------------------
+{
+  _aTypeDera = 1 ;
+  _TypeThC = 1 ;
+  RBCAbs->setChecked(true);
+  SpinBox_CPE->setEnabled(false);
+  SpinBox_CRel->setEnabled(false);
+  SpinBox_CAbs->setEnabled(true);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetCNo()
+// ------------------------------------------------------------------------
+{
+  _aTypeDera = 0 ;
+  _TypeThC = 0;
+  RBCNo->setChecked(true);
+  SpinBox_CPE->setEnabled(false);
+  SpinBox_CRel->setEnabled(false);
+  SpinBox_CAbs->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetUCL2()
+// ------------------------------------------------------------------------
+{
+  _UsCmpI = 0 ;
+  RBL2->setChecked(true);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetUCInf()
+// ------------------------------------------------------------------------
+{
+  _UsCmpI = 1 ;
+  RBInf->setChecked(true);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetFiltrage()
+// ------------------------------------------------------------------------
+{
+  if (!CBGroupe->isChecked()) return;
+  MonCreateListGroup *aDlg = new MonCreateListGroup(this, NULL, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),_aCaseName, _aListeGroupes) ;
+  aDlg->show();
+}
+
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::setGroups(QStringList listGroup)
+// ------------------------------------------------------------------------
+{
+    _aListeGroupes=listGroup;
+}
+// ------------------------------------------------------------------------
+bool MonCreateHypothesis::VerifieZone()
+// ------------------------------------------------------------------------
+{
+  if ( _aTypeAdap != 0 ) return true;
+  _aListeZone = GetZonesChecked() ;
+  if (_aListeZone.count() == 0)
+  {
+     QMessageBox::information( 0, "Error",
+                              QString("At least, one zone must be given."),
+                              QMessageBox::Ok + QMessageBox::Default );
+     return false;
+  }
+  return true;
+}
+// ------------------------------------------------------------------------
+bool MonCreateHypothesis::VerifieComposant()
+// ------------------------------------------------------------------------
+{
+  if ( _aTypeAdap != 1 ) return true;
+  _aListeComposant = GetListCompChecked() ;
+  if (_aListeComposant.count() == 0)
+  {
+     QMessageBox::information( 0, "Error",
+                              QString("At least, one composant must be given."),
+                               QMessageBox::Ok + QMessageBox::Default );
+     return false;
+  }
+  return true;
+}
+
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::AssocieLesZones()
+// ------------------------------------------------------------------------
+{
+  if ( _aTypeAdap != 0 ) return;
+  _aListeZone = GetZonesChecked() ;
+  for ( int i=0 ; i< _aListeZone.count() ; i++ )
+      { _myHomardGen->AssociateHypoZone(_aListeZone[i].toStdString().c_str(),_aHypothesisName.toStdString().c_str()); }
+};
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::AssocieComposants()
+// ------------------------------------------------------------------------
+{
+  if ( _aTypeAdap != 1 ) return;
+  MESSAGE( "Dans AssocieComposants, _TypeThC : " << _TypeThC );
+  MESSAGE( "Dans AssocieComposants, _TypeThR : " << _TypeThR );
+
+  _ThreshR = 0;
+  if ( _TypeThR == 1 ) { _ThreshR = SpinBox_RAbs->value();}
+  if ( _TypeThR == 2 ) { _ThreshR = SpinBox_RRel->value();}
+  if ( _TypeThR == 3 ) { _ThreshR = SpinBox_RPE->value(); }
+
+  _ThreshC = 0;
+  if ( _TypeThC == 1 ) { _ThreshC = SpinBox_CAbs->value();}
+  if ( _TypeThC == 2 ) { _ThreshC = SpinBox_CRel->value();}
+  if ( _TypeThC == 3 ) { _ThreshC = SpinBox_CPE->value(); }
+
+  _aFieldName=CBFieldName->currentText();
+  _aHypothesis->SetField(CORBA::string_dup(_aFieldName.toStdString().c_str()) ) ;
+  _aHypothesis->SetRefinThr( _TypeThR, _ThreshR ) ;
+  _aHypothesis->SetUnRefThr( _TypeThC, _ThreshC ) ;
+  _aHypothesis->SetUseComp( _UsCmpI ) ;
+  _aListeComposant = GetListCompChecked() ;
+  for ( int i=0 ; i< _aListeComposant.count() ; i++ )
+      { _aHypothesis->AddComp(_aListeComposant[i].toStdString().c_str()); }
+};
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::AssocieLesGroupes()
+// ------------------------------------------------------------------------
+{
+  HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType;
+  aSeqGroupe->length(_aListeGroupes.size());
+  QStringList::const_iterator it;
+  int i=0;
+  for (it = _aListeGroupes.constBegin(); it != _aListeGroupes.constEnd(); it++)
+     aSeqGroupe[i++]=(*it).toStdString().c_str();
+  _aHypothesis->SetGroups(aSeqGroupe);
+
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetFieldNo()
+// ------------------------------------------------------------------------
+// Par defaut, on n'interpole rien
+{
+  if ( _aTypeAdap == 1 ) { GBFieldFile->setVisible(1); }
+  else                   { GBFieldFile->setVisible(0); }
+  TWField->setVisible(0);
+//
+   adjustSize();
+  _TypeFieldInterp = 0 ;
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetFieldAll()
+// ------------------------------------------------------------------------
+// Par defaut, on interpole tout
+{
+  if (_aFieldFile == QString(""))
+  {
+     QMessageBox::information( 0, "Error",
+                              QString("Enter FieldFile please "),
+                              QMessageBox::Ok + QMessageBox::Default );
+     close();
+     if ( _parent ) { _parent->raise(); _parent->activateWindow(); };
+     return;
+  }
+  LEFieldFile->setText(_aFieldFile);
+  LEFieldFile->setReadOnly(1);
+  GBFieldFile->setVisible(1);
+  TWField->setVisible(0);
+//
+  _TypeFieldInterp = 1 ;
+   adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetFieldChosen()
+// ------------------------------------------------------------------------
+{
+  if (_aFieldFile == QString(""))
+  {
+     QMessageBox::information( 0, "Error",
+                              QString("Enter FieldFile please "),
+                              QMessageBox::Ok + QMessageBox::Default );
+     close();
+     if ( _parent ) { _parent->raise(); _parent->activateWindow(); };
+     return;
+  }
+  LEFieldFile->setText(_aFieldFile);
+  LEFieldFile->setReadOnly(1);
+  GBFieldFile->setVisible(1);
+  // Recuperation de la liste des champs contenus dans le fichier _aFieldFile
+  std::list<QString> listeChamp = HOMARD_QT_COMMUN::GetListeChamps(QString(_aFieldFile) );
+
+  // Initialisation de la table
+  TWField->clear();
+  for ( int row=0; row< TWField->rowCount(); row++)
+     TWField->removeRow(row);
+
+  TWField->setRowCount(0);
+  std:: list<QString>::const_iterator it;
+  int row=0;
+  for ( it=listeChamp.begin() ; it != listeChamp.end(); it++)
+  {
+    TWField->insertRow(row);
+    TWField->setItem( row, 0, new QTableWidgetItem( QString ("") ) );
+    TWField->item( row, 0 )->setFlags( 0 );
+    TWField->item( row, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
+    TWField->item( row, 0 )->setCheckState( Qt::Unchecked );
+    TWField->setItem( row, 1, new QTableWidgetItem(QString(*it)));
+    TWField->item( row, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+    row=row+1;
+  }
+  TWField->resizeColumnsToContents();
+  TWField->resizeRowsToContents();
+  TWField->clearSelection();
+  TWField->setVisible(1);
+
+  _TypeFieldInterp = 2 ;
+   adjustSize();
+}
diff --git a/src/HOMARDGUI/MonCreateHypothesis.h b/src/HOMARDGUI/MonCreateHypothesis.h
new file mode 100644 (file)
index 0000000..de4dc21
--- /dev/null
@@ -0,0 +1,103 @@
+#ifndef MON_CREATEHYPOTHESIS_H
+#define MON_CREATEHYPOTHESIS_H
+
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Hypothesis)
+
+#include <CreateHypothesis.h>
+#include <QDialog>
+
+class MonCreateIteration;
+class MonCreateHypothesis : public QDialog, public Ui_CreateHypothesis
+{ 
+    Q_OBJECT
+
+public:
+    MonCreateHypothesis( MonCreateIteration* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen,
+                         QString aHypotheseName, QString caseName, QString aFieldFile);
+    ~MonCreateHypothesis();
+
+    virtual void addZone(QString newZone);
+    virtual void setGroups(QStringList listGroup);
+
+protected :
+   // MonCreateHypothesis( MonCreateIteration* parent, HOMARD::HOMARD_Gen_var myHomardGen,
+   //                      QString caseName, QString aFieldFile);
+
+    MonCreateIteration *_parent;
+
+    QString _aHypothesisName;
+    QString _aFieldFile ;
+    QString _aFieldName;
+    QString _aCaseName;
+
+    int _aTypeAdap;
+    int _aTypeRaff;
+    int _aTypeDera;
+
+    int _TypeThR;
+    double _ThreshR;
+    int _TypeThC;
+    double _ThreshC;
+
+    int _UsCmpI;
+    int _TypeFieldInterp;
+
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+    HOMARD::HOMARD_Hypothesis_var _aHypothesis;
+
+    QStringList _aListeZone;
+    QStringList _aListeComposant;
+    QStringList _aListeGroupes;
+
+    virtual void InitConnect();
+    virtual void InitFields();
+    virtual void GetAllZones();
+    virtual void SetNewHypothesisName();
+
+    virtual void AssocieFieldInterp();
+    virtual void AssocieLesZones();
+    virtual void AssocieComposants();
+    virtual void AssocieLesGroupes();
+    virtual bool VerifieZone();
+    virtual bool VerifieComposant();
+
+    virtual QStringList GetZonesChecked();
+    virtual QStringList GetListCompChecked();
+
+public slots:
+
+    virtual void SetUniforme();
+    virtual void SetChamp();
+    virtual void SetZone();
+    virtual void SetUniRaff();
+    virtual void SetUniDera();
+    virtual void SetFieldName();
+    virtual void SetRPE();
+    virtual void SetRAbs();
+    virtual void SetRRel();
+    virtual void SetRNo();
+    virtual void SetCPE();
+    virtual void SetCAbs();
+    virtual void SetCRel();
+    virtual void SetCNo();
+    virtual void SetUCL2();
+    virtual void SetUCInf();
+    virtual void PushZoneNew();
+    virtual void PushZoneEdit();
+    virtual void PushZoneDelete();
+    virtual void SetFiltrage();
+    virtual void SetFieldNo();
+    virtual void SetFieldAll();
+    virtual void SetFieldChosen();
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+};
+
+#endif // MON_CREATEHYPOTHESIS_H
diff --git a/src/HOMARDGUI/MonCreateIteration.cxx b/src/HOMARDGUI/MonCreateIteration.cxx
new file mode 100644 (file)
index 0000000..ae49c2b
--- /dev/null
@@ -0,0 +1,325 @@
+using namespace std;
+
+#include "MonCreateIteration.h"
+#include "MonCreateHypothesis.h"
+#include "MonEditHypothesis.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -----------------------------------------------------------------------------------------------------
+MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, 
+                                       HOMARD::HOMARD_Gen_var myHomardGen, QString IterParentName ):
+// -----------------------------------------------------------------------------------------------------
+/* Constructs a MonCreateIteration
+ * Inherits from CasHomard
+ * Sets attributes to default values
+ */
+    QDialog(0),
+    Ui_CreateIteration(),
+    _IterationName(""),
+    _IterParentName(IterParentName),
+    _CaseName("")
+    {
+      MESSAGE("Constructeur");
+      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+      SetNewIterationName();
+      GetHypotheses();
+      if (_IterParentName != QString("")) 
+         { SetIterParentName(); }
+      else 
+         {setModal(false); /* permet selection de l iteration dans l arbre d etude */}
+      SetTSNo();
+    }
+
+// ------------------------------------------------------------------------
+MonCreateIteration::~MonCreateIteration()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateIteration::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( PBIterParent,  SIGNAL(pressed()), this, SLOT( SetIterParentName()));
+    connect( PBHypoEdit,    SIGNAL(pressed()), this, SLOT( PushHypoEdit() ) );
+    connect( PBHypoNew,     SIGNAL(pressed()), this, SLOT( PushHypoNew() ) );
+    connect( PushFieldFile, SIGNAL(pressed()), this, SLOT( SetFieldFile() ) );
+    connect( RBNo,          SIGNAL(clicked()), this, SLOT( SetTSNo()));
+    connect( RBLast,        SIGNAL(clicked()), this, SLOT( SetTSLast()));
+    connect( RBChosen,      SIGNAL(clicked()), this, SLOT( SetTSChosen()));
+
+    connect( buttonOk,     SIGNAL(pressed()), this, SLOT( PushOnOK() ) );
+    connect( buttonApply,  SIGNAL(pressed()), this, SLOT( PushOnApply() ) );
+    connect( buttonCancel, SIGNAL(pressed()), this, SLOT( close() ) );
+    connect( buttonHelp,   SIGNAL(pressed()), this, SLOT( PushOnHelp() ) );
+}
+// ------------------------------------------------------------------------
+void MonCreateIteration::GetHypotheses()
+// ------------------------------------------------------------------------
+{
+     HOMARD::listeHypotheses_var  mesHypotheses = _myHomardGen->GetAllHypotheses();
+     for (int i=0; i<mesHypotheses->length(); i++)
+     {
+         CBHypothese->addItem(QString(mesHypotheses[i]));
+     }
+}
+
+// ------------------------------------------------------------------------
+bool MonCreateIteration::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+{
+  MESSAGE("PushOnApply");
+//
+  QString aIterationName = LEIterationName->text().trimmed();
+  if ( aIterationName == QString (""))
+  {
+    QMessageBox::information( 0, "Error",
+           QString(" Nommer l iteration "),
+          QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  if ( _IterParentName == QString (""))
+  {
+    QMessageBox::information( 0, "Error",
+    QString(" Donner le point de depart "),
+    QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+  QString aMeshName_np1=LEMeshName_np1->text().trimmed();
+  if (aMeshName_np1 == "" )
+  {
+    QMessageBox::information( 0, "Error",
+    QString(" Donner le nom du maillage final."),
+    QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+  QString monHypoName=CBHypothese->currentText();
+  if (monHypoName == "" )
+  {
+    QMessageBox::information( 0, "Error",
+    QString(" Choisir une hypothese "),
+    QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+  HOMARD::HOMARD_Hypothesis_var _myHypothesis = _myHomardGen->GetHypothesis(monHypoName.toStdString().c_str());
+  HOMARD::listeTypes_var ListTypes (_myHypothesis->GetAdapRefinUnRef());
+  int TypeAdap = ListTypes[0];
+  if ( TypeAdap == 1 and LEFieldFile->text().trimmed() == QString("") )
+  {
+    QMessageBox::information( 0, "Error",
+    QString("Avec cette hypothese, il faut fournir le fichier du champ."),
+    QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  MESSAGE ("aMeshName_np1.toStdString " << aMeshName_np1.toStdString());
+  MESSAGE ("_CaseName.toStdString " << _CaseName.toStdString() );
+  MESSAGE ("_IterParentName.toStdString " << _IterParentName.toStdString() );
+
+// Creation de l'objet CORBA si ce n'est pas deja fait sous le meme nom
+  if (_IterationName != aIterationName)
+  {
+    try
+    {
+      _IterationName = aIterationName;
+      std::cerr << _IterationName.toStdString() << std::endl;
+      aIter = _myHomardGen->CreateIteration( \
+               CORBA::string_dup(_IterationName.toStdString().c_str()),
+               CORBA::string_dup(_IterParentName.toStdString().c_str()));
+    }
+    catch( SALOME::SALOME_Exception& S_ex ) 
+    {
+       QMessageBox::information( 0, "Error",
+                QString(CORBA::string_dup(S_ex.details.text)),
+                QMessageBox::Ok + QMessageBox::Default );
+       return false;
+    }
+  }
+
+// Mise en place des attributs
+  const char* IterName = aIter->GetName() ;
+  std::cerr << IterName << std::endl;
+
+  if ( LEFieldFile->text().trimmed() != QString(""))
+  {
+    QString FieldFile=LEFieldFile->text().trimmed();
+    int rank = SpinBox_Rank->value();
+    int step = SpinBox_TimeStep->value();
+    aIter->SetFieldFile(CORBA::string_dup(FieldFile.toStdString().c_str()));
+    aIter->SetTimeStepRank(rank,step);
+  }
+  _myHomardGen->AssociateIterHypo (IterName, monHypoName.toStdString().c_str());
+  aIter->SetMeshName(CORBA::string_dup(aMeshName_np1.toStdString().c_str()));
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+
+// ------------------------------------------------------------------------
+void MonCreateIteration::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     bool bOK = PushOnApply();
+     if ( bOK )  this->close();
+}
+
+// ------------------------------------------------------------------------
+void MonCreateIteration::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+       HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html"));
+}
+
+// ------------------------------------------------------------------------
+void MonCreateIteration::SetIterParentName()
+// ------------------------------------------------------------------------
+{
+  if (_IterParentName == QString("")) {
+    _IterParentName=HOMARD_QT_COMMUN::SelectionArbreEtude(QString("IterationHomard"), 1);
+    if (_IterParentName == QString("")) { raise();return;};
+  }
+  _CaseName=HOMARD_QT_COMMUN::SelectionCasEtude();
+  HOMARD::HOMARD_Iteration_var aIterParent = _myHomardGen->GetIteration(_IterParentName.toStdString().c_str()) ;
+  QString MeshName = aIterParent->GetMeshName();
+
+  LEMeshName_n->setText(MeshName);
+  LEMeshName_n->setReadOnly(1);
+  LEMeshName_np1->setText(MeshName);
+  
+  LEIterationParentName->setText(_IterParentName);
+}
+
+// -------------------------------------------------
+void MonCreateIteration::SetNewIterationName()
+// --------------------------------------------------
+{
+// Recherche d'un nom par defaut qui n'existe pas encore
+
+  HOMARD::listeIterations_var  myIters=_myHomardGen->GetAllIterations();
+  int num = 0;// 
+  QString aIterationName="";
+  while (aIterationName=="" )
+  {
+    aIterationName.setNum(num+1) ;
+    aIterationName.insert(0, QString("Iter_"));
+    for ( int i=0; i< myIters->length(); i++)
+    {
+      if ( aIterationName ==  QString((myIters)[i]))
+      {
+          num=num+1;
+          aIterationName="";
+          break;
+      }
+   }
+  }
+  LEIterationName->setText(aIterationName);
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateIteration::PushHypoEdit()
+// ------------------------------------------------------------------------
+{
+  if (CBHypothese->currentText() == QString(""))  return;
+  if (_IterParentName == QString(""))
+  {
+        QMessageBox::information( 0, "Error",
+        QString("The previous iteration must be given."),
+        QMessageBox::Ok + QMessageBox::Default );
+        raise();
+        return;
+  }
+  QString aFieldFile=LEFieldFile->text().trimmed();
+  MonEditHypothesis *HypoDlg = new MonEditHypothesis(this,TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),CBHypothese->currentText(), _CaseName, aFieldFile) ;
+  HypoDlg->show();
+}
+
+// ------------------------------------------------------------------------
+void MonCreateIteration::addHypothese(QString newHypothese)
+// ------------------------------------------------------------------------
+{
+         CBHypothese->insertItem(0,newHypothese);
+         CBHypothese->setCurrentIndex(0);
+}
+// ------------------------------------------------------------------------
+void MonCreateIteration::PushHypoNew()
+// ------------------------------------------------------------------------
+{
+    if (_IterParentName == QString(""))
+    {
+         QMessageBox::information( 0, "Error",
+         QString("The previous iteration must be given."),
+         QMessageBox::Ok + QMessageBox::Default );
+         raise();
+         return;
+    }
+    if ( _CaseName == QString(""))
+    {
+         _CaseName = _myHomardGen->GetCaseName(CORBA::string_dup(_IterParentName.toStdString().c_str()));
+    }
+   QString aFieldFile=LEFieldFile->text().trimmed();
+   MonCreateHypothesis *HypoDlg = new MonCreateHypothesis(this,TRUE,HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),QString(""),_CaseName, aFieldFile) ;
+   HypoDlg->show();
+}
+
+// ------------------------------------------------------------------------
+void MonCreateIteration::SetFieldFile()
+// ------------------------------------------------------------------------
+
+{
+  QString fileName0 = LEFieldFile->text().trimmed();
+  QString fileName = HOMARD_QT_COMMUN::PushNomFichier(false);
+  if (fileName.isEmpty()) fileName = fileName0 ;
+  LEFieldFile->setText(fileName);
+  raise();
+}
+// ------------------------------------------------------------------------
+void MonCreateIteration::SetTSNo()
+// ------------------------------------------------------------------------
+// Par defaut, on declare que le pas de temps vaut -1
+{
+  Rank->setVisible(0);
+  SpinBox_Rank->setVisible(0);
+  TimeStep->setVisible(0);
+  SpinBox_TimeStep->setVisible(0);
+  SpinBox_TimeStep->setValue(-1);
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateIteration::SetTSLast()
+// ------------------------------------------------------------------------
+// Par defaut, on declare que le pas de temps vaut -2
+{
+  Rank->setVisible(0);
+  SpinBox_Rank->setVisible(0);
+  TimeStep->setVisible(0);
+  SpinBox_TimeStep->setVisible(0);
+  SpinBox_TimeStep->setValue(-2);
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateIteration::SetTSChosen()
+// ------------------------------------------------------------------------
+{
+  Rank->setVisible(1);
+  SpinBox_Rank->setVisible(1);
+  TimeStep->setVisible(1);
+  SpinBox_TimeStep->setVisible(1);
+  SpinBox_TimeStep->setValue(1);
+  adjustSize();
+}
+
diff --git a/src/HOMARDGUI/MonCreateIteration.h b/src/HOMARDGUI/MonCreateIteration.h
new file mode 100644 (file)
index 0000000..141619f
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef MON_CREATEITERATION_H
+#define MON_CREATEITERATION_H
+
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+
+#include <CreateIteration.h>
+#include <QDialog>
+#include <QWidget>
+
+class MonCreateIteration : public QDialog, public Ui_CreateIteration
+{ 
+    Q_OBJECT
+
+public:
+    MonCreateIteration( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString IterParentName );
+    ~MonCreateIteration();
+
+    void addHypothese(QString newHypothese);
+
+
+protected :
+    MonCreateIteration( QWidget* parent, HOMARD::HOMARD_Gen_var myHomardGen, QString IterParentName );
+
+    QString _IterationName;
+    QString _IterParentName;
+    QString _CaseName;
+
+
+    HOMARD::HOMARD_Iteration_var aIter ;
+    HOMARD::HOMARD_Iteration_var aIterParent ;
+    HOMARD::HOMARD_Cas_var aCas ;
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+
+    virtual void InitConnect();
+    virtual void GetHypotheses();
+    virtual void SetNewIterationName();
+
+public slots:
+    virtual void SetIterParentName();
+    virtual void PushHypoEdit();
+    virtual void PushHypoNew();
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+    virtual void SetFieldFile();
+    virtual void SetTSNo();
+    virtual void SetTSLast();
+    virtual void SetTSChosen();
+
+};
+
+#endif // MON_CREATEITERATION_H
diff --git a/src/HOMARDGUI/MonCreateListGroup.cxx b/src/HOMARDGUI/MonCreateListGroup.cxx
new file mode 100644 (file)
index 0000000..47121c7
--- /dev/null
@@ -0,0 +1,131 @@
+using namespace std;
+
+#include "MonCreateListGroup.h"
+#include "MonCreateHypothesis.h"
+#include "MonCreateBoundaryDi.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_ViewManager.h>
+
+// --------------------------------------------------------------------------------------------------------------
+MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, 
+                                       HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo) : 
+// --------------------------------------------------------------------------------------------------------------
+//
+    QDialog(0), Ui_CreateListGroup(),
+    _aCaseName (aCaseName),
+    _listeGroupesHypo (listeGroupesHypo),
+    _parentHyp(parentHyp),
+    _parentBound(parentBound)
+{
+    MESSAGE("Debut de  MonCreateListGroup")
+     _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+    setupUi(this);
+    setModal(modal);
+    InitConnect();
+    InitGroupes();
+}
+// --------------------------------------------------------------------------------------------------------------
+MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound,  
+                                       HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo) : 
+// --------------------------------------------------------------------------------------------------------------
+//
+    QDialog(0), Ui_CreateListGroup(),
+    _aCaseName (aCaseName),
+    _listeGroupesHypo (listeGroupesHypo),
+    _parentHyp(parentHyp),
+    _parentBound(parentBound)
+{
+    _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+    setupUi(this);
+    InitConnect();
+}
+
+// ------------------------------------------------------------------------
+MonCreateListGroup::~MonCreateListGroup()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroup::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( buttonOk,     SIGNAL( pressed() ), this, SLOT( PushOnOK() ) );
+    connect( buttonApply,  SIGNAL( pressed() ), this, SLOT( PushOnApply() ) );
+    connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) );
+    connect( buttonHelp,   SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) );
+}
+// ------------------------------------------------------------------------
+bool MonCreateListGroup::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+  QStringList ListeGroup ;
+  for ( int row=0; row< TWGroupe->rowCount(); row++)
+  {
+      if ( TWGroupe->item( row, 0 )->checkState() ==  Qt::Checked )
+          ListeGroup.insert(0, QString(TWGroupe->item(row, 1)->text()) );
+  }
+  if ( _parentHyp )   { _parentHyp->setGroups(ListeGroup);};
+  if ( _parentBound ) { _parentBound->setGroups(ListeGroup);};
+  return true;
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateListGroup::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+     if ( _parentHyp )   { _parentHyp->raise(); _parentHyp->activateWindow(); };
+     if ( _parentBound ) { _parentBound->raise(); _parentBound->activateWindow(); };
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroup::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"));
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroup::InitGroupes()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de InitGroupes ");
+  for ( int row=0; row< TWGroupe->rowCount(); row++)
+      TWGroupe->removeRow(row);
+  TWGroupe->setRowCount(0);
+  if (_aCaseName == QString("")) { return; };
+  HOMARD::HOMARD_Cas_var monCas= _myHomardGen->GetCas(_aCaseName.toStdString().c_str());
+  HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
+  for ( int i = 0; i < _listeGroupesCas->length(); i++ )
+  {
+    TWGroupe->insertRow(i);
+    TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
+    TWGroupe->item( i, 0 )->setFlags( 0 );
+    TWGroupe->item( i, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
+    if (_listeGroupesHypo.contains (QString((_listeGroupesCas)[i])))
+      {TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );}
+    else
+      {TWGroupe->item( i, 0 )->setCheckState( Qt::Unchecked );}
+    TWGroupe->setItem( i, 1, new QTableWidgetItem(QString((_listeGroupesCas)[i])));
+    TWGroupe->item( i, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+  }
+  TWGroupe->resizeColumnsToContents();
+  TWGroupe->resizeRowsToContents();
+  TWGroupe->clearSelection();
+  MESSAGE("Fin de InitGroupes ");
+}
+
diff --git a/src/HOMARDGUI/MonCreateListGroup.h b/src/HOMARDGUI/MonCreateListGroup.h
new file mode 100644 (file)
index 0000000..c9e3e22
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef MON_CREATELISTGROUP_H
+#define MON_CREATELISTGROUP_H
+
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <CreateListGroup.h>
+#include <QDialog>
+
+class MonCreateHypothesis;
+class MonCreateBoundaryDi;
+class MonCreateListGroup : public QDialog, public Ui_CreateListGroup
+{
+    Q_OBJECT
+
+public:
+    MonCreateListGroup( MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo);
+    MonCreateListGroup( MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
+    virtual ~MonCreateListGroup();
+
+protected :
+
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+    MonCreateHypothesis * _parentHyp;
+    MonCreateBoundaryDi * _parentBound;
+    QString _aCaseName;
+    QStringList _listeGroupesHypo;
+
+    virtual void InitConnect();
+    virtual void InitGroupes();
+
+public slots:
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+};
+
+#endif // MON_CREATELISTGROUP_H
diff --git a/src/HOMARDGUI/MonCreateZone.cxx b/src/HOMARDGUI/MonCreateZone.cxx
new file mode 100644 (file)
index 0000000..6fbea3d
--- /dev/null
@@ -0,0 +1,410 @@
+using namespace std;
+
+#include "MonCreateZone.h"
+#include "MonCreateHypothesis.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_ViewManager.h>
+
+// ------------------------------------------------------------------------------------------------------------------------
+MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, bool modal,
+                             HOMARD::HOMARD_Gen_var myHomardGen,
+                             QString caseName) :
+// ------------------------------------------------------------------------------------------------------------------------------
+/* Constructs a MonCreateZone
+   appele pour une vraie creation
+   initialise une boite et non une sphere
+*/
+    QDialog(0), Ui_CreateZone(),
+    _parent(parent),
+    _aZoneName (""),
+    _aCaseName(caseName),
+    _ZoneType(2),
+    _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0),
+    _ZoneXcentre(0), _ZoneYcentre(0), _ZoneZcentre(0), _ZoneRayon(0),
+    _ZoneXmin(0), _ZoneXmax(0), _ZoneYmin(0), _ZoneYmax(0), _ZoneZmin(0), _ZoneZmax(0),
+    _Xmin(0), _Xmax(0), _Xincr(0), _Ymin(0), _Ymax(0), _Yincr(0), _Zmin(0), _Zmax(0), _Zincr(0), _DMax(0),
+    Chgt (false)
+    {
+      MESSAGE("Constructeur") ;
+      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      setupUi(this);
+      setModal(modal);
+
+    //  Gestion des icones
+      SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" );
+      QIcon IS=QIcon(pix);
+      RBSphere->setIcon(IS);
+      QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" );
+      QIcon IS2=QIcon(pix2);
+      RBBox->setIcon(IS2);
+
+      InitConnect( );
+
+      SetNewZoneName() ;
+      InitValZone();           // Cherche les valeurs de la boite englobante le maillage
+      InitMinMax();            // Initialise les bornes des boutons
+      SetBox();                // Propose une boite en premier choix
+    }
+// --------------------------------------------------------------------------------------------------------------
+MonCreateZone::MonCreateZone(MonCreateHypothesis* parent,
+                             HOMARD::HOMARD_Gen_var myHomardGen,
+                             QString caseName):
+// --------------------------------------------------------------------------------------------------------------
+// Constructeur appele par MonEditZone
+//
+    QDialog(0), Ui_CreateZone(),
+     _myHomardGen(myHomardGen),
+    _parent(parent),
+    _aZoneName (""),
+    _aCaseName(caseName),
+    _ZoneType(2),
+    _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0),
+    _ZoneXcentre(0), _ZoneYcentre(0), _ZoneZcentre(0), _ZoneRayon(0),
+    _ZoneXmin(0), _ZoneXmax(0), _ZoneYmin(0), _ZoneYmax(0), _ZoneZmin(0), _ZoneZmax(0),
+    // Pour affichage lors de l edition d une Zone sans nom de Cas
+    _Xmin(1), _Xmax(1), _Xincr(1), _Ymin(1), _Ymax(1), _Yincr(1), _Zmin(1), _Zmax(1), _Zincr(1), _DMax(1),
+    Chgt (false)
+    {
+  //  MESSAGE("Debut de  MonCreateZone")
+      setupUi(this);
+      SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+      QPixmap pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" );
+      QIcon IS=QIcon(pix);
+      RBSphere->setIcon(IS);
+      QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" );
+      QIcon IS2=QIcon(pix2);
+      RBBox->setIcon(IS2);
+      setModal(true);
+      InitConnect();
+    }
+
+// ------------------------------------------------------------------------
+MonCreateZone::~MonCreateZone()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateZone::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( RBBox,        SIGNAL(clicked()) , this, SLOT(SetBox()) ) ;
+    connect( RBSphere,     SIGNAL(clicked()) , this, SLOT(SetSphere()) ) ;
+    connect( buttonOk,     SIGNAL( pressed() ), this, SLOT( PushOnOK() ) );
+    connect( buttonApply,  SIGNAL( pressed() ), this, SLOT( PushOnApply() ) );
+    connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) );
+    connect( buttonHelp,   SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) );
+}
+// ------------------------------------------------------------------------
+void MonCreateZone::InitValZone()
+// ------------------------------------------------------------------------
+{
+//
+//  1. Les coordonnees extremes du maillage
+//
+    if (_aCaseName == QString("")) { return; }
+
+    HOMARD::HOMARD_Cas_var aCas = _myHomardGen->GetCas(_aCaseName.toStdString().c_str());
+    HOMARD::extrema_var  MesExtremes = aCas->GetBoundingBox();
+    int num = MesExtremes->length() ;
+    ASSERT(num == 10);
+    _Xmin=MesExtremes[0]; _Xmax=MesExtremes[1]; _Xincr=MesExtremes[2];
+    _Ymin=MesExtremes[3]; _Ymax=MesExtremes[4]; _Yincr=MesExtremes[5];
+    _Zmin=MesExtremes[6]; _Zmax=MesExtremes[7]; _Zincr=MesExtremes[8];
+    _DMax=MesExtremes[9];
+     MESSAGE ("_Xmin : " << _Xmin << " _Xmax : " << _Xmax << " _Xincr : " << _Xincr ) ;
+     MESSAGE ("_Ymin : " << _Ymin << " _Ymax : " << _Ymax << " _Yincr : " << _Yincr ) ;
+     MESSAGE ("_Zmin : " << _Zmin << " _Zmax : " << _Zmax << " _Zincr : " << _Zincr) ;
+     MESSAGE ("_DMax : " << _DMax);
+
+//  2. Caracteristiques des zones
+// en X
+    if ( _Xincr < 0 )
+    {
+      _ZoneXmin = _Xmin;
+      _ZoneXmax = _Xmax;
+    }
+    else
+    {
+      _ZoneXmin = _Xmin - _Xincr;
+      _ZoneXmax = _Xmax + _Xincr;
+    }
+    _Xcentre=(_Xmin + _Xmax)/2.;
+// en Y
+    if ( _Yincr < 0 )
+    {
+      _ZoneYmin = _Ymin;
+      _ZoneYmax = _Ymax;
+    }
+    else
+    {
+      _ZoneYmin = _Ymin - _Yincr;
+      _ZoneYmax = _Ymax + _Yincr;
+    }
+    _Ycentre=(_Ymin + _Ymax)/2.;
+// en Z
+    if ( _Zincr < 0 )
+    {
+      _ZoneZmin = _Zmin;
+      _ZoneZmax = _Zmax;
+    }
+    else
+    {
+      _ZoneZmin = _Zmin - _Zincr;
+      _ZoneZmax = _Zmax + _Zincr;
+    }
+    _Zcentre=(_Zmin + _Zmax)/2.;
+// Rayon
+    _Rayon= _DMax/4.;
+}
+
+// ------------------------------------------------------------------------
+void MonCreateZone::InitMinMax()
+// ------------------------------------------------------------------------
+{
+// en X
+    if ( _Xincr > 0) {
+      SpinBox_Xmini->setRange(_ZoneXmin,_ZoneXmax);
+      SpinBox_Xmaxi->setRange(_ZoneXmin,_ZoneXmax);
+      SpinBox_Xmini->setSingleStep(_Xincr);
+      SpinBox_Xmaxi->setSingleStep(_Xincr);
+      SpinBox_Xcentre->setSingleStep(_Xincr);
+    }
+    else {
+      SpinBox_Xmini->setValue(_ZoneXmin) ;
+      SpinBox_Xmaxi->setValue(_ZoneXmax) ;
+      SpinBox_Xmini->setEnabled(false) ;
+      SpinBox_Xmaxi->setEnabled(false) ;
+      SpinBox_Xcentre->setEnabled(false) ;
+    }
+// en Y
+    if ( _Yincr > 0) {
+      SpinBox_Ymini->setRange(_ZoneYmin,_ZoneYmax);
+      SpinBox_Ymaxi->setRange(_ZoneYmin,_ZoneYmax);
+      SpinBox_Ymini->setSingleStep(_Yincr);
+      SpinBox_Ymaxi->setSingleStep(_Yincr);
+      SpinBox_Ycentre->setSingleStep(_Yincr);
+    }
+    else {
+      SpinBox_Ymini->setValue(_ZoneYmin) ;
+      SpinBox_Ymaxi->setValue(_ZoneYmax) ;
+      SpinBox_Ycentre->setValue(_Ycentre);
+      SpinBox_Ymini->setEnabled(false) ;
+      SpinBox_Ymaxi->setEnabled(false) ;
+      SpinBox_Ycentre->setEnabled(false) ;
+    }
+// en Z
+    if ( _Zincr > 0) {
+      SpinBox_Zmini->setRange(_ZoneZmin,_ZoneZmax);
+      SpinBox_Zmaxi->setRange(_ZoneZmin,_ZoneZmax);
+      SpinBox_Zmini->setSingleStep(_Zincr);
+      SpinBox_Zmaxi->setSingleStep(_Zincr);
+      SpinBox_Zcentre->setSingleStep(_Zincr);
+    }
+    else {
+      SpinBox_Zmini->setValue(_ZoneZmin) ;
+      SpinBox_Zmaxi->setValue(_ZoneZmax) ;
+      SpinBox_Zmini->setEnabled(false) ;
+      SpinBox_Zmaxi->setEnabled(false) ;
+      SpinBox_Zcentre->setEnabled(false) ;
+    }
+// Rayon
+    SpinBox_Rayon->setMinimum(0.);
+}
+// ------------------------------------------------------------------------
+bool MonCreateZone::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+  std::cerr << LEZoneName->text().trimmed().toStdString() << std::endl;
+  if (LEZoneName->text().trimmed()=="")
+  {
+    QMessageBox::information( 0, "Error",
+                              "The zone must be named.",
+                              QMessageBox::Ok + QMessageBox::Default );
+    return false;
+  }
+
+  switch (_ZoneType)
+  {
+      case 2 : // il s agit d une boite
+      {
+        if ((_ZoneXmin != SpinBox_Xmini->value()) or (_ZoneXmax != SpinBox_Xmaxi->value()) or
+            (_ZoneYmin != SpinBox_Ymini->value()) or (_ZoneYmax != SpinBox_Ymaxi->value()) or
+            (_ZoneZmin != SpinBox_Zmini->value()) or (_ZoneZmax != SpinBox_Zmaxi->value()) )
+            Chgt = true;
+        break;
+      } 
+
+      case 4 : // il s agit d une sphere
+      {
+        if ((_ZoneXcentre != SpinBox_Xcentre->value()) or (_ZoneYcentre != SpinBox_Ycentre->value()) 
+        or  (_ZoneZcentre != SpinBox_Zcentre->value()) or (_ZoneRayon != SpinBox_Rayon->value()))
+           Chgt = true;
+           break;
+      }
+  }
+
+  _ZoneXmin= SpinBox_Xmini->value(); _ZoneXmax= SpinBox_Xmaxi->value(); 
+  _ZoneYmin= SpinBox_Ymini->value(); _ZoneYmax= SpinBox_Ymaxi->value(); 
+  _ZoneZmin= SpinBox_Zmini->value(); _ZoneZmax= SpinBox_Zmaxi->value(); 
+
+  _ZoneXcentre=SpinBox_Xcentre->value();_ZoneYcentre=SpinBox_Ycentre->value();
+  _ZoneZcentre=SpinBox_Zcentre->value();_ZoneRayon=SpinBox_Rayon->value();
+
+  if( _ZoneType == 2 )
+  {
+    if ((_ZoneXmin>= _ZoneXmax) and (_Xincr > 0)) {
+      QMessageBox::information( 0, "Error",
+               QString("X maxi must be greater than X mini."),
+               QMessageBox::Ok + QMessageBox::Default );
+      return false; }
+
+    if  ((_ZoneYmin>= _ZoneYmax) and (_Yincr > 0)) {
+      QMessageBox::information( 0, "Error",
+                  QString("Y maxi must be greater than Y mini."),
+                  QMessageBox::Ok + QMessageBox::Default );
+      return false; }
+
+    if ((_ZoneZmin>= _ZoneZmax) and (_Zincr > 0)) {
+      QMessageBox::information( 0, "Error",
+                    QString("Z maxi must be greater than Z mini."),
+                    QMessageBox::Ok + QMessageBox::Default );
+      return false; }
+  }
+
+  bool bOK = CreateOrUpdateZone();
+  return bOK;
+
+}
+// ---------------------------------------------------
+bool MonCreateZone:: CreateOrUpdateZone()
+//----------------------------------------------------
+//  Creation de la zone
+//  Mise a jour des attributs de la Zone
+
+{
+  if (_aZoneName != LEZoneName->text().trimmed())
+  {
+    try
+    {
+      _aZoneName = LEZoneName->text().trimmed();
+      aZone = _myHomardGen->CreateZone( \
+              CORBA::string_dup(_aZoneName.toStdString().c_str()), \
+              CORBA::Long(_ZoneType) );
+      _parent->addZone(_aZoneName);
+     }
+     catch( SALOME::SALOME_Exception& S_ex ) 
+     {
+       QMessageBox::information( 0, "Error",
+                QString(CORBA::string_dup(S_ex.details.text)),
+                QMessageBox::Ok + QMessageBox::Default );
+       return false;
+     }
+  }
+// Mise en place des attributs
+  aZone->SetZoneType(_ZoneType);
+  aZone->SetBox(_ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax);
+  aZone->SetSphere(_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon);
+  aZone->SetLimit(_Xincr, _Yincr, _Zincr);
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+// ------------------------------------------------------------------------
+void MonCreateZone::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+}
+// ------------------------------------------------------------------------
+void MonCreateZone::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_zone.html") ) ;
+}
+
+// -----------------------------------
+void MonCreateZone::SetNewZoneName()
+// -----------------------------------
+{
+// Recherche d'un nom par defaut qui n'existe pas encore
+
+  HOMARD::listeZones_var  MyZones = _myHomardGen->GetAllZones();
+  int num = 0; QString aZoneName="";
+  while (aZoneName=="" ) 
+  {
+    aZoneName.setNum(num+1) ;
+    aZoneName.insert(0, QString("Zone_")) ;
+    for ( int i=0; i<MyZones->length(); i++) 
+    {
+      if ( aZoneName ==  QString(MyZones[i])) 
+      {
+          num=num+1;
+          aZoneName="";
+          break;
+      } 
+   } 
+  }
+  LEZoneName->clear() ;
+  LEZoneName->insert(aZoneName);
+}
+// ------------------------------------------------------------------------
+void MonCreateZone::SetBox()
+// ------------------------------------------------------------------------
+{
+  gBBox->setVisible(1);
+  gBSphere->setVisible(0);
+  adjustSize();
+  _ZoneType=2;
+// Sachant que l'increment est le 1/100eme de l'ecart (min/max), cela revient
+// a initialiser la boite sur une boite 'centrale' comprise entre 2/5 et 3/5
+  if ( _Xincr > 0 ) {
+      SpinBox_Xmini->setValue(_Xcentre-10*_Xincr);
+      SpinBox_Xmaxi->setValue(_Xcentre+10*_Xincr);
+   }
+  if ( _Yincr > 0 ) {
+      SpinBox_Ymini->setValue(_Ycentre-10*_Yincr);
+      SpinBox_Ymaxi->setValue(_Ycentre+10*_Yincr);
+   }
+  if ( _Zincr > 0 ) {
+      SpinBox_Zmini->setValue(_Zcentre-10*_Zincr);
+      SpinBox_Zmaxi->setValue(_Zcentre+10*_Zincr);
+   }
+}
+// ------------------------------------------------------------------------
+void MonCreateZone::SetSphere()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetSphere")
+  gBBox->setVisible(0);
+  gBSphere->setVisible(1);
+  adjustSize();
+  _ZoneType=4;
+  if ( _Xincr > 0 ) {
+     SpinBox_Xcentre->setValue(_Xcentre);
+   }
+  if ( _Yincr > 0 ) {
+     SpinBox_Ycentre->setValue(_Ycentre);
+   }
+  if ( _Zincr > 0 ) {
+     SpinBox_Zcentre->setValue(_Zcentre);
+   }
+   SpinBox_Rayon->setValue(_Rayon); 
+}
+
+
diff --git a/src/HOMARDGUI/MonCreateZone.h b/src/HOMARDGUI/MonCreateZone.h
new file mode 100644 (file)
index 0000000..e00812e
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef MON_CREATEZONE_H
+#define MON_CREATEZONE_H
+
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <CreateZone.h>
+#include <QDialog>
+
+class MonCreateHypothesis;
+class MonCreateZone : public QDialog, public Ui_CreateZone
+{
+    Q_OBJECT
+
+public:
+    MonCreateZone( MonCreateHypothesis* parent, bool modal,
+                   HOMARD::HOMARD_Gen_var myHomardGen,
+                   QString caseName);
+    virtual ~MonCreateZone();
+
+protected :
+    MonCreateZone( MonCreateHypothesis* parent,
+                   HOMARD::HOMARD_Gen_var myHomardGen,
+                   QString caseName);
+
+    MonCreateHypothesis * _parent;
+
+    QString _aZoneName;
+    QString _aCaseName;
+
+    int _ZoneType;
+    double _Xcentre, _Ycentre, _Zcentre, _Rayon ;
+    double _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon;
+    double _Xmin, _Xmax, _Xincr, _Ymin, _Ymax, _Yincr, _Zmin, _Zmax, _Zincr, _DMax ;
+    double _ZoneXmin, _ZoneXmax,  _ZoneYmin, _ZoneYmax,  _ZoneZmin, _ZoneZmax;
+
+
+    bool Chgt;
+
+    HOMARD::HOMARD_Zone_var aZone ;
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+    virtual void InitConnect();
+    virtual void InitValZone();
+    virtual void InitMinMax();
+    virtual void SetNewZoneName();
+    virtual bool CreateOrUpdateZone();
+
+public slots:
+    virtual void SetBox();
+    virtual void SetSphere();
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+};
+
+#endif // MON_CREATEZONE_H
diff --git a/src/HOMARDGUI/MonEditBoundaryDi.cxx b/src/HOMARDGUI/MonEditBoundaryDi.cxx
new file mode 100644 (file)
index 0000000..cae0825
--- /dev/null
@@ -0,0 +1,89 @@
+using namespace std;
+
+#include "MonEditBoundaryDi.h"
+#include "MonEditListGroup.h"
+
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -------------------------------------------------------------------------------------------------------------------------------------
+MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal,
+                                      HOMARD::HOMARD_Gen_var myHomardGen,
+                                      QString caseName, QString BoundaryName):
+// -------------------------------------------------------------------------------------------------------------------------------------
+/* Constructs a MonEditBoundaryDi
+    herite de MonCreateBoundaryDi
+*/
+    MonCreateBoundaryDi(parent, modal, myHomardGen, caseName, BoundaryName)
+{
+    MESSAGE("Debut de Boundary pour " << BoundaryName.toStdString().c_str());
+    setWindowTitle("Edit BoundaryDi");
+    try
+    {
+     _aBoundary=_myHomardGen->GetBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str()));
+     if (caseName==QString("")) { _aCaseName=_aBoundary->GetCaseCreation();}
+     InitValEdit();
+    }
+    catch( SALOME::SALOME_Exception& S_ex )
+    {
+        QMessageBox::information( 0, "Error",
+                  QString(CORBA::string_dup(S_ex.details.text)),
+                  QMessageBox::Ok + QMessageBox::Default );
+        return;
+    }
+
+    HOMARD::ListGroupType_var maListe = _aBoundary->GetGroups();
+    for ( int i = 0; i < maListe->length(); i++ )
+       _listeGroupesBoundary << QString(maListe[i]);
+
+}
+// ------------------------------
+MonEditBoundaryDi::~MonEditBoundaryDi()
+// ------------------------------
+{
+}
+
+// ------------------------------
+void MonEditBoundaryDi::InitValEdit()
+// ------------------------------
+{
+      LEBoundaryName->setText(_aBoundaryName);
+      LEBoundaryName->setReadOnly(true);
+
+      QString aMeshFile = _aBoundary->GetMeshFile();
+      LEFileName->setText(aMeshFile);
+      LEFileName->setReadOnly(1);
+      PushFichier->setVisible(0);
+      adjustSize();
+}
+// ------------------------------
+bool MonEditBoundaryDi::PushOnApply()
+// ------------------------------
+{
+     return true;
+}
+// ------------------------------------------------------------------------
+void MonEditBoundaryDi::SetFiltrage()
+// // ------------------------------------------------------------------------
+{
+   if (!CBGroupe->isChecked()) return;
+   if (_aCaseName.toStdString().c_str() == QString()) 
+   {
+        QMessageBox::information( 0, "Error",
+                              "Case MeshFile unknowned.",
+                              QMessageBox::Ok + QMessageBox::Default );
+        return;
+   }
+   HOMARD::HOMARD_Cas_var monCas= _myHomardGen->GetCas(_aCaseName.toStdString().c_str());
+   HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
+
+   MonEditListGroup *aDlg = new MonEditListGroup(NULL,this,  TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),
+                              _aCaseName, _listeGroupesBoundary) ;
+   aDlg->show();
+}
+
diff --git a/src/HOMARDGUI/MonEditBoundaryDi.h b/src/HOMARDGUI/MonEditBoundaryDi.h
new file mode 100644 (file)
index 0000000..ce9efbb
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef MON_EDITBOUNDARYDI_H
+#define MON_EDITBOUNDARYDI_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateBoundaryDi.h>
+
+class MonEditBoundaryDi : public MonCreateBoundaryDi
+{
+    Q_OBJECT
+public:
+    MonEditBoundaryDi( MonCreateCase* parent, bool modal,
+                       HOMARD::HOMARD_Gen_var myHomardGen,
+                       QString caseName, QString BoundaryName );
+    virtual ~MonEditBoundaryDi();
+
+protected :
+    virtual void InitValEdit();
+    virtual bool PushOnApply();
+    virtual void SetFiltrage();
+
+public slots:
+
+};
+
+#endif
diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx
new file mode 100644 (file)
index 0000000..ca060e3
--- /dev/null
@@ -0,0 +1,121 @@
+using namespace std;
+
+#include "MonEditCase.h"
+
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -------------------------------------------------------------
+MonEditCase::MonEditCase ( QWidget* parent, bool modal,
+                           HOMARD::HOMARD_Gen_var myHomardGen,
+                           QString CaseName ):
+// -------------------------------------------------------------
+/* Constructs a MonEditCase
+    herite de MonCreateCase
+*/
+   MonCreateCase(parent, modal, myHomardGen)
+{
+    MESSAGE("Debut de MonEditCase" << CaseName.toStdString().c_str());
+    setWindowTitle("Edit case");
+    _aCaseName = CaseName;
+    aCase = _myHomardGen->GetCas(_aCaseName.toStdString().c_str());
+    InitValEdit();
+}
+// ------------------------------
+MonEditCase::~MonEditCase()
+// ------------------------------
+{
+}
+
+
+// ------------------------------
+void MonEditCase::InitValEdit()
+// ------------------------------
+{
+    MESSAGE("Debut de InitValEdit");
+      LECaseName->setText(_aCaseName);
+      LECaseName->setReadOnly(true);
+
+      QString aDirName = aCase->GetDirName();
+      LEDirName->setText(aDirName);
+      LEDirName->setReadOnly(true);
+      PushDir->setVisible(0);
+
+      QString _aitername=aCase->GetIter0Name();
+      HOMARD::HOMARD_Iteration_var aIter = _myHomardGen->GetIteration(_aitername.toStdString().c_str());
+      QString aFileName = aIter->GetMeshFile();
+      LEFileName->setText(aFileName);
+      LEFileName->setReadOnly(true);
+      PushFichier->setVisible(0);
+
+      int ConfType=aCase->GetConfType();
+      if(ConfType==1)
+      {
+         GBTypeNoConf->setVisible(0);
+         RBConforme->setChecked(true);
+      }
+      else
+      {
+        RBNonConforme->setChecked(true);
+        GBTypeNoConf->setVisible(1);
+        RB1NpM->setEnabled(false);
+        RB1NpA->setEnabled(false);
+        RBQuelconque->setEnabled(false);
+      };
+
+      if (_ConfType==2) { RB1NpM->setChecked(true);};
+      if (_ConfType==3) { RB1NpA->setChecked(true);};
+      if (_ConfType==4) { RBQuelconque->setChecked(true);};
+
+      RBNonConforme->setEnabled(false);
+      RBConforme->setEnabled(false);
+
+//    Affichage du mode de suivi de frontiere
+      CBBoundaryA->setVisible(0);
+      GBBoundaryA->setVisible(0);
+      CBBoundaryD->setVisible(0);
+      GBBoundaryD->setVisible(0);
+
+      HOMARD::ListBoundaryGroupType_var mesBoundarys = aCase->GetBoundaryGroup();
+      if (mesBoundarys->length()>0)
+      {
+        bool BounDi = false ;
+        bool BounAn = false ;
+        for (int i=0; i<mesBoundarys->length(); i++)
+        {
+          HOMARD::HOMARD_Boundary_var myBoundary = _myHomardGen->GetBoundary((mesBoundarys)[i]);
+          int type_obj = myBoundary->GetBoundaryType() ;
+
+          if ( type_obj==0 ) 
+          { CBBoundaryDi->addItem(QString((mesBoundarys)[i++]));
+            BounDi = true ;
+          }
+          else
+          {
+            i++ ;
+            BounAn = true ;
+          };
+        }
+        MESSAGE("BounDi "<<BounDi<<", BounAn "<<BounAn);
+        if ( BounAn )
+        { GBBoundaryA->setVisible(1);
+          GBBoundaryA->setDisabled(true);}
+        if ( BounDi )
+        { GBBoundaryD->setVisible(1);
+          CBBoundaryDi->setDisabled(true);
+          PBBoundaryDiNew->setVisible(0);}
+      }
+}
+
+// -------------------------------------
+bool MonEditCase::PushOnApply()
+// -------------------------------------
+{
+  return true ;
+
+};
diff --git a/src/HOMARDGUI/MonEditCase.h b/src/HOMARDGUI/MonEditCase.h
new file mode 100644 (file)
index 0000000..f4e91c4
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef MON_EDITCASE_H
+#define MON_EDITCASE_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateCase.h>
+
+class MonEditCase : public MonCreateCase
+{
+    Q_OBJECT
+public:
+    MonEditCase( QWidget* parent, bool modal,
+                 HOMARD::HOMARD_Gen_var myHomardGen,
+                 QString CaseName );
+    virtual ~MonEditCase();
+
+protected :
+    virtual void InitValEdit();
+    virtual bool PushOnApply();
+
+public slots:
+
+};
+
+#endif
diff --git a/src/HOMARDGUI/MonEditFile.cxx b/src/HOMARDGUI/MonEditFile.cxx
new file mode 100644 (file)
index 0000000..c73730c
--- /dev/null
@@ -0,0 +1,99 @@
+using namespace std;
+
+#include "MonEditFile.h"
+
+#include <QFile>
+#include <QTextStream>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+/* ---------------------------------------------------------
+ * MonEditFile classe derivee de EditFile
+ *               elle meme generee par uic
+ * Ouvre le fichier passe en parametre
+ * et affiche le texte correspondant dans la fenêtre de log
+ * ---------------------------------------------------------
+ */
+
+/* ---------------------------------------------------------
+ * MonEditFile Constructeur 
+ * ---------------------------------------------------------
+ */
+MonEditFile::MonEditFile( QWidget* parent,  bool modal,
+                          HOMARD::HOMARD_Gen_var myHomardGen,
+                          QString aFileName):
+//    QWidget(0),
+    Ui_EditFile(),
+    _aFileName (aFileName)
+{
+  MESSAGE("Debut de MonEditFile " << aFileName.toStdString().c_str());
+  setupUi(this);
+  InitConnect();
+  EditText();
+}
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+MonEditFile::~MonEditFile()
+{
+   MESSAGE("Destructeur de ~MonEditFile");
+}
+// ------------------------------------------------------------------------
+void MonEditFile::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( buttonQuit,     SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonPrint,    SIGNAL(pressed()), this, SLOT(PushOnPrint()));
+    connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
+}
+// ------------------------------------------------------------------------
+void MonEditFile::EditText()
+// ------------------------------------------------------------------------
+{
+// Creation de l'objet fichier QT associe
+  QFile file( _aFileName );
+// Ouverture
+  bool bOpen = file.open( QIODevice::ReadOnly | QIODevice::Text ) ;
+//
+  if ( bOpen )
+  {
+// Lecture
+//    Remarque : il serait plus clair de tout lire d'un coup mais cela ne marche pas !
+//               alors on fait ligne par ligne et on cumule en ajoutant un saut de ligne.
+      QTextStream stream( &file );
+      QString tout;
+      while ( !stream.atEnd() )
+      {
+        tout = tout + stream.readLine() + "\n" ;
+      }
+//       tout = stream.readAll() ;
+      QTBEditFile->setPlainText( tout );
+  }
+  else
+  {
+     // GERALD -- QMESSAGE BOX
+     MESSAGE( "EditText " << _aFileName.toStdString().c_str() << "est impossible a ouvrir ");
+  }
+}
+// ------------------------------------------------------------------------
+void MonEditFile::PushOnPrint()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de MonEditFile::PushOnPrint")
+  QMessageBox::information( 0, "Error",
+                            "Inactive button.",
+                            QMessageBox::Ok + QMessageBox::Default );
+  return;
+}
+// ------------------------------------------------------------------------
+void MonEditFile::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_usage.html"));
+}
+
+
diff --git a/src/HOMARDGUI/MonEditFile.h b/src/HOMARDGUI/MonEditFile.h
new file mode 100644 (file)
index 0000000..22def7a
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef MON_EDITFILE_H
+#define MON_EDITFILE_H
+
+
+#include <SALOMEconfig.h>
+#include "SALOME_Selection.h"
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+
+#include "EditFile.h"
+#include <QWidget>
+
+class QListBox;
+class QDialog;
+
+class MonEditFile : public QWidget, public Ui_EditFile
+{
+    Q_OBJECT
+
+public:
+    MonEditFile( QWidget* parent,  bool modal,
+                 HOMARD::HOMARD_Gen_var myHomardGen,
+                 QString FileName );
+    ~MonEditFile();
+
+protected :
+
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+    QString _aFileName ;
+
+    virtual void InitConnect();
+    virtual void EditText();
+
+public slots:
+    virtual void PushOnPrint();
+    virtual void PushOnHelp();
+
+};
+
+#endif // MON_EDITFILE_H
diff --git a/src/HOMARDGUI/MonEditHypothesis.cxx b/src/HOMARDGUI/MonEditHypothesis.cxx
new file mode 100644 (file)
index 0000000..f1667f6
--- /dev/null
@@ -0,0 +1,354 @@
+using namespace std;
+
+#include "MonEditHypothesis.h"
+#include "MonEditListGroup.h"
+
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -------------------------------------------------------------------------------------------------------------------------------------
+MonEditHypothesis::MonEditHypothesis( MonCreateIteration* parent, bool modal,
+                                      HOMARD::HOMARD_Gen_var myHomardGen,
+                                      QString aHypothesisName,
+                                      QString caseName,  QString aFieldFile ):
+// -------------------------------------------------------------------------------------------------------------------------------------
+/* Constructs a MonEditHypothesis
+    herite de MonCreateHypothesis
+*/
+    MonCreateHypothesis(parent, modal,myHomardGen, aHypothesisName, caseName, aFieldFile)
+{
+    MESSAGE("Hypothese " << aHypothesisName.toStdString().c_str());
+    setWindowTitle("Edit Hypothesis");
+    _aHypothesis    = _myHomardGen->GetHypothesis(_aHypothesisName.toStdString().c_str());
+    if (caseName == QString("") ){ _aCaseName = _aHypothesis->GetCaseCreation();}
+    InitValEdit();
+    InitGroupes();
+}
+// ------------------------------
+MonEditHypothesis::~MonEditHypothesis()
+// ------------------------------
+{
+}
+// ------------------------------
+void MonEditHypothesis::InitGroupes()
+// ------------------------------
+{
+    HOMARD::ListGroupType_var maListe = _aHypothesis->GetGroups();
+    for ( int i = 0; i < maListe->length(); i++ )
+       _aListeGroupes << QString(maListe[i]);
+
+    if (maListe->length() == 0) { CBGroupe->hide();}
+}
+
+// ------------------------------
+void MonEditHypothesis::InitValEdit()
+// ------------------------------
+{
+      MESSAGE("Debut de InitValEdit");
+      LEHypothesisName->setText(_aHypothesisName);
+      LEHypothesisName->setReadOnly(true);
+      HOMARD::listeTypes_var ListTypes (_aHypothesis->GetAdapRefinUnRef());
+      ASSERT( ListTypes->length()==3) ;
+      _aTypeAdap = ListTypes[0];
+      _aTypeRaff = ListTypes[1];
+      _aTypeDera = ListTypes[2];
+
+      if (_aTypeAdap == -1) InitAdaptUniforme();
+      if (_aTypeAdap ==  0) InitAdaptZone();
+      if (_aTypeAdap ==  1) InitAdaptChamps();
+
+      RBUniDera->setDisabled(true);
+      RBUniRaff->setDisabled(true);
+
+      InitFieldInterp();
+
+      if (_aTypeAdap == 1 or _TypeFieldInterp >= 1 )
+      {
+        if (_aFieldFile == QString("")) { GBFieldFile->setVisible(0); }
+        else
+        {
+          GBFieldFile->setVisible(1);
+          LEFieldFile->setText(_aFieldFile);
+          LEFieldFile->setReadOnly(1);
+        }
+      }
+      else
+      {
+        GBFieldFile->setVisible(0);
+      }
+      adjustSize();
+}
+// ----------------------------------------
+void MonEditHypothesis::InitAdaptUniforme()
+// ----------------------------------------
+// Affichage des informations pour une adaptation uniforme
+{
+//  Choix des options generales
+    GBFieldManagement->setVisible(0);
+    GBAreaManagement->setVisible(0);
+    GBUniform->setVisible(1);
+    adjustSize();
+    RBUniforme->setChecked(true);
+    RBUniforme->setEnabled(false);
+    RBChamp->setEnabled(false);
+    RBZone->setEnabled(false);
+//
+// Raffinement ou deraffinement ?
+    if (_aTypeDera == 0)
+    {
+        ASSERT(_aTypeRaff==1);
+        RBUniDera->setChecked(false);
+        RBUniRaff->setChecked(true);
+    }
+    if (_aTypeDera == 1)
+    {
+        ASSERT(_aTypeRaff==0);
+        RBUniDera->setChecked(true);
+        RBUniRaff->setChecked(false);
+    }
+//
+}
+// -------------------------------------
+void MonEditHypothesis::InitAdaptZone()
+// -------------------------------------
+// Affichage des informations pour une adaptation selon des zones :
+{
+// . Liste des zones
+
+//  Choix des options generales
+    GBUniform->setVisible(0);
+    GBFieldManagement->setVisible(0);
+    GBAreaManagement->setVisible(1);
+    adjustSize();
+    RBZone->setChecked(true);
+    RBChamp->setEnabled(false);
+    RBUniforme->setEnabled(false);
+    RBZone->setEnabled(false);
+
+//  Recuperation de toutes les zones decrites et notation de celles retenues
+    GetAllZones();
+    HOMARD::listeZonesHypo_var mesZonesAvant = _aHypothesis->GetZones();
+    for (int i=0; i<mesZonesAvant->length(); i++)
+    {
+        for ( int j =0 ; j < TWZone->rowCount(); j++)
+        {
+            if (TWZone->item(j,1)->text().toStdString() == string(mesZonesAvant[i]))
+            {
+               TWZone->item( j,0 )->setCheckState( Qt::Checked );
+               break;
+            }
+        }
+    }
+//
+//  Inactivation des choix
+    for ( int j =0 ; j < TWZone->rowCount(); j++)
+    {
+        TWZone->item( j, 0 )->setFlags(0);
+    }
+    PBZoneNew->setVisible(0);
+//
+}
+
+// -------------------------------------
+void MonEditHypothesis::InitAdaptChamps()
+// -------------------------------------
+// Affichage des informations pour une adaptation selon un champ :
+// . Nom du champ
+// . Composantes
+// . Seuils
+// . Absolu/relatif
+{
+    MESSAGE ("Debut de InitAdaptChamps");
+//  Choix des options generales
+    GBUniform->setVisible(0);
+    GBAreaManagement->setVisible(0);
+    GBFieldManagement->setVisible(1);
+    adjustSize();
+    RBChamp->setChecked(true);
+    RBUniforme->setEnabled(false);
+    RBChamp->setEnabled(false);
+    RBZone->setEnabled(false);
+
+
+
+    HOMARD::InfosHypo_var  aInfosHypo = _aHypothesis->GetField();
+    _aFieldName =  aInfosHypo->FieldName;
+    _TypeThR = aInfosHypo->TypeThR;
+    _ThreshR = aInfosHypo->ThreshR;
+    _TypeThC = aInfosHypo->TypeThC;
+    _ThreshC = aInfosHypo->ThreshC;
+    _UsCmpI  = aInfosHypo->UsCmpI;
+
+
+    CBFieldName->insertItem(0,_aFieldName);
+    CBFieldName->setCurrentIndex(0);
+    CBFieldName->setEnabled(false);
+    //SetFieldName(Qt::Unchecked);
+
+    HOMARD::listeComposantsHypo_var mesComposantsAvant = _aHypothesis->GetListComp();
+    TWCMP->clear();
+    TWCMP->setRowCount(0);
+    TWCMP->resizeRowsToContents();
+    for (int i=0; i<mesComposantsAvant->length(); i++)
+    {
+       TWCMP->insertRow(0);
+       TWCMP->setItem( 0, 0, new QTableWidgetItem( QString ("") ) );
+       TWCMP->item( 0, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled);
+       TWCMP->item( 0, 0 )->setCheckState(Qt::Checked );
+       TWCMP->item( 0, 0 )->setFlags( 0 );
+       TWCMP->setItem( 0, 1, new QTableWidgetItem(QString(mesComposantsAvant[i])));
+       TWCMP->item( 0, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+    }
+    TWCMP->resizeColumnsToContents();
+    TWCMP->resizeRowsToContents();
+    TWCMP->clearSelection();
+
+  // Les seuils de raffinement
+  RBRAbs->setEnabled(false) ;
+  RBRRel->setEnabled(false) ;
+  RBRPE->setEnabled(false) ;
+  RBRNo->setEnabled(false) ;
+  if (_aTypeRaff== 0 )
+  {
+    SetRNo();
+    RBRNo->setEnabled(true) ;
+  }
+  else
+  {
+    if ( _TypeThR == 1 ) { SpinBox_RAbs->setValue(_ThreshR); SetRAbs(); RBRAbs->setEnabled(true);}
+    if ( _TypeThR == 2 ) { SpinBox_RRel->setValue(_ThreshR); SetRRel(); RBRRel->setEnabled(true);}
+    if ( _TypeThR == 3 ) { SpinBox_RPE->setValue(_ThreshR);  SetRPE();  RBRPE->setEnabled(true);}
+  }
+
+  // Les seuils de deraffinement
+  RBCAbs->setEnabled(false) ;
+  RBCRel->setEnabled(false) ;
+  RBCPE->setEnabled(false) ;
+  RBCNo->setEnabled(false) ;
+  if (_aTypeDera== 0 )
+  {
+    SetCNo();
+    RBCNo->setEnabled(true) ;
+  }
+  else
+  {
+    if ( _TypeThC == 1 ) { SpinBox_CAbs->setValue(_ThreshC); SetCAbs(); RBCAbs->setEnabled(true);}
+    if ( _TypeThC == 2 ) { SpinBox_CRel->setValue(_ThreshC); SetCRel(); RBCRel->setEnabled(true);}
+    if ( _TypeThC == 3 ) { SpinBox_CPE->setValue(_ThreshC);  SetCPE(); RBCPE->setEnabled(true);}
+  }
+  // Le choix de la prise en compte des composantes
+  if ( TWCMP->rowCount() == 1 )
+  { RBL2->setText(QString("Absolute value"));
+    RBInf->setText(QString("Relative value"));
+  }
+  else
+  { RBL2->setText(QString("L2 norm"));
+    RBInf->setText(QString("Infinite Norm"));
+  }
+  if ( _UsCmpI == 0 )
+  {
+    RBL2->setChecked(true);
+    RBL2->setEnabled(true);
+    RBInf->setEnabled(false) ;
+  }
+  else
+  {
+    RBL2->setEnabled(false) ;
+    RBInf->setChecked(true);
+    RBInf->setEnabled(true);
+  }
+}
+// -------------------------------------
+void MonEditHypothesis::InitFieldInterp()
+// -------------------------------------
+// Affichage des informations pour les interpolations
+{
+    MESSAGE ("Debut de InitFieldInterp");
+//  Choix des options generales
+    _TypeFieldInterp = _aHypothesis->GetTypeFieldInterp();
+    MESSAGE ("_TypeFieldInterp = " << _TypeFieldInterp);
+//
+//  Aucune interpolation
+    if ( _TypeFieldInterp == 0 )
+    {
+      RBFieldNo->setChecked(true);
+      TWField->setVisible(0);
+    }
+//  Interpolation de tous les champs
+    if ( _TypeFieldInterp == 1 )
+    {
+      RBFieldAll->setChecked(true);
+      TWField->setVisible(0);
+    }
+//  Interpolation de champs choisis
+    if ( _TypeFieldInterp == 2 )
+    {
+      RBFieldChosen->setChecked(true);
+//
+      TWField->setVisible(1);
+      HOMARD::listFieldInterpHypo_var mesChampsAvant = _aHypothesis->GetListFieldInterp();
+      TWField->clear();
+      TWField->setRowCount(0);
+      TWField->resizeRowsToContents();
+      for (int i=0; i<mesChampsAvant->length(); i++)
+      {
+        TWField->insertRow(0);
+        TWField->setItem( 0, 0, new QTableWidgetItem( QString ("") ) );
+        TWField->item( 0, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled);
+        TWField->item( 0, 0 )->setCheckState(Qt::Checked );
+        TWField->item( 0, 0 )->setFlags( 0 );
+        TWField->setItem( 0, 1, new QTableWidgetItem(QString(mesChampsAvant[i])));
+        TWField->item( 0, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+      }
+      TWField->resizeColumnsToContents();
+      TWField->resizeRowsToContents();
+      TWField->clearSelection();
+    }
+    RBFieldNo->setEnabled(false) ;
+    RBFieldAll->setEnabled(false) ;
+    RBFieldChosen->setEnabled(false) ;
+}
+
+// -------------------------------------
+bool MonEditHypothesis::PushOnApply()
+// -------------------------------------
+{
+// Pour du raffinement selon un champ, les seuils ont-ils change ?
+  if ( _aTypeAdap ==  1 )
+  {
+    if (_aTypeRaff!= 0 )
+    {
+      if (_TypeThR == 1) { _ThreshR = SpinBox_RAbs->value(); }
+      if (_TypeThR == 2) { _ThreshR = SpinBox_RRel->value(); }
+      if (_TypeThR == 3) { _ThreshR = SpinBox_RPE->value();  }
+      _aHypothesis->SetRefinThr(_TypeThR, _ThreshR) ;
+    }
+    if (_aTypeDera!= 0 )
+    {
+      if (_TypeThC == 1) { _ThreshC = SpinBox_CAbs->value() ; }
+      if (_TypeThC == 2) { _ThreshC = SpinBox_CRel->value() ; }
+      if (_TypeThC == 3) { _ThreshC = SpinBox_CPE->value() ; }
+      _aHypothesis->SetUnRefThr(_TypeThC, _ThreshC) ;
+    }
+
+    _myHomardGen->InvalideHypo(_aHypothesisName.toStdString().c_str());
+    HOMARD_UTILS::updateObjBrowser();
+  }
+  return true;
+};
+// ------------------------------------------------------------------------
+void MonEditHypothesis::SetFiltrage()
+// ------------------------------------------------------------------------
+{
+  if (CBGroupe->isChecked())
+  {
+    MonEditListGroup *aDlg = new MonEditListGroup(this, NULL, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),_aCaseName, _aListeGroupes) ;
+    aDlg->show();
+  }
+}
+
diff --git a/src/HOMARDGUI/MonEditHypothesis.h b/src/HOMARDGUI/MonEditHypothesis.h
new file mode 100644 (file)
index 0000000..c418424
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef MON_EDITHYPOTHESIS_H
+#define MON_EDITHYPOTHESIS_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateHypothesis.h>
+
+class MonEditHypothesis : public MonCreateHypothesis
+{
+    Q_OBJECT
+public:
+    MonEditHypothesis( MonCreateIteration* parent, bool modal,
+                       HOMARD::HOMARD_Gen_var myHomardGen,
+                       QString caseName, QString HypothesisName, QString aFieldFile );
+    virtual ~MonEditHypothesis();
+
+protected :
+    virtual void InitValEdit();
+    virtual void InitAdaptUniforme();
+    virtual void InitAdaptZone();
+    virtual void InitAdaptChamps();
+    virtual void InitGroupes();
+    virtual void InitFieldInterp();
+    virtual void SetFiltrage();
+    virtual bool PushOnApply();
+
+public slots:
+
+};
+
+#endif
diff --git a/src/HOMARDGUI/MonEditIteration.cxx b/src/HOMARDGUI/MonEditIteration.cxx
new file mode 100644 (file)
index 0000000..4363da1
--- /dev/null
@@ -0,0 +1,168 @@
+using namespace std;
+
+#include "MonEditIteration.h"
+
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -------------------------------------------------------------------------------------------------------------------------------------
+MonEditIteration::MonEditIteration ( QWidget* parent, bool modal,
+                                     HOMARD::HOMARD_Gen_var myHomardGen,
+                                     QString IterParentName, QString IterName ):
+// -------------------------------------------------------------------------------------------------------------------------------------
+/* Constructs a MonEditIteration
+    herite de MonCreateIteration
+*/
+   MonCreateIteration(parent, modal, myHomardGen, IterParentName),
+   _rank(0), _step(0), _IterationName(""), _FieldFile(""),_aTypeAdap()
+{
+    MESSAGE("Debut de  MonEditIteration" << IterName.toStdString().c_str());
+    setWindowTitle("Edit iteration");
+    _IterationName = IterName;
+    aIter = _myHomardGen->GetIteration(_IterationName.toStdString().c_str());
+
+//  Attention au cas ou c'est une iteration initiale : il faut inhiber l'essentiel
+    int number = aIter->GetNumber() ;
+    if ( number == 0 ) { InitValEdit0(); }
+    else               { InitValEdit(); }
+}
+// ------------------------------
+MonEditIteration::~MonEditIteration()
+// ------------------------------
+{
+}
+
+// ------------------------------
+void MonEditIteration::InitValEdit0()
+// ------------------------------
+//    Cas d'une iteration 0
+{
+//
+      LEIterationName->setText(_IterationName);
+      LEIterationName->setReadOnly(true);
+
+//    Invisibilite de l'iteration parent
+      Iter_Parent->setVisible(0);
+      PBIterParent->setVisible(0);
+      LEIterationParentName->setVisible(0);
+
+//    Affichage bloque du nom du maillage de l'iteration courante
+      QString MeshName = aIter->GetMeshName();
+      Mesh_n->setText(QString("Mesh name"));
+      LEMeshName_n->setText(MeshName);
+      LEMeshName_n->setReadOnly(1);
+
+//    Message general
+      Mesh_np1->setText(QString("First iteration of the case."));
+      LEMeshName_np1->setVisible(0);
+//
+//    Invisibilite des hypotheses et des champs
+      Hypothese->setVisible(0);
+      GBField->setVisible(0);
+      adjustSize();
+//
+}
+// ------------------------------
+void MonEditIteration::InitValEdit()
+// ------------------------------
+//    Cas d'une iteration > 0
+{
+//    Affichage bloque du nom de l'iteration
+      LEIterationName->setText(_IterationName);
+      LEIterationName->setReadOnly(true);
+
+//    Affichage bloque du nom de l'iteration parent
+      _IterParentName = aIter->GetIterParent();
+      LEIterationParentName->setText(_IterParentName);
+      LEIterationParentName->setReadOnly(true);
+      PBIterParent->setEnabled(false);
+      PBIterParent->setVisible(0);
+
+//    Affichage bloque du nom du maillage de l'iteration parent
+      aIterParent = _myHomardGen->GetIteration(_IterParentName.toStdString().c_str());
+      QString MeshNameParent = aIterParent->GetMeshName();
+      LEMeshName_n->setText(MeshNameParent);
+      LEMeshName_n->setReadOnly(1);
+
+//    Affichage bloque du nom du maillage de l'iteration courante
+      QString MeshName = aIter->GetMeshName();
+      LEMeshName_np1->setText(MeshName);
+      LEMeshName_np1->setReadOnly(1);
+
+//    Affichage de la bonne hypothese
+      QString HypoName = aIter->GetHypoName();
+      CBHypothese->insertItem(0,HypoName);
+      CBHypothese->setCurrentIndex(0);
+      CBHypothese->setEnabled(false);
+      PBHypoNew->setVisible(0);
+
+//    Pour une adaptation selon un champ
+      HOMARD::HOMARD_Hypothesis_var myHypo = _myHomardGen->GetHypothesis(HypoName.toStdString().c_str()) ;
+      _aTypeAdap = myHypo->GetAdapType() ;
+      if ( _aTypeAdap == 1 )
+      {
+          _FieldFile = aIter->GetFieldFile();
+          LEFieldFile->setText(_FieldFile);
+          _step = aIter->GetTimeStep() ;
+          SpinBox_TimeStep->setValue(_step);
+          _rank = aIter->GetRank() ;
+          SpinBox_Rank->setValue(_rank);
+
+// Cas ou on prend le dernier pas de temps ou sans pas de temps
+          if ( _step <= -1 )
+          {
+            Rank->setVisible(0);
+            SpinBox_Rank->setVisible(0);
+            TimeStep->setVisible(0);
+            SpinBox_TimeStep->setVisible(0);
+
+            if ( _step == -2 ) { RBLast->setChecked(true); }
+            else               { RBNo->setChecked(true); }
+          }
+
+// Cas avec pas de temps
+          else
+          {
+            Rank->setVisible(1);
+            SpinBox_Rank->setVisible(1);
+            TimeStep->setVisible(1);
+            SpinBox_TimeStep->setVisible(1);
+            RBChosen->setChecked(true);
+          }
+      }
+      else
+      {
+          GBField->setVisible(0);
+      }
+      adjustSize();
+//
+}
+
+// -------------------------------------
+bool MonEditIteration::PushOnApply()
+// -------------------------------------
+{
+  if ( _aTypeAdap ==  1)
+  {
+// Pour du raffinement selon un champ, les instants ont-ils change ?
+    if ( (_FieldFile != LEFieldFile->text().trimmed()) or 
+       (  _rank != SpinBox_Rank->value())  or
+       (  _step != SpinBox_TimeStep->value()))
+    {
+      _FieldFile = LEFieldFile->text().trimmed();
+      _rank = SpinBox_Rank->value();
+      _step = SpinBox_TimeStep->value();
+      aIter->SetFieldFile(CORBA::string_dup(_FieldFile.toStdString().c_str()));
+      aIter->SetTimeStepRank(_step, _rank);
+      _myHomardGen->InvalideIter(_IterationName.toStdString().c_str());
+      HOMARD_UTILS::updateObjBrowser();
+    }
+  }
+  return true;
+
+};
diff --git a/src/HOMARDGUI/MonEditIteration.h b/src/HOMARDGUI/MonEditIteration.h
new file mode 100644 (file)
index 0000000..e1da403
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef MON_EDITITERATION_H
+#define MON_EDITITERATION_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateIteration.h>
+
+class MonEditIteration : public MonCreateIteration
+{
+    Q_OBJECT
+public:
+    MonEditIteration( QWidget* parent, bool modal,
+                      HOMARD::HOMARD_Gen_var myHomardGen,
+                      QString IterParentName, QString IterName );
+    virtual ~MonEditIteration();
+
+protected :
+    QString _FieldFile ;
+    QString _IterationName ;
+    int _aTypeAdap ;
+    int _rank ;
+    int _step ;
+
+    virtual void InitValEdit();
+    virtual void InitValEdit0();
+    virtual bool PushOnApply();
+
+public slots:
+
+};
+
+#endif
diff --git a/src/HOMARDGUI/MonEditListGroup.cxx b/src/HOMARDGUI/MonEditListGroup.cxx
new file mode 100644 (file)
index 0000000..40ee236
--- /dev/null
@@ -0,0 +1,43 @@
+using namespace std;
+
+#include "MonEditListGroup.h"
+#include <utilities.h>
+
+//---------------------------------------------------------------------
+MonEditListGroup::MonEditListGroup( MonCreateHypothesis* parentHyp, 
+                                    MonCreateBoundaryDi* parentBound, 
+                                    bool modal, 
+                                    HOMARD::HOMARD_Gen_var myHomardGen, 
+                                    QString aCaseName,  
+                                    QStringList listeGroupesHypo):
+//---------------------------------------------------------------------
+MonCreateListGroup(parentHyp,parentBound,myHomardGen,aCaseName,listeGroupesHypo)
+{
+  MESSAGE("Debut de MonEditListGroup");
+  setWindowTitle("Edit ListGroup");
+  setModal(true);
+  InitGroupes();
+}
+
+//------------------------------------
+MonEditListGroup:: ~MonEditListGroup()
+//------------------------------------
+{
+}
+// -------------------------------------
+void MonEditListGroup:: InitGroupes()
+// -------------------------------------
+{
+  for (int i = 0; i < _listeGroupesHypo.size(); i++ )
+  {
+     std::cerr << _listeGroupesHypo[i].toStdString().c_str() << std::endl;
+     TWGroupe->insertRow(i);
+     TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
+     TWGroupe->item( i, 0 )->setFlags( 0 );
+     TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );
+     TWGroupe->setItem( i, 1, new QTableWidgetItem(_listeGroupesHypo[i]));
+   }
+   TWGroupe->resizeRowsToContents();
+}
+
+
diff --git a/src/HOMARDGUI/MonEditListGroup.h b/src/HOMARDGUI/MonEditListGroup.h
new file mode 100644 (file)
index 0000000..f372ed1
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef MON_EDITLISTGROUP_H
+#define MON_EDITLISTGROUP_H
+
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateListGroup.h>
+
+class MonCreateHypothesis;
+class MonCreateBoundaryDi;
+class MonEditListGroup : public MonCreateListGroup
+{
+    Q_OBJECT
+
+public:
+    MonEditListGroup( MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo);
+    virtual ~MonEditListGroup();
+
+protected :
+
+    virtual void InitGroupes();
+
+};
+
+#endif // MON_EDITLISTGROUP_H
diff --git a/src/HOMARDGUI/MonEditZone.cxx b/src/HOMARDGUI/MonEditZone.cxx
new file mode 100644 (file)
index 0000000..afebbfb
--- /dev/null
@@ -0,0 +1,173 @@
+using namespace std;
+
+#include "MonEditZone.h"
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include <utilities.h>
+
+
+// ------------------------------------------------------------------------
+MonEditZone::MonEditZone( MonCreateHypothesis* parent, bool modal,
+                          HOMARD::HOMARD_Gen_var myHomardGen,
+                          QString caseName, QString zoneName ):
+// ------------------------------------------------------------------------
+/* Constructs a MonEditZone
+    herite de MonCreateZone
+*/
+    MonCreateZone(parent, myHomardGen, caseName)
+{
+    MESSAGE("Debut de MonEditZone pour " << zoneName.toStdString().c_str());
+    setWindowTitle("Edit Zone");
+    _aZoneName=zoneName;
+    aZone = _myHomardGen->GetZone(_aZoneName.toStdString().c_str());
+    InitValEdit();
+}
+// ------------------------------------------------------------------------
+MonEditZone::~MonEditZone()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonEditZone::InitValEdit()
+// ------------------------------------------------------------------------
+{
+    LEZoneName->setText(_aZoneName);
+    LEZoneName->setReadOnly(true);
+    _ZoneType = aZone->GetZoneType();
+    InitValZoneLimit();
+    if (_aCaseName != QString("")) InitValZone();
+    switch (_ZoneType)
+    {
+      case 2 : // il s agit d une boite
+      {
+        InitValZoneBox();
+        SetBox();
+        break;
+      }
+      case 4 : // il s agit d une sphere
+      {
+        InitValZoneSphere();
+        SetSphere();
+        break;
+      }
+    };
+}
+// ------------------------------------------------------------------------
+void MonEditZone::InitValZoneLimit()
+// ------------------------------------------------------------------------
+{
+      HOMARD::double_array_var  mesCoordLimits = aZone->GetLimit();
+      ASSERT(mesCoordLimits->length() == 3 );
+      _Xincr=mesCoordLimits[0];
+      _Yincr=mesCoordLimits[1];
+      _Zincr=mesCoordLimits[2];
+
+}
+// ------------------------------------------------------------------------
+void MonEditZone::InitValZoneBox()
+// ------------------------------------------------------------------------
+{
+      HOMARD::double_array_var  mesCoordZones = aZone->GetBox();
+      ASSERT(mesCoordZones->length() == 6 );
+      _ZoneXmin=mesCoordZones[0]; _ZoneXmax=mesCoordZones[1];
+      _ZoneYmin=mesCoordZones[2]; _ZoneYmax=mesCoordZones[3];
+      _ZoneZmin=mesCoordZones[4]; _ZoneZmax=mesCoordZones[5];
+
+}
+// ------------------------------------------------------------------------
+void MonEditZone::InitValZoneSphere()
+// ------------------------------------------------------------------------
+{
+      HOMARD::double_array_var  mesCoordZones = aZone->GetSphere();
+      ASSERT(mesCoordZones->length() == 4 );
+      _ZoneXcentre=mesCoordZones[0];
+      _ZoneYcentre=mesCoordZones[1];
+      _ZoneZcentre=mesCoordZones[2];
+      _ZoneRayon=mesCoordZones[3];
+
+}
+// ------------------------------------------------------------------------
+void MonEditZone::SetBox()
+// ------------------------------------------------------------------------
+{
+  gBBox->setVisible(1);
+  gBSphere->setVisible(0);
+  RBBox->setChecked(1);
+  adjustSize();
+  _ZoneType=2;
+  RBSphere->setDisabled(true);
+  adjustSize();
+
+  SpinBox_Xmini->setValue(_ZoneXmin);
+  SpinBox_Xmaxi->setValue(_ZoneXmax);
+
+  int incr=1;
+  if ( _Xincr > 0 ) { incr=_Xincr;};
+  SpinBox_Xmini->setSingleStep(incr);
+  SpinBox_Xmaxi->setSingleStep(incr);
+
+  SpinBox_Ymini->setValue(_ZoneYmin);
+  SpinBox_Ymaxi->setValue(_ZoneYmax);
+  if ( _Yincr > 0 ) {incr=_Yincr;} else{incr=1;}
+  SpinBox_Ymini->setSingleStep(incr);
+  SpinBox_Ymaxi->setSingleStep(incr);
+
+  SpinBox_Zmini->setValue(_ZoneZmin);
+  SpinBox_Zmaxi->setValue(_ZoneZmax);
+  if ( _Zincr > 0 ) {incr=_Zincr;} else{incr=1;}
+  SpinBox_Zmini->setSingleStep(incr);
+  SpinBox_Zmaxi->setSingleStep(incr);
+
+}
+// ------------------------------------------------------------------------
+void MonEditZone::SetSphere()
+// ------------------------------------------------------------------------
+{
+  gBBox->setVisible(0);
+  gBSphere->setVisible(1);
+  RBSphere->setChecked(1);
+  RBBox->setDisabled(true);
+  adjustSize();
+  _ZoneType=4 ;
+
+  SpinBox_Xcentre->setValue(_ZoneXcentre);
+  if ( _Xincr > 0) { SpinBox_Xcentre->setSingleStep(_Xincr); }
+  else             { SpinBox_Xcentre->setSingleStep(1) ; }
+
+  SpinBox_Ycentre->setValue(_ZoneYcentre);
+  if ( _Yincr > 0) { SpinBox_Ycentre->setSingleStep(_Yincr); }
+  else             { SpinBox_Ycentre->setSingleStep(1) ; }
+
+  SpinBox_Zcentre->setValue(_ZoneZcentre);
+  if ( _Zincr > 0) { SpinBox_Zcentre->setSingleStep(_Zincr); }
+  else             { SpinBox_Zcentre->setSingleStep(1);}
+
+  SpinBox_Rayon->setMinimum(0.);
+  SpinBox_Rayon->setValue(_ZoneRayon);
+}
+
+
+// ---------------------------------------------------
+bool MonEditZone::CreateOrUpdateZone()
+//----------------------------------------------------
+//  Pas de Creation de la zone
+//  Mise a jour des attributs de la Zone 
+
+{
+  try
+  {
+    aZone->SetZoneType(_ZoneType);
+    aZone->SetBox(_ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax);
+    aZone->SetSphere(_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon);
+    if (Chgt) _myHomardGen->InvalideZone(_aZoneName.toStdString().c_str());
+    HOMARD_UTILS::updateObjBrowser();
+  }
+  catch( const SALOME::SALOME_Exception& S_ex ) {
+       SalomeApp_Tools::QtCatchCorbaException( S_ex ); 
+       return false;
+  }
+  return true;
+}
+
diff --git a/src/HOMARDGUI/MonEditZone.h b/src/HOMARDGUI/MonEditZone.h
new file mode 100644 (file)
index 0000000..6406409
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef MON_EDITZONE_H
+#define MON_EDITZONE_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateZone.h>
+
+class MonEditZone : public MonCreateZone
+{
+    Q_OBJECT
+public:
+    MonEditZone( MonCreateHypothesis* parent, bool modal,
+                 HOMARD::HOMARD_Gen_var myHomardGen,
+                 QString caseName, QString zoneName);
+    virtual ~MonEditZone();
+
+protected :
+    void SetBox();
+    void SetSphere();
+    bool CreateOrUpdateZone();
+    void InitValEdit();
+    void InitValZoneLimit();
+    void InitValZoneBox();
+    void InitValZoneSphere();
+
+public slots:
+
+};
+
+#endif // MON_EDITZONE_H
diff --git a/src/HOMARDGUI/MonHomardDlg.cxx b/src/HOMARDGUI/MonHomardDlg.cxx
new file mode 100644 (file)
index 0000000..a79e137
--- /dev/null
@@ -0,0 +1,331 @@
+#include "MonHomardDlg.h"
+#include "HomardConfigFile.hxx"
+#include "HomardQtCommun.h"
+
+#include<QMessageBox>
+
+#include <SalomeApp_Module.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+
+#include "HOMARDGUI_Utils.h"
+
+#include <string>
+#include "utilities.h"
+
+#define MIN_LISTBOX_WIDTH      150
+#define MIN_LISTBOX_HEIGHT     100
+
+int MonHomardDlg::RootInfo = 100;
+
+//--------------------------------------------------------------------------------------------------------------------
+MonHomardDlg::MonHomardDlg( QWidget * parent,  bool modal, HOMARD::HOMARD_Gen_ptr myHomardGen):
+      QWidget(0),
+      Ui_HomardDlg(),
+      bHisto(true),bBilan(true), bNomFichier(false), bNomMaillage(false),
+      _aFile(QString::null), _aMesh (QString::null)
+//--------------------------------------------------------------------------------------------------------------------
+{
+      setupUi(this);
+      setModal(true);
+      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+
+      _monCas      = new HomardConfigFile();
+      _monCas->initVal(string("Interpe3"),string("non"));
+      _monCas->initVal(string("Qualite5"),string("oui"));
+      _monCas->initVal(string("Nb_Enti7"),string("oui"));
+      _monCas->initVal(string("Connex11"),string("oui"));
+      _monCas->initVal(string("Taille13"),string("oui"));
+      _monCas->setBilan(true);
+      
+      initConnect();
+
+}
+
+//-----------------------------
+MonHomardDlg::~MonHomardDlg()
+//-----------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+//-----------------------------
+void MonHomardDlg::initConnect()
+//-----------------------------
+{
+    connect( lancement, SIGNAL( pressed() ), this, SLOT( Lancement() ) );
+    connect( terminer, SIGNAL( pressed() ), this, SLOT( close() ) );
+    connect( ListeMeshName, SIGNAL( activated(int) ), this, SLOT( SetMaillage() ) );
+    connect( NomFichier, SIGNAL( returnPressed() ), this, SLOT( SetNomFichier() ) );
+    connect( PushFichier, SIGNAL( clicked() ), this, SLOT( PushNomFichier() ) );
+    connect( Connexite, SIGNAL( stateChanged(int) ), this, SLOT( SetConnexite() ) );
+    connect( Inter, SIGNAL( stateChanged(int) ), this, SLOT( SetInter() ) );
+    connect( NbEntites, SIGNAL( stateChanged(int) ), this, SLOT( SetNbEntites() ) );
+    connect( Histo, SIGNAL( stateChanged(int) ), this, SLOT( SetHisto() ) );
+    connect( Qualite, SIGNAL( stateChanged(int) ), this, SLOT( SetQualite() ) );
+    connect( Volumes, SIGNAL( stateChanged(int) ), this, SLOT( SetVolumes() ) );
+    connect( Bilan, SIGNAL( stateChanged(int) ), this, SLOT( SetBilans() ) );
+}
+
+//-----------------------------
+void MonHomardDlg::Lancement()
+//-----------------------------
+{
+  if( ( bNomFichier==false) || (bNomMaillage ==false))
+  {
+        QMessageBox::information( 0, "Mauvaise Selection",
+        QString(" Selectionner un Fichier et un Maillage SVP "),
+        QMessageBox::Ok + QMessageBox::Default );
+       return;
+  }
+
+  bool ok;
+  ok=_monCas->initVal(string("ModeHOMA"),string("2"));
+  ok=_monCas->initVal(string("ListeStd"),string(_aMesh.toStdString())+string(".info"));
+  ok=_monCas->initVal(string("CCAssoci"),string("MED"));
+  ok=_monCas->initVal(string("CCSolN__"),string(_aFile.toStdString()));
+  ok=_monCas->initVal(string("CCMaiN__"),string(_aFile.toStdString()));
+  ok=_monCas->initVal(string("CCNoMN__"),string(_aMesh.toStdString()));
+  ok=_monCas->initVal(string("PPBasFic"),string(_aMesh.toStdString()));
+  ok=_monCas->initVal(string("EcriFiHO"),string("non"));
+
+  ok = _monCas->createFile();
+  if ( ok == false)
+  {
+        QMessageBox::information( 0, "Mauvaise Selection",
+        QString("Probleme � la cr�ation du fichier Homard "),
+        QMessageBox::Ok + QMessageBox::Default );
+        return;
+  }
+
+  string fileDir=string(_monCas->getMyDir().c_str());
+  char * dirchar; char * execchar;
+  string  dir; string  executable;
+  string result=string(_aMesh.toStdString())+string(".info");
+
+  if ( !(dirchar = getenv("HOMARD_REP_EXE")) )
+     { dir=string("/local/logiciels/Homard"); }
+  else
+     { dir=string(dirchar); }
+
+  if ( !(execchar = getenv("HOMARD_EXE")) )
+     { executable =string("HOMARD"); }
+  else
+     { executable =string(execchar); }
+
+  string commande = dir+"/"+executable;
+  string info = ";more *.info";
+  string ou=string("cd ") + string(fileDir);
+  string tout=ou +string("; xterm -sb -hold  -e \" ") + commande + info + string ("\"");
+  system(tout.c_str());
+  int MonCasRoot = MonHomardDlg::RootInfo;
+  int TagInfo = 0;
+  MonHomardDlg::RootInfo = MonHomardDlg::RootInfo+1;
+  HOMARD_UTILS::AddNewRoot(MonCasRoot,QString(_aMesh));
+
+  if (bBilan == true)  
+  {
+     QStringList Lesfichiers=HOMARD_UTILS::ChercheDansDir(fileDir.c_str(),QString("info"),-1);
+     QString FileComment=QString("HomardOuputInfo");
+     for ( QStringList::Iterator it = Lesfichiers.begin(); it != Lesfichiers.end(); ++it )
+     {
+       HOMARD_UTILS::RangeSousTag(MonCasRoot,(*it),TagInfo,FileComment,fileDir.c_str());
+       TagInfo ++;
+     }
+  }
+  if (bHisto == true)  
+  {
+     QStringList Lesfichiers=HOMARD_UTILS::ChercheDansDir(fileDir.c_str(),QString("qual"),-1);
+     QString FileComment=QString("HomardOuputQual");
+     for ( QStringList::Iterator it = Lesfichiers.begin(); it != Lesfichiers.end(); ++it )
+     {
+       HOMARD_UTILS::RangeSousTag(MonCasRoot,(*it),TagInfo,FileComment,fileDir.c_str());
+       TagInfo ++;
+     }
+  }
+  HOMARD_UTILS::updateObjBrowser();
+  close();
+
+}
+
+//-----------------------------
+void MonHomardDlg::SetBilans()
+//-----------------------------
+{
+    if (Bilan->isChecked())
+    {  
+      _monCas->setBilan(true);
+      bBilan=true;
+    }
+    else
+    {
+      _monCas->setBilan(false);
+      bBilan=false;
+    }   
+}
+
+//-----------------------------
+void MonHomardDlg::SetConnexite()
+//-----------------------------
+{
+    bool ok;
+    if (Connexite->isChecked())
+    {  
+      ok=_monCas->initVal(string("Connex11"),string("oui"));
+    }
+    else
+    {
+      ok=_monCas->initVal(string("Connex11"),string("non"));
+    }   
+    if ( ok ==false)
+    {
+        QMessageBox::information( 0, "Mauvaise Selection",
+        QString("Mauvaise valeur pour ce mot clef"),
+        QMessageBox::Ok + QMessageBox::Default );
+    }
+}
+
+//-----------------------------
+void MonHomardDlg::SetInter()
+//-----------------------------
+{
+    bool ok;
+    if (Inter->isChecked())
+    {  
+      ok=_monCas->initVal(string("Interpe3"),string("oui"));
+    }
+    else
+    {
+      ok=_monCas->initVal(string("Interpe3"),string("non"));
+    }   
+    if ( ok ==false)
+    {
+        QMessageBox::information( 0, "Mauvaise Selection",
+        QString("Mauvaise valeur pour ce mot clef"),
+        QMessageBox::Ok + QMessageBox::Default );
+    }
+}
+
+//-----------------------------
+void MonHomardDlg::SetNbEntites()
+//-----------------------------
+{
+    bool ok;
+    if (NbEntites->isChecked())
+    {  
+      ok=_monCas->initVal(string("Nb_Enti7"),string("oui"));
+    }
+    else
+    {
+      ok=_monCas->initVal(string("Nb_Enti7"),string("non"));
+    }   
+    if ( ok ==false)
+    {
+        QMessageBox::information( 0, "Mauvaise Selection",
+        QString("Mauvaise valeur pour ce mot clef"),
+        QMessageBox::Ok + QMessageBox::Default );
+    }
+}
+
+//-----------------------------
+void MonHomardDlg::SetHisto()
+//-----------------------------
+{
+    if (Histo->isChecked())
+    {  
+      bHisto=true;
+    }
+    else
+    {
+      bHisto=false;
+    }   
+}
+
+//-----------------------------
+void MonHomardDlg::SetQualite()
+//-----------------------------
+{
+    bool ok;
+    if (Qualite->isChecked())
+    {  
+      ok=_monCas->initVal(string("Qualite5"),string("oui"));
+    }
+    else
+    {
+      ok=_monCas->initVal(string("Qualite5"),string("non"));
+    }   
+    if ( ok ==false)
+    {
+        QMessageBox::information( 0, "Mauvaise Selection",
+        QString("Mauvaise valeur pour ce mot clef"),
+        QMessageBox::Ok + QMessageBox::Default );
+    }
+}
+
+//-----------------------------
+void MonHomardDlg::SetVolumes()
+//-----------------------------
+{
+    bool ok;
+    if (Volumes->isChecked())
+    {  
+      ok=_monCas->initVal(string("Taille13"),string("oui"));
+    }
+    else
+    {
+      ok=_monCas->initVal(string("Taille13"),string("non"));
+    }   
+    if ( ok ==false)
+    {
+        QMessageBox::information( 0, "Mauvaise Selection",
+        QString("Mauvaise valeur pour ce mot clef"),
+        QMessageBox::Ok + QMessageBox::Default );
+    }
+
+}
+
+//---------------------------------
+void MonHomardDlg::PushNomFichier()
+//---------------------------------
+{
+   MESSAGE("Debut de PushNomFichier");
+   bNomFichier=false;
+   _aFile=HOMARD_QT_COMMUN::PushNomFichier();
+   if ( _aFile != QString::null)
+   {
+       NomFichier->setText(_aFile);
+       bNomFichier=true;
+       this->SetNomFichier();
+   }
+}
+
+//-----------------------------------
+void MonHomardDlg::SetNomFichier()
+//-----------------------------------
+/* Ce slot est appele quand on entre le nom du fichier */
+{
+   MESSAGE("Debut de SetNomFichier");
+   _aFile=NomFichier->text();
+   bNomFichier=true;
+   if ( HOMARD_QT_COMMUN::SetListeMaillages(_aFile,ListeMeshName))
+   {
+      if (ListeMeshName->count() == 1) this->SetMaillage();
+   }
+   else
+   {
+      bNomFichier=false;
+      _aFile=QString::null;
+     NomFichier->setText(_aFile);
+   }
+}
+
+
+//-----------------------------------
+void MonHomardDlg::SetMaillage()
+//-----------------------------------
+{
+       MESSAGE("Debut de SetMaillage");
+       bNomMaillage = true;
+       _aMesh=ListeMeshName->currentText();
+}
+
diff --git a/src/HOMARDGUI/MonHomardDlg.h b/src/HOMARDGUI/MonHomardDlg.h
new file mode 100644 (file)
index 0000000..2b044cf
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef MONHOMARDDLG_H
+#define MONHOMARDDLG_H
+
+#include "utilities.h"
+#include "HomardDlg.h"
+#include <QWidget>
+#include <SALOMEconfig.h>
+#include "SALOME_Selection.h"
+
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+
+class HomardConfigFile;
+class MonHomardDlg : public QWidget,public Ui_HomardDlg
+{ 
+    Q_OBJECT
+
+public:
+    MonHomardDlg( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_ptr myHomardGen );
+    ~MonHomardDlg();
+
+    virtual void initConnect();
+
+public slots:
+    virtual void SetNomFichier();
+    virtual void PushNomFichier();
+    virtual void SetMaillage();
+    virtual void SetNbEntites();
+    virtual void Lancement();
+    virtual void SetInter();
+    virtual void SetBilans();
+    virtual void SetConnexite();
+    virtual void SetHisto();
+    virtual void SetQualite();
+    virtual void SetVolumes();
+
+protected :
+    bool  bHisto, bBilan;
+    bool bNomFichier, bNomMaillage;
+
+    HOMARD::HOMARD_Gen_ptr _myHomardGen;
+
+    HomardConfigFile* _monCas;
+
+    QString _aFile;
+    QString _aMesh;
+
+private:
+      static int RootInfo;
+};
+
+#endif // MONHOMARDDLG_H
diff --git a/src/HOMARDGUI/ui/HomardCas.ui b/src/HOMARDGUI/ui/HomardCas.ui
new file mode 100644 (file)
index 0000000..555f866
--- /dev/null
@@ -0,0 +1,181 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>HomardCas</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>HomardCas</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>561</width>
+            <height>193</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>Analyse de maillage avec HOMARD</string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>false</bool>
+    </property>
+    <widget class="QGroupBox">
+        <property name="name">
+            <cstring>GroupBox1</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>10</x>
+                <y>10</y>
+                <width>540</width>
+                <height>130</height>
+            </rect>
+        </property>
+        <property name="title">
+            <string>Case</string>
+        </property>
+        <widget class="QLabel">
+            <property name="name">
+                <cstring>textLabel1</cstring>
+            </property>
+            <property name="geometry">
+                <rect>
+                    <x>10</x>
+                    <y>20</y>
+                    <width>71</width>
+                    <height>31</height>
+                </rect>
+            </property>
+            <property name="text">
+                <string>Name</string>
+            </property>
+        </widget>
+        <widget class="QLineEdit">
+            <property name="name">
+                <cstring>NomCas</cstring>
+            </property>
+            <property name="geometry">
+                <rect>
+                    <x>110</x>
+                    <y>20</y>
+                    <width>420</width>
+                    <height>30</height>
+                </rect>
+            </property>
+        </widget>
+        <widget class="QPushButton">
+            <property name="name">
+                <cstring>pushDirect</cstring>
+            </property>
+            <property name="geometry">
+                <rect>
+                    <x>10</x>
+                    <y>70</y>
+                    <width>91</width>
+                    <height>31</height>
+                </rect>
+            </property>
+            <property name="text">
+                <string>Directory</string>
+            </property>
+        </widget>
+        <widget class="QLineEdit">
+            <property name="name">
+                <cstring>NomDirect</cstring>
+            </property>
+            <property name="geometry">
+                <rect>
+                    <x>110</x>
+                    <y>70</y>
+                    <width>421</width>
+                    <height>31</height>
+                </rect>
+            </property>
+        </widget>
+    </widget>
+    <widget class="QPushButton">
+        <property name="name">
+            <cstring>ButtonOk</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>420</x>
+                <y>150</y>
+                <width>61</width>
+                <height>31</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>OK</string>
+        </property>
+    </widget>
+    <widget class="QPushButton">
+        <property name="name">
+            <cstring>ButtonCancel</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>490</x>
+                <y>150</y>
+                <width>61</width>
+                <height>31</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>Cancel</string>
+        </property>
+    </widget>
+</widget>
+<connections>
+    <connection>
+        <sender>NomCas</sender>
+        <signal>returnPressed()</signal>
+        <receiver>HomardCas</receiver>
+        <slot>SetNomCas()</slot>
+    </connection>
+    <connection>
+        <sender>NomCas</sender>
+        <signal>textChanged(const QString&amp;)</signal>
+        <receiver>HomardCas</receiver>
+        <slot>SetNomCas(const QString&amp;)</slot>
+    </connection>
+    <connection>
+        <sender>NomDirect</sender>
+        <signal>returnPressed()</signal>
+        <receiver>HomardCas</receiver>
+        <slot>SetDir2()</slot>
+    </connection>
+    <connection>
+        <sender>NomDirect</sender>
+        <signal>textChanged(const QString&amp;)</signal>
+        <receiver>HomardCas</receiver>
+        <slot>SetDir2(const QString&amp;)</slot>
+    </connection>
+    <connection>
+        <sender>pushDirect</sender>
+        <signal>pressed()</signal>
+        <receiver>HomardCas</receiver>
+        <slot>SetDir()</slot>
+    </connection>
+    <connection>
+        <sender>ButtonOk</sender>
+        <signal>pressed()</signal>
+        <receiver>HomardCas</receiver>
+        <slot>PushOnApply()</slot>
+    </connection>
+    <connection>
+        <sender>ButtonCancel</sender>
+        <signal>pressed()</signal>
+        <receiver>HomardCas</receiver>
+        <slot>close()</slot>
+    </connection>
+</connections>
+<slots>
+    <slot>PushOnApply()</slot>
+    <slot>SetDir()</slot>
+    <slot>SetDir2()</slot>
+    <slot>SetDir2( const QString &amp; )</slot>
+    <slot>SetNomCas()</slot>
+    <slot>SetNomCas( const QString &amp; )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/HOMARDGUI/ui/HomardDlg.ui b/src/HOMARDGUI/ui/HomardDlg.ui
new file mode 100644 (file)
index 0000000..69482bb
--- /dev/null
@@ -0,0 +1,467 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>HomardDlg</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>HomardDlg</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>467</width>
+            <height>355</height>
+        </rect>
+    </property>
+    <property name="sizePolicy">
+        <sizepolicy>
+            <hsizetype>5</hsizetype>
+            <vsizetype>5</vsizetype>
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+        </sizepolicy>
+    </property>
+    <property name="caption">
+        <string>Homard : Analyse de maillage</string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>true</bool>
+    </property>
+    <grid>
+        <property name="name">
+            <cstring>unnamed</cstring>
+        </property>
+        <spacer row="3" column="0">
+            <property name="name">
+                <cstring>spacer10</cstring>
+            </property>
+            <property name="orientation">
+                <enum>Vertical</enum>
+            </property>
+            <property name="sizeType">
+                <enum>Expanding</enum>
+            </property>
+            <property name="sizeHint">
+                <size>
+                    <width>20</width>
+                    <height>16</height>
+                </size>
+            </property>
+        </spacer>
+        <widget class="QGroupBox" row="1" column="0">
+            <property name="name">
+                <cstring>groupBox3</cstring>
+            </property>
+            <property name="sizePolicy">
+                <sizepolicy>
+                    <hsizetype>5</hsizetype>
+                    <vsizetype>5</vsizetype>
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                </sizepolicy>
+            </property>
+            <property name="title">
+                <string>Options</string>
+            </property>
+            <grid>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLayoutWidget" row="0" column="0">
+                    <property name="name">
+                        <cstring>layout30</cstring>
+                    </property>
+                    <grid>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QCheckBox" row="2" column="0">
+                            <property name="name">
+                                <cstring>Connexite</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Connexité</string>
+                            </property>
+                            <property name="checked">
+                                <bool>true</bool>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox" row="1" column="1">
+                            <property name="name">
+                                <cstring>Inter</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Interpénétration</string>
+                            </property>
+                            <property name="checked">
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox" row="0" column="1">
+                            <property name="name">
+                                <cstring>Volumes</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Volumes/Surfaces/Longueurs</string>
+                            </property>
+                            <property name="checked">
+                                <bool>true</bool>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox" row="0" column="0">
+                            <property name="name">
+                                <cstring>NbEntites</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Nombre d'entités</string>
+                            </property>
+                            <property name="checked">
+                                <bool>true</bool>
+                            </property>
+                        </widget>
+                        <widget class="QCheckBox" row="1" column="0">
+                            <property name="name">
+                                <cstring>Qualite</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Qualité</string>
+                            </property>
+                            <property name="checked">
+                                <bool>true</bool>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+        <widget class="QGroupBox" row="4" column="0">
+            <property name="name">
+                <cstring>groupBox4</cstring>
+            </property>
+            <property name="title">
+                <string></string>
+            </property>
+            <hbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <spacer>
+                    <property name="name">
+                        <cstring>Horizontal Spacing2</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Expanding</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>290</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget class="QPushButton">
+                    <property name="name">
+                        <cstring>lancement</cstring>
+                    </property>
+                    <property name="text">
+                        <string>&amp;OK</string>
+                    </property>
+                    <property name="accel">
+                        <string></string>
+                    </property>
+                    <property name="autoDefault">
+                        <bool>true</bool>
+                    </property>
+                    <property name="default">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+                <widget class="QPushButton">
+                    <property name="name">
+                        <cstring>terminer</cstring>
+                    </property>
+                    <property name="text">
+                        <string>&amp;Cancel</string>
+                    </property>
+                    <property name="accel">
+                        <string></string>
+                    </property>
+                    <property name="autoDefault">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+            </hbox>
+        </widget>
+        <widget class="QGroupBox" row="0" column="0">
+            <property name="name">
+                <cstring>groupBox7</cstring>
+            </property>
+            <property name="sizePolicy">
+                <sizepolicy>
+                    <hsizetype>5</hsizetype>
+                    <vsizetype>5</vsizetype>
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                </sizepolicy>
+            </property>
+            <property name="paletteBackgroundColor">
+                <color>
+                    <red>230</red>
+                    <green>230</green>
+                    <blue>230</blue>
+                </color>
+            </property>
+            <property name="frameShadow">
+                <enum>Raised</enum>
+            </property>
+            <property name="margin">
+                <number>1</number>
+            </property>
+            <property name="title">
+                <string></string>
+            </property>
+            <grid>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLabel" row="1" column="0">
+                    <property name="name">
+                        <cstring>lblMesh</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>1</hsizetype>
+                            <vsizetype>5</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="text">
+                        <string>Mesh</string>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="0" column="0">
+                    <property name="name">
+                        <cstring>lblCommande</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>1</hsizetype>
+                            <vsizetype>5</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="text">
+                        <string>MED File</string>
+                    </property>
+                </widget>
+                <widget class="QPushButton" row="0" column="1">
+                    <property name="name">
+                        <cstring>PushFichier</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>0</hsizetype>
+                            <vsizetype>0</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="text">
+                        <string></string>
+                    </property>
+                    <property name="pixmap">
+                        <pixmap>image0</pixmap>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="0" column="3">
+                    <property name="name">
+                        <cstring>lblTypeMesh</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>1</hsizetype>
+                            <vsizetype>5</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="text">
+                        <string></string>
+                    </property>
+                    <property name="pixmap">
+                        <pixmap>image1</pixmap>
+                    </property>
+                    <property name="toolTip" stdset="0">
+                        <string>A quoi ça sert ?</string>
+                    </property>
+                </widget>
+                <widget class="QLineEdit" row="0" column="2">
+                    <property name="name">
+                        <cstring>NomFichier</cstring>
+                    </property>
+                    <property name="minimumSize">
+                        <size>
+                            <width>300</width>
+                            <height>21</height>
+                        </size>
+                    </property>
+                </widget>
+                <widget class="QComboBox" row="1" column="1" rowspan="1" colspan="3">
+                    <property name="name">
+                        <cstring>ListeMeshName</cstring>
+                    </property>
+                    <property name="minimumSize">
+                        <size>
+                            <width>300</width>
+                            <height>31</height>
+                        </size>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+        <widget class="QGroupBox" row="2" column="0">
+            <property name="name">
+                <cstring>groupBox3_2</cstring>
+            </property>
+            <property name="sizePolicy">
+                <sizepolicy>
+                    <hsizetype>5</hsizetype>
+                    <vsizetype>5</vsizetype>
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                </sizepolicy>
+            </property>
+            <property name="title">
+                <string>Conservation des résultats</string>
+            </property>
+            <grid>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QCheckBox" row="0" column="0">
+                    <property name="name">
+                        <cstring>bilans</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Bilan</string>
+                    </property>
+                    <property name="checked">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+                <widget class="QCheckBox" row="0" column="1">
+                    <property name="name">
+                        <cstring>Histo</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Histogramme Qualité</string>
+                    </property>
+                    <property name="checked">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<images>
+    <image name="image0">
+        <data format="PNG" length="209">89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082</data>
+    </image>
+    <image name="image1">
+        <data format="PNG" length="461">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082</data>
+    </image>
+</images>
+<connections>
+    <connection>
+        <sender>lancement</sender>
+        <signal>pressed()</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>Lancement()</slot>
+    </connection>
+    <connection>
+        <sender>terminer</sender>
+        <signal>pressed()</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>close()</slot>
+    </connection>
+    <connection>
+        <sender>ListeMeshName</sender>
+        <signal>activated(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetMaillage()</slot>
+    </connection>
+    <connection>
+        <sender>NomFichier</sender>
+        <signal>returnPressed()</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetNomFichier()</slot>
+    </connection>
+    <connection>
+        <sender>PushFichier</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>PushNomFichier()</slot>
+    </connection>
+    <connection>
+        <sender>Connexite</sender>
+        <signal>stateChanged(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetConnexite()</slot>
+    </connection>
+    <connection>
+        <sender>Inter</sender>
+        <signal>stateChanged(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetInter()</slot>
+    </connection>
+    <connection>
+        <sender>NbEntites</sender>
+        <signal>stateChanged(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetNbEntites()</slot>
+    </connection>
+    <connection>
+        <sender>Histo</sender>
+        <signal>stateChanged(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetHisto()</slot>
+    </connection>
+    <connection>
+        <sender>Qualite</sender>
+        <signal>stateChanged(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetQualite()</slot>
+    </connection>
+    <connection>
+        <sender>Volumes</sender>
+        <signal>stateChanged(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetVolumes()</slot>
+    </connection>
+    <connection>
+        <sender>bilans</sender>
+        <signal>stateChanged(int)</signal>
+        <receiver>HomardDlg</receiver>
+        <slot>SetBilans()</slot>
+    </connection>
+</connections>
+<slots>
+    <slot>SetNomFichier()</slot>
+    <slot>PushNomFichier()</slot>
+    <slot>SetMaillage()</slot>
+    <slot>SetNbEntites()</slot>
+    <slot>Lancement()</slot>
+    <slot>SetInter()</slot>
+    <slot>SetBilans()</slot>
+    <slot>SetConnexite()</slot>
+    <slot>SetHisto()</slot>
+    <slot>SetQualite()</slot>
+    <slot>SetVolumes()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/HOMARDGUI/ui/HomardEditLog.ui b/src/HOMARDGUI/ui/HomardEditLog.ui
new file mode 100644 (file)
index 0000000..bc8613a
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>HomardEditLog</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>HomardEditLog</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>487</width>
+            <height>338</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>Homard : </string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>true</bool>
+    </property>
+    <widget class="QLabel">
+        <property name="name">
+            <cstring>lblTypeMesh</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>457</x>
+                <y>16</y>
+                <width>16</width>
+                <height>28</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string></string>
+        </property>
+        <property name="pixmap">
+            <pixmap>image0</pixmap>
+        </property>
+    </widget>
+    <widget class="QTextEdit">
+        <property name="name">
+            <cstring>FileEditeur</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>0</x>
+                <y>0</y>
+                <width>490</width>
+                <height>340</height>
+            </rect>
+        </property>
+    </widget>
+</widget>
+<images>
+    <image name="image0">
+        <data format="PNG" length="461">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082</data>
+    </image>
+</images>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/HOMARDGUI/ui/HomardIteration.ui b/src/HOMARDGUI/ui/HomardIteration.ui
new file mode 100644 (file)
index 0000000..72e661a
--- /dev/null
@@ -0,0 +1,218 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>HomardIteration</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>HomardIteration</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>533</width>
+            <height>112</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>Homard : Iteration Control</string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>true</bool>
+    </property>
+    <widget class="QLabel">
+        <property name="name">
+            <cstring>lblTypeMesh</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>497</x>
+                <y>38</y>
+                <width>16</width>
+                <height>26</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string></string>
+        </property>
+        <property name="pixmap">
+            <pixmap>image0</pixmap>
+        </property>
+    </widget>
+    <widget class="QSpinBox">
+        <property name="name">
+            <cstring>IterBox</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>140</x>
+                <y>10</y>
+                <width>41</width>
+                <height>21</height>
+            </rect>
+        </property>
+    </widget>
+    <widget class="QLineEdit">
+        <property name="name">
+            <cstring>NomFichier</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>180</x>
+                <y>40</y>
+                <width>310</width>
+                <height>21</height>
+            </rect>
+        </property>
+        <property name="minimumSize">
+            <size>
+                <width>250</width>
+                <height>21</height>
+            </size>
+        </property>
+    </widget>
+    <widget class="QPushButton">
+        <property name="name">
+            <cstring>PushFichier</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>144</x>
+                <y>39</y>
+                <width>24</width>
+                <height>24</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string></string>
+        </property>
+        <property name="pixmap">
+            <pixmap>image1</pixmap>
+        </property>
+    </widget>
+    <widget class="QPushButton">
+        <property name="name">
+            <cstring>buttonOk</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>366</x>
+                <y>80</y>
+                <width>58</width>
+                <height>21</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>Refine</string>
+        </property>
+        <property name="accel">
+            <string></string>
+        </property>
+        <property name="autoDefault">
+            <bool>true</bool>
+        </property>
+        <property name="default">
+            <bool>true</bool>
+        </property>
+    </widget>
+    <widget class="QPushButton">
+        <property name="name">
+            <cstring>buttonCancel</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>430</x>
+                <y>80</y>
+                <width>60</width>
+                <height>21</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>&amp;Cancel</string>
+        </property>
+        <property name="accel">
+            <string></string>
+        </property>
+        <property name="autoDefault">
+            <bool>true</bool>
+        </property>
+    </widget>
+    <widget class="QLabel">
+        <property name="name">
+            <cstring>textLabel1</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>10</x>
+                <y>10</y>
+                <width>120</width>
+                <height>21</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>Iteration Rank</string>
+        </property>
+    </widget>
+    <widget class="QLabel">
+        <property name="name">
+            <cstring>lblCommande</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>7</x>
+                <y>37</y>
+                <width>128</width>
+                <height>28</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>Configuration File</string>
+        </property>
+    </widget>
+</widget>
+<images>
+    <image name="image0">
+        <data format="PNG" length="461">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082</data>
+    </image>
+    <image name="image1">
+        <data format="PNG" length="209">89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082</data>
+    </image>
+</images>
+<connections>
+    <connection>
+        <sender>NomFichier</sender>
+        <signal>returnPressed()</signal>
+        <receiver>HomardIteration</receiver>
+        <slot>SetNomFichier()</slot>
+    </connection>
+    <connection>
+        <sender>buttonOk</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardIteration</receiver>
+        <slot>Lancement()</slot>
+    </connection>
+    <connection>
+        <sender>buttonCancel</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardIteration</receiver>
+        <slot>close()</slot>
+    </connection>
+    <connection>
+        <sender>PushFichier</sender>
+        <signal>pressed()</signal>
+        <receiver>HomardIteration</receiver>
+        <slot>PushNomFichier()</slot>
+    </connection>
+    <connection>
+        <sender>IterBox</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>HomardIteration</receiver>
+        <slot>ChangeIter(int)</slot>
+    </connection>
+</connections>
+<slots>
+    <slot>Lancement()</slot>
+    <slot>SetNomFichier()</slot>
+    <slot>PushNomFichier()</slot>
+    <slot>ChangeIter(int)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/HOMARDGUI/ui/HomardPourLesNuls.ui b/src/HOMARDGUI/ui/HomardPourLesNuls.ui
new file mode 100644 (file)
index 0000000..25b6d00
--- /dev/null
@@ -0,0 +1,738 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>HomardPourLesNuls</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>HomardPourLesNuls</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>563</width>
+            <height>375</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>Homard for Dummies</string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>true</bool>
+    </property>
+    <vbox>
+        <property name="name">
+            <cstring>unnamed</cstring>
+        </property>
+        <widget class="QLayoutWidget">
+            <property name="name">
+                <cstring>layout27</cstring>
+            </property>
+            <vbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLayoutWidget">
+                    <property name="name">
+                        <cstring>layout49</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>lblCommande</cstring>
+                            </property>
+                            <property name="text">
+                                <string>MED File</string>
+                            </property>
+                        </widget>
+                        <spacer>
+                            <property name="name">
+                                <cstring>spacer4</cstring>
+                            </property>
+                            <property name="orientation">
+                                <enum>Horizontal</enum>
+                            </property>
+                            <property name="sizeType">
+                                <enum>Expanding</enum>
+                            </property>
+                            <property name="sizeHint">
+                                <size>
+                                    <width>120</width>
+                                    <height>20</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget class="QLayoutWidget">
+                            <property name="name">
+                                <cstring>layout48</cstring>
+                            </property>
+                            <hbox>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <widget class="QLayoutWidget">
+                                    <property name="name">
+                                        <cstring>layout26</cstring>
+                                    </property>
+                                    <hbox>
+                                        <property name="name">
+                                            <cstring>unnamed</cstring>
+                                        </property>
+                                        <widget class="QPushButton">
+                                            <property name="name">
+                                                <cstring>PushFichier</cstring>
+                                            </property>
+                                            <property name="text">
+                                                <string></string>
+                                            </property>
+                                            <property name="pixmap">
+                                                <pixmap>image0</pixmap>
+                                            </property>
+                                        </widget>
+                                        <widget class="QLineEdit">
+                                            <property name="name">
+                                                <cstring>NomFichier</cstring>
+                                            </property>
+                                            <property name="minimumSize">
+                                                <size>
+                                                    <width>382</width>
+                                                    <height>21</height>
+                                                </size>
+                                            </property>
+                                        </widget>
+                                    </hbox>
+                                </widget>
+                                <widget class="QLabel">
+                                    <property name="name">
+                                        <cstring>lblTypeMesh</cstring>
+                                    </property>
+                                    <property name="text">
+                                        <string></string>
+                                    </property>
+                                    <property name="pixmap">
+                                        <pixmap>image1</pixmap>
+                                    </property>
+                                </widget>
+                            </hbox>
+                        </widget>
+                    </hbox>
+                </widget>
+                <spacer>
+                    <property name="name">
+                        <cstring>spacer19</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Vertical</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Expanding</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>20</width>
+                            <height>29</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget class="QLayoutWidget">
+                    <property name="name">
+                        <cstring>layout26</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <spacer>
+                            <property name="name">
+                                <cstring>spacer20</cstring>
+                            </property>
+                            <property name="orientation">
+                                <enum>Horizontal</enum>
+                            </property>
+                            <property name="sizeType">
+                                <enum>Expanding</enum>
+                            </property>
+                            <property name="sizeHint">
+                                <size>
+                                    <width>104</width>
+                                    <height>20</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget class="QLayoutWidget">
+                            <property name="name">
+                                <cstring>layout25</cstring>
+                            </property>
+                            <vbox>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <widget class="QGroupBox">
+                                    <property name="name">
+                                        <cstring>groupBox2</cstring>
+                                    </property>
+                                    <property name="title">
+                                        <string></string>
+                                    </property>
+                                    <vbox>
+                                        <property name="name">
+                                            <cstring>unnamed</cstring>
+                                        </property>
+                                        <widget class="QLayoutWidget">
+                                            <property name="name">
+                                                <cstring>layout43</cstring>
+                                            </property>
+                                            <vbox>
+                                                <property name="name">
+                                                    <cstring>unnamed</cstring>
+                                                </property>
+                                                <widget class="QLayoutWidget">
+                                                    <property name="name">
+                                                        <cstring>layout41</cstring>
+                                                    </property>
+                                                    <vbox>
+                                                        <property name="name">
+                                                            <cstring>unnamed</cstring>
+                                                        </property>
+                                                        <widget class="QLayoutWidget">
+                                                            <property name="name">
+                                                                <cstring>layout34</cstring>
+                                                            </property>
+                                                            <hbox>
+                                                                <property name="name">
+                                                                    <cstring>unnamed</cstring>
+                                                                </property>
+                                                                <widget class="QLabel">
+                                                                    <property name="name">
+                                                                        <cstring>lblMesh</cstring>
+                                                                    </property>
+                                                                    <property name="text">
+                                                                        <string>Mesh</string>
+                                                                    </property>
+                                                                </widget>
+                                                                <spacer>
+                                                                    <property name="name">
+                                                                        <cstring>spacer5</cstring>
+                                                                    </property>
+                                                                    <property name="orientation">
+                                                                        <enum>Horizontal</enum>
+                                                                    </property>
+                                                                    <property name="sizeType">
+                                                                        <enum>Expanding</enum>
+                                                                    </property>
+                                                                    <property name="sizeHint">
+                                                                        <size>
+                                                                            <width>70</width>
+                                                                            <height>20</height>
+                                                                        </size>
+                                                                    </property>
+                                                                </spacer>
+                                                                <widget class="QComboBox">
+                                                                    <property name="name">
+                                                                        <cstring>ListeMeshName</cstring>
+                                                                    </property>
+                                                                    <property name="minimumSize">
+                                                                        <size>
+                                                                            <width>350</width>
+                                                                            <height>31</height>
+                                                                        </size>
+                                                                    </property>
+                                                                </widget>
+                                                            </hbox>
+                                                        </widget>
+                                                        <spacer>
+                                                            <property name="name">
+                                                                <cstring>spacer15</cstring>
+                                                            </property>
+                                                            <property name="orientation">
+                                                                <enum>Vertical</enum>
+                                                            </property>
+                                                            <property name="sizeType">
+                                                                <enum>Expanding</enum>
+                                                            </property>
+                                                            <property name="sizeHint">
+                                                                <size>
+                                                                    <width>20</width>
+                                                                    <height>31</height>
+                                                                </size>
+                                                            </property>
+                                                        </spacer>
+                                                        <widget class="QLayoutWidget">
+                                                            <property name="name">
+                                                                <cstring>layout40</cstring>
+                                                            </property>
+                                                            <vbox>
+                                                                <property name="name">
+                                                                    <cstring>unnamed</cstring>
+                                                                </property>
+                                                                <widget class="QLayoutWidget">
+                                                                    <property name="name">
+                                                                        <cstring>layout34_2</cstring>
+                                                                    </property>
+                                                                    <hbox>
+                                                                        <property name="name">
+                                                                            <cstring>unnamed</cstring>
+                                                                        </property>
+                                                                        <widget class="QLabel">
+                                                                            <property name="name">
+                                                                                <cstring>lblMesh_3</cstring>
+                                                                            </property>
+                                                                            <property name="text">
+                                                                                <string>Error Field</string>
+                                                                            </property>
+                                                                        </widget>
+                                                                        <spacer>
+                                                                            <property name="name">
+                                                                                <cstring>spacer5_2</cstring>
+                                                                            </property>
+                                                                            <property name="orientation">
+                                                                                <enum>Horizontal</enum>
+                                                                            </property>
+                                                                            <property name="sizeType">
+                                                                                <enum>Expanding</enum>
+                                                                            </property>
+                                                                            <property name="sizeHint">
+                                                                                <size>
+                                                                                    <width>70</width>
+                                                                                    <height>20</height>
+                                                                                </size>
+                                                                            </property>
+                                                                        </spacer>
+                                                                        <widget class="QComboBox">
+                                                                            <property name="name">
+                                                                                <cstring>ListeField</cstring>
+                                                                            </property>
+                                                                            <property name="minimumSize">
+                                                                                <size>
+                                                                                    <width>350</width>
+                                                                                    <height>31</height>
+                                                                                </size>
+                                                                            </property>
+                                                                        </widget>
+                                                                    </hbox>
+                                                                </widget>
+                                                                <widget class="QLayoutWidget">
+                                                                    <property name="name">
+                                                                        <cstring>layout34_3</cstring>
+                                                                    </property>
+                                                                    <hbox>
+                                                                        <property name="name">
+                                                                            <cstring>unnamed</cstring>
+                                                                        </property>
+                                                                        <widget class="QLabel">
+                                                                            <property name="name">
+                                                                                <cstring>lblMesh_2</cstring>
+                                                                            </property>
+                                                                            <property name="text">
+                                                                                <string>Componant</string>
+                                                                            </property>
+                                                                        </widget>
+                                                                        <spacer>
+                                                                            <property name="name">
+                                                                                <cstring>spacer5_3</cstring>
+                                                                            </property>
+                                                                            <property name="orientation">
+                                                                                <enum>Horizontal</enum>
+                                                                            </property>
+                                                                            <property name="sizeType">
+                                                                                <enum>Expanding</enum>
+                                                                            </property>
+                                                                            <property name="sizeHint">
+                                                                                <size>
+                                                                                    <width>70</width>
+                                                                                    <height>20</height>
+                                                                                </size>
+                                                                            </property>
+                                                                        </spacer>
+                                                                        <widget class="QComboBox">
+                                                                            <property name="name">
+                                                                                <cstring>ListeComponant</cstring>
+                                                                            </property>
+                                                                            <property name="minimumSize">
+                                                                                <size>
+                                                                                    <width>350</width>
+                                                                                    <height>31</height>
+                                                                                </size>
+                                                                            </property>
+                                                                        </widget>
+                                                                    </hbox>
+                                                                </widget>
+                                                                <widget class="QLayoutWidget">
+                                                                    <property name="name">
+                                                                        <cstring>layout34_4</cstring>
+                                                                    </property>
+                                                                    <hbox>
+                                                                        <property name="name">
+                                                                            <cstring>unnamed</cstring>
+                                                                        </property>
+                                                                        <widget class="QLabel">
+                                                                            <property name="name">
+                                                                                <cstring>lblMesh_4</cstring>
+                                                                            </property>
+                                                                            <property name="text">
+                                                                                <string>Iteration</string>
+                                                                            </property>
+                                                                        </widget>
+                                                                        <spacer>
+                                                                            <property name="name">
+                                                                                <cstring>spacer5_4</cstring>
+                                                                            </property>
+                                                                            <property name="orientation">
+                                                                                <enum>Horizontal</enum>
+                                                                            </property>
+                                                                            <property name="sizeType">
+                                                                                <enum>Expanding</enum>
+                                                                            </property>
+                                                                            <property name="sizeHint">
+                                                                                <size>
+                                                                                    <width>70</width>
+                                                                                    <height>20</height>
+                                                                                </size>
+                                                                            </property>
+                                                                        </spacer>
+                                                                        <widget class="QComboBox">
+                                                                            <property name="name">
+                                                                                <cstring>ListeIteration</cstring>
+                                                                            </property>
+                                                                            <property name="minimumSize">
+                                                                                <size>
+                                                                                    <width>350</width>
+                                                                                    <height>31</height>
+                                                                                </size>
+                                                                            </property>
+                                                                        </widget>
+                                                                    </hbox>
+                                                                </widget>
+                                                            </vbox>
+                                                        </widget>
+                                                    </vbox>
+                                                </widget>
+                                                <spacer>
+                                                    <property name="name">
+                                                        <cstring>spacer16</cstring>
+                                                    </property>
+                                                    <property name="orientation">
+                                                        <enum>Vertical</enum>
+                                                    </property>
+                                                    <property name="sizeType">
+                                                        <enum>Expanding</enum>
+                                                    </property>
+                                                    <property name="sizeHint">
+                                                        <size>
+                                                            <width>31</width>
+                                                            <height>51</height>
+                                                        </size>
+                                                    </property>
+                                                </spacer>
+                                                <widget class="QLayoutWidget">
+                                                    <property name="name">
+                                                        <cstring>layout42</cstring>
+                                                    </property>
+                                                    <vbox>
+                                                        <property name="name">
+                                                            <cstring>unnamed</cstring>
+                                                        </property>
+                                                        <widget class="QLayoutWidget">
+                                                            <property name="name">
+                                                                <cstring>layout38</cstring>
+                                                            </property>
+                                                            <hbox>
+                                                                <property name="name">
+                                                                    <cstring>unnamed</cstring>
+                                                                </property>
+                                                                <widget class="QLabel">
+                                                                    <property name="name">
+                                                                        <cstring>lblMesh_2_2_2_2</cstring>
+                                                                    </property>
+                                                                    <property name="text">
+                                                                        <string>Refinement %</string>
+                                                                    </property>
+                                                                </widget>
+                                                                <spacer>
+                                                                    <property name="name">
+                                                                        <cstring>spacer6_4</cstring>
+                                                                    </property>
+                                                                    <property name="orientation">
+                                                                        <enum>Horizontal</enum>
+                                                                    </property>
+                                                                    <property name="sizeType">
+                                                                        <enum>Expanding</enum>
+                                                                    </property>
+                                                                    <property name="sizeHint">
+                                                                        <size>
+                                                                            <width>50</width>
+                                                                            <height>20</height>
+                                                                        </size>
+                                                                    </property>
+                                                                </spacer>
+                                                                <widget class="QSlider">
+                                                                    <property name="name">
+                                                                        <cstring>PRaf</cstring>
+                                                                    </property>
+                                                                    <property name="minimumSize">
+                                                                        <size>
+                                                                            <width>350</width>
+                                                                            <height>0</height>
+                                                                        </size>
+                                                                    </property>
+                                                                    <property name="mouseTracking">
+                                                                        <bool>false</bool>
+                                                                    </property>
+                                                                    <property name="acceptDrops">
+                                                                        <bool>false</bool>
+                                                                    </property>
+                                                                    <property name="value">
+                                                                        <number>30</number>
+                                                                    </property>
+                                                                    <property name="orientation">
+                                                                        <enum>Horizontal</enum>
+                                                                    </property>
+                                                                    <property name="tickmarks">
+                                                                        <enum>Above</enum>
+                                                                    </property>
+                                                                    <property name="tickInterval">
+                                                                        <number>10</number>
+                                                                    </property>
+                                                                </widget>
+                                                            </hbox>
+                                                        </widget>
+                                                        <widget class="QLayoutWidget">
+                                                            <property name="name">
+                                                                <cstring>layout38_2</cstring>
+                                                            </property>
+                                                            <hbox>
+                                                                <property name="name">
+                                                                    <cstring>unnamed</cstring>
+                                                                </property>
+                                                                <widget class="QLabel">
+                                                                    <property name="name">
+                                                                        <cstring>lblMesh_2_2_2_2_3</cstring>
+                                                                    </property>
+                                                                    <property name="text">
+                                                                        <string>Unrefinement %</string>
+                                                                    </property>
+                                                                </widget>
+                                                                <spacer>
+                                                                    <property name="name">
+                                                                        <cstring>spacer6_4_2</cstring>
+                                                                    </property>
+                                                                    <property name="orientation">
+                                                                        <enum>Horizontal</enum>
+                                                                    </property>
+                                                                    <property name="sizeType">
+                                                                        <enum>Expanding</enum>
+                                                                    </property>
+                                                                    <property name="sizeHint">
+                                                                        <size>
+                                                                            <width>50</width>
+                                                                            <height>20</height>
+                                                                        </size>
+                                                                    </property>
+                                                                </spacer>
+                                                                <widget class="QSlider">
+                                                                    <property name="name">
+                                                                        <cstring>PDeRaf</cstring>
+                                                                    </property>
+                                                                    <property name="minimumSize">
+                                                                        <size>
+                                                                            <width>350</width>
+                                                                            <height>0</height>
+                                                                        </size>
+                                                                    </property>
+                                                                    <property name="mouseTracking">
+                                                                        <bool>false</bool>
+                                                                    </property>
+                                                                    <property name="value">
+                                                                        <number>0</number>
+                                                                    </property>
+                                                                    <property name="orientation">
+                                                                        <enum>Horizontal</enum>
+                                                                    </property>
+                                                                    <property name="tickmarks">
+                                                                        <enum>Above</enum>
+                                                                    </property>
+                                                                    <property name="tickInterval">
+                                                                        <number>10</number>
+                                                                    </property>
+                                                                </widget>
+                                                            </hbox>
+                                                        </widget>
+                                                    </vbox>
+                                                </widget>
+                                            </vbox>
+                                        </widget>
+                                    </vbox>
+                                </widget>
+                                <spacer>
+                                    <property name="name">
+                                        <cstring>spacer18</cstring>
+                                    </property>
+                                    <property name="orientation">
+                                        <enum>Vertical</enum>
+                                    </property>
+                                    <property name="sizeType">
+                                        <enum>Expanding</enum>
+                                    </property>
+                                    <property name="sizeHint">
+                                        <size>
+                                            <width>20</width>
+                                            <height>41</height>
+                                        </size>
+                                    </property>
+                                </spacer>
+                                <widget class="QLayoutWidget">
+                                    <property name="name">
+                                        <cstring>Layout1</cstring>
+                                    </property>
+                                    <hbox>
+                                        <property name="name">
+                                            <cstring>unnamed</cstring>
+                                        </property>
+                                        <property name="margin">
+                                            <number>0</number>
+                                        </property>
+                                        <property name="spacing">
+                                            <number>6</number>
+                                        </property>
+                                        <spacer>
+                                            <property name="name">
+                                                <cstring>Horizontal Spacing2</cstring>
+                                            </property>
+                                            <property name="orientation">
+                                                <enum>Horizontal</enum>
+                                            </property>
+                                            <property name="sizeType">
+                                                <enum>Expanding</enum>
+                                            </property>
+                                            <property name="sizeHint">
+                                                <size>
+                                                    <width>20</width>
+                                                    <height>0</height>
+                                                </size>
+                                            </property>
+                                        </spacer>
+                                        <widget class="QPushButton">
+                                            <property name="name">
+                                                <cstring>buttonOk</cstring>
+                                            </property>
+                                            <property name="text">
+                                                <string>&amp;OK</string>
+                                            </property>
+                                            <property name="accel">
+                                                <string></string>
+                                            </property>
+                                            <property name="autoDefault">
+                                                <bool>true</bool>
+                                            </property>
+                                            <property name="default">
+                                                <bool>true</bool>
+                                            </property>
+                                        </widget>
+                                        <widget class="QPushButton">
+                                            <property name="name">
+                                                <cstring>buttonCancel</cstring>
+                                            </property>
+                                            <property name="text">
+                                                <string>&amp;Cancel</string>
+                                            </property>
+                                            <property name="accel">
+                                                <string></string>
+                                            </property>
+                                            <property name="autoDefault">
+                                                <bool>true</bool>
+                                            </property>
+                                        </widget>
+                                    </hbox>
+                                </widget>
+                            </vbox>
+                        </widget>
+                    </hbox>
+                </widget>
+            </vbox>
+        </widget>
+    </vbox>
+</widget>
+<images>
+    <image name="image0">
+        <data format="PNG" length="209">89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082</data>
+    </image>
+    <image name="image1">
+        <data format="PNG" length="461">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082</data>
+    </image>
+</images>
+<connections>
+    <connection>
+        <sender>buttonOk</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>Lancement()</slot>
+    </connection>
+    <connection>
+        <sender>buttonCancel</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>reject()</slot>
+    </connection>
+    <connection>
+        <sender>ListeComponant</sender>
+        <signal>activated(int)</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>SetComponant()</slot>
+    </connection>
+    <connection>
+        <sender>ListeField</sender>
+        <signal>activated(int)</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>SetError()</slot>
+    </connection>
+    <connection>
+        <sender>ListeIteration</sender>
+        <signal>activated(int)</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>SetIter()</slot>
+    </connection>
+    <connection>
+        <sender>ListeMeshName</sender>
+        <signal>activated(int)</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>SetMaillage()</slot>
+    </connection>
+    <connection>
+        <sender>NomFichier</sender>
+        <signal>returnPressed()</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>SetNomFichier()</slot>
+    </connection>
+    <connection>
+        <sender>PRaf</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>ChangeRaf()</slot>
+    </connection>
+    <connection>
+        <sender>PRaf</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>ChangeDeRaf()</slot>
+    </connection>
+    <connection>
+        <sender>PushFichier</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardPourLesNuls</receiver>
+        <slot>PushNomFichier()</slot>
+    </connection>
+</connections>
+<slots>
+    <slot>SetNomFichier()</slot>
+    <slot>PushNomFichier()</slot>
+    <slot>SetMaillage()</slot>
+    <slot>SetError()</slot>
+    <slot>SetComponant()</slot>
+    <slot>Lancement()</slot>
+    <slot>ChangeDeRaf()</slot>
+    <slot>SetIter()</slot>
+    <slot>ChangeRaf()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/HOMARDGUI/ui/HomardRaffiUniforme.ui b/src/HOMARDGUI/ui/HomardRaffiUniforme.ui
new file mode 100644 (file)
index 0000000..ac5b4b5
--- /dev/null
@@ -0,0 +1,383 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>HomardRaffi</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>HomardRaffi</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>533</width>
+            <height>206</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>Uniform Refinement</string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>true</bool>
+    </property>
+    <hbox>
+        <property name="name">
+            <cstring>unnamed</cstring>
+        </property>
+        <widget class="QLayoutWidget">
+            <property name="name">
+                <cstring>layout32</cstring>
+            </property>
+            <vbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLayoutWidget">
+                    <property name="name">
+                        <cstring>layout49</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>lblCommande</cstring>
+                            </property>
+                            <property name="text">
+                                <string>MED File</string>
+                            </property>
+                        </widget>
+                        <spacer>
+                            <property name="name">
+                                <cstring>spacer4</cstring>
+                            </property>
+                            <property name="orientation">
+                                <enum>Horizontal</enum>
+                            </property>
+                            <property name="sizeType">
+                                <enum>Expanding</enum>
+                            </property>
+                            <property name="sizeHint">
+                                <size>
+                                    <width>120</width>
+                                    <height>20</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget class="QLayoutWidget">
+                            <property name="name">
+                                <cstring>layout48</cstring>
+                            </property>
+                            <hbox>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <widget class="QLayoutWidget">
+                                    <property name="name">
+                                        <cstring>layout26</cstring>
+                                    </property>
+                                    <hbox>
+                                        <property name="name">
+                                            <cstring>unnamed</cstring>
+                                        </property>
+                                        <widget class="QPushButton">
+                                            <property name="name">
+                                                <cstring>PushFichier</cstring>
+                                            </property>
+                                            <property name="text">
+                                                <string></string>
+                                            </property>
+                                            <property name="pixmap">
+                                                <pixmap>image0</pixmap>
+                                            </property>
+                                        </widget>
+                                        <widget class="QLineEdit">
+                                            <property name="name">
+                                                <cstring>NomFichier</cstring>
+                                            </property>
+                                            <property name="minimumSize">
+                                                <size>
+                                                    <width>382</width>
+                                                    <height>21</height>
+                                                </size>
+                                            </property>
+                                        </widget>
+                                    </hbox>
+                                </widget>
+                                <widget class="QLabel">
+                                    <property name="name">
+                                        <cstring>lblTypeMesh</cstring>
+                                    </property>
+                                    <property name="text">
+                                        <string></string>
+                                    </property>
+                                    <property name="pixmap">
+                                        <pixmap>image1</pixmap>
+                                    </property>
+                                </widget>
+                            </hbox>
+                        </widget>
+                    </hbox>
+                </widget>
+                <spacer>
+                    <property name="name">
+                        <cstring>spacer15</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Vertical</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Expanding</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>21</width>
+                            <height>41</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget class="QLayoutWidget">
+                    <property name="name">
+                        <cstring>layout31</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <spacer>
+                            <property name="name">
+                                <cstring>spacer20</cstring>
+                            </property>
+                            <property name="orientation">
+                                <enum>Horizontal</enum>
+                            </property>
+                            <property name="sizeType">
+                                <enum>Expanding</enum>
+                            </property>
+                            <property name="sizeHint">
+                                <size>
+                                    <width>104</width>
+                                    <height>20</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget class="QLayoutWidget">
+                            <property name="name">
+                                <cstring>layout29</cstring>
+                            </property>
+                            <vbox>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <spacer>
+                                    <property name="name">
+                                        <cstring>spacer19</cstring>
+                                    </property>
+                                    <property name="orientation">
+                                        <enum>Vertical</enum>
+                                    </property>
+                                    <property name="sizeType">
+                                        <enum>Expanding</enum>
+                                    </property>
+                                    <property name="sizeHint">
+                                        <size>
+                                            <width>20</width>
+                                            <height>29</height>
+                                        </size>
+                                    </property>
+                                </spacer>
+                                <widget class="QGroupBox">
+                                    <property name="name">
+                                        <cstring>groupBox2</cstring>
+                                    </property>
+                                    <property name="title">
+                                        <string></string>
+                                    </property>
+                                    <hbox>
+                                        <property name="name">
+                                            <cstring>unnamed</cstring>
+                                        </property>
+                                        <widget class="QLayoutWidget">
+                                            <property name="name">
+                                                <cstring>layout34</cstring>
+                                            </property>
+                                            <hbox>
+                                                <property name="name">
+                                                    <cstring>unnamed</cstring>
+                                                </property>
+                                                <widget class="QLabel">
+                                                    <property name="name">
+                                                        <cstring>lblMesh</cstring>
+                                                    </property>
+                                                    <property name="text">
+                                                        <string>Mesh</string>
+                                                    </property>
+                                                </widget>
+                                                <spacer>
+                                                    <property name="name">
+                                                        <cstring>spacer5</cstring>
+                                                    </property>
+                                                    <property name="orientation">
+                                                        <enum>Horizontal</enum>
+                                                    </property>
+                                                    <property name="sizeType">
+                                                        <enum>Expanding</enum>
+                                                    </property>
+                                                    <property name="sizeHint">
+                                                        <size>
+                                                            <width>70</width>
+                                                            <height>20</height>
+                                                        </size>
+                                                    </property>
+                                                </spacer>
+                                                <widget class="QComboBox">
+                                                    <property name="name">
+                                                        <cstring>ListeMeshName</cstring>
+                                                    </property>
+                                                    <property name="minimumSize">
+                                                        <size>
+                                                            <width>350</width>
+                                                            <height>31</height>
+                                                        </size>
+                                                    </property>
+                                                </widget>
+                                            </hbox>
+                                        </widget>
+                                    </hbox>
+                                </widget>
+                                <spacer>
+                                    <property name="name">
+                                        <cstring>spacer18</cstring>
+                                    </property>
+                                    <property name="orientation">
+                                        <enum>Vertical</enum>
+                                    </property>
+                                    <property name="sizeType">
+                                        <enum>Expanding</enum>
+                                    </property>
+                                    <property name="sizeHint">
+                                        <size>
+                                            <width>20</width>
+                                            <height>41</height>
+                                        </size>
+                                    </property>
+                                </spacer>
+                                <widget class="QLayoutWidget">
+                                    <property name="name">
+                                        <cstring>Layout1</cstring>
+                                    </property>
+                                    <hbox>
+                                        <property name="name">
+                                            <cstring>unnamed</cstring>
+                                        </property>
+                                        <property name="margin">
+                                            <number>0</number>
+                                        </property>
+                                        <property name="spacing">
+                                            <number>6</number>
+                                        </property>
+                                        <spacer>
+                                            <property name="name">
+                                                <cstring>Horizontal Spacing2</cstring>
+                                            </property>
+                                            <property name="orientation">
+                                                <enum>Horizontal</enum>
+                                            </property>
+                                            <property name="sizeType">
+                                                <enum>Expanding</enum>
+                                            </property>
+                                            <property name="sizeHint">
+                                                <size>
+                                                    <width>20</width>
+                                                    <height>0</height>
+                                                </size>
+                                            </property>
+                                        </spacer>
+                                        <widget class="QPushButton">
+                                            <property name="name">
+                                                <cstring>buttonOk</cstring>
+                                            </property>
+                                            <property name="text">
+                                                <string>Refine</string>
+                                            </property>
+                                            <property name="accel">
+                                                <string></string>
+                                            </property>
+                                            <property name="autoDefault">
+                                                <bool>true</bool>
+                                            </property>
+                                            <property name="default">
+                                                <bool>true</bool>
+                                            </property>
+                                        </widget>
+                                        <widget class="QPushButton">
+                                            <property name="name">
+                                                <cstring>buttonCancel</cstring>
+                                            </property>
+                                            <property name="text">
+                                                <string>&amp;Cancel</string>
+                                            </property>
+                                            <property name="accel">
+                                                <string></string>
+                                            </property>
+                                            <property name="autoDefault">
+                                                <bool>true</bool>
+                                            </property>
+                                        </widget>
+                                    </hbox>
+                                </widget>
+                            </vbox>
+                        </widget>
+                    </hbox>
+                </widget>
+            </vbox>
+        </widget>
+    </hbox>
+</widget>
+<images>
+    <image name="image0">
+        <data format="PNG" length="209">89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082</data>
+    </image>
+    <image name="image1">
+        <data format="PNG" length="461">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082</data>
+    </image>
+</images>
+<connections>
+    <connection>
+        <sender>NomFichier</sender>
+        <signal>returnPressed()</signal>
+        <receiver>HomardRaffi</receiver>
+        <slot>SetNomFichier()</slot>
+    </connection>
+    <connection>
+        <sender>buttonOk</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardRaffi</receiver>
+        <slot>Lancement()</slot>
+    </connection>
+    <connection>
+        <sender>buttonCancel</sender>
+        <signal>clicked()</signal>
+        <receiver>HomardRaffi</receiver>
+        <slot>close()</slot>
+    </connection>
+    <connection>
+        <sender>PushFichier</sender>
+        <signal>pressed()</signal>
+        <receiver>HomardRaffi</receiver>
+        <slot>PushNomFichier()</slot>
+    </connection>
+    <connection>
+        <sender>ListeMeshName</sender>
+        <signal>activated(const QString&amp;)</signal>
+        <receiver>HomardRaffi</receiver>
+        <slot>SetMaillage()</slot>
+    </connection>
+</connections>
+<slots>
+    <slot>Lancement()</slot>
+    <slot>SetNomFichier()</slot>
+    <slot>SetMaillage()</slot>
+    <slot>PushNomFichier()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/HOMARD_I/HOMARD_Boundary_i.cxx b/src/HOMARD_I/HOMARD_Boundary_i.cxx
new file mode 100644 (file)
index 0000000..aa3dbdf
--- /dev/null
@@ -0,0 +1,234 @@
+#include "HOMARD_Boundary_i.hxx"
+#include "HOMARD_Gen_i.hxx"
+#include "HOMARD_Boundary.hxx"
+#include "HOMARD_DriverTools.hxx"
+
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Boundary_i::HOMARD_Boundary_i()
+{
+  MESSAGE( "Default constructor, not for use" );
+  ASSERT( 0 );
+}
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Boundary_i::HOMARD_Boundary_i( CORBA::ORB_ptr orb,
+                             HOMARD::HOMARD_Gen_var engine )
+{
+  MESSAGE( "HOMARD_Boundary_i" );
+  _gen_i = engine;
+  _orb = orb;
+  myHomardBoundary = new ::HOMARD_Boundary();
+  ASSERT( myHomardBoundary );
+}
+//=============================================================================
+/*!
+ *  standard destructor
+ */
+//=============================================================================
+
+HOMARD_Boundary_i::~HOMARD_Boundary_i()
+{
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Boundary_i::SetName( const char* NomBoundary )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetName( NomBoundary );
+}
+
+//=============================================================================
+char* HOMARD_Boundary_i::GetName()
+{
+  ASSERT( myHomardBoundary );
+  return CORBA::string_dup( myHomardBoundary->GetName().c_str() );
+}
+
+//=============================================================================
+char* HOMARD_Boundary_i::GetDumpPython()
+{
+  ASSERT( myHomardBoundary );
+  return CORBA::string_dup( myHomardBoundary->GetDumpPython().c_str() );
+}
+
+
+//=============================================================================
+void HOMARD_Boundary_i::SetBoundaryType( CORBA::Long BoundaryType )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetBoundaryType( BoundaryType );
+}
+
+//=============================================================================
+CORBA::Long HOMARD_Boundary_i::GetBoundaryType()
+{
+  ASSERT( myHomardBoundary );
+  return  CORBA::Long( myHomardBoundary->GetBoundaryType() );
+}
+
+//=============================================================================
+void HOMARD_Boundary_i::SetMeshFile( const char* MeshFile )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetMeshFile( MeshFile );
+  _gen_i->PublishResultInSmesh(MeshFile, 0);
+}
+//=============================================================================
+char* HOMARD_Boundary_i::GetMeshFile()
+{
+  ASSERT( myHomardBoundary );
+  return CORBA::string_dup( myHomardBoundary->GetMeshFile().c_str() );
+}
+
+//=============================================================================
+void HOMARD_Boundary_i::SetMeshName( const char* MeshName )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetMeshName( MeshName );
+}
+
+//=============================================================================
+char* HOMARD_Boundary_i::GetMeshName()
+{
+  ASSERT( myHomardBoundary );
+  return CORBA::string_dup( myHomardBoundary->GetMeshName().c_str() );
+}
+
+
+//=============================================================================
+void HOMARD_Boundary_i::SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetCylinder( X0, X1, X2, X3, X4, X5, X6 );
+}
+
+//=============================================================================
+HOMARD::double_array* HOMARD_Boundary_i::GetCylinder()
+{
+  ASSERT( myHomardBoundary );
+  HOMARD::double_array_var aResult = new HOMARD::double_array();
+  std::vector<double> mesCoor = myHomardBoundary->GetCylinder();
+  aResult->length( mesCoor .size() );
+  std::vector<double>::const_iterator it;
+  int i = 0;
+  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
+    aResult[i++] = (*it);
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Boundary_i::SetSphere( double Xcentre, double Ycentre, double ZCentre, double rayon )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetSphere( Xcentre, Ycentre, ZCentre, rayon );
+}
+
+//=============================================================================
+HOMARD::double_array* HOMARD_Boundary_i::GetSphere()
+{
+  ASSERT( myHomardBoundary );
+  HOMARD::double_array_var aResult = new HOMARD::double_array();
+  std::vector<double> mesCoor = myHomardBoundary->GetSphere();
+  aResult->length( mesCoor .size() );
+  std::vector<double>::const_iterator it;
+  int i = 0;
+  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
+    aResult[i++] = (*it);
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Boundary_i::SetLimit( double Xincr, double Yincr, double Zincr )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetLimit( Xincr, Yincr, Zincr );
+}
+
+//=============================================================================
+HOMARD::double_array* HOMARD_Boundary_i::GetLimit()
+{
+  ASSERT( myHomardBoundary );
+  HOMARD::double_array_var aResult = new HOMARD::double_array();
+  std::vector<double> mesCoor = myHomardBoundary->GetLimit();
+  aResult->length( mesCoor .size() );
+  std::vector<double>::const_iterator it;
+  int i = 0;
+  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
+    aResult[i++] = (*it);
+  return aResult._retn();
+}
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Boundary_i::SetCaseCreation( const char* NomCaseCreation )
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetCaseCreation( NomCaseCreation );
+}
+
+//=============================================================================
+char* HOMARD_Boundary_i::GetCaseCreation()
+{
+  ASSERT( myHomardBoundary );
+  return CORBA::string_dup( myHomardBoundary->GetCaseCreation().c_str() );
+}
+//=============================================================================
+void HOMARD_Boundary_i::AddGroup( const char* Group)
+{
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->AddGroup( Group );
+}
+//=============================================================================
+void HOMARD_Boundary_i::SetGroups(const HOMARD::ListGroupType& ListGroup)
+{
+  ASSERT( myHomardBoundary );
+  std::list<std::string> ListString;
+  for ( int i = 0; i < ListGroup.length(); i++ )
+  {
+      ListString.push_back(std::string(ListGroup[i]));
+  }
+  myHomardBoundary->SetGroups( ListString );
+}
+//=============================================================================
+HOMARD::ListGroupType*  HOMARD_Boundary_i::GetGroups()
+{
+  ASSERT( myHomardBoundary );
+  const std::list<std::string>& ListString = myHomardBoundary->GetGroups();
+  HOMARD::ListGroupType_var aResult = new HOMARD::ListGroupType;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+
+
+
+//=============================================================================
+std::string HOMARD_Boundary_i::Dump() const
+{
+  return HOMARD::Dump( *myHomardBoundary );
+}
+
+//=============================================================================
+bool HOMARD_Boundary_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardBoundary, stream );
+}
diff --git a/src/HOMARD_I/HOMARD_Boundary_i.hxx b/src/HOMARD_I/HOMARD_Boundary_i.hxx
new file mode 100644 (file)
index 0000000..081753e
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef _HOMARD_Boundary_I_HXX_
+#define _HOMARD_Boundary_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HOMARD_Gen)
+#include CORBA_SERVER_HEADER(HOMARD_Boundary)
+
+#include <string>
+
+class HOMARD_Boundary;
+
+class HOMARD_Boundary_i: public virtual POA_HOMARD::HOMARD_Boundary,
+                         public virtual PortableServer::ServantBase
+{ 
+public:
+  HOMARD_Boundary_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i );
+  HOMARD_Boundary_i();
+  
+  virtual ~HOMARD_Boundary_i();
+
+  void                   SetName( const char* NomBoundary );
+  char*                  GetName();
+  char*                  GetDumpPython();
+  
+  void                   SetBoundaryType( CORBA::Long BoundaryType );
+  
+  CORBA::Long            GetBoundaryType();
+
+  void                   SetMeshFile( const char* MeshFile );
+  char*                  GetMeshFile();
+
+  void                   SetMeshName( const char* MeshName );
+  char*                  GetMeshName();
+  
+  HOMARD::double_array*  GetCylinder();
+  void                   SetCylinder( double Xcentre, double Ycentre, double ZCentre,
+                                      double Xaxe, double Yaxe, double Zaxe,
+                                      double rayon );
+  
+  HOMARD::double_array*  GetSphere();
+  void                   SetSphere( double Xcentre, double Ycentre, double ZCentre,
+                                    double rayon );
+  
+  HOMARD::double_array*  GetLimit();
+  void                   SetLimit( double Xincr, double Yincr, double Zincr);
+  
+  
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
+
+  void                   SetCaseCreation( const char* NomCaseCreation );
+  char*                  GetCaseCreation();
+
+  void                    AddGroup( const char* Group);
+  void                    SetGroups(const HOMARD::ListGroupType& ListGroup);
+  HOMARD::ListGroupType*  GetGroups();
+
+
+private:
+  ::HOMARD_Boundary*     myHomardBoundary;
+  
+  CORBA::ORB_ptr         _orb;
+  HOMARD::HOMARD_Gen_var _gen_i;
+};
+
+#endif
diff --git a/src/HOMARD_I/HOMARD_Cas_i.cxx b/src/HOMARD_I/HOMARD_Cas_i.cxx
new file mode 100755 (executable)
index 0000000..96dc2ea
--- /dev/null
@@ -0,0 +1,220 @@
+#include "HOMARD_Cas_i.hxx"
+#include "HOMARD_Gen_i.hxx"
+#include "HOMARD_Cas.hxx"
+#include "HOMARD_DriverTools.hxx"
+
+#include "utilities.h"
+#include <vector>
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Cas_i::HOMARD_Cas_i()
+{
+  MESSAGE( "Default constructor, not for use" );
+  ASSERT( 0 );
+}
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Cas_i::HOMARD_Cas_i( CORBA::ORB_ptr orb,
+                            HOMARD::HOMARD_Gen_var engine )
+{
+  MESSAGE( "HOMARD_Cas_i" );
+  _gen_i = engine;
+  _orb = orb;
+  myHomardCas = new ::HOMARD_Cas();
+  ASSERT( myHomardCas );
+}
+
+//=============================================================================
+/*!
+ *  standard destructor
+ */
+//=============================================================================
+HOMARD_Cas_i::~HOMARD_Cas_i()
+{
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Cas_i::SetDirName( const char* NomDir )
+{
+  ASSERT( myHomardCas );
+  myHomardCas->SetDirName( NomDir );
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Cas_i::SetName( const char* NomCas )
+{
+  ASSERT( myHomardCas );
+  myHomardCas->SetName( NomCas );
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+char* HOMARD_Cas_i::GetName()
+{
+  ASSERT( myHomardCas );
+  return CORBA::string_dup( myHomardCas->GetName().c_str() );
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+char* HOMARD_Cas_i::GetDumpPython()
+{
+  ASSERT( myHomardCas );
+  return CORBA::string_dup( myHomardCas->GetDumpPython().c_str() );
+}
+
+//=============================================================================
+char* HOMARD_Cas_i::GetDirName()
+{
+  ASSERT( myHomardCas );
+  return CORBA::string_dup( myHomardCas->GetDirName().c_str() );
+}
+
+//=============================================================================
+void HOMARD_Cas_i::SetConfType( CORBA::Long ConfType )
+{
+  ASSERT( myHomardCas );
+  myHomardCas->SetConfType( ConfType );
+}
+//=============================================================================
+CORBA::Long HOMARD_Cas_i::GetNumber()
+{
+  ASSERT( myHomardCas );
+  return myHomardCas->GetNumber();
+}
+
+//=============================================================================
+CORBA::Long HOMARD_Cas_i::GetConfType()
+{
+  ASSERT( myHomardCas );
+  return myHomardCas->GetConfType();
+}
+
+//=============================================================================
+void HOMARD_Cas_i::AddIteration( const char* NomIteration )
+{
+  ASSERT( myHomardCas );
+  myHomardCas->AddIteration( NomIteration );
+}
+
+//=============================================================================
+char* HOMARD_Cas_i::GetIter0Name()
+{
+  ASSERT( myHomardCas );
+  return CORBA::string_dup( myHomardCas->GetIter0Name().c_str() );
+}
+//=============================================================================
+HOMARD::extrema* HOMARD_Cas_i::GetBoundingBox()
+{
+  ASSERT(myHomardCas );
+  HOMARD::extrema_var aResult = new HOMARD::extrema();
+  std::vector<double> LesExtremes = myHomardCas->GetBoundingBox();
+  ASSERT( LesExtremes.size() == 10 );
+  aResult->length( 10 );
+  for ( int i = 0; i < LesExtremes.size(); i++ )
+  {
+    aResult[i] = LesExtremes[i];
+  }
+  return aResult._retn();
+}
+//=============================================================================
+void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema )
+{
+  ASSERT( myHomardCas );
+  std::vector<double> VExtrema;
+  ASSERT( LesExtrema.length() == 10 );
+  VExtrema.resize( LesExtrema.length() );
+  for ( int i = 0; i < LesExtrema.length(); i++ )
+  {
+    VExtrema[i] = LesExtrema[i];
+  }
+  
+  myHomardCas->SetBoundingBox( VExtrema );
+}
+//=============================================================================
+void HOMARD_Cas_i::AddGroup( const char* Group)
+{
+  ASSERT( myHomardCas );
+  myHomardCas->AddGroup( Group );
+}
+//=============================================================================
+void HOMARD_Cas_i::SetGroups( const HOMARD::ListGroupType& ListGroup )
+{
+  ASSERT( myHomardCas );
+  std::list<std::string> ListString ;
+  for ( int i = 0; i < ListGroup.length(); i++ )
+  {
+    ListString.push_back(std::string(ListGroup[i]));
+  }
+
+  myHomardCas->SetGroups( ListString );
+}
+//=============================================================================
+HOMARD::ListGroupType* HOMARD_Cas_i::GetGroups()
+{
+  ASSERT(myHomardCas );
+  const std::list<std::string>& ListString = myHomardCas->GetGroups();
+  HOMARD::ListGroupType_var aResult = new HOMARD::ListGroupType();
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Cas_i::AddBoundaryGroup( const char* Boundary, const char* Group)
+{
+  MESSAGE ("Dans AddBoundaryGroup");
+  ASSERT( myHomardCas );
+  myHomardCas->AddBoundaryGroup( Boundary, Group );
+}
+//=============================================================================
+HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup()
+{
+  MESSAGE ("Dans GetBoundaryGroup");
+  ASSERT(myHomardCas );
+  const std::list<std::string>& ListString = myHomardCas->GetBoundaryGroup();
+  HOMARD::ListBoundaryGroupType_var aResult = new HOMARD::ListBoundaryGroupType();
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+
+//=============================================================================
+std::string HOMARD_Cas_i::Dump() const
+{
+  return HOMARD::Dump( *myHomardCas );
+}
+
+//=============================================================================
+bool HOMARD_Cas_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardCas, stream );
+}
diff --git a/src/HOMARD_I/HOMARD_Cas_i.hxx b/src/HOMARD_I/HOMARD_Cas_i.hxx
new file mode 100644 (file)
index 0000000..fc19e9f
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef _HOMARD_CAS_I_HXX_
+#define _HOMARD_CAS_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HOMARD_Gen)
+#include CORBA_SERVER_HEADER(HOMARD_Cas)
+
+#include <string>
+
+class HOMARD_Cas;
+
+class HOMARD_Cas_i: public virtual POA_HOMARD::HOMARD_Cas,
+                   public virtual PortableServer::ServantBase
+{
+public:
+  HOMARD_Cas_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i );
+  HOMARD_Cas_i();
+
+  virtual ~HOMARD_Cas_i();
+
+  void                   SetDirName( const char* NomDir );
+  char*                  GetDirName();
+
+  void                   SetName( const char* NomCas );
+  char*                  GetName();
+
+  void                   SetConfType( CORBA::Long ConfType );
+  CORBA::Long            GetConfType();
+
+  void                   AddIteration( const char* NomIteration );
+  char*                  GetIter0Name();
+
+  HOMARD::extrema*       GetBoundingBox();
+  void                   SetBoundingBox( const HOMARD::extrema& LesExtremes );
+
+  HOMARD::ListGroupType* GetGroups();
+  void                   AddGroup( const char* Group);
+  void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
+
+  HOMARD::ListBoundaryGroupType*  GetBoundaryGroup();
+  void                   AddBoundaryGroup( const char* Boundary, const char* Group);
+
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
+
+  char *                GetDumpPython();
+  CORBA::Long            GetNumber();
+
+private:
+  ::HOMARD_Cas*          myHomardCas;
+
+  CORBA::ORB_ptr         _orb;
+  HOMARD::HOMARD_Gen_var _gen_i;
+};
+
+#endif
diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx
new file mode 100755 (executable)
index 0000000..cc2ac94
--- /dev/null
@@ -0,0 +1,2462 @@
+#include "HOMARD_Gen_i.hxx"
+#include "HOMARD_Cas_i.hxx"
+#include "HOMARD_Hypothesis_i.hxx"
+#include "HOMARD_Iteration_i.hxx"
+#include "HOMARD_Boundary_i.hxx"
+#include "HOMARD_Zone_i.hxx"
+#include "HomardDriver.hxx"
+#include "HOMARD_DriverTools.hxx"
+#include "HomardMedCommun.h"
+
+#include "utilities.h"
+#include "Utils_SINGLETON.hxx"
+#include "Utils_CorbaException.hxx"
+#include "SALOMEDS_Tool.hxx"
+#include "SALOME_LifeCycleCORBA.hxx"
+#include "SALOMEconfig.h"
+#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
+#include CORBA_CLIENT_HEADER(SMESH_Gen)
+
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <string>
+#include <iostream>
+#include <iomanip>
+#include <sys/stat.h>
+#include <set>
+#include <vector>
+#include <stdio.h>
+
+
+using  namespace std;
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Gen_i::HOMARD_Gen_i(CORBA::ORB_ptr orb,
+                          PortableServer::POA_ptr poa,
+                          PortableServer::ObjectId * contId, 
+                          const char *instanceName, 
+                          const char *interfaceName) :
+  Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
+{
+  MESSAGE("activate object");
+  _thisObj = this;
+  _id = _poa->activate_object(_thisObj);
+
+  myHomard = new ::HOMARD_Gen();
+  _NS = SINGLETON_<SALOME_NamingService>::Instance();
+  ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting());
+  _NS->init_orb(_orb);
+}
+
+//=================================
+/*!
+ *  standard destructor
+ */
+//================================
+HOMARD_Gen_i::~HOMARD_Gen_i()
+{
+}
+//=============================================================================
+/*!
+ *  Ajoute le composant homard dans l etude si necessaire 
+ */
+//=============================================================================
+void HOMARD_Gen_i::addInStudy(SALOMEDS::Study_ptr theStudy)
+{
+  ASSERT(!CORBA::is_nil(theStudy));
+  MESSAGE("addInStudy: current study ID = " << GetCurrentStudyID());
+  SALOMEDS::StudyBuilder_var myBuilder = theStudy->NewBuilder();
+  // Create SComponent labelled 'homard' if it doesn't already exit
+  SALOMEDS::SComponent_var homardFather = theStudy->FindComponent(ComponentDataType());
+  if (CORBA::is_nil(homardFather))
+  {
+    myBuilder->NewCommand();
+    MESSAGE("Add Component HOMARD");
+
+    bool aLocked = theStudy->GetProperties()->IsLocked();
+    if (aLocked) theStudy->GetProperties()->SetLocked(false);
+    
+    homardFather = myBuilder->NewComponent(ComponentDataType());
+    SALOMEDS::GenericAttribute_var anAttr = myBuilder->FindOrCreateAttribute(homardFather,"AttributeName");
+    SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
+    CORBA::Object_var objVarN = _NS->Resolve("/Kernel/ModulCatalog");
+    SALOME_ModuleCatalog::ModuleCatalog_var Catalogue = 
+                SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
+    SALOME_ModuleCatalog::Acomponent_var Comp = Catalogue->GetComponent(ComponentDataType());
+    if (!Comp->_is_nil()) 
+    {
+      aName->SetValue(ComponentDataType());
+    }
+
+    anAttr = myBuilder->FindOrCreateAttribute(homardFather,"AttributePixMap");
+    SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+    aPixmap->SetPixMap("HOMARD_2.png");
+    myBuilder->DefineComponentInstance(homardFather, HOMARD_Gen::_this());
+
+    if (aLocked) theStudy->GetProperties()->SetLocked(true);
+    myBuilder->CommitCommand();
+  }
+}
+
+//=============================================================================
+/*!
+ *
+ *  Set current study
+ */
+//=============================================================================
+void HOMARD_Gen_i::SetCurrentStudy(SALOMEDS::Study_ptr theStudy)
+{
+  MESSAGE("SetCurrentStudy: current study Id = " << GetCurrentStudyID());
+  myCurrentStudy = SALOMEDS::Study::_duplicate(theStudy);
+  this->addInStudy(myCurrentStudy);
+}
+
+//=============================================================================
+SALOMEDS::Study_ptr HOMARD_Gen_i::GetCurrentStudy()
+//=============================================================================
+{
+  MESSAGE("GetCurrentStudy: study Id = " << GetCurrentStudyID());
+  return SALOMEDS::Study::_duplicate(myCurrentStudy);
+}
+
+//=============================================================================
+int HOMARD_Gen_i::GetCurrentStudyID()
+//=============================================================================
+{
+  return myCurrentStudy->_is_nil() ? -1 : myCurrentStudy->StudyId();
+}
+
+//=============================================================================
+void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, const char* labelIter)
+{
+  MESSAGE( "AssociateCaseIter " << nomCas << " ," << nomIter << ","  << labelIter );
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  if (CORBA::is_nil(myCase))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Case ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
+  if (CORBA::is_nil(myIteration))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Case ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  SALOMEDS::SObject_var aCasSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myCase)));
+  if (CORBA::is_nil(aCasSO))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Case ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  aStudyBuilder->NewCommand();
+  SALOMEDS::SObject_var newStudyIter = aStudyBuilder->NewObject(aCasSO);
+  PublishInStudyAttr(aStudyBuilder, newStudyIter, nomIter , labelIter, 
+                     "iter_non_calculee.png", _orb->object_to_string(myIteration)) ;
+  aStudyBuilder->CommitCommand();
+
+  myCase->AddIteration(nomIter);
+  myIteration->SetCaseName(nomCas);
+}
+
+//=====================================================================================
+void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const bool EtatCalcul)
+//=====================================================================================
+{
+  MESSAGE( "SetEtatIter, nomIter  = " << nomIter << " etat " << EtatCalcul );
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
+  if (CORBA::is_nil(myIteration))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Iteration ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  myIteration->SetEtat(EtatCalcul);
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
+  if (CORBA::is_nil(myIteration))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Iteration ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  int number = myIteration->GetNumber() ;
+  if ( number == 0 )  
+      PublishInStudyAttr(aStudyBuilder, aIterSO, NULL , NULL, "iter0.png", NULL) ;
+  else if (EtatCalcul) 
+      PublishInStudyAttr(aStudyBuilder, aIterSO, NULL, NULL, "iter_calculee.png", NULL) ;
+  else                 
+      PublishInStudyAttr(aStudyBuilder, aIterSO, NULL, NULL, "iter_non_calculee.png", NULL) ;
+
+  aStudyBuilder->CommitCommand();
+
+}
+//=====================================================================================
+void HOMARD_Gen_i::InvalideZone(const char* ZoneName)
+//=====================================================================================
+{
+  MESSAGE( "InvalideZone, ZoneName    = " << ZoneName  );
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+  if (CORBA::is_nil(myZone))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Zone ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+  HOMARD::listeHypo* maListe = myZone->GetHypo();
+  int numberOfHypo = maListe->length();
+  for (int NumeHypo = 0; NumeHypo< numberOfHypo; NumeHypo++)
+  {
+      std::string nomHypo = std::string((*maListe)[NumeHypo]);
+      InvalideHypo(nomHypo.c_str());
+  }
+}
+//=====================================================================================
+void HOMARD_Gen_i::InvalideHypo(const char* nomHypo)
+//=====================================================================================
+{
+  MESSAGE( "InvalideHypo, nomHypo    = " << nomHypo  );
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
+  if (CORBA::is_nil(myHypo))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Hypothesis ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::listeIters* maListe = myHypo->GetIterations();
+  int numberOfIter = maListe->length();
+  for (int NumeIter = 0; NumeIter< numberOfIter; NumeIter++)
+  {
+      std::string nomIter = std::string((*maListe)[NumeIter]);
+      InvalideIter(nomIter.c_str());
+  }
+}
+//
+//=====================================================================================
+void HOMARD_Gen_i::InvalideIter(const char* nomIter)
+//=====================================================================================
+{
+  MESSAGE("InvalideIter, nomIter    = " << nomIter);
+  SetEtatIter(nomIter,false);
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
+  if (CORBA::is_nil(myIteration))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Iteration ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::listeIterFilles* maListe = myIteration->GetIterations();
+  int numberOfIter = maListe->length();
+  for (int NumeIter = 0; NumeIter< numberOfIter; NumeIter++)
+  {
+      std::string nomIterFille = std::string((*maListe)[NumeIter]);
+      InvalideIter(nomIterFille.c_str());
+  }
+
+  SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
+  SALOMEDS::ChildIterator_var  aIter = myCurrentStudy->NewChildIterator(aIterSO);
+  for (; aIter->More(); aIter->Next()) 
+  {
+      SALOMEDS::SObject_var so = aIter->Value();
+      SALOMEDS::GenericAttribute_var anAttr;
+      if (!so->FindAttribute(anAttr, "AttributeComment")) continue;
+      SALOMEDS::AttributeComment_var aCommentAttr = SALOMEDS::AttributeComment::_narrow(anAttr);
+      std::string value (aCommentAttr->Value());
+      if(value == std::string("HypoHomard")) continue;
+      SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+      aStudyBuilder->RemoveObject(so);
+  }
+  const char * nomCas = myIteration->GetCaseName();
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  if (CORBA::is_nil(myCase))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Case Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+  const char* dirParent  = myCase->GetDirName();
+  const char* nomDir     = myIteration->GetDirName();
+  const char* nomFichier = myIteration->GetMeshFile();
+  std::string commande= "rm -rf " + std::string(dirParent) + "/" + std::string(nomDir);
+  commande = commande + ";rm -rf " + std::string(nomFichier);
+  if ((system(commande.c_str())) != 0)
+  {
+        SALOME::ExceptionStruct es;
+        es.type = SALOME::BAD_PARAM;
+        es.text = "Menage du repertoire de calcul impossible" ;
+        throw SALOME::SALOME_Exception(es);
+        return ;
+  }
+// Suppression du maillage publie dans SMESH
+  const char* MeshName = myIteration->GetMeshName();
+  DeleteResultInSmesh(nomFichier, MeshName) ;
+}
+//
+//=====================================================================================
+void HOMARD_Gen_i::AssociateHypoZone(const char* ZoneName, const char* nomHypothesis)
+{
+  MESSAGE ( " AssociateHypoZone, ZoneName= " << ZoneName << ", nomHypo = " << nomHypothesis);
+
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis];
+  ASSERT(!CORBA::is_nil(myHypo));
+  SALOMEDS::SObject_var aHypoSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myHypo)));
+  ASSERT(!CORBA::is_nil(aHypoSO));
+
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+  ASSERT(!CORBA::is_nil(myZone));
+  SALOMEDS::SObject_var aZoneSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myZone)));
+  ASSERT(!CORBA::is_nil(aZoneSO));
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  aStudyBuilder->NewCommand();
+
+  SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aHypoSO);
+  aStudyBuilder->Addreference(aSubSO, aZoneSO);
+  aStudyBuilder->CommitCommand();
+
+  myZone->AddHypo(nomHypothesis);
+  myHypo->AddZone(ZoneName);
+};
+
+//=====================================================================================
+void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypothesis)
+{
+  MESSAGE ( " DissociateHypoZone, ZoneName= " << ZoneName << ", nomHypo = " << nomHypothesis);
+
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis];
+  ASSERT(!CORBA::is_nil(myHypo));
+  SALOMEDS::SObject_var aHypoSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myHypo)));
+  ASSERT(!CORBA::is_nil(aHypoSO));
+
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+  ASSERT(!CORBA::is_nil(myZone));
+  SALOMEDS::SObject_var aZoneSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myZone)));
+  ASSERT(!CORBA::is_nil(aZoneSO));
+
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+
+  SALOMEDS::ChildIterator_var it = myCurrentStudy->NewChildIterator(aHypoSO);
+  for (; it->More(); it->Next())
+  {
+    SALOMEDS::SObject_var aHypObj = it->Value();
+    SALOMEDS::SObject_var ptrObj;
+    if (aHypObj->ReferencedObject(ptrObj)) 
+    {
+      if (std::string(ptrObj->GetName()) == std::string(aZoneSO->GetName()))
+      {
+        aStudyBuilder->NewCommand();
+        aStudyBuilder->RemoveObject(aHypObj);
+        aStudyBuilder->CommitCommand();
+        break;
+      }
+    }
+  }
+
+  myZone->SupprHypo(nomHypothesis);
+  myHypo->SupprZone(ZoneName);
+};
+
+//=============================================================================
+void HOMARD_Gen_i::AssociateIterIter(const char* nomIterParent, const char* nomIter)
+{
+  MESSAGE ( "AssociateIterIter, nomIter       = " << nomIter << " nomIterParent = " << nomIterParent);
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent];
+  ASSERT(!CORBA::is_nil(myIterationParent));
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
+  ASSERT(!CORBA::is_nil(myIteration));
+
+  myIterationParent->AddIteration(nomIter);
+  myIteration->SetIterParent(nomIterParent);
+}
+
+//===================================================================================
+void HOMARD_Gen_i::AssociateIterHypo(const char* nomIter, const char* nomHypo)
+{
+  MESSAGE("AssociateIterHypo, nomHypo = " << nomHypo << " nomIter = " << nomIter);
+
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
+  ASSERT(!CORBA::is_nil(myHypo));
+  SALOMEDS::SObject_var aHypoSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myHypo)));
+  ASSERT(!CORBA::is_nil(aHypoSO));
+
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
+  ASSERT(!CORBA::is_nil(myIteration));
+  SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
+  ASSERT(!CORBA::is_nil(aIterSO));
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+
+  aStudyBuilder->NewCommand();
+
+  SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aIterSO);
+  aStudyBuilder->Addreference(aSubSO, aHypoSO);
+
+  aStudyBuilder->CommitCommand();
+  
+  myIteration->SetHypoName(nomHypo);
+  myHypo->AddIteration(nomIter);
+};
+
+//=============================================================================
+CORBA::Boolean HOMARD_Gen_i::VerifieDir(const char* nomDir)
+{
+  std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it;
+  for (it  = myContextMap[GetCurrentStudyID()]._mesCas.begin();
+       it != myContextMap[GetCurrentStudyID()]._mesCas.end(); it++)
+  {
+   if (std::string(nomDir) == std::string(it->second->GetDirName())) return false;
+  }
+  return true;
+}
+
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* MeshName, const char* FileName)
+{
+  MESSAGE ( "CreateCase, nomCas   = " << nomCas << "MeshName = " << MeshName );
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  if ((myContextMap[GetCurrentStudyID()]._mesCas).find(nomCas)!=(myContextMap[GetCurrentStudyID()]._mesCas).end())
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "This case has already been defined";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Cas_var myCase = newCase();
+  myCase->SetName(nomCas);
+  SALOMEDS::SObject_var aSO;
+  PublishInStudy(myCurrentStudy, aSO, myCase, nomCas);
+  myContextMap[GetCurrentStudyID()]._mesCas[nomCas] = myCase;
+
+
+  std::vector<double> LesExtremes =GetBoundingBoxInMedFile(FileName);
+  HOMARD::extrema_var aSeq = new HOMARD::extrema();
+  if (LesExtremes.size()!=10) { return false; } 
+  aSeq->length(10);
+  for (int i =0; i< LesExtremes.size(); i++)
+       aSeq[i]=LesExtremes[i];
+  myCase->SetBoundingBox(aSeq);
+
+  std::set<std::string> LesGroupes  =GetListeGroupesInMedFile(FileName);
+  HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType;
+  aSeqGroupe->length(LesGroupes.size());
+  std::set<std::string>::const_iterator it;
+  int i = 0;
+  for (it=LesGroupes.begin() ; it != LesGroupes.end(); it++)
+     aSeqGroupe[i++]=(*it).c_str();
+  myCase->SetGroups(aSeqGroupe);
+
+// Recherche d'un nom pour l'iteration 0. Par defaut, on prend le nom
+// du maillage du cas. Si ce nom existe deja, on incremente avec 0, 1, 2, etc.
+  int monNum=0;
+  std::string nomIter = std::string(MeshName) ;
+  while ((myContextMap[GetCurrentStudyID()]._mesIterations).find(nomIter) != (myContextMap[GetCurrentStudyID()]._mesIterations.end()))
+  {
+     std::ostringstream nom;
+     nom << MeshName << monNum;
+     nomIter=nom.str();
+     monNum = monNum+1;
+  }
+
+  HOMARD::HOMARD_Iteration_var anIter = newIteration();
+  myContextMap[GetCurrentStudyID()]._mesIterations[nomIter] = anIter;
+  std::ostringstream DirName;
+  DirName << "I_00";
+
+  anIter->SetDirName(DirName.str().c_str());
+  anIter->SetName(nomIter.c_str());
+  anIter->SetMeshFile(FileName);
+  anIter->SetMeshName(MeshName);
+  anIter->SetNumber(0);
+
+  AssociateCaseIter (nomCas,nomIter.c_str(),"IterationHomard");
+  SetEtatIter(nomIter.c_str(),true);
+//
+  PublishResultInSmesh(FileName, 0);
+
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
+
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::GetCas(const char* nomCas)
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  if (CORBA::is_nil(myCase))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Case";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
+
+//=============================================================================
+HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::GetZone(const char* ZoneName)
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+  ASSERT(!CORBA::is_nil(myZone));
+  return HOMARD::HOMARD_Zone::_duplicate(myZone);
+}
+
+//=============================================================================
+HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::GetHypothesis(const char* nomHypothesis)
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Hypothesis_var myHypothesis = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis];
+  ASSERT(!CORBA::is_nil(myHypothesis));
+  return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis);
+}
+
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr  HOMARD_Gen_i::GetIteration(const char* nomIteration)
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration];
+  ASSERT(!CORBA::is_nil(myIteration));
+  return HOMARD::HOMARD_Iteration::_duplicate(myIteration);
+}
+//=============================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::GetBoundary(const char* nomBoundary)
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[nomBoundary];
+  ASSERT(!CORBA::is_nil(myBoundary));
+  return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
+}
+
+//=============================================================================
+HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypothesis)
+{
+  MESSAGE ( "CreateHypothesis, nomHypothesis  = " << nomHypothesis );
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  if ((myContextMap[GetCurrentStudyID()]._mesHypotheses).find(nomHypothesis) != (myContextMap[GetCurrentStudyID()]._mesHypotheses).end())
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "This hypothesis is already defined.";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+    }
+
+  HOMARD::HOMARD_Hypothesis_var myHypothesis = newHypothesis();
+  myHypothesis->SetName(nomHypothesis);
+  myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis] = myHypothesis;
+  SALOMEDS::SObject_var aSO;
+  PublishInStudy(myCurrentStudy, aSO, myHypothesis, nomHypothesis);
+
+  return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis);
+}
+
+//============================================================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIteration, const char* nomIterParent)
+//============================================================================================================
+{
+  MESSAGE ("CreateIteration, nomIteration  = " << nomIteration << "nomIterParent = " << nomIterParent);
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent];
+  if (CORBA::is_nil(myIterationParent))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "The parent iteration is not defined.";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  const char* nomCas = GetCaseName(nomIterParent);
+  MESSAGE ("CreateIteration, nomCas = " << nomCas);
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  if (CORBA::is_nil(myCase))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Case Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  if ((myContextMap[GetCurrentStudyID()]._mesIterations).find(nomIteration)!=(myContextMap[GetCurrentStudyID()]._mesIterations).end())
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "This iteration is already defined. ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+   HOMARD::HOMARD_Iteration_var myIteration = newIteration();
+   if (CORBA::is_nil(myIteration))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Unable to create Iteration ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+   myContextMap[GetCurrentStudyID()]._mesIterations[std::string(nomIteration)] = myIteration;
+   myIteration->SetName(nomIteration);
+   myIteration->SetMeshName(nomIteration);
+
+   int numero = myIterationParent->GetNumber() + 1;
+   myIteration->SetNumber(numero);
+
+// Nombre d'iterations deja connues pour le cas, permettant
+// la creation d'un sous-repertoire unique
+   int nbitercase = myCase->GetNumber();
+   std::ostringstream iaux ;
+   iaux << std::setw(2) << std::setfill('0') << nbitercase ;
+   std::stringstream DirName;
+   DirName << "I" << iaux.str();
+   myIteration->SetDirName(DirName.str().c_str());
+
+// Le nom du fichier du maillage MED est indice par le nombre d'iterations du cas.
+// Si on a une chaine unique depuis le depart, ce nombre est le meme que le
+// numero d'iteration dans la sucession : maill.01.med, maill.02.med, etc... C'est le
+// cas le plus frequent.
+// Si on a plusieurs branches, donc des iterations a meme niveau d'adaptation, utiliser
+// le nombre d'iterations du cas permet d'eviter les collisions.
+   std::stringstream FileName;
+   const char* nomDir = myCase->GetDirName();
+   FileName << nomDir << "/maill." << iaux.str() << ".med";
+   myIteration->SetMeshFile(FileName.str().c_str());
+
+// Association avec le cas et l'iteration precedente
+   std::string label = "IterationHomard_" + std::string(nomIterParent);
+   AssociateCaseIter(nomCas, nomIteration, label.c_str());
+   AssociateIterIter (nomIterParent,nomIteration);
+
+   return HOMARD::HOMARD_Iteration::_duplicate(myIteration);
+}
+
+
+//=============================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryName, CORBA::Long BoundaryType)
+{
+  MESSAGE ("BoundaryName  = " << BoundaryName << ", BoundaryType = " << BoundaryType);
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  if ((myContextMap[GetCurrentStudyID()]._mesBoundarys).find(BoundaryName)!=(myContextMap[GetCurrentStudyID()]._mesBoundarys).end())
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "This boundary has already been defined";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Boundary_var myBoundary = newBoundary();
+  myBoundary->SetName(BoundaryName);
+  myBoundary->SetBoundaryType(BoundaryType);
+
+  myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName] = myBoundary;
+
+  SALOMEDS::SObject_var aSO;
+  SALOMEDS::SObject_var aResultSO=PublishInStudy(myCurrentStudy, aSO, myBoundary, BoundaryName);
+
+// Limites par defaut pour initialiser en cas de lancement par python
+
+  return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
+}
+
+
+//=============================================================================
+HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZone(const char* ZoneName, CORBA::Long ZoneType)
+{
+  MESSAGE ("ZoneName  = " << ZoneName << ", ZoneType = " << ZoneType);
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  if ((myContextMap[GetCurrentStudyID()]._mesZones).find(ZoneName)!=(myContextMap[GetCurrentStudyID()]._mesZones).end())
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "This zone has already been defined";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Zone_var myZone = newZone();
+  myZone->SetName(ZoneName);
+  myZone->SetZoneType(ZoneType);
+
+  myContextMap[GetCurrentStudyID()]._mesZones[ZoneName] = myZone;
+
+  SALOMEDS::SObject_var aSO;
+  SALOMEDS::SObject_var aResultSO=PublishInStudy(myCurrentStudy, aSO, myZone, ZoneName);
+
+  return HOMARD::HOMARD_Zone::_duplicate(myZone);
+}
+
+//=============================================================================
+CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMenage)
+{
+  MESSAGE ( "Compute, calcul de " << nomIteration );
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration];
+  ASSERT(!CORBA::is_nil(myIteration));
+
+// on ne calcule pas l iteration 0 
+  int NumeIter = myIteration->GetNumber();
+  if ( NumeIter == 0 )
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "This iteration is the first of the case and cannot be computed.";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+// on verifie qu il y a une hypothese (erreur improbable);
+  const char* nomHypo = myIteration->GetHypoName();
+  if (std::string(nomHypo) == std::string(""))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      es.text= "This iteration  has no associated hypothese";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  }
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
+  ASSERT(!CORBA::is_nil(myHypo));
+
+
+
+  // A.4. L'iteration parent
+  const char* nomIterationParent = myIteration->GetIterParent();
+  HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterationParent];
+  ASSERT(!CORBA::is_nil(myIterationParent));
+  if ( ! myIterationParent->GetEtat() )
+  {
+      /*
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      std::string text = "The iteration cannot be computed because the previous iteration " + std::string(nomIterationParent) + " is not valid.";
+      es.text = CORBA::string_dup(text.c_str());
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+      */
+      Compute(nomIterationParent, etatMenage);
+  };
+
+  const char* nomCas = myIteration->GetCaseName();
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  ASSERT(!CORBA::is_nil(myCase));
+
+  int codret = 0;
+  std::stringstream saux0 ;
+  saux0 << NumeIter - 1 ;
+  std::string siter = saux0.str() ;
+  if (NumeIter < 11) { siter = "0" + siter ; }
+//
+  std::stringstream saux1 ;
+  saux1 << NumeIter ;
+  std::string siterp1 = saux1.str() ;
+  if (NumeIter < 10) { siterp1 = "0" + siterp1 ; }
+
+  // A.3. Hypothese associee
+  // B. Les repertoires
+  // B.1. Le repertoire du cas
+  const char* nomDir = myCase->GetDirName();
+  MESSAGE ( ". nomDir = " << nomDir );
+
+  // B.2. Le sous-repertoire de l'iteration a calculer, puis le repertoire complet a creer
+  // B.2.1. Le nom du sous-repertoire
+   const char* nomDirIt = myIteration->GetDirName();
+
+  // B.2.2. Le nom complet du sous-repertoire
+  std::stringstream DirCompute ;
+  DirCompute << nomDir << "/" << nomDirIt;
+  MESSAGE (". DirCompute = " << DirCompute.str() );
+
+  // B.2.3. Si le sous-repertoire n'existe pas, on le cree
+  //        Si le sous-repertoire existe :
+  //         etatMenage = 0 : on sort en erreur si le repertoire n'est pas vide
+  //         etatMenage = 1 : on fait le menage du repertoire
+  if (chdir(DirCompute.str().c_str()) != 0)
+  {
+//  Creation du repertoire car il n'existe pas :
+    if (mkdir(DirCompute.str().c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
+    {
+       // GERALD -- QMESSAGE BOX
+       std::cerr << "Pb Creation du repertoire DirCompute = " << DirCompute.str() << std::endl;
+       ASSERT("Pb a la creation du repertoire" == 0);
+    }
+  }
+  else
+  {
+//  Le repertoire existe et on fait le menage de son contenu :
+    if (etatMenage != 0)
+    {
+       MESSAGE (". Menage du repertoire DirCompute = " << DirCompute.str());
+       std::string commande= "rm -rf " + DirCompute.str()+"/*" ;
+       int codret = system(commande.c_str());
+       if (codret != 0)
+       {
+         // GERALD -- QMESSAGE BOX
+         std::cerr << ". Menage du repertoire de calcul" << DirCompute.str() << std::endl;
+         ASSERT("Pb au menage du repertoire de calcul" == 0);
+       }
+    }
+    else
+    {
+//  Le repertoire existe et s'il n'est pas vide, on sort en erreur :
+       DIR *dp;
+       struct dirent *dirp;
+       dp  = opendir(DirCompute.str().c_str());
+       bool result = true;
+       while ((dirp = readdir(dp)) != NULL && result )
+       {
+            std::string file_name(dirp->d_name);
+            result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false
+       }
+       closedir(dp);
+       if ( result == false)
+       {
+          SALOME::ExceptionStruct es;
+          es.type = SALOME::BAD_PARAM;
+          std::string text = "Directory : " + DirCompute.str() + "is not empty";
+          es.text = CORBA::string_dup(text.c_str());
+          throw SALOME::SALOME_Exception(es);
+          return false;
+       }
+    }
+  }
+
+  // B.3. Le sous-repertoire de l'iteration precedente
+  const char* nomDirItPa ;
+  std::stringstream DirComputePa ;
+  if (NumeIter == 1)
+  {
+    nomDirItPa = nomDirIt;
+    DirComputePa << DirCompute.str();
+  }
+  else
+  {
+    nomDirItPa = myIterationParent->GetDirName();
+    DirComputePa << nomDir << "/" << nomDirItPa;
+  }
+  MESSAGE( ". nomDirItPa = " << nomDirItPa);
+  MESSAGE( ". DirComputePa = " << DirComputePa.str() );
+
+  // B.4. Le fichier des messages
+  chdir(DirCompute.str().c_str()) ;
+  std::string MessFile = DirCompute.str() + "/Liste." + siter + ".vers." + siterp1 ;
+  MESSAGE (". MessFile = " << MessFile);
+  myIteration->SetMessFile(MessFile.c_str());
+
+   // C. On passe dans le repertoire de l'iteration a calculer
+  chdir(DirCompute.str().c_str()) ;
+
+  // D. Les donnees du calcul HOMARD
+  // D.1. Le type de conformite
+  int ConfType = myCase->GetConfType();
+  MESSAGE ( ". ConfType = " << ConfType );
+
+  // D.2. Le maillage n
+  const char* NomMeshParent = myIterationParent->GetMeshName();
+  MESSAGE ( ". NomMeshParent = " << NomMeshParent );
+  const char* MeshFileParent = myIterationParent->GetMeshFile();
+  MESSAGE ( ". MeshFileParent = " << MeshFileParent );
+
+  // D.3. Le maillage n+1
+  const char* NomMesh = myIteration->GetMeshName();
+  MESSAGE ( ". NomMesh = " << NomMesh );
+  const char* MeshFile = myIteration->GetMeshFile();
+  MESSAGE ( ". MeshFile = " << MeshFile );
+  FILE *file = fopen(MeshFile,"r");
+  if (file != NULL)
+  {
+     fclose(file);
+     if (etatMenage == 0)
+     {
+          SALOME::ExceptionStruct es;
+          es.type = SALOME::BAD_PARAM;
+          std::string text = "MeshFile : " + std::string(MeshFile) + " already exists ";
+          es.text = CORBA::string_dup(text.c_str());
+          throw SALOME::SALOME_Exception(es);
+          return false;
+     }
+     else
+     {
+         std::string commande = "rm -f " + std::string(MeshFile);
+         codret = system(commande.c_str());
+         if (codret != 0)
+         {
+          SALOME::ExceptionStruct es;
+          es.type = SALOME::BAD_PARAM;
+          std::string text = "PB with meshfile destruction ";
+          es.text = CORBA::string_dup(text.c_str());
+          throw SALOME::SALOME_Exception(es);
+          return false;
+         }
+      }
+  }
+  else
+  {
+     codret = 0 ;
+  };
+
+  // D.4. Les types de raffinement et de deraffinement
+  // Les appels corba sont lourds, il vaut mieux les grouper
+  HOMARD::listeTypes* ListTypes = myHypo->GetAdapRefinUnRef();
+  ASSERT(ListTypes->length() == 3);
+  int TypeAdap = (*ListTypes)[0];
+  int TypeRaff = (*ListTypes)[1];
+  int TypeDera = (*ListTypes)[2];
+
+  // D.6. L'option d'interpolation des champs
+  int TypeFieldInterp = myHypo->GetTypeFieldInterp();
+
+  // E. Texte du fichier de configuration
+  // E.1. Incontournables du texte
+  HomardDriver* myDriver = new HomardDriver(siter, siterp1);
+  myDriver->TexteInit(DirCompute.str(), DirComputePa.str(),MessFile);
+  myDriver->TexteMaillage(NomMeshParent, MeshFileParent, 0);
+  myDriver->TexteMaillage(NomMesh, MeshFile, 1);
+  myDriver->TexteConfRaffDera(ConfType, TypeAdap, TypeRaff, TypeDera);
+
+  // E.2. Ajout des informations liees aux zones eventuelles
+  if (TypeAdap == 0)
+  {
+    HOMARD::listeZonesHypo* ListZone = myHypo->GetZones();
+    int numberOfZones = ListZone->length();
+
+    for (int NumZone = 0; NumZone< numberOfZones; NumZone++)
+    {
+      std::string ZoneName = std::string((*ListZone)[NumZone]);
+      MESSAGE ( "... ZoneName = " << ZoneName);
+      HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+      ASSERT(!CORBA::is_nil(myZone));
+
+      int ZoneType = myZone->GetZoneType();
+      MESSAGE ( "... ZoneType = " << ZoneType);
+      if (ZoneType == 2) // Cas d un parallelepipede
+      {
+        HOMARD::double_array* zone = myZone->GetBox();
+        myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5]);
+      }
+      else if (ZoneType == 4) // Cas d une sphere
+      {
+        HOMARD::double_array* zone = myZone->GetSphere();
+        myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], 0., 0.);
+      }
+    }
+  }
+  // E.3. Ajout des informations liees aux champs eventuels
+  if (TypeAdap == 1)
+  {
+//  Le fichier du champ
+    char* FieldFile = myIteration->GetFieldFile();
+    MESSAGE ( ". FieldFile = " << FieldFile );
+    if (strlen(FieldFile) == 0)
+    {
+      // GERALD -- QMESSAGE BOX
+      std::cerr << "Le fichier du champ n'a pas ete fourni." << std::endl;
+      ASSERT("The file for the field is not given." == 0);
+    }
+//  Les caracteristiques d'instants
+    int TimeStep = myIteration->GetTimeStep();
+    MESSAGE( ". TimeStep = " << TimeStep );
+    int Rank = myIteration->GetRank();
+    MESSAGE( ". Rank = " << Rank );
+//  Les informations sur les champ
+    HOMARD::InfosHypo* aInfosHypo = myHypo->GetField();
+//  Le nom
+    const char* FieldName = aInfosHypo->FieldName;
+//  Les seuils
+    int TypeThR = aInfosHypo->TypeThR;
+    double ThreshR = aInfosHypo->ThreshR;
+    int TypeThC = aInfosHypo->TypeThC;
+    double ThreshC = aInfosHypo->ThreshC;
+//  L'usage des composantes
+    int UsCmpI = aInfosHypo->UsCmpI;
+    MESSAGE( ". UsCmpI = " << UsCmpI );
+//
+    myDriver->TexteField(FieldName, FieldFile, TimeStep, Rank, TypeThR, ThreshR, TypeThC, ThreshC, UsCmpI);
+//
+//  Les composantes
+    HOMARD::listeComposantsHypo* mescompo = myHypo->GetListComp();
+    int numberOfCompos = mescompo->length();
+    MESSAGE( ". numberOfCompos = " << numberOfCompos );
+    for (int NumeComp = 0; NumeComp< numberOfCompos; NumeComp++)
+    {
+      std::string nomCompo = std::string((*mescompo)[NumeComp]);
+      MESSAGE( "... nomCompo = " << nomCompo );
+      myDriver->TexteCompo(NumeComp, nomCompo);
+    }
+  }
+  // E.4. Ajout des informations liees au filtrage eventuel par les groupes
+  HOMARD::ListGroupType* listeGroupes = myHypo->GetGroups();
+  int numberOfGroups = listeGroupes->length();
+  MESSAGE( ". numberOfGroups = " << numberOfGroups );
+  if (numberOfGroups > 0)
+  {
+
+    for (int NumGroup = 0; NumGroup< numberOfGroups; NumGroup++)
+    {
+      std::string GroupName = std::string((*listeGroupes)[NumGroup]);
+      MESSAGE( "... GroupName = " << GroupName );
+      myDriver->TexteGroup(GroupName);
+    }
+  }
+
+  // E.5. Ajout des informations liees a l'eventuel suivi de frontiere
+  HOMARD::ListBoundaryGroupType* ListBoundaryGroupType = myCase->GetBoundaryGroup();
+  int numberOfitems = ListBoundaryGroupType->length();
+  MESSAGE ( "... number of string for Boundary+Group = " << numberOfitems);
+  int BoundaryOption = 1 ;
+  int NumBoundaryAnalytical = 0 ;
+  for (int NumBoundary = 0; NumBoundary< numberOfitems; NumBoundary=NumBoundary+2)
+  {
+    std::string BoundaryName = std::string((*ListBoundaryGroupType)[NumBoundary]);
+    MESSAGE ( "... BoundaryName = " << BoundaryName);
+    HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName];
+    ASSERT(!CORBA::is_nil(myBoundary));
+    std::string GroupName = std::string((*ListBoundaryGroupType)[NumBoundary+1]);
+    MESSAGE ( "... GroupName = " << GroupName);
+
+    int BoundaryType = myBoundary->GetBoundaryType();
+    MESSAGE ( "... BoundaryType = " << BoundaryType );
+    if (BoundaryType == 0) // Cas d une frontiere discrete
+    {
+      const char* MeshName = myBoundary->GetMeshName() ;
+      const char* MeshFile = myBoundary->GetMeshFile() ;
+      myDriver->TexteBoundaryDi( MeshName, MeshFile);
+      BoundaryOption = BoundaryOption*2 ;
+    }
+    else if (BoundaryType == 1) // Cas d un cylindre
+    {
+      NumBoundaryAnalytical++ ;
+      HOMARD::double_array* coor = myBoundary->GetCylinder();
+      myDriver->TexteBoundaryAn(NumBoundaryAnalytical, BoundaryType, GroupName, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], (*coor)[4], (*coor)[5], (*coor)[6]);
+      BoundaryOption = BoundaryOption*3 ;
+    }
+    else if (BoundaryType == 2) // Cas d une sphere
+    {
+      NumBoundaryAnalytical++ ;
+      HOMARD::double_array* coor = myBoundary->GetSphere();
+      myDriver->TexteBoundaryAn(NumBoundaryAnalytical, BoundaryType, GroupName, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], 0., 0., 0.);
+      BoundaryOption = BoundaryOption*3 ;
+    }
+  }
+  myDriver->TexteBoundaryOption(BoundaryOption);
+
+  // E.6. Ajout des informations liees a l'eventuelle interpolation des champs
+  MESSAGE( "... TypeFieldInterp = " << TypeFieldInterp );
+  if (TypeFieldInterp != 0)
+  {
+//  Le fichier des champs
+    char* FieldFile = myIteration->GetFieldFile();
+    MESSAGE ( ". FieldFile = " << FieldFile );
+    if (strlen(FieldFile) == 0)
+    {
+      // GERALD -- QMESSAGE BOX
+      std::cerr << "Le fichier du champ n'a pas ete fourni." << std::endl;
+      ASSERT("The file for the field is not given." == 0);
+    }
+//  Les caracteristiques d'instants
+    int TimeStep = myIteration->GetTimeStep();
+    MESSAGE( ". TimeStep = " << TimeStep );
+    int Rank = myIteration->GetRank();
+    MESSAGE( ". Rank = " << Rank );
+//
+    myDriver->TexteFieldInterp(TypeFieldInterp, FieldFile, MeshFile, TimeStep, Rank);
+//  Les champs
+    if (TypeFieldInterp == 2)
+    {
+      HOMARD::listFieldInterpHypo* meschamps = myHypo->GetListFieldInterp();
+      int numberOfFields = meschamps->length();
+      MESSAGE( ". numberOfFields = " << numberOfFields );
+      for (int NumeChamp = 0; NumeChamp< numberOfFields; NumeChamp++)
+      {
+        std::string nomChamp = std::string((*meschamps)[NumeChamp]);
+        MESSAGE( "... nomChamp = " << nomChamp );
+        myDriver->TexteFieldInterpName(NumeChamp, nomChamp);
+      }
+    }
+  }
+
+  // F. Ecriture du texte dans le fichier
+  if (codret == 0)
+  {
+    myDriver->CreeFichier();
+  }
+
+// G. Execution
+//
+  int codretexec = 1 ;
+  if (codret == 0)
+  {
+    codretexec = myDriver->ExecuteHomard();
+//
+    if (codretexec == 0)
+    {
+      SetEtatIter(nomIteration,true);
+    }
+    else
+    {
+      // GERALD -- QMESSAGE BOX
+      SetEtatIter(nomIteration,false);
+    }
+  }
+
+  // H. Gestion des resultats
+  if (codret == 0)
+  {
+    // H.1. Le fichier des messages, dans tous les cas
+    std::stringstream saux1 ;
+    saux1 << "Mess " << NumeIter ;
+    PublishFileUnderIteration(nomIteration, MessFile.c_str(), saux1.str().c_str());
+
+    // H.2. Si tout s'est bien passe :
+    if (codretexec == 0)
+    {
+    // H.2.1. Le fichier de bilan
+      std::stringstream saux2 ;
+      saux2 << "Summary " << NumeIter ;
+      std::string SummaryFile = DirCompute.str() + "/apad." + siterp1 + ".bilan" ;
+      PublishFileUnderIteration(nomIteration, SummaryFile.c_str(), saux2.str().c_str());
+    // H.2.2. Le fichier de  maillage obtenu
+      std::stringstream saux0 ;
+      saux0 <<"Iteration " << NumeIter ;
+      PublishFileUnderIteration(nomIteration, MeshFile, saux0.str().c_str());
+      PublishResultInSmesh(MeshFile, 1);
+    }
+  // H.3 Message d'erreur en cas de probleme
+    else
+    {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      std::string text = "Error during the adaptation.\n" ;
+      try 
+      {
+          ifstream fichier(MessFile.c_str(), ios::in);
+          string ligne;
+          while(getline(fichier, ligne) and (ligne != "===== HOMARD ===== STOP ====="));
+          while (getline(fichier, ligne)) { text += ligne+ "\n";};
+      }
+      catch (...) {
+        text += "no log file ....";
+      }
+      es.text = CORBA::string_dup(text.c_str());
+      throw SALOME::SALOME_Exception(es);
+    }
+  }
+
+  // I. Menage
+  if (codret == 0)
+  {
+    delete myDriver;
+  }
+  //
+  if (codret == 0) { return true; }
+  else { return false; }
+}
+
+//===========================================================================
+SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
+                                                   SALOMEDS::SObject_ptr theSObject,
+                                                   CORBA::Object_ptr theObject,
+                                                   const char* theName)
+{
+  MESSAGE("PublishInStudy pour " << theName);
+  SALOMEDS::SObject_var aResultSO;
+  if (CORBA::is_nil(theStudy))
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid Study Context ";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
+  };
+
+// Recuperation de l'objet correspondant, en essayant chacun des types possibles
+// Rq : Iteration est publiee ailleurs
+  HOMARD::HOMARD_Cas_var        aCase  = HOMARD::HOMARD_Cas::_narrow(theObject);
+  HOMARD::HOMARD_Hypothesis_var aHypo = HOMARD::HOMARD_Hypothesis::_narrow(theObject);
+  HOMARD::HOMARD_Zone_var       aZone = HOMARD::HOMARD_Zone::_narrow(theObject);
+  HOMARD::HOMARD_Boundary_var   aBoundary = HOMARD::HOMARD_Boundary::_narrow(theObject);
+
+   addInStudy(theStudy);
+
+// Controle de la non publication d'un objet de meme nom
+   if ((!aHypo->_is_nil()) or (!aZone->_is_nil()) or (!aBoundary->_is_nil()))
+    {
+         SALOMEDS::Study::ListOfSObject_var listSO = theStudy->FindObjectByName(theName, ComponentDataType());
+         if (listSO->length() >= 1)
+         {
+             MESSAGE("This name "<<theName<<" is already used "<<listSO->length()<<" time(s)");
+             std::cerr <<"This name "<<theName<<" is already used "<<listSO->length()<<" time(s)" << std::endl;
+             aResultSO = listSO[0];
+             return aResultSO._retn();
+         }
+    }
+
+  // Caracteristiques de l'etude
+    SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
+    aStudyBuilder->NewCommand();
+     if(!aCase->_is_nil())
+        aResultSO = PublishCaseInStudy(theStudy, aStudyBuilder, aCase, theName);
+     else if(!aHypo->_is_nil())
+        aResultSO = PublishHypotheseInStudy(theStudy, aStudyBuilder, aHypo, theName);
+     else if(!aZone->_is_nil())
+        aResultSO = PublishZoneInStudy(theStudy, aStudyBuilder, aZone, theName);
+     else if(!aBoundary->_is_nil())
+        aResultSO = PublishBoundaryInStudy(theStudy, aStudyBuilder, aBoundary, theName);
+
+    aStudyBuilder->CommitCommand();
+  return aResultSO._retn();
+};
+//=============================================================================
+SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishCaseInStudy(SALOMEDS::Study_ptr theStudy, 
+                                                       SALOMEDS::StudyBuilder_var aStudyBuilder,
+                                                       HOMARD::HOMARD_Cas_ptr theObject, const char* theName)
+{
+  MESSAGE("PublishCaseInStudy pour "<<theName);
+  SALOMEDS::SObject_var aResultSO;
+  SALOMEDS::GenericAttribute_var anAttr;
+
+  if (CORBA::is_nil(theObject)) {
+    MESSAGE("HOMARD_Gen_i.cxx::theObject->_is_nil()");
+    return aResultSO._retn();
+  }
+  if (theStudy->_is_nil()) {
+    MESSAGE("HOMARD_Gen_i.cxx::theStudy->_is_nil()");
+    return aResultSO._retn();
+  }
+
+  SALOMEDS::SComponent_var theFatherHomard = theStudy->FindComponent(ComponentDataType());
+  if (theFatherHomard->_is_nil()) 
+  {
+    MESSAGE("theFatherHomard->_is_nil()");      
+    return aResultSO._retn();
+  }
+
+  aResultSO = aStudyBuilder->NewObject(theFatherHomard);
+  PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "CasHomard", "cas_calcule.png", 
+                     _orb->object_to_string(theObject) ) ;
+  return aResultSO._retn();
+}
+
+//=============================================================================
+SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theStudy, 
+                    SALOMEDS::StudyBuilder_var aStudyBuilder,
+                   HOMARD::HOMARD_Zone_ptr theObject, const char* theName)
+{
+  MESSAGE("PublishZoneStudy pour "<<theName);
+  SALOMEDS::SObject_var aResultSO;
+  SALOMEDS::GenericAttribute_var anAttr;
+
+  if (CORBA::is_nil(theObject)) 
+  {
+    MESSAGE("HOMARD_Gen_i.cxx::theObject->_is_nil()");
+    return aResultSO._retn();
+  }
+  if (theStudy->_is_nil()) 
+  {
+    MESSAGE("HOMARD_Gen_i.cxx::theStudy->_is_nil()");
+    return aResultSO._retn();
+  }
+  SALOMEDS::SComponent_var theFatherHomard = theStudy->FindComponent(ComponentDataType());
+  if (theFatherHomard->_is_nil()) 
+  {
+    MESSAGE("theFatherHomard->_is_nil()");
+    return aResultSO._retn();
+  }
+
+  // Caracteristique de la zone
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[theName];
+  CORBA::Long ZoneType = myZone->GetZoneType();
+
+  // On ajoute la categorie des zones dans l etude si necessaire
+  SALOMEDS::SObject_var aSOZone;
+  if (!theFatherHomard->FindSubObject(100, aSOZone))
+  {
+    aSOZone = aStudyBuilder->NewObjectToTag(theFatherHomard, 100);
+    PublishInStudyAttr(aStudyBuilder, aSOZone, "Zones", "ZoneList", "zone_icone_2.png", NULL ) ;
+  }
+
+  aResultSO = aStudyBuilder->NewObject(aSOZone);
+  switch (ZoneType)
+  {
+    case 2 :
+    { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", 
+      "boxdxyz_2.png", _orb->object_to_string(theObject) ) ;
+      break; 
+    }
+    case 4 :
+    { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", 
+     "spherepoint_2.png", _orb->object_to_string(theObject) ) ;
+      break; 
+    }
+  }
+  return aResultSO._retn();
+}
+//=============================================================================
+SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr theStudy, 
+                   SALOMEDS::StudyBuilder_var aStudyBuilder,
+                   HOMARD::HOMARD_Boundary_ptr theObject, const char* theName)
+{
+  MESSAGE("PublishBoundaryStudy pour "<<theName);
+  SALOMEDS::SObject_var aResultSO;
+  SALOMEDS::GenericAttribute_var anAttr;
+
+  // Caracteristique de la Boundary
+  HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[theName];
+
+  // On recupere le module pere dans l etude
+  SALOMEDS::SComponent_var       theFatherHomard = theStudy->FindComponent(ComponentDataType());
+  if (theFatherHomard->_is_nil())
+  {
+    MESSAGE("theFatherHomard->_is_nil()");
+    return aResultSO._retn();
+  }
+
+  // On ajoute la categorie des boundarys dans l etude si necessaire
+  SALOMEDS::SObject_var aSOBoundary;
+  if (!theFatherHomard->FindSubObject(101, aSOBoundary))
+  {
+    aSOBoundary = aStudyBuilder->NewObjectToTag(theFatherHomard, 101);
+    PublishInStudyAttr(aStudyBuilder, aSOBoundary, "Boundaries", "BoundList", "zone_icone_2.png", NULL ) ;
+  }
+
+  aResultSO = aStudyBuilder->NewObject(aSOBoundary);
+  CORBA::Long BoundaryType = myBoundary->GetBoundaryType();
+  switch (BoundaryType)
+  {
+    case 0 :
+    { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "BoundaryDiHomard", "mesh_tree_mesh.png",
+                          _orb->object_to_string(theObject));
+      break; 
+    }
+    case 1 :
+    { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "BoundaryAnHomard", "cylinderpointvector_2.png", 
+                          _orb->object_to_string(theObject));
+      break; 
+    }
+    case 2 :
+    { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "BoundaryAnHomard", "spherepoint_2.png", 
+                          _orb->object_to_string(theObject));
+      break; 
+    }
+  }
+  return aResultSO._retn();
+}
+
+//=============================================================================
+SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr theStudy, 
+                   SALOMEDS::StudyBuilder_var aStudyBuilder,
+                   HOMARD::HOMARD_Hypothesis_ptr theObject, const char* theName)
+{
+  MESSAGE("PublishHypotheseInStudy pour "<<theName);
+  SALOMEDS::SObject_var aResultSO;
+  SALOMEDS::GenericAttribute_var anAttr;
+
+  // On recupere le module pere dans l etude
+  // On ajoute la categorie des hypotheses dans l etude si necessaire
+  SALOMEDS::SComponent_var theFatherHomard = theStudy->FindComponent(ComponentDataType());
+  if (theFatherHomard->_is_nil()) 
+  {
+    MESSAGE("theFatherHomard->_is_nil()");
+    return aResultSO._retn();
+  }
+  SALOMEDS::SObject_var aSOHypothese;
+  if (!theFatherHomard->FindSubObject(0, aSOHypothese))
+  {
+    aSOHypothese = aStudyBuilder->NewObjectToTag(theFatherHomard, 0);
+    PublishInStudyAttr(aStudyBuilder, aSOHypothese, "Hypothesis", "HypoList","hypotheses.png", NULL);
+  }
+
+// Creation du resultat dans l'etude
+  aResultSO = aStudyBuilder->NewObject(aSOHypothese);
+  PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "HypoHomard", NULL, _orb->object_to_string(theObject) ) ;
+
+  return aResultSO._retn();
+}
+//===========================================================================
+void HOMARD_Gen_i::PublishInStudyAttr(SALOMEDS::StudyBuilder_var aStudyBuilder,
+                                      SALOMEDS::SObject_var aResultSO,
+                                      const char* name, const char* value, const char* icone, const char* ior)
+{
+  SALOMEDS::GenericAttribute_var anAttr ;
+//  Ajout du nom
+  if ( name != NULL )
+  {
+    anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeName");
+    SALOMEDS::AttributeName_var aNameAttrib = SALOMEDS::AttributeName::_narrow(anAttr);
+    aNameAttrib->SetValue(name);
+  }
+
+//  Ajout du commentaire
+  if ( value != NULL )
+  {
+    anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeComment");
+    SALOMEDS::AttributeComment_var aCommentAttrib = SALOMEDS::AttributeComment::_narrow(anAttr);
+    aCommentAttrib->SetValue(value);
+  }
+
+//  Ajout de l'icone
+  if ( icone != NULL  )
+  {
+    anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO,"AttributePixMap");
+    SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+    aPixmap->SetPixMap(icone);
+  }
+
+//  Ajout de l ior
+  if ( ior != NULL  )
+  {
+    anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR");
+    SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
+    anIOR->SetValue(ior);
+  }
+};
+
+//=============================================================================
+HOMARD::listeCases* HOMARD_Gen_i::GetAllCases()
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::listeCases_var ret = new HOMARD::listeCases;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesCas.size());
+  std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it;
+  int i = 0;
+  for (it  = myContextMap[GetCurrentStudyID()]._mesCas.begin();
+       it != myContextMap[GetCurrentStudyID()]._mesCas.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
+
+  return ret._retn();
+}
+
+//=============================================================================
+HOMARD::listeHypotheses* HOMARD_Gen_i::GetAllHypotheses()
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::listeHypotheses_var ret = new HOMARD::listeHypotheses;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesHypotheses.size());
+  std::map<std::string, HOMARD::HOMARD_Hypothesis_var>::const_iterator it;
+  int i = 0;
+  for (it  = myContextMap[GetCurrentStudyID()]._mesHypotheses.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesHypotheses.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
+
+  return ret._retn();
+}
+
+//=============================================================================
+HOMARD::listeZones* HOMARD_Gen_i::GetAllZones()
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::listeZones_var ret = new HOMARD::listeZones;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesZones.size());
+  std::map<std::string, HOMARD::HOMARD_Zone_var>::const_iterator it;
+  int i = 0;
+  for (it  = myContextMap[GetCurrentStudyID()]._mesZones.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesZones.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
+
+  return ret._retn();
+}
+
+//=============================================================================
+HOMARD::listeIterations* HOMARD_Gen_i::GetAllIterations()
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::listeIterations_var ret = new HOMARD::listeIterations;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesIterations.size());
+  std::map<std::string, HOMARD::HOMARD_Iteration_var>::const_iterator it;
+  int i = 0;
+  for (it  = myContextMap[GetCurrentStudyID()]._mesIterations.begin(); 
+  it != myContextMap[GetCurrentStudyID()]._mesIterations.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
+
+  return ret._retn();
+}
+//=============================================================================
+HOMARD::listeBoundarys* HOMARD_Gen_i::GetAllBoundarys()
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::listeBoundarys_var ret = new HOMARD::listeBoundarys;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesBoundarys.size());
+  std::map<std::string, HOMARD::HOMARD_Boundary_var>::const_iterator it;
+  int i = 0;
+  for (it  = myContextMap[GetCurrentStudyID()]._mesBoundarys.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesBoundarys.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
+
+  return ret._retn();
+}
+
+//=============================================================================
+char* HOMARD_Gen_i::GetCaseName(const char* nomIteration)
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+  };
+
+  HOMARD::HOMARD_Iteration_var monIter = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration];
+  ASSERT(!CORBA::is_nil(monIter));
+  return CORBA::string_dup(monIter->GetCaseName());
+}
+//=============================================================================
+void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeType)
+{
+  MESSAGE( "PublishResultInSmesh " << NomFich);
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+// Le module SMESH est-il actif ?
+  SALOMEDS::SObject_var aSmeshSO = myCurrentStudy->FindComponent("SMESH");
+//
+  if (!CORBA::is_nil(aSmeshSO))
+  {
+// On verifie que le fichier n est pas deja publie
+    SALOMEDS::ChildIterator_var aIter = myCurrentStudy->NewChildIterator(aSmeshSO);
+    for (; aIter->More(); aIter->Next()) 
+    {
+       SALOMEDS::SObject_var  aSO = aIter->Value();
+       SALOMEDS::GenericAttribute_var aGAttr;
+       if (aSO->FindAttribute(aGAttr,"AttributeExternalFileDef"))
+       {
+           SALOMEDS::AttributeExternalFileDef_var anAttr = SALOMEDS::AttributeExternalFileDef::_narrow(aGAttr);
+           CORBA::String_var value=anAttr->Value();
+           if (strcmp((const char*)value,NomFich) == 0)
+           {
+                // GERALD -- QMESSAGE BOX
+                std::cerr << "fichier : "<< NomFich << " deja publie "<< std::endl;
+                return;
+           }
+       }
+     }
+
+  }
+
+// On enregistre le fichier
+  MESSAGE( "Enregistrement du fichier");
+  SALOME_LifeCycleCORBA* myLCC = new SALOME_LifeCycleCORBA(_NS);
+  SMESH::SMESH_Gen_var aSmeshEngine = SMESH::SMESH_Gen::_narrow(myLCC->FindOrLoad_Component("FactoryServer","SMESH"));
+  ASSERT(!CORBA::is_nil(aSmeshEngine));
+  aSmeshEngine->SetCurrentStudy(myCurrentStudy);
+  SMESH::DriverMED_ReadStatus theStatus;
+  //aSmeshEngine->CreateMeshesFromMED(NomFich, theStatus);
+
+// On met a jour les attributs AttributeExternalFileDef et AttributePixMap
+  SMESH::mesh_array* mesMaillages=aSmeshEngine->CreateMeshesFromMED(NomFich, theStatus);
+  for (int i = 0; i < mesMaillages->length();  i++) 
+  {
+    MESSAGE( ". Mise a jour des attributs");
+    SMESH::SMESH_Mesh_var monMaillage= (*mesMaillages)[i];
+    SALOMEDS::SObject_var aSO=SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(monMaillage)));
+    SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+    SALOMEDS::GenericAttribute_var aGAttr = aStudyBuilder->FindOrCreateAttribute(aSO, "AttributeExternalFileDef");
+    SALOMEDS::AttributeExternalFileDef_var anAttr = SALOMEDS::AttributeExternalFileDef::_narrow(aGAttr);
+    anAttr->SetValue(NomFich);
+    SALOMEDS::GenericAttribute_var aPixMap = aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePixMap" );
+    SALOMEDS::AttributePixMap_var anAttr2 = SALOMEDS::AttributePixMap::_narrow(aPixMap);
+//  IconeType = 0 : fichier issu d'une importation
+//  IconeType = 1 : fichier issu d'une execution HOMARD
+    if ( IconeType == 0 )
+    { anAttr2->SetPixMap( "mesh_tree_importedmesh.png" ); }
+    else
+    { anAttr2->SetPixMap( "mesh_tree_mesh.png" ); }
+  }
+
+}
+//=============================================================================
+void HOMARD_Gen_i::DeleteResultInSmesh(const char* NomFich, const char* MeshName)
+{
+  MESSAGE (" DeleteResultInSmesh pour "<< NomFich << "et le maillage "<< MeshName);
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+// Le module SMESH est-il actif ?
+  SALOMEDS::SObject_var aSmeshSO = myCurrentStudy->FindComponent("SMESH");
+//
+  if (CORBA::is_nil(aSmeshSO))
+  {
+      return ;
+  };
+// On verifie que le fichier est deja publie
+  SALOMEDS::StudyBuilder_var myBuilder = myCurrentStudy->NewBuilder();
+  SALOMEDS::ChildIterator_var aIter = myCurrentStudy->NewChildIterator(aSmeshSO);
+  for (; aIter->More(); aIter->Next()) 
+  {
+     SALOMEDS::SObject_var  aSO = aIter->Value();
+     SALOMEDS::GenericAttribute_var aGAttr;
+     if (aSO->FindAttribute(aGAttr,"AttributeExternalFileDef"))
+     {
+       SALOMEDS::AttributeExternalFileDef_var anAttr = SALOMEDS::AttributeExternalFileDef::_narrow(aGAttr);
+       CORBA::String_var value=anAttr->Value();
+       if (strcmp((const char*)value,NomFich) == 0)
+       {
+         if (aSO->FindAttribute(aGAttr,"AttributeName"))
+         {
+           SALOMEDS::AttributeName_var anAttr2 = SALOMEDS::AttributeName::_narrow(aGAttr);
+           CORBA::String_var value2=anAttr2->Value();
+           if (strcmp((const char*)value2,MeshName) == 0)
+           {
+             myBuilder->RemoveObjectWithChildren( aSO ) ;
+           }
+         }
+       }
+     }
+  }
+
+}
+//=============================================================================
+void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* NomFich, const char* Commentaire)
+{
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Study Context ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[NomIter];
+  if (CORBA::is_nil(myIteration))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Iteration ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+  SALOMEDS::SObject_var aIterSO=SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
+  if (CORBA::is_nil(myIteration))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Iteration Study Object";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+
+  aStudyBuilder->NewCommand();
+
+  SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aIterSO);
+// Pour les fichiers med, on affiche une icone de maillage
+// Pour les fichiers qui sont texte, on affiche une icone de fichier texte 'texte'
+// Le reperage se fait par la 1ere lettre du commentaire : I pour Iteration n
+  const char* icone ;
+  const char* ior = " " ;
+  if ( Commentaire[0] == 'I' )
+  { icone = "med.png" ; }
+  else
+  { icone = "texte_2.png" ; }
+  PublishInStudyAttr(aStudyBuilder, aSubSO, NomFich, Commentaire, icone, ior ) ;
+
+  aStudyBuilder->CommitCommand();
+}
+
+
+//===========================================================================
+//
+// Next functions are inherited from SALOMEDS::Driver interface
+//
+//===========================================================================
+
+//===========================================================================
+SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
+                                      const char* theURL,
+                                      bool isMultiFile)
+{
+  MESSAGE (" Save pour theURL = "<< theURL);
+  SALOMEDS::TMPFile_var aStreamFile;
+
+  // get temporary directory name
+  std::string tmpDir = isMultiFile ? std::string(theURL) : SALOMEDS_Tool::GetTmpDir();
+
+  SALOMEDS::Study_var aStudy = theComponent->GetStudy();
+  StudyContext& context = myContextMap[ aStudy->StudyId() ];
+
+  // HOMARD data file name
+  std::string aFileName = "";
+  if (isMultiFile)
+    aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL());
+  aFileName += "_HOMARD.dat";
+
+  // initialize sequence of file names
+  SALOMEDS::ListOfFileNames_var aFileSeq = new SALOMEDS::ListOfFileNames;
+  aFileSeq->length(1);
+  aFileSeq[0] = CORBA::string_dup(aFileName.c_str()) ;
+
+  // get full path to the data file
+  aFileName = tmpDir + aFileName;
+
+  // save data
+  // -> create file
+  std::ofstream f(aFileName.c_str());
+
+  // clear temporary id map
+  context._idmap.clear();
+
+  int id = 1;
+
+  // -> dump cases
+  std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it_case;
+  for (it_case = context._mesCas.begin(); it_case != context._mesCas.end(); ++it_case) {
+    HOMARD::HOMARD_Cas_var aCas = it_case->second;
+    PortableServer::ServantBase_var aServant = GetServant(aCas);
+    HOMARD_Cas_i* aCasServant = dynamic_cast<HOMARD_Cas_i*>(aServant.in());
+    if (aCasServant) {
+      f << HOMARD::GetSignature(HOMARD::Case) << aCasServant->Dump() << std::endl;
+      context._idmap[id++] = dynamic_cast<PortableServer::ServantBase*>(aCasServant);
+    }
+  }
+  // -> dump zones
+  std::map<std::string, HOMARD::HOMARD_Zone_var>::const_iterator it_zone;
+  for (it_zone = context._mesZones.begin(); it_zone != context._mesZones.end(); ++it_zone) {
+    HOMARD::HOMARD_Zone_var aZone = it_zone->second;
+    PortableServer::ServantBase_var aServant = GetServant(aZone);
+    HOMARD_Zone_i* aZoneServant = dynamic_cast<HOMARD_Zone_i*>(aServant.in());
+    if (aZoneServant) {
+      f << HOMARD::GetSignature(HOMARD::Zone) << aZoneServant->Dump() << std::endl;
+      context._idmap[id++] = dynamic_cast<PortableServer::ServantBase*>(aZoneServant);
+    }
+  }
+  // -> dump hypotheses
+  std::map<std::string, HOMARD::HOMARD_Hypothesis_var>::const_iterator it_hypo;
+  for (it_hypo = context._mesHypotheses.begin(); it_hypo != context._mesHypotheses.end(); ++it_hypo) {
+    HOMARD::HOMARD_Hypothesis_var aHypo = it_hypo->second;
+    PortableServer::ServantBase_var aServant = GetServant(aHypo);
+    HOMARD_Hypothesis_i* aHypoServant = dynamic_cast<HOMARD_Hypothesis_i*>(aServant.in());
+    if (aHypoServant) {
+      f << HOMARD::GetSignature(HOMARD::Hypothesis) << aHypoServant->Dump() << std::endl;
+      context._idmap[id++] = dynamic_cast<PortableServer::ServantBase*>(aHypoServant);
+    }
+  }
+  // -> dump iterations
+  std::map<std::string, HOMARD::HOMARD_Iteration_var>::const_iterator it_iter;
+  for (it_iter = context._mesIterations.begin(); it_iter != context._mesIterations.end(); ++it_iter) {
+    HOMARD::HOMARD_Iteration_var aIter = it_iter->second;
+    PortableServer::ServantBase_var aServant = GetServant(aIter);
+    HOMARD_Iteration_i* aIterServant = dynamic_cast<HOMARD_Iteration_i*>(aServant.in());
+    if (aIterServant) {
+      f << HOMARD::GetSignature(HOMARD::Iteration) << aIterServant->Dump() << std::endl;
+      context._idmap[id++] = dynamic_cast<PortableServer::ServantBase*>(aIterServant);
+    }
+  }
+  // -> dump boundaries
+  std::map<std::string, HOMARD::HOMARD_Boundary_var>::const_iterator it_boundary;
+  for (it_boundary = context._mesBoundarys.begin(); it_boundary != context._mesBoundarys.end(); ++it_boundary) {
+    HOMARD::HOMARD_Boundary_var aBoundary = it_boundary->second;
+    PortableServer::ServantBase_var aServant = GetServant(aBoundary);
+    HOMARD_Boundary_i* aBoundaryServant = dynamic_cast<HOMARD_Boundary_i*>(aServant.in());
+    if (aBoundaryServant) {
+      f << HOMARD::GetSignature(HOMARD::Boundary) << aBoundaryServant->Dump() << std::endl;
+      context._idmap[id++] = dynamic_cast<PortableServer::ServantBase*>(aBoundaryServant);
+    }
+  }
+  // -> close file
+  f.close();
+
+  // put temporary files  to the stream
+  aStreamFile = SALOMEDS_Tool::PutFilesToStream(tmpDir.c_str(), aFileSeq.in(), isMultiFile);
+
+  // remove temporary files
+  if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(tmpDir.c_str(), aFileSeq.in(), true);
+
+  // return data stream
+  return aStreamFile._retn();
+};
+
+//===========================================================================
+SALOMEDS::TMPFile* HOMARD_Gen_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
+                                           const char* theURL,
+                                           bool isMultiFile)
+{
+  // No specific ASCII persistence
+  SALOMEDS::TMPFile_var aStreamFile = Save(theComponent, theURL, isMultiFile);
+  return aStreamFile._retn();
+};
+
+//===========================================================================
+CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
+                                  const SALOMEDS::TMPFile& theStream,
+                                  const char* theURL,
+                                  bool isMultiFile)
+{
+  MESSAGE (" Load pour theURL = "<< theURL);
+  SALOMEDS::Study_var aStudy = theComponent->GetStudy();
+
+  // set current study
+  if (myCurrentStudy->_is_nil() || aStudy->StudyId() != myCurrentStudy->StudyId())
+    SetCurrentStudy(aStudy);
+
+  // get temporary directory name
+  std::string tmpDir = isMultiFile ? std::string(theURL) : SALOMEDS_Tool::GetTmpDir();
+
+  // Convert the stream into sequence of files to process
+  SALOMEDS::ListOfFileNames_var aFileSeq = SALOMEDS_Tool::PutStreamToFiles(theStream,
+                                                                            tmpDir.c_str(),
+                                                                            isMultiFile);
+  // HOMARD data file name
+  std::string aFileName = "";
+  if (isMultiFile)
+    aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL());
+  aFileName = tmpDir + aFileName + "_HOMARD.dat";
+
+  StudyContext& context = myContextMap[ aStudy->StudyId() ];
+
+  // save data
+  // -> create file
+  std::ifstream f(aFileName.c_str());
+
+  // clear context
+  context._mesCas.clear();
+  context._mesHypotheses.clear();
+  context._mesIterations.clear();
+  context._mesZones.clear();
+  context._mesBoundarys.clear();
+  context._idmap.clear();
+
+  int id = 1;
+  std::string line;
+
+  while (f) {
+    std::getline(f, line);
+    std::string caseSignature = HOMARD::GetSignature(HOMARD::Case);
+    std::string zoneSignature = HOMARD::GetSignature(HOMARD::Zone);
+    std::string iterSignature = HOMARD::GetSignature(HOMARD::Iteration);
+    std::string hypoSignature = HOMARD::GetSignature(HOMARD::Hypothesis);
+    std::string bounSignature = HOMARD::GetSignature(HOMARD::Boundary);
+    if (line.substr(0, caseSignature.size()) == caseSignature) {
+      // re-create case
+      HOMARD::HOMARD_Cas_var aCase = newCase();
+      PortableServer::ServantBase_var aServant = GetServant(aCase);
+      HOMARD_Cas_i* aCaseServant = dynamic_cast<HOMARD_Cas_i*>(aServant.in());
+      if (aCaseServant && aCaseServant->Restore(line.substr(caseSignature.size()))) {
+        context._mesCas[aCase->GetName()] = aCase;
+        context._idmap[id] = dynamic_cast<PortableServer::ServantBase*>(aCaseServant);
+      }
+    }
+    else if (line.substr(0, zoneSignature.size()) == zoneSignature) {
+      // re-create zone
+      HOMARD::HOMARD_Zone_var aZone = newZone();
+      PortableServer::ServantBase_var aServant = GetServant(aZone);
+      HOMARD_Zone_i* aZoneServant = dynamic_cast<HOMARD_Zone_i*>(aServant.in());
+      if (aZoneServant && aZoneServant->Restore(line.substr(zoneSignature.size()))) {
+        context._mesZones[aZone->GetName()] = aZone;
+        context._idmap[id] = dynamic_cast<PortableServer::ServantBase*>(aZoneServant);
+      }
+    }
+    else if (line.substr(0, iterSignature.size()) == iterSignature) {
+      // re-create iteration
+      HOMARD::HOMARD_Iteration_var aIter = newIteration();
+      PortableServer::ServantBase_var aServant = GetServant(aIter);
+      HOMARD_Iteration_i* aIterServant = dynamic_cast<HOMARD_Iteration_i*>(aServant.in());
+      if (aIterServant && aIterServant->Restore(line.substr(iterSignature.size()))) {
+        context._mesIterations[aIter->GetName()] = aIter;
+        context._idmap[id] = dynamic_cast<PortableServer::ServantBase*>(aIterServant);
+      }
+    }
+    else if (line.substr(0, hypoSignature.size()) == hypoSignature) {
+      // re-create hypothesis
+      HOMARD::HOMARD_Hypothesis_var aHypo = newHypothesis();
+      PortableServer::ServantBase_var aServant = GetServant(aHypo);
+      HOMARD_Hypothesis_i* aHypoServant = dynamic_cast<HOMARD_Hypothesis_i*>(aServant.in());
+      if (aHypoServant && aHypoServant->Restore(line.substr(hypoSignature.size()))) {
+        context._mesHypotheses[aHypo->GetName()] = aHypo;
+        context._idmap[id] = dynamic_cast<PortableServer::ServantBase*>(aHypoServant);
+      }
+    }
+    else if (line.substr(0, bounSignature.size()) == bounSignature) {
+      // re-create boundary
+      HOMARD::HOMARD_Boundary_var aBoundary = newBoundary();
+      PortableServer::ServantBase_var aServant = GetServant(aBoundary);
+      HOMARD_Boundary_i* aBoundaryServant = dynamic_cast<HOMARD_Boundary_i*>(aServant.in());
+      if (aBoundaryServant && aBoundaryServant->Restore(line.substr(bounSignature.size()))) {
+        context._mesBoundarys[aBoundary->GetName()] = aBoundary;
+        context._idmap[id] = dynamic_cast<PortableServer::ServantBase*>(aBoundaryServant);
+      }
+    }
+    id++;
+  }
+
+  // -> close file
+  f.close();
+
+  // Remove temporary files created from the stream
+  if (!isMultiFile) 
+    SALOMEDS_Tool::RemoveTemporaryFiles(tmpDir.c_str(), aFileSeq.in(), true);
+
+  return true;
+};
+
+//===========================================================================
+CORBA::Boolean HOMARD_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
+                                       const SALOMEDS::TMPFile& theStream,
+                                       const char* theURL,
+                                       bool isMultiFile)
+{
+  // No specific ASCII persistence
+  return Load(theComponent, theStream, theURL, isMultiFile);
+};
+
+//===========================================================================
+void HOMARD_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
+{
+  if (theComponent->GetStudy()->StudyId() == GetCurrentStudyID()) {
+    // clearing study context should be done here:
+    // - destroy all servants and related CORBA objects
+    // ... (TODO)
+    // - remove context from myContextMap
+    myContextMap.erase(theComponent->GetStudy()->StudyId());
+    // - nullify myCurrentStudy
+    myCurrentStudy = SALOMEDS::Study::_nil();
+  }
+};
+
+//===========================================================================
+char* HOMARD_Gen_i::ComponentDataType()
+{
+  return CORBA::string_dup("HOMARD");
+};
+
+//===========================================================================
+char* HOMARD_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
+                                           const char* IORString,
+                                           CORBA::Boolean isMultiFile,
+                                           CORBA::Boolean isASCII)
+{
+  CORBA::String_var aString("");
+  if (!CORBA::is_nil(theSObject) && strcmp(IORString, "") != 0) {
+    StudyContext context = myContextMap[ theSObject->GetStudy()->StudyId() ];
+    CORBA::Object_var anObj = _orb->string_to_object(IORString);
+    if (!CORBA::is_nil(anObj)) {
+      PortableServer::ServantBase_var aServant = GetServant(anObj);
+      PortableServer::ServantBase* aStorable = dynamic_cast<PortableServer::ServantBase*>(aServant.in());
+      if (aStorable) {
+       std::map<int, PortableServer::ServantBase*>::const_iterator it;
+       for (it = context._idmap.begin(); it != context._idmap.end(); ++it) {
+         if (it->second == aStorable) {
+           std::stringstream os;
+           os << it->first;
+           aString = CORBA::string_dup(os.str().c_str());
+         }
+       }
+      }
+    }
+  }
+  return aString._retn();
+};
+
+//===========================================================================
+char* HOMARD_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
+                                           const char* aLocalPersistentID,
+                                           CORBA::Boolean isMultiFile,
+                                           CORBA::Boolean isASCII)
+{
+  CORBA::String_var aString("");
+  if (!CORBA::is_nil(theSObject) && strcmp(aLocalPersistentID, "") != 0) {
+    StudyContext context = myContextMap[ theSObject->GetStudy()->StudyId() ];
+    int id = atoi(aLocalPersistentID);
+    if (id > 0 && context._idmap.find(id) != context._idmap.end()) {
+      CORBA::Object_var object = _poa->servant_to_reference(context._idmap[ id ]);
+      if (!CORBA::is_nil(object)) {
+       aString = _orb->object_to_string(object);
+      }
+    }
+  }
+  return aString._retn();
+};
+
+//===========================================================================
+bool HOMARD_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) 
+{
+  if(CORBA::is_nil(myCurrentStudy))
+    return false;
+
+  HOMARD::HOMARD_Cas_var aCas = HOMARD::HOMARD_Cas::_narrow(theIOR);
+  if(!aCas->_is_nil())
+    return true;
+
+  HOMARD::HOMARD_Hypothesis_var aHypo = HOMARD::HOMARD_Hypothesis::_narrow(theIOR);
+  if(!aHypo->_is_nil())
+    return true;
+
+  HOMARD::HOMARD_Zone_var aZone = HOMARD::HOMARD_Zone::_narrow(theIOR);
+  if(!aZone->_is_nil())
+    return true;
+
+  HOMARD::HOMARD_Boundary_var aBoundary = HOMARD::HOMARD_Boundary::_narrow(theIOR);
+  if(!aBoundary->_is_nil())
+    return true;
+
+  /* Iteration is not published directly
+  HOMARD::HOMARD_Iteration_var aIter = HOMARD::HOMARD_Iteration::_narrow(theIOR);
+  if(!aIter->_is_nil())
+    return true;
+  */
+  return false;
+};
+
+//===========================================================================
+CORBA::Boolean HOMARD_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) 
+{
+  // No Copy/Paste support
+  return false;
+};
+
+//===========================================================================
+SALOMEDS::TMPFile* HOMARD_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject,
+                                          CORBA::Long& theObjectID)
+{
+  // No Copy/Paste support
+  SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
+  return aStreamFile._retn();
+};
+
+//===========================================================================
+CORBA::Boolean  HOMARD_Gen_i::CanPaste(const char *theComponentName,
+                                       CORBA::Long theObjectID)
+{
+  // No Copy/Paste support
+  return false;
+};
+
+//===========================================================================
+SALOMEDS::SObject_ptr HOMARD_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
+                                              CORBA::Long theObjectID,
+                                              SALOMEDS::SObject_ptr theSObject)
+{
+  // No Copy/Paste support
+  SALOMEDS::SObject_var aResultSO;
+  return aResultSO._retn();
+};
+
+//===========================================================================
+PortableServer::ServantBase_var HOMARD_Gen_i::GetServant(CORBA::Object_ptr theObject)
+{
+  PortableServer::Servant aServant = 0;
+  if (!CORBA::is_nil(theObject)) {
+    try {
+      aServant = _poa->reference_to_servant(theObject);
+    }
+    catch (...) {
+    }
+  }
+  return aServant;
+}
+
+//===========================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::newCase()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Cas_i* aServant = new HOMARD_Cas_i(_orb, engine);
+  HOMARD::HOMARD_Cas_var aCase = HOMARD::HOMARD_Cas::_narrow(aServant->_this());
+  return aCase._retn();
+}
+
+//===========================================================================
+HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::newHypothesis()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Hypothesis_i* aServant = new HOMARD_Hypothesis_i(_orb, engine);
+  HOMARD::HOMARD_Hypothesis_var aHypo = HOMARD::HOMARD_Hypothesis::_narrow(aServant->_this());
+  return aHypo._retn();
+}
+
+//===========================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::newIteration()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Iteration_i* aServant = new HOMARD_Iteration_i(_orb, engine);
+  HOMARD::HOMARD_Iteration_var aIter = HOMARD::HOMARD_Iteration::_narrow(aServant->_this());
+  return aIter._retn();
+}
+
+//===========================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::newBoundary()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Boundary_i* aServant = new HOMARD_Boundary_i(_orb, engine);
+  HOMARD::HOMARD_Boundary_var aBoundary = HOMARD::HOMARD_Boundary::_narrow(aServant->_this());
+  return aBoundary._retn();
+}
+//===========================================================================
+HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::newZone()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Zone_i* aServant = new HOMARD_Zone_i(_orb, engine);
+  HOMARD::HOMARD_Zone_var aZone = HOMARD::HOMARD_Zone::_narrow(aServant->_this());
+  return aZone._retn();
+}
+//==========================================================================
+Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
+                                       CORBA::Boolean isPublished,
+                                       CORBA::Boolean& isValidScript)
+{
+   MESSAGE ("Entree dans DumpPython");
+   isValidScript=1;
+   SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
+   if(CORBA::is_nil(aStudy))
+     return new Engines::TMPFile(0);
+
+   SALOMEDS::SObject_var aSO = aStudy->FindComponent("HOMARD");
+   if(CORBA::is_nil(aSO))
+      return new Engines::TMPFile(0);
+
+   std::string aScript = "\"\"\"\n";
+   aScript += "Python script for HOMARD\n";
+   aScript += "Copyright EDF-R&D 2010\n";
+   aScript += "\"\"\"\n";
+   aScript += "__revision__ = \"V1.2\"\n";
+   aScript += "import HOMARD\n";
+   aScript += "import salome\n";
+   aScript += "homard = salome.lcc.FindOrLoadComponent('FactoryServer','HOMARD')\n";
+   aScript += "def RebuildData(theStudy):\n";
+   aScript += "\thomard.SetCurrentStudy(theStudy)\n";
+
+
+   if (myContextMap[GetCurrentStudyID()]._mesBoundarys.size() > 0)
+   {
+    aScript += "#\n# Creation of the boundaries";
+    aScript +=  "\n# ==========================";
+   }
+   std::map<std::string, HOMARD::HOMARD_Boundary_var>::const_iterator it_boundary;
+   for (it_boundary  = myContextMap[GetCurrentStudyID()]._mesBoundarys.begin();
+        it_boundary != myContextMap[GetCurrentStudyID()]._mesBoundarys.end(); ++it_boundary)
+   {
+    HOMARD::HOMARD_Boundary_var maBoundary = (*it_boundary).second;
+    CORBA::String_var dumpCorbaBoundary = maBoundary->GetDumpPython();
+    std::string dumpBoundary = dumpCorbaBoundary.in();
+    aScript+=dumpBoundary;
+   }
+
+
+   if (myContextMap[GetCurrentStudyID()]._mesZones.size() > 0)
+   {
+    aScript += "#\n# Creation of the zones";
+    aScript +=  "\n# =====================";
+   }
+   std::map<std::string, HOMARD::HOMARD_Zone_var>::const_iterator it_zone;
+   for ( it_zone  = myContextMap[GetCurrentStudyID()]._mesZones.begin(); 
+         it_zone != myContextMap[GetCurrentStudyID()]._mesZones.end(); ++it_zone) 
+   {
+    HOMARD::HOMARD_Zone_var maZone = (*it_zone).second;
+    CORBA::String_var dumpCorbaZone = maZone->GetDumpPython();
+    std::string dumpZone = dumpCorbaZone.in();
+    aScript+=dumpZone;
+   }
+
+
+   aScript += "#\n# Creation of the hypotheses";
+   aScript +=  "\n# ==========================";
+   std::map<std::string, HOMARD::HOMARD_Hypothesis_var>::const_iterator it_hypo;
+   for ( it_hypo  = myContextMap[GetCurrentStudyID()]._mesHypotheses.begin();
+         it_hypo != myContextMap[GetCurrentStudyID()]._mesHypotheses.end(); it_hypo++)
+   {
+    HOMARD::HOMARD_Hypothesis_var monHypo = (*it_hypo).second;
+    CORBA::String_var dumpCorbaHypo = monHypo->GetDumpPython();
+    std::string dumpHypo = dumpCorbaHypo.in();
+    aScript+=dumpHypo;
+   }
+
+
+   aScript += "#\n# Creation of the cases";
+   aScript += "\n# =====================";
+   std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it_cas;
+   for (it_cas  = myContextMap[GetCurrentStudyID()]._mesCas.begin();
+        it_cas != myContextMap[GetCurrentStudyID()]._mesCas.end(); it_cas++)
+        {
+           std::string nomCas = (*it_cas).first;
+           std::string dumpCas = std::string("\n# Creation of the case ") ;
+           dumpCas +=  nomCas + std::string("\n");
+           dumpCas += std::string("\t") + nomCas;
+           dumpCas += std::string(" = homard.CreateCase('") + nomCas + std::string("', '");
+
+           HOMARD::HOMARD_Cas_var myCase = (*it_cas).second;
+           CORBA::String_var cIter0= myCase->GetIter0Name();
+           std::string iter0 = cIter0.in();
+
+           HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[iter0];
+           CORBA::String_var cMesh0= myIteration->GetMeshFile();
+           std::string mesh0 = cMesh0.in();
+           CORBA::String_var cMeshName0= myIteration->GetMeshName();
+           std::string meshName0 = cMeshName0.in();
+           dumpCas += meshName0 + std::string("', '")+ mesh0 + std::string("')\n"); 
+           CORBA::String_var dumpCorbaCase = myCase->GetDumpPython();
+           std::string dumpCas2= dumpCorbaCase.in();
+
+           aScript+=dumpCas + dumpCas2;
+        };
+
+
+   aScript += "#\n# Creation of the iterations" ;
+   aScript += "\n# ==========================";
+   std::map<std::string, HOMARD::HOMARD_Iteration_var>::const_iterator it_iter;
+   for (it_iter  = myContextMap[GetCurrentStudyID()]._mesIterations.begin(); 
+        it_iter != myContextMap[GetCurrentStudyID()]._mesIterations.end(); ++it_iter) 
+   {
+    HOMARD::HOMARD_Iteration_var aIter = (*it_iter).second;
+    CORBA::String_var dumpCorbaIter = aIter->GetDumpPython();
+    std::string dumpIter = dumpCorbaIter.in();
+    aScript+=dumpIter;
+   }
+
+
+   const size_t aLen = strlen(aScript.c_str());
+   char* aBuffer = new char[aLen+1];
+   strcpy(aBuffer, aScript.c_str());
+
+   CORBA::Octet* anOctetBuf =  (CORBA::Octet*)aBuffer;
+   Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1);
+
+   return aStreamFile._retn();
+}
+
+//=============================================================================
+extern "C"
+{
+  PortableServer::ObjectId* HOMARDEngine_factory(CORBA::ORB_ptr orb,
+                                                 PortableServer::POA_ptr poa, 
+                                                 PortableServer::ObjectId* contId,
+                                                 const char* instanceName, 
+                                                 const char* interfaceName)
+  {
+    MESSAGE("PortableServer::ObjectId* HOMARDEngine_factory()");
+    HOMARD_Gen_i* myHOMARD_Gen = new HOMARD_Gen_i(orb, poa, contId, instanceName, interfaceName);
+    return myHOMARD_Gen->getId();
+  }
+}
diff --git a/src/HOMARD_I/HOMARD_Gen_i.hxx b/src/HOMARD_I/HOMARD_Gen_i.hxx
new file mode 100644 (file)
index 0000000..b6dff45
--- /dev/null
@@ -0,0 +1,188 @@
+#ifndef _HOMARD_GEN_I_HXX_
+#define _HOMARD_GEN_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HOMARD_Gen)
+#include CORBA_SERVER_HEADER(HOMARD_Cas)
+#include CORBA_SERVER_HEADER(HOMARD_Hypothesis)
+#include CORBA_SERVER_HEADER(HOMARD_Iteration)
+#include CORBA_SERVER_HEADER(HOMARD_Zone)
+#include CORBA_SERVER_HEADER(HOMARD_Boundary)
+#include CORBA_CLIENT_HEADER(SALOMEDS)
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+
+#include "HOMARD_Gen.hxx"
+#include "SALOME_Component_i.hxx"
+#include "SALOME_NamingService.hxx"
+#include "Utils_CorbaException.hxx"
+
+
+#include <string>
+#include <map>
+
+class HOMARD_Gen_i:
+  public virtual Engines_Component_i,
+  public virtual POA_HOMARD::HOMARD_Gen
+{ 
+public:
+  HOMARD_Gen_i(CORBA::ORB_ptr orb,
+               PortableServer::POA_ptr poa,
+               PortableServer::ObjectId* contId, 
+               const char* instanceName, 
+               const char* interfaceName);
+  virtual ~HOMARD_Gen_i();
+  
+
+  SALOMEDS::Study_ptr             GetCurrentStudy();
+  void                            SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
+  int                             GetCurrentStudyID();
+
+  HOMARD::HOMARD_Cas_ptr          CreateCase      (const char* nomCas,
+                                                   const char* MeshName, const char* FileName);
+  HOMARD::HOMARD_Hypothesis_ptr   CreateHypothesis(const char* nomHypothesis);
+  HOMARD::HOMARD_Iteration_ptr    CreateIteration (const char* nomIter, const char* nomIterParent);
+  HOMARD::HOMARD_Zone_ptr         CreateZone      (const char* nomZone, CORBA::Long typeZone);
+  HOMARD::HOMARD_Boundary_ptr     CreateBoundary  (const char* nomBoundary, CORBA::Long typeBoundary);
+
+  HOMARD::HOMARD_Cas_ptr          GetCas        (const char* nomCas);
+  HOMARD::HOMARD_Zone_ptr         GetZone       (const char* nomZone);
+  HOMARD::HOMARD_Hypothesis_ptr   GetHypothesis (const char* nomHypothesis);
+  HOMARD::HOMARD_Iteration_ptr    GetIteration  (const char* nomIteration);
+  HOMARD::HOMARD_Boundary_ptr     GetBoundary   (const char* nomBoundary);
+
+  void                            AssociateCaseIter(const char* nomCas, const char* nomIter,
+                                                    const char* labelIter);
+  void                            AssociateIterIter(const char* nomIterParent, const char* nomIter);
+  void                            AssociateIterHypo(const char* nomIter, const char* nomHypothesis);
+  void                            AssociateHypoZone(const char* nomZone, const char* nomHypothesis);
+  void                            DissociateHypoZone(const char* nomZone, const char* nomHypothesis);
+
+  void                            InvalideZone(const char* nomZone);
+  void                            InvalideHypo(const char* nomHypo);
+  void                            InvalideIter(const char* nomIter);
+
+  void                            SetEtatIter(const char* nomIter,const bool EtatCalcul);
+
+  HOMARD::listeCases*             GetAllCases();
+  HOMARD::listeHypotheses*        GetAllHypotheses();
+  HOMARD::listeZones*             GetAllZones();
+  HOMARD::listeIterations*        GetAllIterations();
+  HOMARD::listeBoundarys*         GetAllBoundarys();
+
+  char*                           GetCaseName(const char* nomIteration);
+  
+  CORBA::Boolean                  Compute(const char* nomIteration, CORBA::Long etatMenage);
+  CORBA::Boolean                  VerifieDir(const char* nomDir);
+  
+  void                            PublishResultInSmesh(const char* NomFich, CORBA::Long IconeType);
+  void                            DeleteResultInSmesh(const char* NomFich, const char* MeshName);
+  void                            PublishFileUnderIteration(const char* NomIter, const char* NomFich,
+                                                            const char* Commentaire);
+
+  // ---------------------------------------------------------------
+  // next functions are inherited from SALOMEDS::Driver interface
+  // ---------------------------------------------------------------
+
+  // --> Persistence
+  virtual SALOMEDS::TMPFile*      Save(SALOMEDS::SComponent_ptr theComponent,
+                                       const char* theURL,
+                                       bool isMultiFile);
+  
+  virtual SALOMEDS::TMPFile*      SaveASCII(SALOMEDS::SComponent_ptr theComponent,
+                                            const char* theURL,
+                                            bool isMultiFile);
+  
+  virtual bool                    Load(SALOMEDS::SComponent_ptr theComponent,
+                                       const SALOMEDS::TMPFile& theStream,
+                                       const char* theURL,
+                                       bool isMultiFile);
+
+  virtual bool                    LoadASCII(SALOMEDS::SComponent_ptr theComponent,
+                                            const SALOMEDS::TMPFile& theStream,
+                                            const char* theURL,
+                                            bool isMultiFile);
+
+  virtual void                    Close(SALOMEDS::SComponent_ptr IORSComponent);
+  
+  virtual char*                   ComponentDataType();
+  
+  virtual char*                   IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
+                                                         const char* IORString,
+                                                         CORBA::Boolean isMultiFile,
+                                                         CORBA::Boolean isASCII);
+
+  virtual char*                   LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
+                                                         const char* aLocalPersistentID,
+                                                         CORBA::Boolean isMultiFile,
+                                                         CORBA::Boolean isASCII);
+  
+  // --> Data publishing
+  virtual bool                    CanPublishInStudy(CORBA::Object_ptr theIOR);
+
+  virtual SALOMEDS::SObject_ptr   PublishInStudy(SALOMEDS::Study_ptr theStudy,
+                                                 SALOMEDS::SObject_ptr theSObject,
+                                                 CORBA::Object_ptr theObject,
+                                                 const char* theName);
+
+  // --> Copy/Paste
+  virtual CORBA::Boolean          CanCopy(SALOMEDS::SObject_ptr theObject);
+  
+  virtual SALOMEDS::TMPFile*      CopyFrom(SALOMEDS::SObject_ptr theObject,
+                                           CORBA::Long& theObjectID);
+
+  virtual CORBA::Boolean          CanPaste(const char* theComponentName, CORBA::Long theObjectID);
+
+  virtual SALOMEDS::SObject_ptr   PasteInto(const SALOMEDS::TMPFile& theStream,
+                                            CORBA::Long theObjectID,
+                                            SALOMEDS::SObject_ptr theObject);
+
+
+private:
+  void                            addInStudy(SALOMEDS::Study_ptr theStudy);
+  SALOMEDS::SObject_ptr           PublishCaseInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+                                                     HOMARD::HOMARD_Cas_ptr theObject, const char* theName);
+  
+  SALOMEDS::SObject_ptr           PublishHypotheseInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+                                                     HOMARD::HOMARD_Hypothesis_ptr theObject, const char* theName);
+
+  SALOMEDS::SObject_ptr           PublishZoneInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+                                                     HOMARD::HOMARD_Zone_ptr theObject, const char* theName);
+  SALOMEDS::SObject_ptr           PublishBoundaryInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+                                                     HOMARD::HOMARD_Boundary_ptr theObject, const char* theName);
+  virtual void                    PublishInStudyAttr(SALOMEDS::StudyBuilder_var aStudyBuilder,
+                                                     SALOMEDS::SObject_var aResultSO,
+                                                     const char* theName, const char* value, const char* icone, const char* ior);
+  PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject);
+
+  HOMARD::HOMARD_Cas_ptr          newCase();
+  HOMARD::HOMARD_Hypothesis_ptr   newHypothesis();
+  HOMARD::HOMARD_Iteration_ptr    newIteration();
+  HOMARD::HOMARD_Zone_ptr         newZone();
+  HOMARD::HOMARD_Boundary_ptr     newBoundary();
+
+
+  virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
+                                       CORBA::Boolean isPublished,
+                                       CORBA::Boolean& isValidScript);
+
+
+private:
+  struct StudyContext
+  {
+    std::map<std::string, HOMARD::HOMARD_Cas_var>        _mesCas;
+    std::map<std::string, HOMARD::HOMARD_Hypothesis_var> _mesHypotheses;
+    std::map<std::string, HOMARD::HOMARD_Iteration_var>  _mesIterations;
+    std::map<std::string, HOMARD::HOMARD_Zone_var>       _mesZones;
+    std::map<std::string, HOMARD::HOMARD_Boundary_var>   _mesBoundarys;
+    std::map<int, PortableServer::ServantBase*>          _idmap;
+  };
+  typedef std::map<int, StudyContext> ContextMap;
+  
+  ::HOMARD_Gen*                 myHomard;
+  SALOMEDS::Study_var           myCurrentStudy;
+  ContextMap                    myContextMap;
+  SALOME_NamingService*         _NS;
+
+};
+
+#endif
diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx
new file mode 100644 (file)
index 0000000..0118ff5
--- /dev/null
@@ -0,0 +1,353 @@
+#include "HOMARD_Hypothesis_i.hxx"
+#include "HOMARD_Gen_i.hxx"
+#include "HOMARD_Hypothesis.hxx"
+#include "HOMARD_DriverTools.hxx"
+
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Hypothesis_i::HOMARD_Hypothesis_i()
+{
+  MESSAGE( "Default constructor, not for use" );
+  ASSERT( 0 );
+}
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Hypothesis_i::HOMARD_Hypothesis_i( CORBA::ORB_ptr orb,
+                                          HOMARD::HOMARD_Gen_var engine )
+{
+  MESSAGE( "standard constructor" );
+  _gen_i = engine;
+  _orb = orb;
+  myHomardHypothesis = new ::HOMARD_Hypothesis();
+  ASSERT( myHomardHypothesis );
+}
+
+//=============================================================================
+/*!
+ *  standard destructor
+ */
+//=============================================================================
+HOMARD_Hypothesis_i::~HOMARD_Hypothesis_i()
+{
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Hypothesis_i::SetName( const char* NomHypothesis )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetName( NomHypothesis );
+}
+
+//=============================================================================
+char* HOMARD_Hypothesis_i::GetName()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::string_dup( myHomardHypothesis->GetName().c_str() );
+}
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Hypothesis_i::SetCaseCreation( const char* NomCaseCreation )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetCaseCreation( NomCaseCreation );
+}
+
+//=============================================================================
+char* HOMARD_Hypothesis_i::GetCaseCreation()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::string_dup( myHomardHypothesis->GetCaseCreation().c_str() );
+}
+//=============================================================================
+char* HOMARD_Hypothesis_i::GetDumpPython()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::string_dup( myHomardHypothesis->GetDumpPython().c_str() );
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Hypothesis_i::SetAdapRefinUnRef( CORBA::Long TypeAdap,CORBA::Long TypeRaff, CORBA::Long TypeDera )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetAdapType( TypeAdap );
+  myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
+}
+
+//=============================================================================
+HOMARD::listeTypes* HOMARD_Hypothesis_i::GetAdapRefinUnRef()
+{
+  ASSERT( myHomardHypothesis );
+  HOMARD::listeTypes_var aResult = new HOMARD::listeTypes;
+  aResult->length( 3 );
+  aResult[0] = CORBA::Long( myHomardHypothesis->GetAdapType() );
+  aResult[1] = CORBA::Long( myHomardHypothesis->GetRefinType() );
+  aResult[2] = CORBA::Long( myHomardHypothesis->GetUnRefType() );
+  return aResult._retn();
+}
+//=============================================================================
+CORBA::Long HOMARD_Hypothesis_i::GetAdapType()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::Long( myHomardHypothesis->GetAdapType() );
+}
+//=============================================================================
+CORBA::Long HOMARD_Hypothesis_i::GetRefinType()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::Long( myHomardHypothesis->GetRefinType() );
+}
+//=============================================================================
+CORBA::Long HOMARD_Hypothesis_i::GetUnRefType()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::Long( myHomardHypothesis->GetUnRefType() );
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Hypothesis_i::SetField( const char* FieldName )
+{
+  myHomardHypothesis->SetField( FieldName );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SetRefinThr( CORBA::Long TypeThR, CORBA::Double ThreshR )
+{
+  myHomardHypothesis->SetRefinThr( TypeThR, ThreshR );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SetUnRefThr( CORBA::Long TypeThC, CORBA::Double ThreshC )
+{
+  myHomardHypothesis->SetUnRefThr( TypeThC, ThreshC );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SetUseComp( CORBA::Long UsCmpI )
+{
+  myHomardHypothesis->SetUseComp( UsCmpI );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SetUseField( CORBA::Long UsField )
+{
+  myHomardHypothesis->SetUseField( UsField );
+}
+
+//=============================================================================
+HOMARD::InfosHypo* HOMARD_Hypothesis_i::GetField()
+{
+  ASSERT(myHomardHypothesis);
+  HOMARD::InfosHypo* aInfosHypo = new HOMARD::InfosHypo();
+  aInfosHypo->FieldName  = CORBA::string_dup( myHomardHypothesis->GetFieldName().c_str() );
+  aInfosHypo->TypeThR    = CORBA::Long( myHomardHypothesis->GetRefinThrType() );
+  aInfosHypo->ThreshR    = CORBA::Double( myHomardHypothesis->GetThreshR() );
+  aInfosHypo->TypeThC    = CORBA::Long( myHomardHypothesis->GetUnRefThrType() );
+  aInfosHypo->ThreshC    = CORBA::Double( myHomardHypothesis->GetThreshC() );
+  aInfosHypo->UsCmpI     = CORBA::Long( myHomardHypothesis->GetUseCompI() );
+  return aInfosHypo;
+}
+//=============================================================================
+char* HOMARD_Hypothesis_i::GetFieldName()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::string_dup( myHomardHypothesis->GetFieldName().c_str() );
+}
+//=============================================================================
+CORBA::Long HOMARD_Hypothesis_i::GetRefinThrType()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::Long( myHomardHypothesis->GetRefinThrType() );
+}
+//=============================================================================
+CORBA::Long HOMARD_Hypothesis_i::GetUnRefThrType()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::Long( myHomardHypothesis->GetUnRefThrType() );
+}
+
+/*!
+ */
+//=============================================================================
+void HOMARD_Hypothesis_i::AddIteration( const char* NomIteration )
+{
+  ASSERT(myHomardHypothesis);
+  myHomardHypothesis->AddIteration( NomIteration );
+}
+
+//=============================================================================
+void  HOMARD_Hypothesis_i::AddZone( const char* NomZone )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->AddZone( NomZone );
+}
+//=============================================================================
+void  HOMARD_Hypothesis_i::SupprZone      (const char * NomZone)
+{
+  ASSERT(myHomardHypothesis);
+  myHomardHypothesis->SupprZone( NomZone);
+}
+//=============================================================================
+HOMARD::listeZonesHypo* HOMARD_Hypothesis_i::GetZones()
+{
+  ASSERT(myHomardHypothesis);
+  const std::list<std::string>& ListString = myHomardHypothesis->GetZones();
+  HOMARD::listeZonesHypo_var aResult = new HOMARD::listeZonesHypo;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+
+//=============================================================================
+HOMARD::listeIters* HOMARD_Hypothesis_i::GetIterations()
+{
+  ASSERT(myHomardHypothesis);
+  const std::list<std::string>& ListString = myHomardHypothesis->GetIterations();
+  HOMARD::listeIters_var aResult = new HOMARD::listeIters;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Hypothesis_i::AddComp( const char* NomComposant )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->AddComp( NomComposant );
+}
+
+//=============================================================================
+void HOMARD_Hypothesis_i::SupprComp()
+{
+  ASSERT( myHomardHypothesis );  
+  myHomardHypothesis->SupprComp();
+}
+
+//=============================================================================
+HOMARD::listeComposantsHypo* HOMARD_Hypothesis_i::GetListComp()
+{
+  ASSERT( myHomardHypothesis );
+  const std::list<std::string>& ListString = myHomardHypothesis->GetListComp();
+  HOMARD::listeComposantsHypo_var aResult = new HOMARD::listeComposantsHypo;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::AddGroup( const char* Group)
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->AddGroup( Group );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SetGroups(const HOMARD::ListGroupType& ListGroup)
+{
+  ASSERT( myHomardHypothesis );
+  std::list<std::string> ListString;
+  for ( int i = 0; i < ListGroup.length(); i++ )
+  {
+      ListString.push_back(std::string(ListGroup[i]));
+  }
+  myHomardHypothesis->SetGroups( ListString );
+}
+//=============================================================================
+HOMARD::ListGroupType*  HOMARD_Hypothesis_i::GetGroups()
+{
+  ASSERT( myHomardHypothesis );
+  const std::list<std::string>& ListString = myHomardHypothesis->GetGroups();
+  HOMARD::ListGroupType_var aResult = new HOMARD::ListGroupType;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Hypothesis_i::SetTypeFieldInterp( CORBA::Long TypeFieldInterp )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetTypeFieldInterp( TypeFieldInterp );
+}
+//=============================================================================
+CORBA::Long HOMARD_Hypothesis_i::GetTypeFieldInterp()
+{
+  ASSERT( myHomardHypothesis );
+  return CORBA::Long( myHomardHypothesis->GetTypeFieldInterp() );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::AddFieldInterp( const char* FieldInterp )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->AddFieldInterp( FieldInterp );
+}
+
+//=============================================================================
+void HOMARD_Hypothesis_i::SupprFieldInterp()
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SupprFieldInterp();
+}
+
+//=============================================================================
+HOMARD::listFieldInterpHypo* HOMARD_Hypothesis_i::GetListFieldInterp()
+{
+  ASSERT( myHomardHypothesis );
+  const std::list<std::string>& ListString = myHomardHypothesis->GetListFieldInterp();
+  HOMARD::listFieldInterpHypo_var aResult = new HOMARD::listFieldInterpHypo;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+
+//=============================================================================
+std::string HOMARD_Hypothesis_i::Dump() const
+{
+  return HOMARD::Dump( *myHomardHypothesis );
+}
+
+//=============================================================================
+bool HOMARD_Hypothesis_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardHypothesis, stream );
+}
diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx
new file mode 100644 (file)
index 0000000..d5268df
--- /dev/null
@@ -0,0 +1,74 @@
+#ifndef _HOMARD_HYPOTHESIS_I_HXX_
+#define _HOMARD_HYPOTHESIS_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HOMARD_Gen)
+#include CORBA_SERVER_HEADER(HOMARD_Hypothesis)
+
+#include <string>
+
+class HOMARD_Hypothesis;
+
+class HOMARD_Hypothesis_i: public virtual POA_HOMARD::HOMARD_Hypothesis,
+                          public virtual PortableServer::ServantBase
+{ 
+public:
+  HOMARD_Hypothesis_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i );
+  HOMARD_Hypothesis_i();
+
+  virtual ~HOMARD_Hypothesis_i();
+
+  void                         SetName( const char* NomHypothesis );
+  char*                        GetName();
+  void                         SetCaseCreation( const char* NomCaseCreation );
+  char*                        GetCaseCreation();
+  char*                        GetDumpPython();
+
+  void                         SetAdapRefinUnRef( CORBA::Long TypeAdap, CORBA::Long TypeRaff, CORBA::Long TypeDera );
+  HOMARD::listeTypes*          GetAdapRefinUnRef();
+  CORBA::Long                  GetAdapType();
+  CORBA::Long                  GetRefinType();
+  CORBA::Long                  GetUnRefType();
+
+  void                         SetField( const char* FieldName );
+  char*                        GetFieldName();
+  void                         SetRefinThr(CORBA::Long TypeThR, CORBA::Double ThreshR);
+  CORBA::Long                  GetRefinThrType();
+  void                         SetUnRefThr(CORBA::Long TypeThC, CORBA::Double ThreshC);
+  CORBA::Long                  GetUnRefThrType();
+  void                         SetUseComp(CORBA::Long UsCmpI);
+  void                         SetUseField(CORBA::Long UsField);
+  HOMARD::InfosHypo*           GetField();
+
+  void                         AddIteration( const char* NomIteration );
+  void                         AddZone( const char* NomZone );
+  void                         SupprZone( const char* NomZone );
+  void                         AddComp( const char* NomComposant );
+  void                         SupprComp();
+
+  HOMARD::listeComposantsHypo* GetListComp();
+  HOMARD::listeIters*          GetIterations();
+  HOMARD::listeZonesHypo*      GetZones();
+
+  void                         AddGroup( const char* Group);
+  void                         SetGroups(const HOMARD::ListGroupType& ListGroup);
+  HOMARD::ListGroupType*       GetGroups();
+
+  void                         SetTypeFieldInterp( CORBA::Long TypeFieldInterp );
+  CORBA::Long                  GetTypeFieldInterp();
+  void                         AddFieldInterp( const char* FieldInterp );
+  void                         SupprFieldInterp();
+  HOMARD::listFieldInterpHypo* GetListFieldInterp();
+
+
+  std::string                  Dump() const;
+  bool                         Restore( const std::string& stream );
+
+private:
+  ::HOMARD_Hypothesis*         myHomardHypothesis;
+
+  CORBA::ORB_ptr               _orb;
+  HOMARD::HOMARD_Gen_var       _gen_i;
+};
+
+#endif
diff --git a/src/HOMARD_I/HOMARD_Iteration_i.cxx b/src/HOMARD_I/HOMARD_Iteration_i.cxx
new file mode 100644 (file)
index 0000000..bbd7b18
--- /dev/null
@@ -0,0 +1,271 @@
+#include "HOMARD_Iteration_i.hxx"
+#include "HOMARD_Gen_i.hxx"
+#include "HOMARD_Iteration.hxx"
+#include "HOMARD_DriverTools.hxx"
+
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Iteration_i::HOMARD_Iteration_i()
+{
+  MESSAGE( "Default constructor, not for use" );
+  ASSERT( 0 );
+}
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Iteration_i::HOMARD_Iteration_i( CORBA::ORB_ptr orb,
+                                       HOMARD::HOMARD_Gen_var engine )
+{
+  MESSAGE( "HOMARD_Iteration_i" );
+  _gen_i = engine;
+  _orb = orb;
+  myHomardIteration = new ::HOMARD_Iteration();
+  ASSERT( myHomardIteration );
+}
+
+//=============================================================================
+/*!
+ *  standard destructor
+ */
+//=============================================================================
+HOMARD_Iteration_i::~HOMARD_Iteration_i()
+{
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Iteration_i::SetName( const char* NomIter )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetName( NomIter );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetName()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetName().c_str() );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetDumpPython()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetDumpPython().c_str() );
+}
+
+//=============================================================================
+
+//=============================================================================
+void HOMARD_Iteration_i::SetEtat( CORBA::Boolean Etat )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetEtat( Etat );
+}
+
+//=============================================================================
+CORBA::Boolean HOMARD_Iteration_i::GetEtat()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::Boolean( myHomardIteration->GetEtat());
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetNumber( CORBA::Long NumIter )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetNumber( NumIter );
+}
+
+//=============================================================================
+CORBA::Long HOMARD_Iteration_i::GetNumber()
+{
+  ASSERT( myHomardIteration );
+  return  myHomardIteration->GetNumber() ;
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetMeshName( const char* NomMesh )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetMeshName( NomMesh );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetMeshName()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetMeshName().c_str() );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetIterParent()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetIterParent().c_str() );
+
+}
+
+//=============================================================================
+HOMARD::listeIterFilles* HOMARD_Iteration_i::GetIterations()
+{
+  ASSERT( myHomardIteration );
+  const std::list<std::string>& maListe = myHomardIteration->GetIterations();
+  HOMARD::listeIterFilles_var aResult = new HOMARD::listeIterFilles;
+  aResult->length( maListe.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = maListe.begin(); it != maListe.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetIterParent( const char* NomIterParent )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetIterParent( NomIterParent );
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::AddIteration( const char* NomIter )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->AddIteration( NomIter );
+}
+
+//=============================================================================
+CORBA::Boolean  HOMARD_Iteration_i::Compute()
+{
+  ASSERT( myHomardIteration );
+  return  CORBA::Boolean( myHomardIteration->Compute() );
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetMeshFile( const char* MeshFile )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetMeshFile( MeshFile );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetMeshFile()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetMeshFile().c_str() );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetCaseName()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetCaseName().c_str() );
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetCaseName( const char* NomCas )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetCaseName( NomCas );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetDirName()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetDirName().c_str() );
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetDirName( const char* NomDir )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetDirName( NomDir );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetHypoName()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetHypoName().c_str() );
+
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetHypoName( const char* NomHypo )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetHypoName( NomHypo );
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetFieldFile( const char* FieldFile )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetFieldFile( FieldFile );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetFieldFile()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetFieldFile().c_str() );
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetTimeStepRank( CORBA::Long TimeStep, CORBA::Long Rank )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetTimeStepRank( TimeStep, Rank );
+}
+
+//=============================================================================
+CORBA::Long HOMARD_Iteration_i::GetTimeStep()
+{
+  ASSERT( myHomardIteration );
+  return  CORBA::Long( myHomardIteration->GetTimeStep() );
+}
+
+//=============================================================================
+CORBA::Long HOMARD_Iteration_i::GetRank()
+{
+  ASSERT( myHomardIteration );
+  return  CORBA::Long( myHomardIteration->GetRank() );
+}
+
+//=============================================================================
+void HOMARD_Iteration_i::SetMessFile( const char* MessFile )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetMessFile( MessFile );
+}
+
+//=============================================================================
+char* HOMARD_Iteration_i::GetMessFile()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetMessFile().c_str() );
+}
+//=============================================================================
+std::string HOMARD_Iteration_i::Dump() const
+{
+  return HOMARD::Dump( *myHomardIteration );
+}
+
+//=============================================================================
+bool HOMARD_Iteration_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardIteration, stream );
+}
diff --git a/src/HOMARD_I/HOMARD_Iteration_i.hxx b/src/HOMARD_I/HOMARD_Iteration_i.hxx
new file mode 100644 (file)
index 0000000..79906e1
--- /dev/null
@@ -0,0 +1,73 @@
+#ifndef _HOMARD_ITERATION_I_HXX_
+#define _HOMARD_ITERATION_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HOMARD_Gen)
+#include CORBA_SERVER_HEADER(HOMARD_Iteration)
+
+#include <string>
+
+class HOMARD_Iteration;
+
+class HOMARD_Iteration_i: public virtual POA_HOMARD::HOMARD_Iteration,
+                         public virtual PortableServer::ServantBase
+{ 
+public:
+  HOMARD_Iteration_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i );
+  HOMARD_Iteration_i();
+  
+  virtual ~HOMARD_Iteration_i();
+
+  void                   SetName( const char* NomIteration );
+  char*                  GetName();
+  char*                  GetDumpPython();
+
+  void                   SetEtat( CORBA::Boolean etat );
+  CORBA::Boolean         GetEtat();
+
+  void                   SetNumber( CORBA::Long NumIter );
+  CORBA::Long            GetNumber();
+
+  void                   SetMeshName( const char* NomMesh );
+  char*                  GetMeshName();
+
+  void                   SetMeshFile( const char* MeshFile );
+  char*                  GetMeshFile();
+
+  void                   SetFieldFile( const char* FieldFile );
+  char*                  GetFieldFile();
+  void                   SetTimeStepRank( CORBA::Long TimeStep, CORBA::Long Rank );
+  CORBA::Long            GetTimeStep();
+  CORBA::Long            GetRank();
+
+  void                   SetMessFile( const char* MessFile );
+  char*                  GetMessFile();
+
+  void                   SetIterParent( const char* NomIterParent );
+  char*                  GetIterParent();
+
+  void                   AddIteration( const char* NomIteration );
+  HOMARD::listeIterFilles* GetIterations();
+
+  void                   SetCaseName( const char* NomCas );
+  char*                  GetCaseName();
+
+  void                   SetDirName( const char* NomDir );
+  char*                  GetDirName();
+
+  void                   SetHypoName( const char* NomHypo );
+  char*                  GetHypoName();
+
+  CORBA::Boolean         Compute();
+
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
+
+private:
+  ::HOMARD_Iteration*    myHomardIteration;
+
+  CORBA::ORB_ptr         _orb;
+  HOMARD::HOMARD_Gen_var _gen_i;
+};
+
+#endif
diff --git a/src/HOMARD_I/HOMARD_Zone_i.cxx b/src/HOMARD_I/HOMARD_Zone_i.cxx
new file mode 100644 (file)
index 0000000..5bee195
--- /dev/null
@@ -0,0 +1,183 @@
+#include "HOMARD_Zone_i.hxx"
+#include "HOMARD_Gen_i.hxx"
+#include "HOMARD_Zone.hxx"
+#include "HOMARD_DriverTools.hxx"
+
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Zone_i::HOMARD_Zone_i()
+{
+  MESSAGE( "Default constructor, not for use" );
+  ASSERT( 0 );
+}
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+HOMARD_Zone_i::HOMARD_Zone_i( CORBA::ORB_ptr orb,
+                             HOMARD::HOMARD_Gen_var engine )
+{
+  MESSAGE( "HOMARD_Zone_i" );
+  _gen_i = engine;
+  _orb = orb;
+  myHomardZone = new ::HOMARD_Zone();
+  ASSERT( myHomardZone );
+}
+//=============================================================================
+/*!
+ *  standard destructor
+ */
+//=============================================================================
+
+HOMARD_Zone_i::~HOMARD_Zone_i()
+{
+}
+
+//=============================================================================
+/*!
+ */
+//=============================================================================
+void HOMARD_Zone_i::SetName( const char* NomZone )
+{
+  ASSERT( myHomardZone );
+  myHomardZone->SetName( NomZone );
+}
+
+//=============================================================================
+char* HOMARD_Zone_i::GetName()
+{
+  ASSERT( myHomardZone );
+  return CORBA::string_dup( myHomardZone->GetName().c_str() );
+}
+
+//=============================================================================
+char* HOMARD_Zone_i::GetDumpPython()
+{
+  ASSERT( myHomardZone );
+  return CORBA::string_dup( myHomardZone->GetDumpPython().c_str() );
+}
+
+
+//=============================================================================
+void HOMARD_Zone_i::SetZoneType( CORBA::Long ZoneType )
+{
+  ASSERT( myHomardZone );
+  myHomardZone->SetZoneType( ZoneType );
+}
+
+//=============================================================================
+CORBA::Long HOMARD_Zone_i::GetZoneType()
+{
+  ASSERT( myHomardZone );
+  return  CORBA::Long( myHomardZone->GetZoneType() );
+}
+
+//=============================================================================
+void HOMARD_Zone_i::SetBox( double X0, double X1, double X2, double X3, double X4, double X5 )
+{
+  ASSERT( myHomardZone );
+  myHomardZone->SetBox( X0, X1, X2, X3, X4, X5 );
+}
+
+//=============================================================================
+HOMARD::double_array* HOMARD_Zone_i::GetBox()
+{
+  ASSERT( myHomardZone );
+  HOMARD::double_array_var aResult = new HOMARD::double_array();
+  std::vector<double> mesCoor = myHomardZone->GetBox();
+  aResult->length( mesCoor .size() );
+  std::vector<double>::const_iterator it;
+  int i = 0;
+  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
+    aResult[i++] = (*it);
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Zone_i::SetSphere( double Xcentre, double Ycentre, double ZCentre, double rayon )
+{
+  ASSERT( myHomardZone );
+  myHomardZone->SetSphere( Xcentre, Ycentre, ZCentre, rayon );
+}
+
+//=============================================================================
+HOMARD::double_array* HOMARD_Zone_i::GetSphere()
+{
+  ASSERT( myHomardZone );
+  HOMARD::double_array_var aResult = new HOMARD::double_array();
+  std::vector<double> mesCoor = myHomardZone->GetSphere();
+  aResult->length( mesCoor .size() );
+  std::vector<double>::const_iterator it;
+  int i = 0;
+  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
+    aResult[i++] = (*it);
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Zone_i::SetLimit( double Xincr, double Yincr, double Zincr )
+{
+  MESSAGE ("SetLimit, Xincr : " << Xincr << ", Yincr : " << Yincr << ", Zincr : " << Zincr) ;
+  ASSERT( myHomardZone );
+  myHomardZone->SetLimit( Xincr, Yincr, Zincr );
+}
+
+//=============================================================================
+HOMARD::double_array* HOMARD_Zone_i::GetLimit()
+{
+  ASSERT( myHomardZone );
+  HOMARD::double_array_var aResult = new HOMARD::double_array();
+  std::vector<double> mesCoor = myHomardZone->GetLimit();
+  aResult->length( mesCoor .size() );
+  std::vector<double>::const_iterator it;
+  int i = 0;
+  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
+    aResult[i++] = (*it);
+  return aResult._retn();
+}
+
+//=============================================================================
+void HOMARD_Zone_i::AddHypo( const char* NomHypo )
+{
+  ASSERT( myHomardZone );
+  myHomardZone->AddHypo( NomHypo );
+}
+
+//=============================================================================
+void HOMARD_Zone_i::SupprHypo( const char* NomHypo )
+{
+  ASSERT( myHomardZone );
+  myHomardZone->SupprHypo( NomHypo );
+}
+//=============================================================================
+HOMARD::listeHypo* HOMARD_Zone_i::GetHypo()
+{
+  ASSERT( myHomardZone );
+  const std::list<std::string>& maListe = myHomardZone->GetHypo();
+  HOMARD::listeHypo_var aResult = new HOMARD::listeHypo;
+  aResult->length( maListe.size() );
+  std:: list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = maListe.begin(); it != maListe.end(); it++ )
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  return aResult._retn();
+}
+
+//=============================================================================
+std::string HOMARD_Zone_i::Dump() const
+{
+  return HOMARD::Dump( *myHomardZone );
+}
+
+//=============================================================================
+bool HOMARD_Zone_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardZone, stream );
+}
diff --git a/src/HOMARD_I/HOMARD_Zone_i.hxx b/src/HOMARD_I/HOMARD_Zone_i.hxx
new file mode 100644 (file)
index 0000000..1d5e72b
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef _HOMARD_Zone_I_HXX_
+#define _HOMARD_Zone_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HOMARD_Gen)
+#include CORBA_SERVER_HEADER(HOMARD_Zone)
+
+#include <string>
+
+class HOMARD_Zone;
+
+class HOMARD_Zone_i: public virtual POA_HOMARD::HOMARD_Zone,
+                     public virtual PortableServer::ServantBase
+{ 
+public:
+  HOMARD_Zone_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i );
+  HOMARD_Zone_i();
+  
+  virtual ~HOMARD_Zone_i();
+
+  void                   SetName( const char* NomZone );
+  char*                  GetName();
+  char*                  GetDumpPython();
+  
+  void                   SetZoneType( CORBA::Long ZoneType );
+  
+  CORBA::Long            GetZoneType();
+  
+  HOMARD::double_array*  GetBox();
+  void                   SetBox( double Xmini, double Xmaxi, 
+                                double Ymini, double Ymaxi, 
+                                double Zmini, double Zmaxi );
+  
+  HOMARD::double_array*  GetSphere();
+  void                   SetSphere( double Xcentre, double Ycentre, double ZCentre,
+                                   double rayon );
+  
+  HOMARD::double_array*  GetLimit();
+  void                   SetLimit( double Xincr, double Yincr, double Zincr);
+  
+  void                   AddHypo( const char *NomHypo );
+  void                   SupprHypo( const char *NomHypo );
+  HOMARD::listeHypo*     GetHypo();
+  
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
+
+private:
+  ::HOMARD_Zone*         myHomardZone;
+  
+  CORBA::ORB_ptr         _orb;
+  HOMARD::HOMARD_Gen_var _gen_i;
+};
+
+#endif
diff --git a/src/HOMARD_I/HomardMedCommun.cxx b/src/HOMARD_I/HomardMedCommun.cxx
new file mode 100644 (file)
index 0000000..bacc234
--- /dev/null
@@ -0,0 +1,261 @@
+#include "HomardMedCommun.h"
+using namespace std;
+#include <iostream>
+#include <cstdlib>
+#include <cmath>
+#include <cstring>
+
+extern "C" 
+{
+#include <med.h>
+}
+
+#include "utilities.h"
+// =======================================================================
+std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
+// =======================================================================
+{
+   std::set<std::string> ListeGroupes;
+   int MedIdt = MEDouvrir(const_cast<char *>(aFile),MED_LECTURE);
+   if ( MedIdt < 0 ) { return ListeGroupes; };
+
+   char maa[MED_TAILLE_NOM+1];
+   char desc[MED_TAILLE_DESC+1];
+   char nomfam[MED_TAILLE_NOM+1];
+   med_int numfam;
+
+   med_int mdim;
+   med_maillage type;
+   med_int numMaillage=1;
+   if ( MEDmaaInfo(MedIdt,numMaillage,maa,&mdim,&type,desc) < 0 ) { return ListeGroupes; };
+   med_int nfam, ngro, natt;
+   if ((nfam = MEDnFam(MedIdt,maa)) < 0) { return ListeGroupes; };
+   for (int i=0;i<nfam;i++) 
+   {
+      if ((ngro = MEDnGroupe(MedIdt,maa,i+1)) < 0) 
+      {
+        // GERALD -- QMESSAGE BOX
+        std::cerr << " Error : Families are unreadable" << std::endl;
+        std::cerr << "Pb avec la famille : " << i << std::endl;
+        break;
+      }
+      if (ngro == 0) continue;
+
+      if ((natt = MEDnAttribut(MedIdt,maa,i+1)) < 0) 
+      {
+        // GERALD -- QMESSAGE BOX
+        std::cerr << " Error : Families are unreadable" << std::endl;
+        std::cerr << "Pb avec la famille : " << i << std::endl;
+        break;
+      }
+
+      med_int* attide = (med_int*) malloc(sizeof(med_int)*natt);
+      med_int* attval = (med_int*) malloc(sizeof(med_int)*natt);
+      char*    attdes = (char *)   malloc(MED_TAILLE_DESC*natt+1);
+      char*    gro    = (char*)    malloc(MED_TAILLE_LNOM*ngro+1);
+      if (MEDfamInfo(MedIdt,maa,i+1,nomfam,&numfam,attide,attval,attdes,
+                      &natt,gro,&ngro) < 0) 
+      { 
+        // GERALD -- QMESSAGE BOX
+        std::cerr << " Error : Families are unreadable" << std::endl;
+        std::cerr << "Pb avec la famille : " << i << std::endl;
+         break;
+      }
+      free(attide);
+      free(attval);
+      free(attdes);
+      if ((numfam )> 0) { continue;} // On ne garde que les familles d elts
+
+      for (int j=0;j<ngro;j++) 
+      {
+           char str2[MED_TAILLE_LNOM+1];
+           strncpy(str2,gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
+           str2[MED_TAILLE_LNOM] = '\0';
+           ListeGroupes.insert(std::string(str2));
+
+      }
+      free(gro);
+   }
+   MEDfermer(MedIdt);
+   return ListeGroupes;
+}
+
+// =======================================================================
+std::vector<double> GetBoundingBoxInMedFile(const char * aFile)
+// =======================================================================
+{
+// Le vecteur en retour contiendra les informations suivantes :
+// en position 0 et 1 Xmin, Xmax et en position 2 Dx si < 0  2D
+// en position 3 et 4 Ymin, Ymax et en position 5 Dy si < 0  2D
+// en position 6 et 7 Zmin, Zmax et en position 8 Dz si < 0  2D
+//  9 distance max dans le maillage
+
+   std::vector<double> LesExtremes;
+   
+                               // Ouverture du Fichier Med
+   int MedIdt = MEDouvrir(const_cast<char *>(aFile),MED_LECTURE);
+   if (MedIdt <0) 
+   {
+          // GERALD -- QMESSAGE BOX
+          std::cerr << "Error : mesh is unreadable" << std::endl;
+          return LesExtremes;
+   }
+
+                                // Le fichier Med est lisible
+                               // Boucle sur les noms de maillage
+   int numberOfMeshes = MEDnMaa(MedIdt) ;
+   if (numberOfMeshes != 1 ) 
+   {
+          // GERALD -- QMESSAGE BOX
+          std::cerr << "Error : file contains more than one mesh" << std::endl;
+          return LesExtremes;
+   }
+
+   char maa[MED_TAILLE_NOM+1];
+   char desc[MED_TAILLE_DESC+1];
+   char nomcoo[3*MED_TAILLE_PNOM+1];
+   char unicoo[3*MED_TAILLE_PNOM+1];
+   med_maillage type;
+   med_repere rep;
+   med_booleen inonoe,inunoe;
+
+   med_int dim;
+   med_int numMaillage=1;
+
+   if (MEDmaaInfo(MedIdt,numMaillage,maa,&dim,&type,desc) < 0) 
+   {
+          // GERALD -- QMESSAGE BOX
+          std::cerr << "Error : mesh " << numMaillage << " is unreadable" << std::endl;
+          return LesExtremes;
+   }
+
+   med_int nnoe  = MEDnEntMaa(MedIdt,maa,MED_COOR,MED_NOEUD,(med_geometrie_element)0,(med_connectivite)0);
+   if ( nnoe < 0) 
+   {
+          // GERALD -- QMESSAGE BOX
+          std::cerr << "Error : mesh " << numMaillage << " is unreadable" << std::endl;
+          return LesExtremes;
+   }
+
+   med_float* coo    = (med_float*) malloc(sizeof(med_float)*nnoe*dim);
+   med_int*   numnoe = (med_int*)   malloc(sizeof(med_int)*nnoe);
+   med_int*   nufano = (med_int*)   malloc(sizeof(med_int)*nnoe);
+   char *     nomnoe = (char*)      malloc(MED_TAILLE_PNOM*nnoe+1);
+
+   MEDnoeudsLire(MedIdt,maa,dim,coo,MED_NO_INTERLACE,&rep,
+                      nomcoo,unicoo,nomnoe,&inonoe,numnoe,&inunoe,
+                      nufano,nnoe);
+
+   med_float xmin,xmax,ymin,ymax,zmin,zmax;
+   
+   xmin=coo[0];
+   xmax=coo[0];
+   for (int i=1;i<nnoe;i++)
+   {
+      xmin = min(xmin,coo[i]);
+      xmax = max(xmax,coo[i]);
+   }
+//
+   if (dim > 1)
+   {
+       ymin=coo[nnoe]; ymax=coo[nnoe];
+       for (int i=nnoe+1;i<2*nnoe;i++)
+       {
+           ymin = min(ymin,coo[i]);
+           ymax = max(ymax,coo[i]);
+       }
+   }
+   else
+   {
+       ymin=0;
+       ymax=0;
+       zmin=0;
+       zmax=0;
+   }
+//
+   if (dim > 2)
+   {
+       zmin=coo[2*nnoe]; zmax=coo[2*nnoe];
+       for (int i=2*nnoe+1;i<3*nnoe;i++)
+       {
+           zmin = min(zmin,coo[i]);
+           zmax = max(zmax,coo[i]);
+       }
+   }
+   else
+   {
+       zmin=0;
+       zmax=0;
+   }
+   MEDfermer(MedIdt);
+
+   MESSAGE( "_______________________________________");
+   MESSAGE( "xmin : " << xmin << " xmax : " << xmax );
+   MESSAGE( "ymin : " << ymin << " ymax : " << ymax );
+   MESSAGE( "zmin : " << zmin << " zmax : " << zmax );
+   MESSAGE( "_______________________________________" );
+   double epsilon = 1.e-6 ;
+   LesExtremes.push_back(xmin);
+   LesExtremes.push_back(xmax);
+   LesExtremes.push_back(0);
+   LesExtremes.push_back(ymin);
+   LesExtremes.push_back(ymax);
+   LesExtremes.push_back(0);
+   LesExtremes.push_back(zmin);
+   LesExtremes.push_back(zmax);
+   LesExtremes.push_back(0);
+
+
+   double max1=max ( LesExtremes[1] - LesExtremes[0] , LesExtremes[4] - LesExtremes[3] ) ;
+   double max2=max ( max1 , LesExtremes[7] - LesExtremes[6] ) ;
+   LesExtremes.push_back(max2);
+
+// LesExtremes[0] = Xmini du maillage
+// LesExtremes[1] = Xmaxi du maillage
+// LesExtremes[2] = increment de progression en X
+// LesExtremes[3,4,5] : idem pour Y
+// LesExtremes[6,7,8] : idem pour Z
+// LesExtremes[9] = ecart maximal entre coordonnees
+// On fait un traitement pour dans le cas d'une coordonnee constante
+// inhiber ce cas en mettant un increment negatif
+//
+   double diff = LesExtremes[1] - LesExtremes[0];
+   if (fabs(diff)  > epsilon*max2)
+   {
+      LesExtremes[2] = diff/100.;
+   }
+   else
+   {
+      LesExtremes[2] = -1. ;
+   }
+
+   diff = LesExtremes[4] - LesExtremes[3];
+   if (fabs(diff)  > epsilon*max2)
+   {
+      LesExtremes[5]=diff/100.;
+   }
+   else
+   {
+      LesExtremes[5] = -1. ;
+   }
+
+   diff = LesExtremes[7] - LesExtremes[6];
+   if (fabs(diff)  > epsilon*max2)
+   {
+      LesExtremes[8]=diff/100.;
+   }
+   else
+   {
+      LesExtremes[8] = -1. ;
+   }
+
+   MESSAGE ( "_______________________________________" );
+   MESSAGE ( "xmin : " << LesExtremes[0] << " xmax : " << LesExtremes[1] << " xincr : " << LesExtremes[2] );
+   MESSAGE ( "ymin : " << LesExtremes[3] << " ymax : " << LesExtremes[4] << " yincr : " << LesExtremes[5] );
+   MESSAGE ( "zmin : " << LesExtremes[6] << " zmax : " << LesExtremes[7] << " zincr : " << LesExtremes[8] );
+   MESSAGE ( "dmax : " << LesExtremes[9] );
+   MESSAGE ( "_______________________________________" );
+
+   return  LesExtremes;
+}
+
diff --git a/src/HOMARD_I/HomardMedCommun.h b/src/HOMARD_I/HomardMedCommun.h
new file mode 100644 (file)
index 0000000..9f9c65d
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef HOMARDMEDCOMMUN_H
+#define HOMARDMEDCOMMUN_H
+
+#include <vector>
+#include <set>
+#include <string>
+
+extern "C"
+{
+#include <med.h>
+}
+
+std::vector<double>    GetBoundingBoxInMedFile( const char * aFile);
+std::set<std::string>  GetListeGroupesInMedFile(const char * aFile);
+
+#endif // HOMARD%MEDCOMMUN_H
diff --git a/src/HOMARD_I/Makefile.am b/src/HOMARD_I/Makefile.am
new file mode 100644 (file)
index 0000000..121b941
--- /dev/null
@@ -0,0 +1,86 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  HOMARD HOMARD_I : idl implementation based on 'HOMARD' unit's calsses
+#  File   : Makefile.in
+#  Author : Paul RASCLE, EDF
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#  Module : HOMARD
+#  $Header$
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# header files 
+salomeinclude_HEADERS =         \
+       HOMARD_Cas_i.hxx        \
+       HOMARD_Hypothesis_i.hxx \
+       HOMARD_Iteration_i.hxx  \
+       HOMARD_Zone_i.hxx       \
+       HOMARD_Gen_i.hxx        \
+       HOMARD_Boundary_i.hxx   \
+        HomardMedCommun.h
+
+# Libraries targets
+
+lib_LTLIBRARIES = libHOMARDEngine.la
+
+dist_libHOMARDEngine_la_SOURCES = \
+       HOMARD_Cas_i.cxx          \
+       HOMARD_Hypothesis_i.cxx   \
+       HOMARD_Iteration_i.cxx    \
+       HOMARD_Gen_i.cxx          \
+       HOMARD_Zone_i.cxx         \
+       HOMARD_Boundary_i.cxx     \
+        HomardMedCommun.cxx
+
+
+
+# additionnal information to compil and link file
+libHOMARDEngine_la_CPPFLAGS =                \
+       $(CORBA_CXXFLAGS)                     \
+       $(CORBA_INCLUDES)                     \
+       $(KERNEL_CXXFLAGS)                    \
+       $(MED2_INCLUDES)                      \
+       $(SMESH_CXXFLAGS)                     \
+       $(GEOM_CXXFLAGS)                      \
+       -I$(srcdir)/../HOMARD                 \
+       -I$(srcdir)/../HOMARDGUI              \
+       -I$(top_builddir)/idl                 \
+        -I$(GEOM_ROOT_DIR)/include/salome     \
+        -I$(SMESH_ROOT_DIR)/include/salome     \
+        -I$(MED_ROOT_DIR)/include/salome      \
+       -I$(top_builddir)/salome_adm/unix
+
+
+libHOMARDEngine_la_LDFLAGS  =            \
+       ../../idl/libSalomeIDLHOMARD.la  \
+       ../HOMARD/libHOMARDImpl.la       \
+       $(KERNEL_LDFLAGS)                \
+       $(MED2_LIBS)                     \
+       -lSalomeContainer                \
+       -lSalomeNS                       \
+       -lRegistry                       \
+       -lSalomeHDFPersist               \
+       -lSalomeLifeCycleCORBA           \
+       -lTOOLSDS                        \
+       -lSalomeGenericObj               \
+        $(SMESH_LDFLAGS)                 \
+        -lSMESHClient
diff --git a/src/HOMARD_I/driver_gen_i.cxx b/src/HOMARD_I/driver_gen_i.cxx
new file mode 100644 (file)
index 0000000..d5fefbe
--- /dev/null
@@ -0,0 +1,245 @@
+#include <utilities.h>
+#include "driver_gen_i.h"
+
+
+//===========================================================================
+    Driver_Base_Gen_i::Driver_Base_Gen_i(CORBA::ORB_ptr orb,
+                                        PortableServer::POA_ptr poa,
+                                        PortableServer::ObjectId * contId,
+                                        const char *instanceName,
+                                        const char *interfaceName) 
+//     :Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
+  {
+    MESSAGE("Driver_Base_Gen_i::Driver_Base_Gen_i : ");
+  };
+
+//===========================================================================
+  Driver_Base_Gen_i::~Driver_Base_Gen_i()
+  {
+    MESSAGE("Driver_Base_Gen_i::~Driver_Base_Gen_i");
+  };
+
+//===========================================================================
+  CORBA::Boolean Driver_Base_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
+                                 const SALOMEDS::TMPFile & theStream,
+                                 const char* theURL,
+                                 bool isMultiFile)
+  {
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::Load");
+    MESSAGE("Should be implemented");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    return false;
+  };
+
+//===========================================================================
+  CORBA::Boolean Driver_Base_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
+                                      const SALOMEDS::TMPFile & theStream,
+                                      const char* theURL,
+                                      bool isMultiFile)
+  {
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::LoadASCII");
+    MESSAGE("Should be implemented");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    return false;
+  };
+
+//===========================================================================
+  char* Driver_Base_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
+                                          const char* aLocalPersistentID,
+                                          CORBA::Boolean isMultiFile,
+                                          CORBA::Boolean isASCII)
+  {
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::LocalPersistentIDToIOR");
+    MESSAGE("Should be implemented");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    CORBA::String_var aString("");
+    return aString._retn();
+  };
+
+//===========================================================================
+  SALOMEDS::TMPFile* Driver_Base_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
+                                     const char* theURL,
+                                     bool isMultiFile)
+  {
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::Save");
+    MESSAGE("Should be implemented");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
+    return aStreamFile._retn();
+  };
+
+//===========================================================================
+  SALOMEDS::TMPFile* Driver_Base_Gen_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
+                                          const char* theURL,
+                                          bool isMultiFile)
+  {
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::SaveASCII");
+    MESSAGE("Should be implemented");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
+    return aStreamFile._retn();
+  };
+
+//===========================================================================
+  char* Driver_Base_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
+                                          const char* IORString,
+                                          CORBA::Boolean isMultiFile,
+                                          CORBA::Boolean isASCII)
+  {
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::IORToLocalPersistentID");
+    MESSAGE("Should be implemented");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    CORBA::String_var aString("");
+    return aString._retn();
+  };
+
+
+//===========================================================================
+  void Driver_Base_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
+  {
+    MESSAGE("------------------------");
+    MESSAGE("Driver_Base_Gen_i::Close");
+    MESSAGE("------------------------");
+  };
+
+//===========================================================================
+  char* Driver_Base_Gen_i::ComponentDataType()
+  {
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::ComponentDataType");
+    MESSAGE("Should be implemented");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    return CORBA::string_dup("J aurais du nommer mon type prefere");
+  };
+
+//===========================================================================
+  bool Driver_Base_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) 
+  {
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::CanPublishInStudy");
+    MESSAGE("Should be implemented");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    return false;
+  };
+
+//===========================================================================
+  SALOMEDS::SObject_ptr Driver_Base_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
+                                                  SALOMEDS::SObject_ptr theSObject,
+                                                  CORBA::Object_ptr theObject,
+                                                  const char* theName)
+    throw (SALOME::SALOME_Exception)
+  {
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::PublishInStudy");
+    MESSAGE("Should be implemented");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    SALOMEDS::SObject_var aResultSO;
+    return aResultSO._retn();
+  };
+
+//===========================================================================
+  CORBA::Boolean Driver_Base_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) 
+  {
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::CanCopy");
+    MESSAGE("Should be implemented");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    //return false;
+    return true;
+  };
+
+//===========================================================================
+  SALOMEDS::TMPFile* Driver_Base_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject,
+                                            CORBA::Long& theObjectID)
+{
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::CopyFrom");
+    MESSAGE("Should be implemented");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    MESSAGE("--------------------------------------");
+    SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
+    return aStreamFile._retn();
+};
+
+//===========================================================================
+  SALOMEDS::SObject_ptr Driver_Base_Gen_i::PasteInto( const SALOMEDS::TMPFile & theStream,
+                                                     CORBA::Long theObjectID,
+                                                     SALOMEDS::SObject_ptr theSObject)
+  {
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::PasteInto");
+    MESSAGE("Should be implemented");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    SALOMEDS::SObject_var aResultSO;
+    return aResultSO._retn();
+  };
+
+//===========================================================================
+   CORBA::Boolean  Driver_Base_Gen_i::CanPaste ( const char *theComponentName,
+                                                CORBA::Long theObjectID)
+  {
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("Driver_Base_Gen_i::CanPaste");
+    MESSAGE("Should be implemented");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    MESSAGE("-----------------------------------------");
+    return false;
+  };
+
+  
diff --git a/src/HOMARD_I/driver_gen_i.h b/src/HOMARD_I/driver_gen_i.h
new file mode 100644 (file)
index 0000000..06a3a11
--- /dev/null
@@ -0,0 +1,86 @@
+#ifndef __DRIVER_BAS_GEN_I_H__
+#define __DRIVER_BAS_GEN_I_H__
+
+#include "SALOME_Component_i.hxx"
+#include "SALOME_NamingService.hxx"
+
+#include CORBA_CLIENT_HEADER(SALOMEDS)
+
+
+//---------------------------------------------------------
+  class Driver_Base_Gen_i :
+         public virtual POA_SALOMEDS::Driver
+//---------------------------------------------------------
+  {
+
+
+    Driver_Base_Gen_i();
+  public:
+    Driver_Base_Gen_i(CORBA::ORB_ptr orb,
+                     PortableServer::POA_ptr poa,
+                     PortableServer::ObjectId * contId,
+                     const char *instanceName,
+                     const char *interfaceName);
+
+
+    virtual ~Driver_Base_Gen_i();
+
+    //---------------------------------------------
+    // inherited methods from SALOMEDS::Driver
+    //---------------------------------------------
+
+    //virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
+     SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
+                                   const char* theURL,
+                                   bool isMultiFile);
+
+    virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
+                                        const char* theURL,
+                                        bool isMultiFile);
+
+    virtual bool Load(SALOMEDS::SComponent_ptr,
+                     const SALOMEDS::TMPFile &,
+                     const char* theURL,
+                     bool isMultiFile);
+
+    virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
+                          const SALOMEDS::TMPFile &,
+                          const char* theURL,
+                          bool isMultiFile);
+
+    virtual void Close(SALOMEDS::SComponent_ptr IORSComponent);
+
+    virtual char* ComponentDataType();
+
+    virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
+                                        const char* IORString,
+                                        CORBA::Boolean isMultiFile,
+                                        CORBA::Boolean isASCII);
+
+    virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
+                                        const char* aLocalPersistentID,
+                                        CORBA::Boolean isMultiFile,
+                                        CORBA::Boolean isASCII);
+
+    virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
+
+    virtual SALOMEDS::SObject_ptr PublishInStudy
+                             (SALOMEDS::Study_ptr theStudy,
+                             SALOMEDS::SObject_ptr theSObject,
+                             CORBA::Object_ptr theObject,
+                             const char* theName) 
+                               throw (SALOME::SALOME_Exception);
+
+    virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
+
+    virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, 
+                                CORBA::Long& theObjectID);
+
+    virtual CORBA::Boolean CanPaste(const char* theComponentName, 
+                            CORBA::Long theObjectID);
+
+    virtual SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
+                                   CORBA::Long theObjectID,
+                                   SALOMEDS::SObject_ptr theObject);
+  };
+#endif
diff --git a/src/HOMARD_SCRIPTS/Makefile.am b/src/HOMARD_SCRIPTS/Makefile.am
new file mode 100644 (file)
index 0000000..e5d2ac8
--- /dev/null
@@ -0,0 +1,39 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  HOMARD_SWIG : binding of C++ omplementaion with Python
+#  File   : Makefile.in
+#  Author : Nicolas REJNERI, Paul RASCLE
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#  Module : HOMARD
+
+
+# Libraries targets
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+
+# Scripts to be installed.
+dist_salomescript_DATA = test_homard.py
diff --git a/src/HOMARD_SCRIPTS/testHomard.py b/src/HOMARD_SCRIPTS/testHomard.py
new file mode 100644 (file)
index 0000000..fe29d76
--- /dev/null
@@ -0,0 +1,13 @@
+import salome
+homard=salome.lcc.FindOrLoadComponent("FactoryServer","HOMARD")
+import os
+home=os.environ["HOME"]
+etape0= home+"essai/etape0"
+archive=+"/archives"
+FichierConfiguration=etape0+"HOMARD.Configuration.0.vers.1"
+monCas=homard.CreateCas("MonCas",etape0)
+print monCas
+monCas.AjoutIter(1,FichierConfiguration)
+print "ici"
+monCas.CalculIter(1)
+print "la"
diff --git a/src/HOMARD_SCRIPTS/test_homard.py b/src/HOMARD_SCRIPTS/test_homard.py
new file mode 100644 (file)
index 0000000..3eb1458
--- /dev/null
@@ -0,0 +1,218 @@
+import salome
+salome.salome_init()
+
+import HOMARD
+
+#
+# initialize engine
+#
+homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
+
+def test_save(fname):
+    #
+    # create new study
+    #
+    study = salome.myStudyManager.NewStudy("HOMARD")
+    homard.SetCurrentStudy(study)
+    #
+    # create case
+    #
+    case_1 = homard.CreateCas("Case 1")
+    case_1.SetNomDir("/tmp/homard")
+    case_1.SetTypeConf(12)
+    case_1.SetBoiteEnglobante([1.2,2.3,3.4,4.5,5.6,6.7,7.8,8.9,9.10,10.11])
+    #
+    # create hypothesis 1
+    #
+    hypo_1 = homard.CreateHypothese("Hypothesis 1")
+    hypo_1.SetTypeAdapRaffDera(2,3,4)
+    hypo_1.SetField("Field 1", 12, 3.45, 67, 23.343)
+    hypo_1.AjoutComposant("Comp 1")
+    hypo_1.AjoutComposant("Comp 2")
+    hypo_1.AjoutComposant("Comp 3")
+    #
+    # create hypothesis 2
+    #
+    hypo_2 = homard.CreateHypothese("Hypothesis 2")
+    hypo_2.SetTypeAdapRaffDera(20,30,40)
+    hypo_2.SetField("Field 2", 5, 12.67223, 900, 6.5434)
+    hypo_2.AjoutComposant("Comp 123")
+    #
+    # create iteration 1
+    #
+    iter_1 = homard.CreateIteration("Iteration 1")
+    iter_1.SetEtat(True)
+    iter_1.SetNumIter(56)
+    iter_1.SetMeshFile("/aaaa/bbbb/AAAAA.med")
+    iter_1.SetNomMesh("My Mesh")
+    iter_1.SetField("Field 1", 42, 522)
+    #
+    # create iteration 2
+    #
+    iter_2 = homard.CreateIteration("Iteration 2")
+    iter_2.SetEtat(False)
+    iter_2.SetNumIter(57)
+    iter_2.SetMeshFile("/cccc/cccc/asd.med")
+    iter_2.SetNomMesh("MeshXZY")
+    iter_2.SetField("Field 2", 22222, 50000)
+    #
+    # create iteration 3 (not published)
+    #
+    iter_3 = homard.CreateIteration("Iteration 3")
+    iter_3.SetEtat(True)
+    iter_3.SetNumIter(666)
+    iter_3.SetMeshFile("/not/assigned/iteration/file.med")
+    iter_3.SetNomMesh("NOT ASSIGNED")
+    iter_3.SetField("Field XXX", 999, -1)
+    #
+    # create zone 1
+    #
+    zone_1 = homard.CreateZone("Zone 1")
+    zone_1.SetBox(1.,2.,3.,4.,5.,6.)
+    zone_1.SetTypeZone(5454)
+    #
+    # create zone 2
+    #
+    zone_2 = homard.CreateZone("Zone 2")
+    zone_2.SetSphere(12.3, 3.4, .56, 6.5)
+    zone_2.SetTypeZone(6545)
+    #
+    # associate objects
+    #
+    homard.AssocieCasIteration("Case 1", "Iteration 1")
+    homard.AssocieCasIteration("Case 1", "Iteration 2")
+    homard.AssocieHypoIteration("Iteration 1", "Hypothesis 1")
+    homard.AssocieHypoZone("Zone 1", "Hypothesis 1")
+    homard.AssocieHypoIteration("Iteration 2", "Hypothesis 2")
+    homard.AssocieHypoZone("Zone 2", "Hypothesis 2")
+    homard.AssocieIterationIteration("Iteration 1", "Iteration 2")
+    #
+    # save study
+    #
+    salome.myStudyManager.SaveAs(fname, study, 0)
+    #
+    # close study
+    #
+    salome.myStudyManager.Close(study)
+    #
+    pass
+
+def test_load(fname):
+    #
+    # load study and 
+    #
+    study = salome.myStudyManager.Open(fname)
+    #
+    # load homard data
+    #
+    comp = study.FindComponent("HOMARD")
+    builder = study.NewBuilder()
+    builder.LoadWith(comp, homard)
+    #
+    # dump study id
+    #
+    print homard.GetCurrentStudy()._get_StudyId()
+    #
+    # dump case 1
+    #
+    case_1 = homard.GetCas("Case 1")
+    print "Case: ",          case_1.GetNomCas()
+    print "-> nom dir:",     case_1.GetNomDir()
+    print "-> type conf:",   case_1.GetTypeConf()
+    print "-> boite:",       case_1.GetBoiteEnglobante()
+    print "---"
+    #
+    # dump hypothesis 1
+    #
+    hypo_1 = homard.GetHypothesis("Hypothesis 1")
+    print "Hypothesis: ",    hypo_1.GetNomHypothesis()
+    print "-> type:",        hypo_1.GetTypeAdapRaffDera()
+    print "-> field name:",  hypo_1.GetFieldName()
+    print "-> composants:",  hypo_1.GetComposants()
+    print "-> zones:",       hypo_1.GetZones()
+    print "---"
+    #
+    # dump hypothesis 2
+    #
+    hypo_2 = homard.GetHypothesis("Hypothesis 2")
+    print "Hypothesis: ",    hypo_2.GetNomHypothesis()
+    print "-> type:",        hypo_2.GetTypeAdapRaffDera()
+    print "-> field name:",  hypo_2.GetFieldName()
+    print "-> composants:",  hypo_2.GetComposants()
+    print "-> zones:",       hypo_2.GetZones()
+    print "---"
+    #
+    # dump zone 1
+    #
+    zone_1 = homard.GetZone("Zone 1")
+    print "Zone: ",          zone_1.GetNomZone()
+    print "-> type zone:",   zone_1.GetTypeZone()
+    print "-> shere:",       zone_1.GetSphere()
+    print "-> box:",         zone_1.GetBox()
+    print "-> hypotheses:",  zone_1.GetHypo()
+    print "---"
+    #
+    # dump zone 1
+    #
+    zone_2 = homard.GetZone("Zone 2")
+    print "Zone: ",          zone_2.GetNomZone()
+    print "-> type zone:",   zone_2.GetTypeZone()
+    print "-> shere:",       zone_2.GetSphere()
+    print "-> box:",         zone_2.GetBox()
+    print "-> hypotheses:",  zone_2.GetHypo()
+    print "---"
+    #
+    # dump iteration 1
+    #
+    iter_1 = homard.GetIteration("Iteration 1")
+    print "Iteration: ",     iter_1.GetNomIter()
+    print "-> etat:",        iter_1.GetEtat()
+    print "-> num iter:",    iter_1.GetNumIter()
+    print "-> nom mesh:",    iter_1.GetNomMesh()
+    print "-> mesh file:",   iter_1.GetMeshFile()
+    print "-> field:",       iter_1.GetFieldFileName()
+    print "-> time step:",   iter_1.GetTimeStep()
+    print "-> rank:",        iter_1.GetRank()
+    print "-> parent iter:", iter_1.GetIterParent()
+    print "-> hypothesis:",  iter_1.GetNomHypo()
+    print "-> case:",        iter_1.GetNomCas()
+    print "---"
+    #
+    # dump iteration 2
+    #
+    iter_2 = homard.GetIteration("Iteration 2")
+    print "Iteration: ",     iter_2.GetNomIter()
+    print "-> etat:",        iter_2.GetEtat()
+    print "-> num iter:",    iter_2.GetNumIter()
+    print "-> nom mesh:",    iter_2.GetNomMesh()
+    print "-> mesh file:",   iter_2.GetMeshFile()
+    print "-> field:",       iter_2.GetFieldFileName()
+    print "-> time step:",   iter_2.GetTimeStep()
+    print "-> rank:",        iter_2.GetRank()
+    print "-> parent iter:", iter_2.GetIterParent()
+    print "-> hypothesis:",  iter_2.GetNomHypo()
+    print "-> case:",        iter_2.GetNomCas()
+    print "---"
+    #
+    # dump iteration 3
+    #
+    iter_3 = homard.GetIteration("Iteration 3")
+    print "Iteration: ",     iter_3.GetNomIter()
+    print "-> etat:",        iter_3.GetEtat()
+    print "-> num iter:",    iter_3.GetNumIter()
+    print "-> nom mesh:",    iter_3.GetNomMesh()
+    print "-> mesh file:",   iter_3.GetMeshFile()
+    print "-> field:",       iter_3.GetFieldFileName()
+    print "-> time step:",   iter_3.GetTimeStep()
+    print "-> rank:",        iter_3.GetRank()
+    print "-> parent iter:", iter_3.GetIterParent()
+    print "-> hypothesis:",  iter_3.GetNomHypo()
+    print "-> case:",        iter_3.GetNomCas()
+    print "---"
+
+# test file name
+filename = "/tmp/save_homard.hdf"
+
+# run tests
+test_save(filename)
+test_load(filename)
diff --git a/src/HOMARD_SWIG/HOMARD_shared_modules.py b/src/HOMARD_SWIG/HOMARD_shared_modules.py
new file mode 100644 (file)
index 0000000..bf86722
--- /dev/null
@@ -0,0 +1,20 @@
+"""
+
+"""
+
+# force HOMARD importation at interpretor initialization
+# see salome_shared_modules.py
+# (avoids incomplete import at run time)
+
+print "============== import HOMARD ======================="
+
+import HOMARD
+
+# this function is required
+
+def init_shared_modules():
+   """
+      This function initializes shared modules that need to be
+   """
+   pass
+
diff --git a/src/HOMARD_SWIG/Makefile.am b/src/HOMARD_SWIG/Makefile.am
new file mode 100644 (file)
index 0000000..6ec5d6d
--- /dev/null
@@ -0,0 +1,42 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  HOMARD_SWIG : binding of C++ omplementaion with Python
+#  File   : Makefile.in
+#  Author : Nicolas REJNERI, Paul RASCLE
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#  Module : HOMARD
+
+
+# Libraries targets
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+
+# Scripts to be installed.
+dist_salomescript_DATA =               
+
+sharedpkgpython_PYTHON =               \
+       HOMARD_shared_modules.py
diff --git a/src/HOMARD_SWIG/libHOMARD_Swig.i b/src/HOMARD_SWIG/libHOMARD_Swig.i
new file mode 100644 (file)
index 0000000..2cc7e28
--- /dev/null
@@ -0,0 +1,3 @@
+%module libHOMARD_Swig
+
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100755 (executable)
index 0000000..61e5565
--- /dev/null
@@ -0,0 +1,26 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  File   : Makefile.in
+#  Author : (CEA)
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#
+SUBDIRS = HOMARD  HOMARD_I HOMARDGUI  HOMARD_SWIG
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644 (file)
index 0000000..ed66236
--- /dev/null
@@ -0,0 +1,37 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+
+dist_salomeres_DATA =   \
+     test_1.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.py \
+     test_2.00.med \
+     test_2.fr.med \
+     test_2.apad.03.bilan 
diff --git a/tests/test_1.00.med b/tests/test_1.00.med
new file mode 100644 (file)
index 0000000..767d4f6
Binary files /dev/null and b/tests/test_1.00.med differ
diff --git a/tests/test_1.01.med b/tests/test_1.01.med
new file mode 100644 (file)
index 0000000..91d7fb3
Binary files /dev/null and b/tests/test_1.01.med differ
diff --git a/tests/test_1.02.med b/tests/test_1.02.med
new file mode 100644 (file)
index 0000000..4e94dcd
Binary files /dev/null and b/tests/test_1.02.med differ
diff --git a/tests/test_1.apad.03.bilan b/tests/test_1.apad.03.bilan
new file mode 100644 (file)
index 0000000..1293ce1
--- /dev/null
@@ -0,0 +1,70 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     MAILL                                                                           
+     Date de creation : vendredi 1 octobre 2010 a 13 h 15 mn 42 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   1                             *         22 *
+     * . du niveau   2                             *         76 *
+     ************************************************************
+
+     ************************************************************
+     *                      Tetraedres                          *
+     ************************************************************
+     * Nombre total                                *        197 *
+     ************************************************************
+     * . du niveau   0                             *          0 *
+     * . du niveau   1                             *         13 *
+     * . du niveau   2                             *        184 *
+     ************************************************************
diff --git a/tests/test_1.odt b/tests/test_1.odt
new file mode 100644 (file)
index 0000000..578a8f1
Binary files /dev/null and b/tests/test_1.odt differ
diff --git a/tests/test_1.pdf b/tests/test_1.pdf
new file mode 100644 (file)
index 0000000..1aaaa2c
Binary files /dev/null and b/tests/test_1.pdf differ
diff --git a/tests/test_1.png b/tests/test_1.png
new file mode 100644 (file)
index 0000000..046034c
Binary files /dev/null and b/tests/test_1.png differ
diff --git a/tests/test_1.py b/tests/test_1.py
new file mode 100644 (file)
index 0000000..abbd6d9
--- /dev/null
@@ -0,0 +1,152 @@
+# -*- coding: iso-8859-1 -*-
+"""
+Python script for HOMARD
+Copyright EDF-R&D 2010
+Test test_1
+"""
+__revision__ = "V1.2"
+
+######################################################################################
+Test_Name = "test_1"
+n_iter_test_file = 3
+######################################################################################
+import os
+import sys
+import tempfile
+import HOMARD
+import salome
+#
+pathHomard=os.getenv('HOMARD_ROOT_DIR')
+Rep_Test = os.path.join(pathHomard,"share/salome/resources/homard")
+Rep_Test_Resu = tempfile.mktemp()
+os.mkdir(Rep_Test_Resu)
+
+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
+Copyright EDF-R&D 2010
+  """
+  homard.SetCurrentStudy(theStudy)
+#
+# Creation of the zones
+# =====================
+# Creation of the  box Zone_1
+  Zone_1 = homard.CreateZone('Zone_1', 2)
+  Zone_1.SetBox(-0.01, 1.01, -0.01, 0.4, -0.01, 0.6)
+
+# Creation of the  sphere Zone_2
+  Zone_2 = homard.CreateZone('Zone_2', 4)
+  Zone_2.SetSphere(0.5, 0.6, 0.7, 0.75)
+#
+# Creation of the hypotheses
+# ==========================
+# Creation of the hypothesis Zones_1_et_2
+  Zones_1_et_2 = homard.CreateHypothesis('Zones_1_et_2')
+  Zones_1_et_2.SetAdapRefinUnRef(0, 1, 0)
+  homard.AssociateHypoZone('Zone_1', 'Zones_1_et_2')
+  homard.AssociateHypoZone('Zone_2', 'Zones_1_et_2')
+
+# Creation of the hypothesis a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM
+  a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM = homard.CreateHypothesis('a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
+  a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.SetAdapRefinUnRef(1, 1, 0)
+  a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.SetField('RESU____ERRE_ELEM_SIGM__________')
+  a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.SetUseComp(0)
+  a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.AddComp('ERREST')
+  a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.SetRefinThr(3, 10.1)
+#
+# Creation of the cases
+# =====================
+  # Creation of the case zzzz121b
+  Case_1 = homard.CreateCase('zzzz121b', 'MAILL', os.path.join(Rep_Test, Test_Name + '.00.med'))
+  Case_1.SetDirName(Rep_Test_Resu)
+  Case_1.SetConfType(1)
+#
+# Creation of the iterations
+# ==========================
+# Creation of the iteration I1
+  I1 = homard.CreateIteration('I1', Case_1.GetIter0Name() )
+  I1.SetMeshName('M1')
+  I1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
+  I1.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.00.med'))
+  I1.SetTimeStepRank( 1, 1)
+  homard.AssociateIterHypo('I1', 'a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
+  result1 = homard.Compute('I1', 1)
+
+# Creation of the iteration I2
+  I2 = homard.CreateIteration('I2', 'I1')
+  I2.SetMeshName('M2')
+  I2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
+  I2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.01.med'))
+  I2.SetTimeStepRank( 1, 1)
+  homard.AssociateIterHypo('I2', 'a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
+  result2 = homard.Compute('I2', 1)
+
+# Creation of the iteration I3
+  I3 = homard.CreateIteration('I3', 'I2')
+  I3.SetMeshName('M3')
+  I3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
+  homard.AssociateIterHypo('I3', 'Zones_1_et_2')
+  result3 = homard.Compute('I3', 1)
+  return result1*result2*result3
+
+######################################################################################
+
+homard = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+#
+# Exec of HOMARD-SALOME
+#
+try :
+  result=homard_exec(salome.myStudy)
+  if (result != True):
+      raise Exception('Pb in homard_exec')
+except :
+  raise Exception('Pb in homard_exec')
+  sys.exit(1)
+#
+# Test of the result
+#
+s_iter_test_file = str(n_iter_test_file)
+test_file_suff = "apad.0" + s_iter_test_file + ".bilan"
+rep_test_file = "I0" + s_iter_test_file
+#
+test_file = os.path.join(Rep_Test, Test_Name + "." + test_file_suff)
+try :
+  file = open (test_file, "r")
+  mess_ref = file.readlines()
+  file.close()
+except :
+  raise Exception('Reference file does not exist.')
+  sys.exit(2)
+#
+test_file = os.path.join(Rep_Test_Resu, rep_test_file, test_file_suff)
+if os.path.isfile (test_file) :
+   file = open (test_file, "r")
+   mess = file.readlines()
+   file.close()
+else :
+  raise Exception('Result file does not exist.')
+  sys.exit(2)
+
+nblign = len(mess_ref)
+if ( len(mess) != nblign ):
+  raise Exception('The number of lines of the files are not the same.')
+  sys.exit(2)
+
+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."
+       raise Exception(message_erreur)
+       sys.exit(10)
+#
+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
new file mode 100644 (file)
index 0000000..05e3849
Binary files /dev/null and b/tests/test_2.00.med differ
diff --git a/tests/test_2.apad.03.bilan b/tests/test_2.apad.03.bilan
new file mode 100644 (file)
index 0000000..c08aa05
--- /dev/null
@@ -0,0 +1,51 @@
+
+
+ANALYSE DU MAILLAGE
+===================
+
+     Maillage apres adaptation                         
+     PLAQUE_0                                                                        
+     Date de creation : lundi 27 septembre 2010 a 9 h 25 mn 54 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   1                             *        162 *
+     * . du niveau   2                             *        384 *
+     ************************************************************
diff --git a/tests/test_2.fr.med b/tests/test_2.fr.med
new file mode 100644 (file)
index 0000000..48ceb7d
Binary files /dev/null and b/tests/test_2.fr.med differ
diff --git a/tests/test_2.odt b/tests/test_2.odt
new file mode 100644 (file)
index 0000000..76858cc
Binary files /dev/null and b/tests/test_2.odt differ
diff --git a/tests/test_2.pdf b/tests/test_2.pdf
new file mode 100644 (file)
index 0000000..62a67c0
Binary files /dev/null and b/tests/test_2.pdf differ
diff --git a/tests/test_2.png b/tests/test_2.png
new file mode 100644 (file)
index 0000000..1762c1b
Binary files /dev/null and b/tests/test_2.png differ
diff --git a/tests/test_2.py b/tests/test_2.py
new file mode 100644 (file)
index 0000000..5ff9f38
--- /dev/null
@@ -0,0 +1,143 @@
+# -*- coding: iso-8859-1 -*-
+"""
+Python script for HOMARD
+Copyright EDF-R&D 2010
+Test test_2
+"""
+__revision__ = "V1.2"
+
+######################################################################################
+Test_Name = "test_2"
+n_iter_test_file = 3
+######################################################################################
+import os
+import sys
+import tempfile
+import HOMARD
+import salome
+#
+pathHomard=os.getenv('HOMARD_ROOT_DIR')
+Rep_Test = os.path.join(pathHomard,"share/salome/resources/homard")
+Rep_Test_Resu = tempfile.mktemp()
+os.mkdir(Rep_Test_Resu)
+
+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
+Copyright EDF-R&D 2010
+  """
+  homard.SetCurrentStudy(theStudy)
+#
+# Creation of the boundaries
+# ==========================
+# Creation of the boundaries Boundary_1
+  Boundary_1 = homard.CreateBoundary('internal_boundary', 0)
+  Boundary_1.SetMeshFile(os.path.join(Rep_Test, Test_Name + '.fr.med'))
+  Boundary_1.SetMeshName('plaque')
+#
+# Creation of the hypotheses
+# ==========================
+# Creation of the hypothesis Hypo_1
+  Hypo_1 = homard.CreateHypothesis('Hypo_1')
+  Hypo_1.SetAdapRefinUnRef(-1, 1, 0)
+  Hypo_1.AddGroup('BANDE                                                                           ')
+  Hypo_1.AddGroup('EG                                                                              ')
+
+# Creation of the hypothesis Hypo_2
+  Hypo_2 = homard.CreateHypothesis('Hypo_2')
+  Hypo_2.SetAdapRefinUnRef(-1, 1, 0)
+  Hypo_2.AddGroup('M_D                                                                             ')
+#
+# Creation of the cases
+# =====================
+  # Creation of the case Case_1
+  Case_1 = homard.CreateCase('Case_1', 'PLAQUE_0', os.path.join(Rep_Test, Test_Name + '.00.med'))
+  Case_1.SetDirName(Rep_Test_Resu)
+  Case_1.SetConfType(1)
+  Case_1.AddBoundaryGroup( 'internal_boundary', ' ' )
+#
+# Creation of the iterations
+# ==========================
+# Creation of the iteration Iter_1
+  Iter_1 = homard.CreateIteration('Iter_1', Case_1.GetIter0Name() )
+  Iter_1.SetMeshName('PLAQUE_1')
+  Iter_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
+  homard.AssociateIterHypo('Iter_1', 'Hypo_1')
+  result1 = homard.Compute('Iter_1', 1)
+
+# Creation of the iteration Iter_2
+  Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1')
+  Iter_2.SetMeshName('PLAQUE_2')
+  Iter_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
+  homard.AssociateIterHypo('Iter_2', 'Hypo_1')
+  result2 = homard.Compute('Iter_2', 1)
+
+# Creation of the iteration Iter_3
+  Iter_3 = homard.CreateIteration('Iter_3', 'Iter_2')
+  Iter_3.SetMeshName('PLAQUE_3')
+  Iter_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
+  homard.AssociateIterHypo('Iter_3', 'Hypo_2')
+  result3 = homard.Compute('Iter_3', 1)
+  return result1*result2*result3
+
+######################################################################################
+
+homard = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD')
+#
+# Exec of HOMARD-SALOME
+#
+try :
+  result=homard_exec(salome.myStudy)
+  if (result != True):
+      raise Exception('Pb in homard_exec')
+except :
+  raise Exception('Pb in homard_exec')
+  sys.exit(1)
+#
+# Test of the result
+#
+s_iter_test_file = str(n_iter_test_file)
+test_file_suff = "apad.0" + s_iter_test_file + ".bilan"
+rep_test_file = "I0" + s_iter_test_file
+#
+test_file = os.path.join(Rep_Test, Test_Name + "." + test_file_suff)
+try :
+  file = open (test_file, "r")
+  mess_ref = file.readlines()
+  file.close()
+except :
+  raise Exception('Reference file does not exist.')
+  sys.exit(2)
+#
+test_file = os.path.join(Rep_Test_Resu, rep_test_file, test_file_suff)
+if os.path.isfile (test_file) :
+   file = open (test_file, "r")
+   mess = file.readlines()
+   file.close()
+else :
+  raise Exception('Result file does not exist.')
+  sys.exit(2)
+
+nblign = len(mess_ref)
+if ( len(mess) != nblign ):
+  raise Exception('The number of lines of the files are not the same.')
+  sys.exit(2)
+
+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."
+       raise Exception(message_erreur)
+       sys.exit(10)
+#
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
+  iparameters.getSession().restoreVisualState(1)
+