From: vsr Date: Thu, 9 Aug 2012 13:20:32 +0000 (+0000) Subject: Merge from V6_main_20120808 08Aug12 X-Git-Tag: V7_0_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a9189d870ff98f06dc5577c5fc37102ee5337aea;p=modules%2Fhomard.git Merge from V6_main_20120808 08Aug12 --- diff --git a/HOMARD_version.h.in b/HOMARD_version.h.in new file mode 100644 index 00000000..d1873f6f --- /dev/null +++ b/HOMARD_version.h.in @@ -0,0 +1,35 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// File : HOMARD_version.h +// Author : Vadim SANDLER +// Module : SALOME +// +#if !defined(__HOMARD_VERSION_H__) +#define __HOMARD_VERSION_H__ + +/* + HOMARD_VERSION is (major << 16) + (minor << 8) + patch. +*/ + +#define HOMARD_VERSION_STR "@VERSION@" +#define HOMARD_VERSION @XVERSION@ +#define HOMARD_DEVELOPMENT @VERSION_DEV@ + +#endif // __HOMARD_VERSION_H__ diff --git a/Makefile.am b/Makefile.am index 49498a47..39df6985 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,24 +1,22 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # -* Makefile *- # Author : Patrick GOLDBRONN (CEA) # Date : 28/06/2001 @@ -26,17 +24,19 @@ # include $(top_srcdir)/adm_local/unix/make_common_starter.am -ACLOCAL_AMFLAGS = -I $(top_srcdir)/adm_local/unix/config_files \ +ACLOCAL_AMFLAGS = -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 ${HOMARD_SRC}/adm_local/unix/config_files - -SUBDIRS = idl resources src doc tests + -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ + -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files + +SUBDIRS = idl adm_local resources src bin doc tests -DIST_SUBDIRS = idl resources src doc tests +DIST_SUBDIRS = idl adm_local resources src bin doc tests -DISTCLEANFILES = a.out aclocal.m4 configure +DISTCLEANFILES = a.out aclocal.m4 configure hack_libtool +salomeinclude_DATA = HOMARD_version.h EXTRA_DIST += \ build_configure \ diff --git a/adm_local/Makefile.am b/adm_local/Makefile.am new file mode 100644 index 00000000..88aeda65 --- /dev/null +++ b/adm_local/Makefile.am @@ -0,0 +1,22 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +SUBDIRS = unix diff --git a/adm_local/unix/Makefile.am b/adm_local/unix/Makefile.am index 5f6d5f75..328edada 100644 --- a/adm_local/unix/Makefile.am +++ b/adm_local/unix/Makefile.am @@ -1,23 +1,20 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # include $(top_srcdir)/adm_local/unix/make_common_starter.am diff --git a/adm_local/unix/config_files/Makefile.am b/adm_local/unix/config_files/Makefile.am new file mode 100644 index 00000000..edbfd5b9 --- /dev/null +++ b/adm_local/unix/config_files/Makefile.am @@ -0,0 +1,25 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +dist_admlocalm4_DATA = \ +check_GUI.m4 \ +check_Med2.m4 \ +check_sphinx.m4 diff --git a/adm_local/unix/config_files/check_GUI.m4 b/adm_local/unix/config_files/check_GUI.m4 index 73a026ee..8907e15e 100755 --- a/adm_local/unix/config_files/check_GUI.m4 +++ b/adm_local/unix/config_files/check_GUI.m4 @@ -1,24 +1,20 @@ -# 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 +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -#------------------------------------------------------------ -# Check availability of Salome binary distribution +# 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, 2002) #------------------------------------------------------------ diff --git a/adm_local/unix/config_files/check_Med2.m4 b/adm_local/unix/config_files/check_Med2.m4 index 82b10788..bd8f7deb 100644 --- a/adm_local/unix/config_files/check_Med2.m4 +++ b/adm_local/unix/config_files/check_Med2.m4 @@ -1,23 +1,20 @@ -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 Copyright (C) 2011-2012 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_MED2],[ diff --git a/adm_local/unix/config_files/check_sphinx.m4 b/adm_local/unix/config_files/check_sphinx.m4 index eec14953..91bb8573 100644 --- a/adm_local/unix/config_files/check_sphinx.m4 +++ b/adm_local/unix/config_files/check_sphinx.m4 @@ -1,20 +1,20 @@ -dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +dnl Copyright (C) 2011-2012 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 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 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 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 See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com dnl AC_DEFUN([CHECK_SPHINX],[ diff --git a/adm_local/unix/make_common_starter.am b/adm_local/unix/make_common_starter.am index 36ad8c3a..e76403b6 100644 --- a/adm_local/unix/make_common_starter.am +++ b/adm_local/unix/make_common_starter.am @@ -1,24 +1,22 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# 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 diff --git a/bin/Makefile.am b/bin/Makefile.am new file mode 100644 index 00000000..4a6b36ba --- /dev/null +++ b/bin/Makefile.am @@ -0,0 +1,23 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +nodist_salomescript_DATA = \ + VERSION diff --git a/bin/VERSION b/bin/VERSION deleted file mode 100755 index db96e4c9..00000000 --- a/bin/VERSION +++ /dev/null @@ -1 +0,0 @@ -THIS IS SALOME PRO - HOMARD VERSION: 0 diff --git a/bin/VERSION.in b/bin/VERSION.in new file mode 100644 index 00000000..9cdb4761 --- /dev/null +++ b/bin/VERSION.in @@ -0,0 +1,3 @@ +[SALOME HOMARD] : @VERSION@ +[DEVELOPMENT] : @VERSION_DEV@ + diff --git a/bin/runAppli.in b/bin/runAppli.in index 9a47b009..16b7fb54 100755 --- a/bin/runAppli.in +++ b/bin/runAppli.in @@ -1,4 +1,22 @@ #!/bin/sh +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# export KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@ export PYHELLO_ROOT_DIR=@prefix@ diff --git a/bin/runSalome.py b/bin/runSalome.py index c7eb2e75..f481b367 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -1,4 +1,22 @@ #!/usr/bin/env python +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# usage="""USAGE: runSalome.py [options] diff --git a/build_configure b/build_configure index 2bc6c3dd..9a3b6c24 100755 --- a/build_configure +++ b/build_configure @@ -1,25 +1,23 @@ #!/bin/bash -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# 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 : @@ -69,14 +67,10 @@ 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 +# custom macro embedded in the directory adm_local/unix/config_files # and KERNEL config_files directory. # output: # aclocal.m4 @@ -95,9 +89,9 @@ aclocal -I adm_local/unix/config_files \ # version. The files are created in the directory specified with the # AC_CONFIG_AUX_DIR() 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 +# adm_local/unix/config_files/config.guess +# adm_local/unix/config_files/config.sub +# adm_local/unix/config_files/ltmain.sh #echo "====================================================== libtoolize" libtoolize --force --copy --automake || exit 1 @@ -118,11 +112,11 @@ autoconf # AC_CONFIG_AUX_DIR() 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 +# adm_local/unix/config_files/compile +# adm_local/unix/config_files/depcomp +# adm_local/unix/config_files/install-sh +# adm_local/unix/config_files/missing +# adm_local/unix/config_files/py-compile # Makefile.in (from Makefile.am) echo "====================================================== automake" diff --git a/clean_configure b/clean_configure index 6ebb5297..c7c8b7f0 100755 --- a/clean_configure +++ b/clean_configure @@ -1,34 +1,29 @@ #!/bin/sh -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 # -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -rm -rf autom4te.cache aclocal.m4 configure make_config +rm -rf autom4te.cache aclocal.m4 configure make_config \$\(top_srcdir\) 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 +# Files created by libtoolize and automake +( cd adm_local/unix/config_files && rm -f config.* depcomp install-sh l*.m4 ltmain.sh missing py-compile install-sh missing depcomp py-compile ) +find . -name Makefile.in | xargs rm -f +rm -f COPYING INSTALL diff --git a/configure.ac b/configure.ac index 90e8b169..7094ead4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,23 +1,20 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # Author : Marc Tajchman (CEA) # Date : 28/06/2001 @@ -26,14 +23,18 @@ # 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_INIT([Salome2 Project HOMARD module], [6.5.0], [webmaster.salome@opencascade.com], [SalomeHOMARD]) +AC_CONFIG_AUX_DIR(adm_local/unix/config_files) AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([-Wno-portability]) +SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'` +AC_SUBST(SHORT_VERSION) XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'` AC_SUBST(XVERSION) +VERSION_DEV=1 +AC_SUBST(VERSION_DEV) # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.) MODULE_NAME=homard @@ -107,7 +108,7 @@ 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 + INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh ;; esac @@ -266,6 +267,14 @@ echo CHECK_HDF5 +echo +echo --------------------------------------------- +echo BOOST Library +echo --------------------------------------------- +echo + +CHECK_BOOST + echo echo --------------------------------------------- echo Testing OpenCascade @@ -286,11 +295,11 @@ CHECK_MPI echo echo --------------------------------------------- -echo Testing Med +echo Testing Med library echo --------------------------------------------- echo -CHECK_MED2 +CHECK_MED3 echo @@ -327,7 +336,7 @@ 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" +variables="cc_ok fortran_ok boost_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok hdf5_ok omniORB_ok Kernel_ok med3_ok SalomeGUI_ok Med_ok SMesh_ok sphinx_ok" fi if test "${HOMARD_WITH_GUI}" = "no"; then @@ -372,20 +381,39 @@ echo # chmod +x ./bin/salome/*; \ #]) +AC_HACK_LIBTOOL +AC_CONFIG_COMMANDS([hack_libtool],[ + sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\ + $(pwd)/hack_libtool \1 \"\$[@]\" \n\ + }\n\ + CC=\"hack_libtool\"%g" libtool + sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool + sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool + sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool + ],[]) + # This list is initiated using autoscan and must be updated manually # when adding a new file .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 \ + adm_local/Makefile \ + adm_local/unix/Makefile \ + adm_local/unix/config_files/Makefile \ + bin/Makefile \ + bin/VERSION \ doc/Makefile \ - src/Makefile \ + doc/conf.py \ + HOMARD_version.h \ + src/Makefile \ src/HOMARD_I/Makefile \ src/HOMARD/Makefile \ src/HOMARDGUI/Makefile \ src/HOMARD_SWIG/Makefile \ resources/Makefile \ + resources/HOMARDCatalog.xml \ + resources/SalomeApp.xml \ tests/Makefile \ ]) diff --git a/doc/Makefile.am b/doc/Makefile.am index f6d358df..9c9af87b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,24 +1,22 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # File : Makefile.in # Author : Vasily Rusyaev (Open Cascade NN) # Module : doc @@ -30,6 +28,7 @@ if SPHINX_IS_OK homarddoc_DATA=html/index.html html/index.html:$(RSTFILES) make htm + endif homarddocdir=$(docdir)/gui/HOMARD @@ -40,18 +39,34 @@ 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 + $(SPHINXBUILD) -c $(top_builddir)/doc -b html $(ALLSPHINXOPTS) html @echo @echo "Build finished. The HTML pages are in html." -RSTFILES= \ -index.rst \ -intro.rst \ +RSTFILES= \ +glossaire.rst \ +gui_create_boundary.rst \ +gui_create_case.rst \ +gui_create_hypothese.rst \ +gui_create_iteration.rst \ +gui_create_zone.rst \ +gui_homard.rst \ +gui_usage.rst \ +index.rst \ +intro.rst \ +tui_create_boundary.rst \ +tui_create_case.rst \ +tui_create_hypothese.rst \ +tui_create_iteration.rst \ +tui_create_zone.rst \ +tui_homard.rst \ +tui_usage.rst \ tutorials.rst +EXTRA_DIST+= $(RSTFILES) images files + usr_docs: make install-data-local @@ -59,7 +74,17 @@ docs: usr_docs install-data-local: $(INSTALL) -d $(DESTDIR)$(homarddocdir) - if test -d "html"; then cp -rf html/* $(DESTDIR)$(homarddocdir); fi; + if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ + if test -d $$b"html"; then cp -rf $$b"html"/* $(DESTDIR)$(homarddocdir); fi; uninstall-local: + chmod -R +w $(DESTDIR)$(homarddocdir) rm -rf $(DESTDIR)$(homarddocdir)/* + +clean-local: + -rm -rf doctrees + if test -d "html"; then rm -rf html ; fi + +dist-hook: + if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ + if test -d $$b"html"; then cp -rf $$b"html" $(distdir) ; fi diff --git a/doc/conf.py b/doc/conf.py deleted file mode 100644 index ca7e356f..00000000 --- a/doc/conf.py +++ /dev/null @@ -1,198 +0,0 @@ -# -*- 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 -# " v 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 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/conf.py.in b/doc/conf.py.in new file mode 100644 index 00000000..4aa0a92c --- /dev/null +++ b/doc/conf.py.in @@ -0,0 +1,198 @@ +# -*- coding: iso-8859-1 -*- +# +# 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 = 'iso-8859-1' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'HOMARD' +copyright = u'1996, 2011, 2012, 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 = '@SHORT_VERSION@' +# The full version, including alpha/beta/rc tags. +release = '@VERSION@' + +# 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 +# " v 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 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/tutorial_1.00.med.gz b/doc/files/tutorial_1.00.med.gz index 500cd019..68242dfd 100644 Binary files a/doc/files/tutorial_1.00.med.gz and b/doc/files/tutorial_1.00.med.gz differ diff --git a/doc/files/tutorial_1.py b/doc/files/tutorial_1.py index 607f72c0..eaebabc2 100644 --- a/doc/files/tutorial_1.py +++ b/doc/files/tutorial_1.py @@ -1,10 +1,37 @@ #!/usr/bin/env python # -*- coding: iso-8859-1 -*- + +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + """ Exemple de couplage HOMARD-Salome Copyright EDF-R&D 1996, 2010 """ -__revision__ = "V1.0" +__revision__ = "V1.2" +# +# ================================== +# Repertoire a personnaliser +# Ce repertoire contient les fichiers de donnees : tutorial_1.00.med +# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med, maill.03.med +dircase = "/tmp" +# ================================== # import salome salome.salome_init() @@ -14,41 +41,39 @@ 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 "Case_1" # ============= -Case_0 = homard.CreateCase('Case_0', 'MESH', dircase+'/tutorial_1.00.med') -Case_0.SetDirName(dircase) -Case_0.SetConfType(1) +Case_1 = homard.CreateCase('Case_1', 'MAILL', dircase+'/tutorial_1.00.med') +Case_1.SetDirName(dircase) +Case_1.SetConfType(1) # # Iterations # ========== # Iteration "Iter_0" -Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name()) +Iter_0 = homard.CreateIteration('Iter_0', Case_1.GetIter0Name()) Iter_0.SetMeshName('MESH') Iter_0.SetMeshFile(dircase+'/maill.01.med') homard.AssociateIterHypo('Iter_0', 'Hypo_0') -codret = homard.Compute('Iter_0', 1) +codret = Iter_0.Compute(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) +codret = Iter_1.Compute(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) +codret = Iter_2.Compute(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 index 2ad4223c..51a01c9c 100644 Binary files a/doc/files/tutorial_2.00.med.gz and b/doc/files/tutorial_2.00.med.gz differ diff --git a/doc/files/tutorial_2.py b/doc/files/tutorial_2.py index d6e7ca8d..6f4ec233 100644 --- a/doc/files/tutorial_2.py +++ b/doc/files/tutorial_2.py @@ -1,10 +1,37 @@ #!/usr/bin/env python # -*- coding: iso-8859-1 -*- + +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + """ Exemple de couplage HOMARD-Salome Copyright EDF-R&D 1996, 2010 """ -__revision__ = "V1.0" +__revision__ = "V1.3" +# +# ================================== +# Repertoire a personnaliser +# Ce repertoire contient les fichiers de donnees : tutorial_2.00.med +# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med +dircase = "/tmp" +# ================================== # import salome salome.salome_init() @@ -14,21 +41,16 @@ 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) +Zone_0 = homard.CreateZoneBox ('Zone_0', -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) +Zone_1 = homard.CreateZoneSphere ('Zone_1', 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) +Zone_2 = homard.CreateZoneBox ('Zone_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51) # # Hypothesis "Hypo_0" # =================== @@ -44,18 +66,18 @@ Hypo_1.SetAdapRefinUnRef(0, 1, 0) homard.AssociateHypoZone('Zone_0', 'Hypo_1') homard.AssociateHypoZone('Zone_2', 'Hypo_1') # -# Case "Case_0" +# Case "Case_1" # ============= -Case_0 = homard.CreateCase('Case_0', 'MZERO', dircase+'/tutorial_2.00.med') -Case_0.SetDirName(dircase) +Case_1 = homard.CreateCase('Case_1', 'MZERO', dircase+'/tutorial_2.00.med') +Case_1.SetDirName(dircase) # # Iteration "Iter_0" # ================== -Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name()) +Iter_0 = homard.CreateIteration('Iter_0', Case_1.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) +codret = Iter_0.Compute(1) # # Iteration "Iter_1" # ================== @@ -63,7 +85,7 @@ 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) +codret = Iter_1.Compute(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 index 6dd54234..8fb733a6 100644 Binary files a/doc/files/tutorial_3.00.med.gz 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 index efdae65c..266b495e 100644 Binary files a/doc/files/tutorial_3.01.med.gz and b/doc/files/tutorial_3.01.med.gz differ diff --git a/doc/files/tutorial_3.py b/doc/files/tutorial_3.py index c9f3cd16..c0aaeb5c 100644 --- a/doc/files/tutorial_3.py +++ b/doc/files/tutorial_3.py @@ -1,10 +1,37 @@ #!/usr/bin/env python # -*- coding: iso-8859-1 -*- + +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + """ Exemple de couplage HOMARD-Salome Copyright EDF-R&D 1996, 2010 """ -__revision__ = "V1.0" +__revision__ = "V1.3" +# +# ================================== +# Repertoire a personnaliser +# Ce repertoire contient les fichiers de donnees : tutorial_3.00.med, tutorial_3.01.med +# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med +dircase = "/tmp" +# ================================== # import salome salome.salome_init() @@ -14,51 +41,81 @@ homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD") study_main = salome.myStudyManager.NewStudy("HOMARD") homard.SetCurrentStudy(salome.myStudy) # -dircase = "/tmp" +# Hypothesis "Hypo_0vers1" +# ======================== +Hypo_0vers1 = homard.CreateHypothesis('Hypo_0vers1') +Hypo_0vers1.SetAdapRefinUnRef(1, 1, 0) +# Characterization of the field +Hypo_0vers1.SetField('SOLU_0__QIRE_ELEM_SIGM__________') +Hypo_0vers1.SetUseComp(0) +Hypo_0vers1.AddComp('ERREST ') +Hypo_0vers1.SetRefinThr(3, 1.0) +Hypo_0vers1.SetTypeFieldInterp(2) +Hypo_0vers1.AddFieldInterp('SOLU_0__DEPL____________________') +Hypo_0vers1.AddFieldInterp('SOLU_0__ERRE_ELEM_SIGM__________') # -# Hypothesis "Hypo_0" -# =================== -Hypo_0 = homard.CreateHypothesis('Hypo_0') -Hypo_0.SetAdapRefinUnRef(1, 1, 0) +# Hypothesis "Hypo_1vers2" +# ======================== +Hypo_1vers2 = homard.CreateHypothesis('Hypo_1vers2') +Hypo_1vers2.SetAdapRefinUnRef(1, 1, 1) # 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) +Hypo_1vers2.SetField('SOLU_1__QIRE_ELEM_SIGM__________') +Hypo_1vers2.SetUseComp(0) +Hypo_1vers2.AddComp('ERREST ') +Hypo_1vers2.SetRefinThr(3, 1.5) +Hypo_1vers2.SetUnRefThr(3, 6.) +Hypo_1vers2.SetTypeFieldInterp(2) +Hypo_1vers2.AddFieldInterp('SOLU_1__DEPL____________________') +Hypo_1vers2.AddFieldInterp('SOLU_1__QIRE_ELEM_SIGM__________') +# +# Hypothesis "Hypo_1vers2_bis" +# ============================ +Hypo_1vers2_bis = homard.CreateHypothesis('Hypo_1vers2_bis') +Hypo_1vers2_bis.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.) +Hypo_1vers2_bis.SetField('SOLU_1__DEPL____________________') +Hypo_1vers2_bis.SetUseComp(1) +Hypo_1vers2_bis.AddComp('DX') +Hypo_1vers2_bis.AddComp('DY') +Hypo_1vers2_bis.AddComp('DZ') +Hypo_1vers2_bis.SetRefinThr(1, 0.0001) +Hypo_1vers2_bis.SetUnRefThr(1, 0.000001) +Hypo_1vers2_bis.SetTypeFieldInterp(0) # -# Case "Case_0" +# Case "Case_1" # ============= -Case_0 = homard.CreateCase('Case_0', 'G_0', dircase+'/tutorial_3.00.med') -Case_0.SetDirName(dircase) +Case_1 = homard.CreateCase('Case_1', 'G_0', dircase+'/tutorial_3.00.med') +Case_1.SetDirName(dircase) # -# Iteration "Iter_0" +# Iteration "Iter_1" # ================== -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) +Iter_1 = homard.CreateIteration('Iter_1', Case_1.GetIter0Name()) +Iter_1.SetMeshName('H_1') +Iter_1.SetMeshFile(dircase+'/maill.01.med') +Iter_1.SetFieldFile(dircase+'/tutorial_3.00.med') +Iter_1.SetTimeStepRank( 1, 1) +homard.AssociateIterHypo('Iter_1', 'Hypo_0vers1') +codret = Iter_1.Compute(1) # -# Iteration "Iter_1" +# Iteration "Iter_2" # ================== -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) - +Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1') +Iter_2.SetMeshName('H_2') +Iter_2.SetMeshFile(dircase+'/maill.02.med') +Iter_2.SetFieldFile(dircase+'/tutorial_3.01.med') +Iter_2.SetTimeStepRank(1, 1) +homard.AssociateIterHypo('Iter_2', 'Hypo_1vers2') +codret = Iter_2.Compute(1) +# +# Iteration "Iter_2_bis" +# ====================== +Iter_2_bis = homard.CreateIteration('Iter_2_bis', 'Iter_1') +Iter_2_bis.SetMeshName('H_2_bis') +Iter_2_bis.SetMeshFile(dircase+'/maill.02.bis.med') +Iter_2_bis.SetFieldFile(dircase+'/tutorial_3.01.med') +Iter_2_bis.SetTimeStepRank(1, 1) +homard.AssociateIterHypo('Iter_2_bis', 'Hypo_1vers2_bis') +codret = Iter_2_bis.Compute(1) +# if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(1) diff --git a/doc/files/tutorial_4.00.med.gz b/doc/files/tutorial_4.00.med.gz new file mode 100644 index 00000000..a9c94d77 Binary files /dev/null and b/doc/files/tutorial_4.00.med.gz differ diff --git a/doc/files/tutorial_4.fr.med.gz b/doc/files/tutorial_4.fr.med.gz new file mode 100644 index 00000000..3bdc67a4 Binary files /dev/null and b/doc/files/tutorial_4.fr.med.gz differ diff --git a/doc/files/tutorial_4.py b/doc/files/tutorial_4.py new file mode 100644 index 00000000..c3aa70ff --- /dev/null +++ b/doc/files/tutorial_4.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- + +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +""" +Exemple de couplage HOMARD-Salome +Copyright EDF-R&D 1996, 2011 +""" +__revision__ = "V1.3" +# +# ================================== +# Repertoire a personnaliser +# Ce repertoire contient les fichiers de donnees : tutorial_4.00.med, tutorial_4.fr.med +# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med +dircase = "/tmp" +# ================================== +# +import salome +salome.salome_init() +import HOMARD +# +homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD") +study_main = salome.myStudyManager.NewStudy("HOMARD") +homard.SetCurrentStudy(salome.myStudy) +# +# Creation of the boundaries +# ========================== +Boundary_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', dircase+'/tutorial_4.fr.med') +# +Boundary_2 = homard.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.) +# +Boundary_3 = homard.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.) +# +Boundary_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.) +# +Boundary_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.) +# +# Hypothesis +# ========== +# Creation of the hypothesis Hypo_1 +Hypo_1 = homard.CreateHypothesis('Hypo_1') +Hypo_1.SetAdapRefinUnRef(-1, 1, 0) +Hypo_1.AddGroup('T1_INT_I') +Hypo_1.AddGroup('T1_INT_O') +Hypo_1.AddGroup('T2_INT') +# Creation of the hypothesis Hypo_2 +Hypo_2 = homard.CreateHypothesis('Hypo_2') +Hypo_2.SetAdapRefinUnRef(-1, 1, 0) +Hypo_2.AddGroup('T1_EXT_I') +Hypo_2.AddGroup('T1_EXT_O') +Hypo_2.AddGroup('T2_EXT') +# +# Case "Case" +# ============= +Case = homard.CreateCase('Case', 'PIQUAGE', dircase+'/tutorial_4.00.med') +Case.SetDirName(dircase) +Case.AddBoundaryGroup( 'intersection', '' ) +Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' ) +Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' ) +Case.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' ) +Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' ) +Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' ) +Case.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' ) +# +# Creation of the iterations +# ========================== +# Creation of the iteration Iter_1 +Iter_1 = homard.CreateIteration('Iter_1', Case.GetIter0Name() ) +Iter_1.SetMeshName('PIQUAGE_1') +Iter_1.SetMeshFile(dircase+'/maill.01.med') +homard.AssociateIterHypo('Iter_1', 'Hypo_1') +codret = Iter_1.Compute(1) +# Creation of the iteration Iter_2 +Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1' ) +Iter_2.SetMeshName('PIQUAGE_2') +Iter_2.SetMeshFile(dircase+'/maill.02.med') +homard.AssociateIterHypo('Iter_2', 'Hypo_2') +codret = Iter_2.Compute(1) + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser(1) diff --git a/doc/files/tutorial_5.00.med.gz b/doc/files/tutorial_5.00.med.gz new file mode 100644 index 00000000..e0170440 Binary files /dev/null and b/doc/files/tutorial_5.00.med.gz differ diff --git a/doc/files/tutorial_5.fr.med.gz b/doc/files/tutorial_5.fr.med.gz new file mode 100644 index 00000000..4c9ccbdd Binary files /dev/null and b/doc/files/tutorial_5.fr.med.gz differ diff --git a/doc/files/tutorial_5.py b/doc/files/tutorial_5.py new file mode 100644 index 00000000..a876501b --- /dev/null +++ b/doc/files/tutorial_5.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- + +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +""" +Exemple de couplage HOMARD-Salome +Copyright EDF-R&D 1996, 2010 +""" +__revision__ = "V1.2" +# +# ================================== +# Repertoire a personnaliser +# Ce repertoire contient les fichiers de donnees : tutorial_5.00.med, tutorial_5.fr.med +# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med +dircase = "/tmp" +# ================================== +# +import salome +salome.salome_init() +import HOMARD +# +homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD") +study_main = salome.myStudyManager.NewStudy("HOMARD") +homard.SetCurrentStudy(salome.myStudy) +# +# Creation of the boundaries +# ========================== +# Creation of the discrete boundary Boun_1 +Boun_1 = homard.CreateBoundaryDi('Boun_1', 'MAIL_EXT', dircase+'/tutorial_5.fr.med') +# +# Creation of the zones +# ===================== +# Creation of the disk with hole enveloppe +enveloppe = homard.CreateZoneDiskWithHole( 'enveloppe', 0., 0., 250., 193., 1 ) +# Creation of the rectangle quart_sup +quart_sup = homard.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 ) +# +# Hypothesis +# ========== +# Creation of the hypothesis Hypo_1 +Hypo_1 = homard.CreateHypothesis('Hypo_1') +Hypo_1.SetAdapRefinUnRef(0, 1, 0) +homard.AssociateHypoZone('enveloppe', 'Hypo_1') +# Creation of the hypothesis Hypo_2 +Hypo_2 = homard.CreateHypothesis('Hypo_2') +Hypo_2.SetAdapRefinUnRef(0, 1, 0) +homard.AssociateHypoZone('quart_sup', 'Hypo_2') +# +# Case "Case_1" +# ============= +Case_1 = homard.CreateCase('Case_1', 'COEUR_2D', dircase+'/tutorial_5.00.med') +Case_1.SetDirName(dircase) +Case_1.SetConfType(3) +Case_1.AddBoundaryGroup('Boun_1', '') +# +# Iteration "Iter_1" +# ================== +Iter_1 = homard.CreateIteration('Iter_1', Case_1.GetIter0Name()) +Iter_1.SetMeshName('COEUR_2D_01') +Iter_1.SetMeshFile(dircase+'/maill.01.med') +homard.AssociateIterHypo('Iter_1', 'Hypo_1') +codret = Iter_1.Compute(1) +# +# Iteration "Iter_2" +# ================== +Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1') +Iter_2.SetMeshName('COEUR_2D_02') +Iter_2.SetMeshFile(dircase+'/maill.02.med') +homard.AssociateIterHypo('Iter_2', 'Hypo_2') +codret = Iter_2.Compute(1) + + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser(1) diff --git a/doc/glossaire.rst b/doc/glossaire.rst index 1e448725..bd5469f3 100644 --- a/doc/glossaire.rst +++ b/doc/glossaire.rst @@ -7,28 +7,28 @@ Glossaire :sorted: raffinement - Le raffinement est une opération consistant à découper les mailles sélectionnées. + 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. + 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. + 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. + 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. + 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. + 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. + 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. + 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 + 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_boundary.rst b/doc/gui_create_boundary.rst new file mode 100644 index 00000000..9fb18473 --- /dev/null +++ b/doc/gui_create_boundary.rst @@ -0,0 +1,116 @@ +.. _gui_create_boundary: + +La frontière +============ +.. index:: single: boundary +.. index:: single: frontière + +L'objet frontière contient toutes les définitions géométriques permettant de décrire une frontière courbe à suivre. + +Il existe deux modes de description d'une frontière : + + - Discrète : ce mode est utilisé pour décrire une courbe 1D + - Analytique : ce mode est utilisé pour décrire une surface + + +Frontière discrète +================== + +Le suivi d'une frontière discrète se fera en sélectionnant une frontière choisie dans la liste des frontières discrètes existantes. + +Au démarrage, la liste est vide. Il faut créer une première frontière discrète par activation du bouton "*Nouveau*" : + +.. image:: images/create_boundary_di_1.png + :align: center + +La fenêtre proposée invite au choix d'un fichier de maillage. Ce maillage est celui de toutes les lignes constituant la frontière. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière. + +.. image:: images/create_boundary_di_2.png + :align: center + +.. note:: + Le fichier ne doit contenir qu'un seul maillage. + +Si des frontières discrètes ont déjà été définies pour un autre cas, on peut sélectionner l'une d'elles. On peut également créer une nouvelle frontière discrète par activation du bouton "*Nouveau*", comme expliqué précédemment. + +.. image:: images/create_boundary_di_3.png + :align: center + + + +Frontière analytique +==================== +Au démarrage, Salome affiche un tableau avec un seule colonne. Cette colonne contient la liste de tous les groupes du maillage initial définissant le cas. + +.. image:: images/create_boundary_an_1.png + :align: center + +Il faut créer une première frontière analytique par activation du bouton "*Nouveau*". On aura le choix entre cylindre ou sphère. Une fois que la frontière sera validée, son nom figurera en en-tête d'une deuxième colonne. + +.. image:: images/create_boundary_an_2.png + :align: center + +Il faut maintenant établir le lien entre le maillage définissant le cas et cette frontière décrite analytiquement. Cela se fait en cochant les groupes des faces qui doivent se trouver sur la frontière. + +.. image:: images/create_boundary_an_3.png + :align: center + +Cette opération est répétée autant de fois que l'on souhaite placer des faces du maillages sur une surface courbe : + +.. image:: images/create_boundary_an_4.png + :align: center + +.. note:: + + Un groupe peut très bien ne jamais être coché : cela signifie que les mailles qu'il définit n'appartiennent à aucune des frontières décrites. + + Un groupe ne peut être coché qu'une seule fois. En effet, des mailles surfaciques ne peuvent pas appartenir à plus d'une surface. + + Plusieurs groupes peuvent être cochés pour une même frontière. Cela arrive quand le maillage initial de la zone a été subdivisé en plusieurs groupes : toutes les mailles surfaciques appartiennent à cette surface mais ont été réparties en plusieurs groupes. + + Inversement, une frontière peut très bien n'être retenue par aucun groupe. Cela arrive si elle a été définie pour un cas précédent et qu'elle est sans objet pour le cas en cours de définition. + + +Il existe deux types de frontière analytique : + + - Cylindre + - Sphère + +.. note:: + Les valeurs numériques proposées par défaut tiennent compte de la géométrie du maillage. + + +Un cylindre +""""""""""" +.. index:: single: cylindre + +Le cylindre est défini par un point de l'axe, son axe et son rayon. L'axe est défini par un vecteur. La norme de ce vecteur n'est pas nécessairement égale à 1 ; de même, son orientation n'a aucune importance. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière. + +.. image:: images/create_boundary_an_cy.png + :align: center + +Une sphère +"""""""""" +.. index:: single: sphere + +La sphère est définie par son centre et son rayon. Un nom de frontière est proposé automatiquement : Boun_1, Boun_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour une autre frontière. + +.. image:: images/create_boundary_an_sp.png + :align: center + +.. index:: single: arbre d'étude + +L'arbre d'étude +""""""""""""""" +A l'issue de cette création de frontières, l'arbre d'études a été enrichi. On y trouve toutes les frontières créées, identifiées par leur nom, avec la possibilité de les éditer. + +.. image:: images/create_boundary_1.png + :align: center + + +Méthodes python correspondantes +""""""""""""""""""""""""""""""" +Consulter : :ref:`tui_create_boundary` + + + diff --git a/doc/gui_create_case.rst b/doc/gui_create_case.rst index 88b3abc6..5758e8e9 100644 --- a/doc/gui_create_case.rst +++ b/doc/gui_create_case.rst @@ -3,12 +3,14 @@ Le cas ====== .. index:: single: cas -La définition du cas se fait par la donnée des informations suivantes : + +La définition du cas se fait par la donnée des informations suivantes : - Un nom - - Un répertoire + - Un répertoire - Le fichier du maillage initial - - Le type de conformité pour la série d'adaptations envisagées + - Le type de conformité pour la série d'adaptations envisagées + - Les éventuelles frontières courbes à respecter .. image:: images/create_case_1.png :align: center @@ -16,20 +18,21 @@ La définition du cas se fait par la donnée des informations suivantes : 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. +Un nom de cas est proposé automatiquement : Case_1, Case_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour un autre cas. -Le répertoire +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. +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. +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 @@ -38,30 +41,74 @@ Le maillage initial doit se trouver dans un fichier au format MED. Classiquement 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 + 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é -.. index:: single: type de conformité -Le 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é. +Les itérations qui seront calculées pour ce cas devront toutes 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. +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 : +Néanmoins, si le calcul est possible avec des maillages non conformes, 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. +* 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. +.. index:: single: frontière + +Les frontières courbes +"""""""""""""""""""""" +Quand le bord du domaine est courbe, HOMARD sait placer les nouveaux noeuds sur ces frontières pour éviter des singularités artificielles. Cette technique est aussi applicable à une courbure intérieure à un domaine. + +Deux cas de figure sont présents : + +* courbe 1D : cette courbe peut être définie dans un plan, par exemple pour un calcul 2D. Elle peut également être définie dans l'espace 3D, par exemple pour l'intersection de deux surfaces. Une ligne à suivre est décrite de manière discrète. +* surface : une surface à suivre est décrite de manière analytique. + +On cochera le ou les boutons voulus : .. image:: images/create_case_5.png :align: center +La définition des frontières est décrite dans :ref:`gui_create_boundary`. + +.. index:: single: pyramide + +Les options avancées +"""""""""""""""""""" +Par défaut, aucune option avancée n'est active. + +Néanmoins, on peut définir une oprion avancée : + +.. image:: images/create_case_7.png + :align: center + +Par défaut, HOMARD sait traiter des maillages en 2 ou 3 dimensions et comportant les mailles suivantes : + - mailles-points + - segments + - triangles + - quadrangles + - tétraèdres + - hexaèdres + - prismes +Si le maillage initial comporte des pyramides, il y a arrêt en erreur. Toutefois, si on est certain que les raffinements ultérieurs ne toucheront aucune des arêtes des pyramides, on cochera la case "Pyramides autorisées". Les adaptations se dérouleront normalement et les pyramides seront restituées telles quelles dans le maillage final. + +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_6.png + :align: center + + + +Méthodes python correspondantes +""""""""""""""""""""""""""""""" +Consulter :ref:`tui_create_case` diff --git a/doc/gui_create_hypothese.rst b/doc/gui_create_hypothese.rst index c3e5c3d5..a3bb4b1d 100644 --- a/doc/gui_create_hypothese.rst +++ b/doc/gui_create_hypothese.rst @@ -1,55 +1,59 @@ .. _gui_create_hypothese: -L'hypothèse +L'hypothèse =========== -.. index:: single: 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. +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 : +Il existe trois classes d'hypothèses : - Uniforme sur tout le maillage, - Selon un champ, - - En fonction de zone géométrique. + - En fonction de zone géométrique. .. image:: images/create_hypothese_1.png :align: center -Nom de l'hypothèse +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. +Un nom de l'hypothèse est proposé automatiquement : Hypo_1, Hypo_2, 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. +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. + Pour pouvoir adapter le maillage selon un champ il faut avoir au préalable désigné le fichier med contenant le champ. Cela se fait dans la fenêtre de construction de l'itération (voir :ref:`gui_create_iteration`). Le nom du fichier qui a été sélectionné est affiché sans modification possible ici : -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 +.. image:: images/create_hypothese_ch_1.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). +Le champ voulu est à choisir dans la liste des champs contenus dans le fichier. +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 choisit 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 +On peut choisir de ne pas utiliser directement le champ, mais sa variation d'un élément à ses voisins. Pour cela, on activera le bouton "*Saut entre éléments*". + +.. image:: images/create_hypothese_ch_2.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. +Le raffinement se fait selon un seuil qui définit un critère haut de raffinement. Toutes les mailles pour lesquelles l'indicateur est supérieur à ce critère seront raffinées. +Pour le choix du critère, trois variantes sont possible : + + - 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. +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 +.. image:: images/create_hypothese_ch_3.png :align: center @@ -57,34 +61,77 @@ 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`) : +Au démarrage, il faut créer une première zone par activation du bouton "*Nouveau*" (voir :ref:`gui_create_zone`) : -.. image:: images/create_hypothese_2.png +.. image:: images/create_hypothese_zo_1.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. +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. On doit alors préciser si une zone est utilisée pour raffiner toutes les mailles dont une arête est contenue dans la zone, ou si la zone est utilisée pour déraffiner les mailles intérieures à la zone. Si aucun choix n'est fait, la zone est ignorée dans cette hypothèse. -.. image:: images/create_hypothese_3.png +.. image:: images/create_hypothese_zo_2.png :align: center Filtrage par les groupes """""""""""""""""""""""" -.. index:: single: zone +.. index:: single: groupe + +On peut restreindre l'application de l'hypothèse d'adaptation à des groupes. Ainsi les mailles n'appartenant pas à ces groupes ne seront pas modidiées, sauf par contamination ultérieure du raffinement pour assurer la conformité du maillage final. +On coche le bouton associé : + +.. image:: images/create_hypothese_gr_1.png + :align: center + +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_gr_2.png + :align: center + + +Interpolation de champs +""""""""""""""""""""""" +.. index:: single: interpolation -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. +.. note:: + Pour pouvoir interpoler un champ de l'ancien vers le nouveau maillage, il faut avoir au préalable désigné le fichier med contenant le champ. Cela se fait dans la fenêtre de construction de l'itération (voir :ref:`gui_create_iteration`). + +Par défaut, aucun champ n'est interpolé. A contrario, on peut demander l'interpolation de tous les champs présents dans le fichier fourni : + +.. image:: images/create_hypothese_ch_4.png + :align: center + +Si on veut choisir les champs à interpoler, il faut les cocher dans la liste de tous les champs présents dans le fichier fourni : + +.. image:: images/create_hypothese_ch_5.png + :align: center -.. image:: images/create_hypothese_8.png + +Les options avancées +"""""""""""""""""""" +Si la case "Options avancées" n'est pas cochée, aucune contrainte supplémentaire n'est définie. +Si la case est cochée, on définira les options avancées. + +Une première série d'options portent sur la finesse maximale de maillage que l'on ne veut pas dépasser. Deux directives sont possibles, séparément ou ensemble. On peut imposer une taille de maille minimale : une maille dont le diamètre est inférieur à cette limite ne sera plus découpée. Par défaut, on propose un diamètre minimal nul, ce qui revient à ne rien imposer. On peut imposer un niveau de raffinement maximal. Par défaut, le maximum est à 99, ce qui équivaut en général à ne rien imposer. + +La seconde série d'options n'a d'intérêt que dans le cas où l'adaptation est piloté par un champ et que ce champ n'est pas défini partout dans le maillage. Cela arrive par exemple quand on construit un champ basé sur une distance dans un plan alors que le domaine est 3D : le champ ne sera pas défini sur les noeuds hors du plan. Pour de tels champs, cette option permet de préciser le comportement que l'on souhaite dans les régions où le champ n'est pas défini. Par défaut, il ne se passe rien : les mailles sont gardées telles quelles. On peut choisir les deux autres variantes : raffiner, toutes les mailles seront a priori coupées, ou déraffiner, toutes les mailles seront candidates au déraffinement. + + +.. image:: images/create_hypothese_av_1.png :align: center +.. index:: single: arbre d'étude -L'arbre d'étude +L'arbre d'étude """"""""""""""" -.. index:: single: 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. +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 +.. image:: images/create_hypothese_2.png :align: center + +Méthodes python correspondantes +""""""""""""""""""""""""""""""" +Consulter :ref:`tui_create_hypothese` diff --git a/doc/gui_create_iteration.rst b/doc/gui_create_iteration.rst index 6d067570..0b662fd0 100644 --- a/doc/gui_create_iteration.rst +++ b/doc/gui_create_iteration.rst @@ -1,74 +1,83 @@ .. _gui_create_iteration: -L'itération +L'itération =========== -.. index:: single: itération -La définition d'une itération se fait par la donnée des informations suivantes : +.. index:: single: itération - - L'itération précédente - - Le nom du maillage résultat - - L'hypothèse utilisée +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 +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. +Un nom de cas est proposé automatiquement : Iter_1, Iter_2, 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 """""""""""""""""""""" -L'itération précédente est choisie dans l'arbre d'étude. Le nom du maillage correspondant sera affiché. +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 -.. index:: single: maillage;résultat -Le nom du 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. +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 +.. 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. C'est également le cas si on veut interpoler des champs du maillage n au maillage n+1. 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. -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 : +Dans le cas où des pas de temps ont été définis, une solution simple consiste à traiter les champs au dernier pas de temps enregistré dans le fichier. Si on veut définir un autre pas de temps, on coche le bouton "*Pas de temps choisi*". Les valeurs de 'Pas de temps' et de 'Numéro d'ordre' sont celles correspondant à la convention MED (time step / rank). Ces valeurs dépendent de la logique qui a été retenue par le logiciel qui a écrit le fichier. Souvent ces deux valeurs sont identiques mais il arrive que l'on disjoigne les pas de temps et les intervalles d'archivage. .. image:: images/create_iteration_3.png :align: center +.. index:: single: hypothèse -.. 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. +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 choisie dans la liste des hypothèses existantes. -Les valeurs de 'Time Step' et de 'Rank' sont celles correspondant à la convention MED. +Au démarrage, il faut créer une première hypothèse par activation du bouton "*Nouveau*" (voir :ref:`gui_create_hypothese`) : .. 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. +Ensuite, si une hypothèse précédemment définie convient, il suffit de la sélectionner dans la liste proposée. Sinon, il faut créer une nouvelle hypothèse par activation du bouton "*Nouveau*", puis la sélectionner dans la liste proposé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. + +.. 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: 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. L'icône en regard de l'itération permet de différencier les itérations calculées ou non. .. image:: images/create_iteration_6.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_7.png + :align: center +Méthodes python correspondantes +""""""""""""""""""""""""""""""" +Consulter :ref:`tui_create_iteration` diff --git a/doc/gui_create_zone.rst b/doc/gui_create_zone.rst index 08343839..b57e4725 100644 --- a/doc/gui_create_zone.rst +++ b/doc/gui_create_zone.rst @@ -3,38 +3,99 @@ La zone ======= .. index:: single: zone +.. index:: single: 2D -L'objet zone contient toutes les définitions géométriques permettant de décrire une zone à raffiner. +L'objet zone contient toutes les définitions géométriques permettant de décrire une zone à raffiner. -Il existe deux types de zone : +En 3D, il existe quatre types de zone : - - Parallélépipède - - Sphère + - Parallélépipède + - Cylindre + - Tuyau + - Sphère + +Leurs analogues en 2D sont : + + - Rectangle + - Disque + - Disque percé + +Le principe du raffinement selon des zones est le suivant. Chaque arête de maille dont les deux extrémités +sont incluses dans une même zone sera coupée. Ensuite HOMARD applique l'algorithme de traitement de la +conformité pour produire un maillage correct. + +.. note:: + Les valeurs proposées par défaut pour les dimensions des zones tiennent compte de la géométrie du maillage. 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 nom de zone est proposé automatiquement : Zone_1, Zone_2, etc. Ce nom peut être modifié. Il ne doit pas avoir été déjà utilisé pour une autre zone. -Un parallélépipède +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. +Le parallélépipède est obligatoirement 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 +Un cylindre +""""""""""" +.. index:: single: cylindre + +Le cylindre est défini par son axe, un point de base positionné sur l'axe, sa hauteur et son rayon. L'axe est défini par un vecteur qui doit être correctement orienté : on retiendra le volume partant de la base dans la direction du vecteur jusqu'à la hauteur retenue. La norme de ce vecteur n'est pas nécessairement égale à 1. + +.. image:: images/create_zone_2.png + :align: center + +Un tuyau +"""""""" +.. index:: single: tuyau + +Le cylindre est défini par son axe, un point de base positionné sur l'axe, sa hauteur et ses rayons interne et externe. L'axe est défini par un vecteur qui doit être correctement orienté : on retiendra le volume partant de la base dans la direction du vecteur jusqu'à la hauteur retenue. La norme de ce vecteur n'est pas nécessairement égale à 1. + +.. image:: images/create_zone_3.png + :align: center + +Une sphère """""""""" .. index:: single: sphere -La sphère est définie par son centre et son rayon. +La sphère est définie par son centre et son rayon. -.. image:: images/create_zone_2.png +.. image:: images/create_zone_4.png :align: center -.. note:: - Les valeurs proposées par défaut tiennent compte de la géométrie du maillage. +Un rectangle +"""""""""""" +.. index:: single: rectangle + +Le rectangle est obligatoirement parallèle aux axes de coordonnées. Il est défini par ses extrêmes dans chacune des directions valides. La coordonnée constante est affichée pour information, mais n'est pas modifiable. + +.. image:: images/create_zone_21.png + :align: center + +Un disque +""""""""" +.. index:: single: disque + +Le disque est obligatoirement dans le plan des axes de coordonnées. Il est défini par son centre et son rayon. La coordonnée constante est affichée pour information, mais n'est pas modifiable. + +.. image:: images/create_zone_22.png + :align: center + +Un disque avec trou +""""""""""""""""""" +.. index:: single: disque avec trou + +Le disque avec trou est obligatoirement dans le plan des axes de coordonnées. Il est défini par son centre et ses rayons externe et interne. La coordonnée constante est affichée pour information, mais n'est pas modifiable. + +.. image:: images/create_zone_23.png + :align: center +Méthodes python correspondantes +""""""""""""""""""""""""""""""" +Consulter :ref:`tui_create_zone` diff --git a/doc/gui_homard.rst b/doc/gui_homard.rst new file mode 100644 index 00000000..c4df6439 --- /dev/null +++ b/doc/gui_homard.rst @@ -0,0 +1,51 @@ +.. _gui_homard: + +Le calcul +========= +.. index:: single: itération +.. index:: single: calcul + +Lancer une adaptation +""""""""""""""""""""" +Lancer une adaptation s'obtient en sélectionnant l'itération à calculer. Elle est repérée par une icone "en attente". On choisit ensuite "*Calculer*" dans le menu HOMARD ou à la souris. + +.. image:: images/lancement_1.png + :align: center + + +.. index:: single: arbre d'étude + +L'arbre d'étude +""""""""""""""" + +A l'issue de ce calcul, l'arbre d'études a été enrichi. L'icone devant l'itération est validée. Sous l'itération, on trouve la référence aux fichiers de résultats créés, identifiés par leur nom dans le répertoire *rep* qui a été défini à la création du cas : + + - *rep*/I(n+1)/Liste.n.vers.(n+1) + - *rep*/I(n+1)/apad.n.vers.(n+1).bilan + - *rep*/maill.(n+1).med + +Les deux premiers fichiers sont des fichiers de texte, éditables. Liste.n.vers.(n+1) contient des informations sur le déroulement de l'adaptation : récapitulatif du mode d'adaptation, pourcentage de mailles concernées, etc. Le fichier apad.n.vers.(n+1).bilan est un résumé des caractéristiques du maillage obtenus. +Le fichier maill.(n+1).med est celui qui contient le maillage produit au format MED. On retrouve ce maillage dans la section de l'arbre d'études du module SMESH. Il est alors visible dans ce module et utilisable ensuite comme tout autre maillage. + + +.. image:: images/lancement_2.png + :align: center + +Consulter le résultat d'une adaptation +"""""""""""""""""""""""""""""""""""""" +Les deux fichiers de texte, Liste.n.vers.(n+1) et apad.n.vers.(n+1).bilan, sont visibles en les sélectionnant. On choisit ensuite "*Afficher le fichier*" dans le menu HOMARD ou à la souris. + +.. image:: images/lancement_3.png + :align: center + + + +.. note:: + Par défaut, le calcul est lancé avec l'exécutable de HOMARD installé avec Salome. Si on souhaite utiliser une version privée de HOMARD, pour tester une évolution par exemple, il faut préciser où le nouvel exécutable est disponible. Pour cela, il faut renseigner deux variables d'environnement. + "*HOMARD_REP_EXE_PRIVATE*" définit le répertoire dans lequel se trouve l'exécutable voulu. + "*HOMARD_EXE_PRIVATE*" définit le nom de l'exécutable dans ce répertoire, si ce nom est différent de "*homard*". + +Méthodes python correspondantes +""""""""""""""""""""""""""""""" +Consulter :ref:`tui_create_iteration` + diff --git a/doc/gui_usage.rst b/doc/gui_usage.rst index e7a58f8d..81e7bf59 100644 --- a/doc/gui_usage.rst +++ b/doc/gui_usage.rst @@ -1,32 +1,29 @@ +.. _gui_usage: + Mode d'emploi pour l'interface graphique ======================================== .. index:: single: cas -.. index:: single: itération +.. index:: single: itération Activer le module HOMARD """""""""""""""""""""""" -Pour utiliser le module HOMARD, deux façons existent : +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 -"""""""""""""""""""""" +L'utilisateur a alors le choix entre créer une nouvelle étude ou en ouvrir une qui a été précédemment enregistrée, selon le principe qui a été retenu pour tous les autres modules de Salome. -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`). +.. image:: images/homard_1.png + :align: center -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. +Définir une adaptation +"""""""""""""""""""""" -.. image:: images/lancement_1.png - :align: center +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`). Les adaptations sont lancées tel que décrit dans :ref:`gui_homard`. -Le fichier contenant le maillage produit est visible dans l'arbre d'études. -Mode d'emploi de la saisie des données +Mode d'emploi de la saisie des données """""""""""""""""""""""""""""""""""""" .. toctree:: @@ -36,4 +33,6 @@ Mode d'emploi de la saisie des données gui_create_iteration gui_create_hypothese gui_create_zone + gui_create_boundary + gui_homard diff --git a/doc/images/create_boundary_1.png b/doc/images/create_boundary_1.png new file mode 100644 index 00000000..0460d485 Binary files /dev/null and b/doc/images/create_boundary_1.png differ diff --git a/doc/images/create_boundary_an_1.png b/doc/images/create_boundary_an_1.png new file mode 100644 index 00000000..09630eb8 Binary files /dev/null and b/doc/images/create_boundary_an_1.png differ diff --git a/doc/images/create_boundary_an_2.png b/doc/images/create_boundary_an_2.png new file mode 100644 index 00000000..25c6e9b1 Binary files /dev/null and b/doc/images/create_boundary_an_2.png differ diff --git a/doc/images/create_boundary_an_3.png b/doc/images/create_boundary_an_3.png new file mode 100644 index 00000000..6f38d9f8 Binary files /dev/null and b/doc/images/create_boundary_an_3.png differ diff --git a/doc/images/create_boundary_an_4.png b/doc/images/create_boundary_an_4.png new file mode 100644 index 00000000..abf10421 Binary files /dev/null and b/doc/images/create_boundary_an_4.png differ diff --git a/doc/images/create_boundary_an_cy.png b/doc/images/create_boundary_an_cy.png new file mode 100644 index 00000000..e3fef853 Binary files /dev/null and b/doc/images/create_boundary_an_cy.png differ diff --git a/doc/images/create_boundary_an_sp.png b/doc/images/create_boundary_an_sp.png new file mode 100644 index 00000000..27b94430 Binary files /dev/null and b/doc/images/create_boundary_an_sp.png differ diff --git a/doc/images/create_boundary_di_1.png b/doc/images/create_boundary_di_1.png new file mode 100644 index 00000000..8f80605d Binary files /dev/null and b/doc/images/create_boundary_di_1.png differ diff --git a/doc/images/create_boundary_di_2.png b/doc/images/create_boundary_di_2.png new file mode 100644 index 00000000..d952edab Binary files /dev/null and b/doc/images/create_boundary_di_2.png differ diff --git a/doc/images/create_boundary_di_3.png b/doc/images/create_boundary_di_3.png new file mode 100644 index 00000000..01195a12 Binary files /dev/null and b/doc/images/create_boundary_di_3.png differ diff --git a/doc/images/create_case_1.png b/doc/images/create_case_1.png index c9c88c52..ddef5000 100644 Binary files a/doc/images/create_case_1.png 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 index 20640789..435a5186 100644 Binary files a/doc/images/create_case_2.png 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 index 8f9e0512..eba31971 100644 Binary files a/doc/images/create_case_3.png 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 index d4e1089e..3429fd65 100644 Binary files a/doc/images/create_case_4.png 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 index e607d9b4..418535b5 100644 Binary files a/doc/images/create_case_5.png and b/doc/images/create_case_5.png differ diff --git a/doc/images/create_case_6.png b/doc/images/create_case_6.png new file mode 100644 index 00000000..c5987297 Binary files /dev/null and b/doc/images/create_case_6.png differ diff --git a/doc/images/create_case_7.png b/doc/images/create_case_7.png new file mode 100644 index 00000000..766430fe Binary files /dev/null and b/doc/images/create_case_7.png differ diff --git a/doc/images/create_hypothese_1.png b/doc/images/create_hypothese_1.png index 4239c335..7c6eb197 100644 Binary files a/doc/images/create_hypothese_1.png 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 index d5a7ee22..fbb434b2 100644 Binary files a/doc/images/create_hypothese_2.png 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 deleted file mode 100644 index d8b6ecd6..00000000 Binary files a/doc/images/create_hypothese_3.png and /dev/null differ diff --git a/doc/images/create_hypothese_4.png b/doc/images/create_hypothese_4.png deleted file mode 100644 index 52b0a3c1..00000000 Binary files a/doc/images/create_hypothese_4.png and /dev/null differ diff --git a/doc/images/create_hypothese_5.png b/doc/images/create_hypothese_5.png deleted file mode 100644 index 76879ad9..00000000 Binary files a/doc/images/create_hypothese_5.png and /dev/null differ diff --git a/doc/images/create_hypothese_6.png b/doc/images/create_hypothese_6.png deleted file mode 100644 index bed6fce7..00000000 Binary files a/doc/images/create_hypothese_6.png and /dev/null differ diff --git a/doc/images/create_hypothese_7.png b/doc/images/create_hypothese_7.png deleted file mode 100644 index cdcb199e..00000000 Binary files a/doc/images/create_hypothese_7.png and /dev/null differ diff --git a/doc/images/create_hypothese_8.png b/doc/images/create_hypothese_8.png deleted file mode 100644 index c1ef185e..00000000 Binary files a/doc/images/create_hypothese_8.png and /dev/null differ diff --git a/doc/images/create_hypothese_av_1.png b/doc/images/create_hypothese_av_1.png new file mode 100644 index 00000000..d6eae0a5 Binary files /dev/null and b/doc/images/create_hypothese_av_1.png differ diff --git a/doc/images/create_hypothese_ch_1.png b/doc/images/create_hypothese_ch_1.png new file mode 100644 index 00000000..392ef7b7 Binary files /dev/null and b/doc/images/create_hypothese_ch_1.png differ diff --git a/doc/images/create_hypothese_ch_2.png b/doc/images/create_hypothese_ch_2.png new file mode 100644 index 00000000..ce3d9441 Binary files /dev/null and b/doc/images/create_hypothese_ch_2.png differ diff --git a/doc/images/create_hypothese_ch_3.png b/doc/images/create_hypothese_ch_3.png new file mode 100644 index 00000000..d1f146c6 Binary files /dev/null and b/doc/images/create_hypothese_ch_3.png differ diff --git a/doc/images/create_hypothese_ch_4.png b/doc/images/create_hypothese_ch_4.png new file mode 100644 index 00000000..b48f6511 Binary files /dev/null and b/doc/images/create_hypothese_ch_4.png differ diff --git a/doc/images/create_hypothese_ch_5.png b/doc/images/create_hypothese_ch_5.png new file mode 100644 index 00000000..4151dd83 Binary files /dev/null and b/doc/images/create_hypothese_ch_5.png differ diff --git a/doc/images/create_hypothese_gr_1.png b/doc/images/create_hypothese_gr_1.png new file mode 100644 index 00000000..34f937f1 Binary files /dev/null and b/doc/images/create_hypothese_gr_1.png differ diff --git a/doc/images/create_hypothese_gr_2.png b/doc/images/create_hypothese_gr_2.png new file mode 100644 index 00000000..3153ad43 Binary files /dev/null and b/doc/images/create_hypothese_gr_2.png differ diff --git a/doc/images/create_hypothese_zo_1.png b/doc/images/create_hypothese_zo_1.png new file mode 100644 index 00000000..0b4f0252 Binary files /dev/null and b/doc/images/create_hypothese_zo_1.png differ diff --git a/doc/images/create_hypothese_zo_2.png b/doc/images/create_hypothese_zo_2.png new file mode 100644 index 00000000..09353cf0 Binary files /dev/null and b/doc/images/create_hypothese_zo_2.png differ diff --git a/doc/images/create_iteration_1.png b/doc/images/create_iteration_1.png index 3160a9ac..affb0286 100644 Binary files a/doc/images/create_iteration_1.png 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 index f0b4d5ae..3c02793f 100644 Binary files a/doc/images/create_iteration_2.png 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 index 414c6db6..a00ede7f 100644 Binary files a/doc/images/create_iteration_3.png 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 index 6a277af6..43665308 100644 Binary files a/doc/images/create_iteration_4.png 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 index 51db52b5..92a9ab00 100644 Binary files a/doc/images/create_iteration_5.png 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 index cdcb199e..339e1e10 100644 Binary files a/doc/images/create_iteration_6.png and b/doc/images/create_iteration_6.png differ diff --git a/doc/images/create_iteration_7.png b/doc/images/create_iteration_7.png new file mode 100644 index 00000000..8816eeff Binary files /dev/null and b/doc/images/create_iteration_7.png differ diff --git a/doc/images/create_zone_1.png b/doc/images/create_zone_1.png index e58f862f..aa32ef17 100644 Binary files a/doc/images/create_zone_1.png 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 index d856c0b3..1664d52f 100644 Binary files a/doc/images/create_zone_2.png and b/doc/images/create_zone_2.png differ diff --git a/doc/images/create_zone_21.png b/doc/images/create_zone_21.png new file mode 100644 index 00000000..8d156f16 Binary files /dev/null and b/doc/images/create_zone_21.png differ diff --git a/doc/images/create_zone_22.png b/doc/images/create_zone_22.png new file mode 100644 index 00000000..f27faaa0 Binary files /dev/null and b/doc/images/create_zone_22.png differ diff --git a/doc/images/create_zone_23.png b/doc/images/create_zone_23.png new file mode 100644 index 00000000..8bce36d5 Binary files /dev/null and b/doc/images/create_zone_23.png differ diff --git a/doc/images/create_zone_3.png b/doc/images/create_zone_3.png new file mode 100644 index 00000000..abaf4068 Binary files /dev/null and b/doc/images/create_zone_3.png differ diff --git a/doc/images/create_zone_4.png b/doc/images/create_zone_4.png new file mode 100644 index 00000000..26955a82 Binary files /dev/null and b/doc/images/create_zone_4.png differ diff --git a/doc/images/homard_1.png b/doc/images/homard_1.png new file mode 100644 index 00000000..80006888 Binary files /dev/null and b/doc/images/homard_1.png differ diff --git a/doc/images/intro_3.png b/doc/images/intro_3.png new file mode 100644 index 00000000..64be42a1 Binary files /dev/null and b/doc/images/intro_3.png differ diff --git a/doc/images/intro_31.png b/doc/images/intro_31.png new file mode 100644 index 00000000..175264e0 Binary files /dev/null and b/doc/images/intro_31.png differ diff --git a/doc/images/intro_32.png b/doc/images/intro_32.png new file mode 100644 index 00000000..f4022ca2 Binary files /dev/null and b/doc/images/intro_32.png differ diff --git a/doc/images/intro_33.png b/doc/images/intro_33.png new file mode 100644 index 00000000..a0bd05e2 Binary files /dev/null and b/doc/images/intro_33.png differ diff --git a/doc/images/intro_34.png b/doc/images/intro_34.png new file mode 100644 index 00000000..94866890 Binary files /dev/null and b/doc/images/intro_34.png differ diff --git a/doc/images/intro_35.png b/doc/images/intro_35.png new file mode 100644 index 00000000..72871479 Binary files /dev/null and b/doc/images/intro_35.png differ diff --git a/doc/images/intro_36.png b/doc/images/intro_36.png new file mode 100644 index 00000000..2d363dad Binary files /dev/null and b/doc/images/intro_36.png differ diff --git a/doc/images/intro_37.png b/doc/images/intro_37.png new file mode 100644 index 00000000..c6f7943d Binary files /dev/null and b/doc/images/intro_37.png differ diff --git a/doc/images/intro_38.png b/doc/images/intro_38.png new file mode 100644 index 00000000..2d29392c Binary files /dev/null and b/doc/images/intro_38.png differ diff --git a/doc/images/intro_39.png b/doc/images/intro_39.png new file mode 100644 index 00000000..ad542ba7 Binary files /dev/null and b/doc/images/intro_39.png differ diff --git a/doc/images/intro_4.png b/doc/images/intro_4.png new file mode 100644 index 00000000..5931fa4b Binary files /dev/null and b/doc/images/intro_4.png differ diff --git a/doc/images/intro_40.png b/doc/images/intro_40.png new file mode 100644 index 00000000..36c447a0 Binary files /dev/null and b/doc/images/intro_40.png differ diff --git a/doc/images/intro_5.png b/doc/images/intro_5.png new file mode 100644 index 00000000..e0730d7e Binary files /dev/null and b/doc/images/intro_5.png differ diff --git a/doc/images/intro_6.png b/doc/images/intro_6.png new file mode 100644 index 00000000..21f79c2d Binary files /dev/null and b/doc/images/intro_6.png differ diff --git a/doc/images/intro_7.png b/doc/images/intro_7.png new file mode 100644 index 00000000..5e8ceec3 Binary files /dev/null and b/doc/images/intro_7.png differ diff --git a/doc/images/intro_8.gif b/doc/images/intro_8.gif new file mode 100644 index 00000000..b11d9253 Binary files /dev/null and b/doc/images/intro_8.gif differ diff --git a/doc/images/lancement_1.png b/doc/images/lancement_1.png index 39fe8c1d..03b76a9d 100644 Binary files a/doc/images/lancement_1.png and b/doc/images/lancement_1.png differ diff --git a/doc/images/lancement_2.png b/doc/images/lancement_2.png new file mode 100644 index 00000000..d5713d51 Binary files /dev/null and b/doc/images/lancement_2.png differ diff --git a/doc/images/lancement_3.png b/doc/images/lancement_3.png new file mode 100644 index 00000000..bd1eb644 Binary files /dev/null and b/doc/images/lancement_3.png differ diff --git a/doc/index.rst b/doc/index.rst index bd9da0f2..7589e93a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -10,9 +10,9 @@ 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.* +*HOMARD est une marque déposée d'EDF.* -Table des matières de ce mode d'emploi +Table des matières de ce mode d'emploi """""""""""""""""""""""""""""""""""""" .. toctree:: diff --git a/doc/intro.rst b/doc/intro.rst index a526864a..a40df798 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -1,26 +1,150 @@ +.. _gui_intro: 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é. + +Présentation générale +""""""""""""""""""""" +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é. + +Raffiner le maillage signifie découper des mailles désignées selon des indications founies par l'utilisateur. Déraffiner le maillage signifie revenir en arrière sur des découpages précédemment réalisés : ainsi, en aucun cas HOMARD ne peut simplifier un maillage existant qui aura été créé trop fin. Le déraffinement prend toute son importance dans les calculs quand la zone d'intérêt se déplace au cours du calcul pour ne plus tenir compte de raffinements précédemment réalisés et qui deviennent inutiles. On en trouvera une illustration au bas de cette page. + +HOMARD sait traiter des maillages en 2 ou 3 dimensions et comportant les mailles suivantes : + - mailles-points + - segments + - triangles + - quadrangles + - tétraèdres + - hexaèdres + - prismes + +Ces mailles peuvent être présentes simultanément. Par exemple, HOMARD saura adapter un maillage comportant des triangles et des quadrangles. +Les noeuds acceptés sont évidemment les noeuds qui sont les sommets des mailles, ce qui correspond à la description classique « en degré 1 » . Si les éléments sont décrits « en degré 2 », les noeuds complémentaires sont gérés. En revanche, il ne peut pas y avoir cohabitation de mailles décrites en degré 1 et d'autres décrites en degré 2. Enfin, HOMARD sait prendre en compte des noeuds isolés, qui n'appartiendraient à aucune définition de mailles : ils ressortiront tels quels du processus d'adaptation. + +Le cas des pyramides est à part. Pour un maillage comportant des hexaèdres ou des prismes, la mise en conformité du maillage issu du raffinement crée des pyramides pour assurer la liaison entre deux régions de niveaux de raffinement différents. Ces pyramides sont gérées comme toutes les mailles de transition et ne sont pas redécoupées par la suite. En revanche, si le maillage initial contient des pyramides, HOMARD ne saura pas l'adapter et émettra un message d'erreur. Dans certains cas particuliers, on pourra néanmoins traiter un tel maillage, comme il est décrit dans la rubrique 'Options avancées' de :ref:`gui_create_case`). 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. + - on veut simplifier la réalisation du maillage d'une géométrie complexe : on part d'un maillage grossier et on confie à un processus automatique la charge de le raffiner. + - 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. +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. Avec 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. +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. +Des variantes de ce schéma de base 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 multiples scénarios d'adaptation de maillage. .. note:: - Pour une description plus complète, voir :download:`Description générale de HOMARD `. + Pour une description plus complète, voir :download:`Description générale de HOMARD `. + + +Quelques illustrations de maillage adaptés +"""""""""""""""""""""""""""""""""""""""""" +.. index:: single: illustration + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| | +| .. image:: images/intro_3.png | +| :align: center | +| | ++---------------------------------------------------------------+ +| | +| .. image:: images/intro_4.png | +| :align: center | +| | ++---------------------------------------------------------------+ +| | +| .. image:: images/intro_5.png | +| :align: center | +| | ++---------------------------------------------------------------+ +| | +| .. image:: images/intro_6.png | +| :align: center | +| | ++---------------------------------------------------------------+ +| | +| .. image:: images/intro_7.png | +| :align: center | +| | ++---------------------------------------------------------------+ +| | +| .. image:: images/intro_8.gif | +| :align: center | +| | ++---------------------------------------------------------------+ + +Démarrage rapide +"""""""""""""""" +.. index:: single: démarrage +.. index:: single: exemple + +L'ensemble des options de pilotage du module HOMARD dans Salome est décrit dans le :ref:`gui_usage`. Mais on trouvera ici le B.A. BA pour découvrir l'utilisation de HOMARD à partir d'un exemple simple. Imaginons que l'on a effectué un calcul de thermique sur un maillage donné. On a récupéré en sortie de ce calcul un fichier au format MED, contenant le maillage et le champ des températures aux noeuds. On aimerait adapter le maillage de telle sorte que l'écart de température entre deux noeuds voisins soit inférieur à une valeur donnée. + +La première action nécessite de lancer le module HOMARD, en créant une nouvelle étude, selon le principe qui a été retenu pour tous les autres modules de Salome. + +.. image:: images/homard_1.png + :align: center + +Une fois le module HOMARD activé, on crée un cas par le choix "*Nouveau cas*" dans le menu HOMARD. La fenêtre suivante apparaît : + +.. image:: images/intro_31.png + :align: center + +Il faut fournir deux informations : le répertoire qui contiendra les fichiers produits par les adaptations successives et le fichier issu du calcul que l'on vient de faire. On valide par "Appliquer et fermer". + +.. image:: images/intro_32.png + :align: center + +L'arbre d'études est enrichi de ce cas. On déplie le cas jusqu'à afficher le maillage correspondant à l'itération 0. On désigne cette itération initiale et on demande une nouvelle itération par "*Nouvelle itération*" dans le menu HOMARD ou à la souris. La fenêtre suivante apparaît : + +.. image:: images/intro_33.png + :align: center + +On désigne le fichier issu du calcul que l'on vient de faire et qui contient le champ de température. C'est le même que celui qui a été donné dans la définition du cas. + +.. image:: images/intro_34.png + :align: center + +On clique sur "Nouveau" dans la rubrique hypothèse. La fenêtre suivante apparaît : + +.. image:: images/intro_35.png + :align: center + +On modifie les options par défaut pour correspondre à notre choix de pilotage de l'adaptation. La sélection d'un pilotage par les saut entre éléments et d'un seuil absolu de 4.0 va demander le découpage de chaque arête de maille où le température varie de plus de 4.0 degrés entre les deux extrémités de l'arête. + +.. image:: images/intro_36.png + :align: center + +On valide par "Appliquer et fermer" cette création d'hypothése, puis la création de la nouvelle itération. On se retrouve avec un arbre d'études enrichi avec la description de l'hypothèse créée et de l'itération à calculer, repérée par une icone "en attente". + +Lancer l'adaptation s'obtient en sélectionnant l'itération à calculer. On choisit ensuite "*Calculer*" dans le menu HOMARD ou à la souris. L'arbre d'études s'enrichit de fichiers d'informations et du nom du fichier au format MED qui contient le nouveau maillage, ``maill.01.med``. On remarque qu'il est placé dans le répertoire qui a été désigné à la création du cas. + +.. image:: images/intro_37.png + :align: center + +A ce stade, on va utiliser ce nouveau maillage pour un deuxième calcul, dans les mêmes conditions que le premier. Une fois que ce nouveau calcul est achevé, on peut décider de poursuivre le processus d'adaptation. Pour cela on revient dans Salome et on active le module HOMARD. On désigne l'itération que l'avait calculée précédemment "*Iter_1*" et on demande une nouvelle itération. La fenêtre suivante apparaît : + +.. image:: images/intro_38.png + :align: center + +Comme on continue l'adaptation avec le même critére de saut de température entre noeuds voisins, on garde l'hypothèse "*Hypo_1*". Il suffit de désigner le fichier issu du calcul que l'on vient de faire et qui contient le nouveau champ de température. + +.. image:: images/intro_39.png + :align: center + +Comme précédemment, on lance l'adaptation et on récupère les résultats dans le répertoire du cas, dont le maillage ``maill.02.med``. + +.. image:: images/intro_40.png + :align: center + +On peut alors lancer un nouveau calcul sur ce nouveau maillage et poursuiver cette alternance calcul/adaptation jusqu'à l'obtention du résultat attendu. diff --git a/doc/tui_create_boundary.rst b/doc/tui_create_boundary.rst new file mode 100644 index 00000000..9b2992b1 --- /dev/null +++ b/doc/tui_create_boundary.rst @@ -0,0 +1,83 @@ +.. _tui_create_boundary: + +La frontière +============ + +.. index:: single: boundary +.. index:: single: frontière +.. index:: single: cylindre +.. index:: single: sphere + +Les variables sont décrites dans :ref:`gui_create_boundary`. + +Méthodes de la classe homard +"""""""""""""""""""""""""""" +Ces méthodes retournent une instance de la classe boundary. + ++----------------------------------------------------------------------------------------+ ++----------------------------------------------------------------------------------------+ +| .. module:: CreateBoundaryDi | +| | +| **CreateBoundaryDi(boundary_name, mesh_name, mesh_file)** | +| | +| - ``boundary_name`` : le nom de la frontière discrète | +| - ``mesh_name`` : le nom du maillage de la frontière | +| - ``mesh_file`` : le nom du fichier contenant ce maillage | ++----------------------------------------------------------------------------------------+ +| .. module:: CreateBoundaryCylinder | +| | +| **CreateBoundaryCylinder(boundary_name, Xcen, Ycen, Zcen, Xaxe, Yaxe, Zaxe, R)** | +| | +| - ``boundary_name`` : le nom de la frontière analytique basée sur un cylindre | +| - ``Xcen``, ``Ycen``, ``Zcen`` : coordonnées d'un point sur l'axe du cylindre | +| - ``Xaxe``, ``Yaxe``, ``Zaxe`` : vecteur de l'axe | +| - ``R`` : rayon du cylindre | ++----------------------------------------------------------------------------------------+ +| .. module:: CreateBoundarySphere | +| | +| **CreateBoundarySphere(boundary_name, Xcen, Ycen, Zcen, R)** | +| | +| - ``boundary_name`` : le nom de la frontière analytique basée sur une sphere | +| - ``Xcen``, ``Ycen``, ``Zcen`` : coordonnées du centre de la sphère | +| - ``R`` : rayon de la sphère | ++----------------------------------------------------------------------------------------+ + +Méthodes de la classe boundary +"""""""""""""""""""""""""""""" + ++-------------------------------------------------------------------+ ++-------------------------------------------------------------------+ +| .. module:: GetName | +| | +| **GetName()** | +| Retourne le nom de la frontière | ++-------------------------------------------------------------------+ +| .. module:: GetBoundaryType | +| | +| **GetBoundaryType()** | +| Retourne le type de la frontière : | +| | +| * 0 : discrète | +| * 1 : cylindre | +| * 2 : sphère | ++-------------------------------------------------------------------+ +| .. module:: GetCoords | +| | +| **GetCoords()** | +| Retourne un tableau contenant les coordonnées de la frontière | +| dans l'ordre d'entrée dans le CreateBoundaryXXXX associé | ++-------------------------------------------------------------------+ + + +Exemple +""""""" +Création d'une frontière discrète, d'une frontière sphèrique, puis d'une frontière cylindrique : :: + + inter = homard.CreateBoundaryDi("INTERSECTION", 'PIQUAGE', dircase+'/tutorial_4.fr.med') + fron_1 = homard.CreateBoundarySphere("FRON_1", 12.3, 3.4, .56, 6.5) + fron_2 = homard.CreateBoundaryCylinder('CYL_1', 0.0, 25., -25., 25., 50., 75., 100.) + + +Saisie graphique correspondante +""""""""""""""""""""""""""""""" +Consulter :ref:`gui_create_boundary` diff --git a/doc/tui_create_case.rst b/doc/tui_create_case.rst index 588c05c9..202c7915 100644 --- a/doc/tui_create_case.rst +++ b/doc/tui_create_case.rst @@ -3,16 +3,16 @@ Le cas ====== .. index:: single: cas -.. index:: single: type de conformité +.. index:: single: type de conformité .. index:: single: maillage;initial -Les variables sont décrites dans :ref:`gui_create_case`. +Les variables sont décrites dans :ref:`gui_create_case`. -Méthodes de la classe homard +Méthodes de la classe homard """""""""""""""""""""""""""" +---------------------------------------------------------------+ -+===============================================================+ ++---------------------------------------------------------------+ | .. module:: CreateCase | | | | **CreateCase(case_name, mesh_name, mesh_file)** | @@ -22,18 +22,18 @@ Méthodes de la classe homard | - ``mesh_name`` : le nom du maillage initial | | - ``mesh_file`` : le nom du fichier contenant ce maillage | | | -| Par défaut : | +| Par défaut : | | | -| * le répertoire des résultats est ``/tmp`` | +| * le répertoire des résultats est ``/tmp`` | | * l'adaptation est conforme | +---------------------------------------------------------------+ -Méthodes de la classe cas +Méthodes de la classe cas """"""""""""""""""""""""" +---------------------------------------------------------------+ -+===============================================================+ ++---------------------------------------------------------------+ | .. module:: GetName | | | | **GetName()** | @@ -43,41 +43,81 @@ Méthodes de la classe cas | | | **SetDirName(dirname)** | | | -| - ``dirname`` : le nom du répertoire des résutats | +| - ``dirname`` : le nom du répertoire des résutats | +---------------------------------------------------------------+ | .. module:: GetDirName | | | | **GetDirName()** | -| Retourne le nom du répertoire des résutats associé au cas | +| 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é | +| - ``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 | +| * 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é | +| Retourne le type de conformité | +---------------------------------------------------------------+ | .. module:: GetIter0Name | | | | **GetIter0Name()** | -| Retourne le nom de l'itération 0, associée au maillage | +| 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| +| HOMARD et doit être utilisé pour enchaîner les adaptations| ++---------------------------------------------------------------+ +| .. module:: AddBoundaryGroup | +| | +| **AddBoundaryGroup(boundary, group)** | +| | +| - ``boundary`` : nom d'une frontière courbe à suivre | +| | +| Pour une frontière discrète : | +| | +| . si toutes les lignes courbes sont suivies, le second | +| argument est une chaîne vide. | +| . si seulement certaines lignes courbes sont suivies, | +| ``group`` est le nom d'un groupe de segments à suivre. | +| | +| Pour une frontière analytique : | +| | +| - ``group`` : nom d'un groupe de faces placées sur la | +| frontière | ++---------------------------------------------------------------+ + +Les options avancées +^^^^^^^^^^^^^^^^^^^^ + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: SetPyram | +| | +| **SetPyram(option)** | +| | +| - ``option`` : entier précisant le statut des pyramides | +| éventuellement présentes dans le maillage initial | +| | +| * 0 : pyramides refusées (défaut) | +| * 1 : pyramides autorisées | ++---------------------------------------------------------------+ +| .. module:: GetPyram | +| | +| **GetPyram()** | +| Retourne le statut accordé aux pyramides éventuellement | +| présentes dans le maillage initial | +---------------------------------------------------------------+ Exemple """"""" -La création de l'objet case_1 se fait ainsi : :: +La création de l'objet case_1 se fait ainsi : :: case_name = "CAS_1" mesh_name = "MAILL" @@ -86,7 +126,15 @@ La création de l'objet case_1 se fait ainsi : :: dirname = "/local00/Salome/Adapt/resu" case_1.SetDirName(dirname) case_1.SetConfType(1) + case_1.AddBoundaryGroup( 'intersection', '' ) + case_1.AddBoundaryGroup( 'cyl_1', 'T1_EXT' ) + case_1.AddBoundaryGroup( 'cyl_1', 'T2_EXT' ) + case_1.AddBoundaryGroup( 'cyl_2', 'T_INT' ) + +Saisie graphique correspondante +""""""""""""""""""""""""""""""" +Consulter :ref:`gui_create_case` diff --git a/doc/tui_create_hypothese.rst b/doc/tui_create_hypothese.rst index 29dfe983..b9b7d85f 100644 --- a/doc/tui_create_hypothese.rst +++ b/doc/tui_create_hypothese.rst @@ -1,66 +1,70 @@ .. _tui_create_hypothese: -L'hypothèse +L'hypothèse =========== -.. index:: single: itération -.. index:: single: hypothèse +.. index:: single: itération +.. index:: single: hypothèse .. index:: single: zone -Les variables sont décrites dans :ref:`gui_create_hypothese`. +Les variables sont décrites dans :ref:`gui_create_hypothese`. -Méthodes de la classe homard +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 | +| - ``hypo_name`` : le nom de l'hypothèse | +---------------------------------------------------------------+ | .. module:: AssociateHypoZone | | | -| **AssociateHypoZone(hypo_name, zone_name)** | +| **AssociateHypoZone(hypo_name, zone_name, type_use)** | +| | +| - ``hypo_name`` : le nom de l'hypothèse | +| - ``zone_name`` : le nom de la zone à associer | +| - ``type_use`` : entier précisant l'usage de la zone | | | -| - ``hypo_name`` : le nom de l'hypothèse | -| - ``zone_name`` : le nom de la zone à associer | +| * 1 : raffinement | +| * -1 : déraffinement | +---------------------------------------------------------------+ -Méthodes de la classe hypothese +Méthodes de la classe hypothese """"""""""""""""""""""""""""""" -Généralités +Généralités ^^^^^^^^^^^ +---------------------------------------------------------------+ -+===============================================================+ ++---------------------------------------------------------------+ | .. module:: GetName | | | | **GetName()** | -| Retourne le nom de l'hypothèse | +| Retourne le nom de l'hypothèse | +---------------------------------------------------------------+ | .. module:: SetAdapRefinUnRef | | | | **SetAdapRefinUnRef(Adap, Refin, UnRef)** | | | -| - ``Adap`` : entier précisant le type d'adaptation | +| - ``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| +| - ``Refin`` : entier précisant si le raffinement est actif| | | -| 0. inactif | -| 1. actif | +| * 0 : inactif | +| * 1 : actif | | | -| - ``UnRef`` : entier précisant si déraffinement est actif | +| - ``UnRef`` : entier précisant si déraffinement est actif | | | -| 0. inactif | -| 1. actif | +| * 0 : inactif | +| * 1 : actif | | | +---------------------------------------------------------------+ | .. module:: GetAdapType | @@ -76,17 +80,17 @@ Généralités | .. module:: GetUnRefType | | | | **GetUnRefType()** | -| Retourne le type de déraffinement | +| Retourne le type de déraffinement | +---------------------------------------------------------------+ Le champ et les seuils ^^^^^^^^^^^^^^^^^^^^^^ +---------------------------------------------------------------+ -+===============================================================+ -| .. module:: SetFieldName | ++---------------------------------------------------------------+ +| .. module:: SetField | | | -| **SetFieldName(field_name)** | +| **SetField(field_name)** | | | | - ``field_name`` : le nom du champ | +---------------------------------------------------------------+ @@ -99,21 +103,21 @@ Le champ et les seuils | | | **SetUseField(use_field)** | | | -| - ``use_field`` : entier précisant l'usage du champ | +| - ``use_field`` : entier précisant l'usage du champ | | | -| 0. valeur par maille (défaut) | -| 1. saut entre une maille et ses voisines | +| * 0 : valeur par élément (défaut) | +| * 1 : saut entre un élément et ses voisins | +---------------------------------------------------------------+ | .. module:: SetRefinThr | | | | **SetRefinThr(type_thres, threshold)** | | | -| - ``type_thres`` : entier précisant le type de seuil en | +| - ``type_thres`` : entier précisant le type de seuil en | | raffinement | | | -| 1. valeur absolue | -| 2. valeur relative en % | -| 3. fraction des mailles en % | +| * 1 : valeur absolue | +| * 2 : valeur relative en % | +| * 3 : fraction des mailles en % | | | | - ``threshold`` : valeur du seuil | +---------------------------------------------------------------+ @@ -126,19 +130,19 @@ Le champ et les seuils | | | **SetUnRefThr(type_thres, threshold)** | | | -| - ``type_thres`` : entier précisant le type de seuil en | -| déraffinement | +| - ``type_thres`` : entier précisant le type de seuil en | +| déraffinement | | | -| 1. valeur absolue | -| 2. valeur relative en % | -| 3. fraction des mailles en % | +| * 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 | +| Retourne le type de seuil de déraffinement | +---------------------------------------------------------------+ @@ -146,56 +150,91 @@ Les composantes du champ ^^^^^^^^^^^^^^^^^^^^^^^^ +---------------------------------------------------------------+ -+===============================================================+ ++---------------------------------------------------------------+ | .. module:: AddComp | | | | **AddComp(comp_name)** | | | -| - ``comp_name`` : nom d'une composante à prendre en | +| - ``comp_name`` : nom d'une composante à prendre en | | compte | +---------------------------------------------------------------+ | .. module:: SetUseComp | | | | **SetUseComp(use_comp)** | | | -| - ``use_comp`` : entier précisant l'usage des composantes | +| - ``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| +| * 0 : norme L2 (défaut) | +| * 1 : norme infinie | +| * 2 : valeur relative, si une seule composante | +---------------------------------------------------------------+ | .. module:: GetListComp | | | | **GetListComp()** | -| Retourne la liste des composantes utilisées | +| 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 | +| - ``group_name`` : nom du groupe à prendre en compte | +---------------------------------------------------------------+ | .. module:: GetGroups | | | | **GetGroups()** | -| Retourne la liste des groupes utilisés pour le filtrage | +| Retourne la liste des groupes utilisés pour le filtrage | +---------------------------------------------------------------+ +Les options avancées +^^^^^^^^^^^^^^^^^^^^ + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: SetNivMax | +| | +| **SetNivMax(nivmax)** | +| | +| - ``nivmax`` : niveau de raffinement à ne pas dépasser | ++---------------------------------------------------------------+ +| .. module:: GetNivMax | +| | +| **GetNivMax()** | +| Retourne le niveau maximal de raffinement | ++---------------------------------------------------------------+ +| .. module:: SetDiamMin | +| | +| **SetDiamMin(diammin)** | +| | +| - ``diammin`` : diamètre minimal voulu pour une maille | ++---------------------------------------------------------------+ +| .. module:: GetDiamMin | +| | +| **GetDiamMin()** | +| Retourne le diamètre minimal voulu | ++---------------------------------------------------------------+ + + Exemple """"""" -La création de l'objet hypo_1 se fait ainsi : :: +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.SetField("INDICATEUR") hypo_1.AddComp("INDX") hypo_1.AddComp("INDZ") hypo_1.SetRefinThr(1, 80.) +Saisie graphique correspondante +""""""""""""""""""""""""""""""" +Consulter :ref:`gui_create_hypothese` + +.. warning:: + En mode graphique, si on édite une hypothèse et que l'on modifie une de ses caractéristiques, par exemple le seuil de raffinement, toutes les itérations qui ont été calculées précédemment avec cette hypothèse sont invalidées. En mode python, cela n'est plus vrai : les itérations restent telles quelles. diff --git a/doc/tui_create_iteration.rst b/doc/tui_create_iteration.rst index 45f80069..a9590dcf 100644 --- a/doc/tui_create_iteration.rst +++ b/doc/tui_create_iteration.rst @@ -1,86 +1,105 @@ .. _tui_create_iteration: -L'itération +L'itération =========== -.. index:: single: itération -.. index:: single: hypothèse +.. index:: single: itération +.. index:: single: hypothèse .. index:: single: zone -Les variables sont décrites dans :ref:`gui_create_iteration`. +Les variables sont décrites dans :ref:`gui_create_iteration`. -Méthodes de la classe homard +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 | +| - ``iter_name`` : le nom de l'itération | +| - ``iter_parent_name`` : le nom de l'itération mère | | | -| Par défaut : | +| Par défaut : | | | -| * le maillage produit a le même nom que l'itération | +| * 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 | +| - ``iter_name`` : le nom de l'itération | +| - ``hypo_name`` : le nom de l'hypothèse à associer | +---------------------------------------------------------------+ -Méthodes de la classe iteration +Méthodes de la classe iteration """"""""""""""""""""""""""""""" -Généralités +Généralités ^^^^^^^^^^^ +---------------------------------------------------------------+ -+===============================================================+ ++---------------------------------------------------------------+ +| .. index:: single: Compute | +| | +| **Compute(option)** | +| Calcule le maillage correspondant à 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 | ++---------------------------------------------------------------+ | .. module:: GetName | | | | **GetName()** | -| Retourne le nom de l'itération | +| Retourne le nom de l'itération | +---------------------------------------------------------------+ | .. module:: GetNumber | | | | **GetNumber()** | -| Retourne le numéro de l'itération | +| Retourne le numéro de l'itération. | +| | +| L'itération 0 est celle associée au maillage initial. | +| Ensuite, une itération de numéro N est issue de | +| l'adaptation d'une itération de numéro N-1. | +---------------------------------------------------------------+ | .. module:: GetIterParent | | | | **GetIterParent()** | -| Retourne le nom de l'itération mère | +| Retourne le nom de l'itération mère | +---------------------------------------------------------------+ | .. module:: GetHypoName | | | | **GetHypoName()** | -| Retourne le nom de l'hypothèse associée | +| Retourne le nom de l'hypothèse associée | +---------------------------------------------------------------+ | .. module:: GetCaseName | | | | **GetCaseName()** | -| Retourne le nom du cas associé | +| Retourne le nom du cas associé | +---------------------------------------------------------------+ | .. module:: GetState | | | | **GetState()** | -| Retourne l'état de l'itération | +| Retourne l'état de l'itération | | | -| - ``0`` : itération non calculée | -| - ``1`` : itération calculée correctement | +| - ``0`` : itération non calculée | +| - ``1`` : itération calculée correctement | +---------------------------------------------------------------+ Informations sur les maillages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +---------------------------------------------------------------+ -+===============================================================+ ++---------------------------------------------------------------+ | .. module:: GetMeshName | | | | **GetMeshName()** | @@ -103,14 +122,19 @@ Informations sur le champ ^^^^^^^^^^^^^^^^^^^^^^^^^ +---------------------------------------------------------------+ -+===============================================================+ -| .. module:: SetField | ++---------------------------------------------------------------+ +| .. module:: SetFieldFile | | | -| **SetField(field_file, TimeStep, Rank)** | +| **SetFieldFile(field_file)** | | | | - ``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:: SetTimeStepRank | +| | +| **SetTimeStepRank(TimeStep, Rank)** | +| | +| - ``TimeStep`` : l'instant où est pris le champ | +| - ``Rank`` : le numéro d'ordre où est pris le champ | +---------------------------------------------------------------+ | .. module:: GetFieldFileName | | | @@ -120,19 +144,19 @@ Informations sur le champ | .. module:: GetTimeStep | | | | **GetTimeStep()** | -| Retourne l'instant où est pris le champ | +| Retourne l'instant où est pris le champ | +---------------------------------------------------------------+ | .. module:: GetRank | | | | **GetRank()** | -| Retourne le numéro d'ordre où est pris le champ | +| 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. :: +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()) @@ -140,13 +164,19 @@ Pour la création de la première itération, il faut récupérer le nom qui a iter_1.SetMeshName("maill_01") iter_1.SetMeshFile("/local00/M.01.med") homard.AssociateIterHypo(iter_name, "HypoField") + codret = iter_1.Compute(1) -Pour la création d'une itération suivante, on donnera le nom de l'itération parent de laquelle on part. :: +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") + iter_2 = homard.CreateIteration(iter_name, "Iteration_1") + iter_2.SetField(field_file, 0, 0) + iter_2.SetMeshName("maill_02") + iter_2.SetMeshFile("/local00/M.02.med") homard.AssociateIterHypo(iter_name, "HypoField") + codret = iter_2.Compute(1) + +Saisie graphique correspondante +""""""""""""""""""""""""""""""" +Consulter :ref:`gui_create_iteration` diff --git a/doc/tui_create_zone.rst b/doc/tui_create_zone.rst index e5e34af5..9911c413 100644 --- a/doc/tui_create_zone.rst +++ b/doc/tui_create_zone.rst @@ -6,64 +6,154 @@ La zone .. index:: single: zone .. index:: single: boite .. index:: single: sphere +.. index:: single: cylindre +.. index:: single: tuyau +.. index:: single: disque +.. index:: single: disque avec trou +.. index:: single: 2D -Les variables sont décrites dans :ref:`gui_create_zone`. +Les variables sont décrites dans :ref:`gui_create_zone`. -Méthodes de la classe homard +Méthodes de la classe homard """""""""""""""""""""""""""" +Ces méthodes retournent une instance de la classe zone. + ++----------------------------------------------------------------------------------+ ++----------------------------------------------------------------------------------+ +| .. module:: CreateZoneBox | +| | +| **CreateZoneBox(zone_name, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax)** | +| | +| - ``zone_name`` : le nom de la zone basée sur un parallélépipède | +| - ``Xmin``, ``Xmax`` : coordonnées extrêmes selon X | +| - ``Ymin``, ``Ymax`` : coordonnées extrêmes selon Y | +| - ``Zmin``, ``Zmax`` : coordonnées extrêmes selon Z | ++----------------------------------------------------------------------------------+ +| .. module:: CreateZoneCylinder | +| | +| **CreateZoneCylinder(zone_name, Xbase, Ybase, Zbase, Xaxe, Yaxe, Zaxe, R, H)** | +| | +| - ``zone_name`` : le nom de la zone basée sur un cylindre | +| - ``Xbase``, ``Ybase``, ``Zbase`` : coordonnées d'un point de base | +| positionné sur l'axe | +| - ``Xaxe``, ``Yaxe``, ``Zaxe`` : vecteur de l'axe | +| - ``R`` : rayon du cylindre | +| - ``H`` : hauteur du cylindre | ++----------------------------------------------------------------------------------+ +| .. module:: CreateZonePipe | +| | +| **CreateZonePipe(zone_name, Xbase, Ybase, Zbase, Xaxe, Yaxe, Zaxe, R, H, Rint)** | +| | +| - ``zone_name`` : le nom de la zone basée sur un tuyau | +| - ``Xbase``, ``Ybase``, ``Zbase`` : coordonnées d'un point de base | +| positionné sur l'axe | +| - ``Xaxe``, ``Yaxe``, ``Zaxe`` : vecteur de l'axe | +| - ``R`` : rayon externe du tuyau | +| - ``H`` : hauteur du tuyau | +| - ``R`` : rayon interne du tuyau | ++----------------------------------------------------------------------------------+ +| .. module:: CreateZoneSphere | +| | +| **CreateZoneSphere(zone_name, Xcen, Ycen, Zcen, R)** | +| | +| - ``zone_name`` : le nom de la zone basée sur une sphère | +| - ``Xcen``, ``Ycen``, ``Zcen`` : coordonnées du centre de la sphère | +| - ``R`` : rayon de la sphère | ++----------------------------------------------------------------------------------+ +| .. module:: CreateZoneBox2D | +| | +| **CreateZoneBox2D(zone_name, Umin, Umax, Vmin, Vmax, Orient)** | +| | +| - ``zone_name`` : le nom de la zone basée sur un rectangle | +| - ``Umin``, ``Umax`` : coordonnées extrêmes pour la 1ère dimension | +| - ``Vmin``, ``Vmax`` : coordonnées extrêmes pour la 2nde dimension | +| - ``Orient`` : entier précisant la convention d'orientation du plan | ++----------------------------------------------------------------------------------+ +| .. module:: CreateZoneDisk | +| | +| **CreateZoneDisk(zone_name, Ucen, Vcen, R, Orient)** | +| | +| - ``zone_name`` : le nom de la zone basée sur un disque plein | +| - ``Ucen``, ``Vcen`` : coordonnées du centre du disque | +| - ``R`` : rayon du disque | +| - ``Orient`` : entier précisant la convention d'orientation du plan | ++----------------------------------------------------------------------------------+ +| .. module:: CreateZoneDiskWithHole | +| | +| **CreateZoneDiskWithHole(zone_name, Ucen, Vcen, R, Rint, Orient)** | +| | +| - ``zone_name`` : le nom de la zone basée sur un disque troué | +| - ``Ucen``, ``Vcen`` : coordonnées du centre du disque | +| - ``R`` : rayon externe du disque | +| - ``Rint`` : rayon interne du disque | +| - ``Orient`` : entier précisant la convention d'orientation du plan | ++----------------------------------------------------------------------------------+ + + + +---------------------------------------------------------------+ -+===============================================================+ -| .. module:: CreateZone | -| | -| **CreateZone(zone_name)** | ++---------------------------------------------------------------+ +| La convention d'orientation du plan est la même que celle | +| utilisée dans les autres modules de Salome, en particulier | +| GEOM : | | | -| - ``zone_name`` : le nom de la zone | +| 1. plan XY ; U <==> X et V <==> Y | +| 2. plan YZ ; U <==> Y et V <==> Z | +| 3. plan ZX ; U <==> Z et V <==> X | +---------------------------------------------------------------+ -Méthodes de la classe zone + +.. note:: + Les fonctions définissant des zones 2D ne doivent être utilisées que si l'intégralité du + maillage est 2D, dans un des plans de coordonnées. + + +Méthodes de la classe zone """""""""""""""""""""""""" +---------------------------------------------------------------+ -+===============================================================+ ++---------------------------------------------------------------+ | .. module:: GetName | | | | **GetName()** | | Retourne le nom de la zone | +---------------------------------------------------------------+ -| .. module:: SetZoneType | +| .. module:: GetZoneType | | | -| **SetZoneType(zone_type)** | +| **GetZoneType()** | +| Retourne le type de la zone | | | -| - ``zone_type`` : entier précisant le type de zone | -| | -| * 2 : parallélépipède | -| * 4 : sphère | +| * 2 : parallélépipède | +| * 3 : sphère | +| * 5 : cylindre | +| * 7 : tuyau | +| * 11, 12, 13 : rectangle et orientation 1, 2 ou 3 | +| * 31, 32, 33 : disque et orientation 1, 2 ou 3 | +| * 61, 62, 63 : disque percé et orientation 1, 2 ou 3 | +---------------------------------------------------------------+ -| .. module:: SetBox | -| | -| **SetBox(Xmin, Xmax, Ymin, Ymax, Zmin, Zmax)** | -| | -| - ``Xmin``, ``Xmax`` : X mini, X maxi | -| - etc. | -+---------------------------------------------------------------+ -| .. module:: SetSphere | -| | -| **SetSphere(Xcen, Ycen, Zcen, R)** | +| .. module:: GetCoords | | | -| - ``Xcen`` : X du centre | -| - ``Ycen`` : Y du centre | -| - ``Zcen`` : Z du centre | -| - ``R`` : rayon de la sphère | +| **GetCoords()** | +| Retourne un tableau contenant les coordonnées de la zone | +| dans l'ordre d'entrée dans le CreateZoneXXXX associé | +---------------------------------------------------------------+ Exemple """"""" -La création de l'objet zone_1 se fait ainsi : :: +La création d'une boîte 3D ou d'un disque dans le plan XY se fait ainsi : :: + + zone_1 = homard.CreateZoneBox ("BLOC", -1., 1., -30., 40., 10.5, 20.8) + zone_2 = homard.CreateZoneDisk ("disque", 1., 3., 43.25, 1) + + +Saisie graphique correspondante +""""""""""""""""""""""""""""""" +Consulter :ref:`gui_create_zone` + +.. warning:: + En mode graphique, si on édite une zone et que l'on modifie une des dimensions, toutes les itérations qui ont été calculées précédemment avec cette zone sont invalidées. En mode python, cela n'est plus vrai : les itérations restent telles quelles. - 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 index d2ef16f3..5727d981 100644 --- a/doc/tui_homard.rst +++ b/doc/tui_homard.rst @@ -1,37 +1,16 @@ .. _tui_homard: -L'adaptation -============ +Le calcul +========= -.. index:: single: itération -.. index:: single: calcul - -Méthodes de la classe homard +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) + +Saisie graphique correspondante +""""""""""""""""""""""""""""""" +Consulter :ref:`gui_homard` diff --git a/doc/tui_usage.rst b/doc/tui_usage.rst index 195b2581..fec8871e 100644 --- a/doc/tui_usage.rst +++ b/doc/tui_usage.rst @@ -1,6 +1,6 @@ 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. +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 @@ -9,4 +9,5 @@ Le module HOMARD peut se lancer à partir d'instructions python. On trouvera ici tui_create_iteration tui_create_hypothese tui_create_zone + tui_create_boundary tui_homard diff --git a/doc/tutorial_3.py b/doc/tutorial_3.py deleted file mode 100644 index 264d5905..00000000 --- a/doc/tutorial_3.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/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 index 653ac99d..3662308e 100644 --- a/doc/tutorials.rst +++ b/doc/tutorials.rst @@ -2,15 +2,16 @@ 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. + +On trouvera ici les instructions python pour quelques configurations caractéristiques. Les fichiers de données associés sont téléchargeables. Il faut penser à modifier le contenu de la variable ``dircase`` : c'est le répertoire dans lequel les fichiers med auront été enregistrés. C'est dans ce répertoire que seront écrits les fichiers résultant des adaptations successives. 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. + * 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. :: @@ -21,37 +22,37 @@ On fera ici trois raffinements uniformes successifs du maillage contenu dans le Hypo_0 = homard.CreateHypothesis('Hypo_0') Hypo_0.SetAdapRefinUnRef(-1, 1, 0) # - # Case "Case_0" + # Case "Case_1" # ============= - Case_0 = homard.CreateCase('Case_0', 'MAILL', dircase+'/m0.med') - Case_0.SetDirName(dircase) - Case_0.SetConfType(1) + Case_1 = homard.CreateCase('Case_1', 'MAILL', dircase+'/tutorial_1.00.med') + Case_1.SetDirName(dircase) + Case_1.SetConfType(1) # # Iterations # ========== # Iteration "Iter_0" - Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name()) + Iter_0 = homard.CreateIteration('Iter_0', Case_1.GetIter0Name()) Iter_0.SetMeshName('MESH') Iter_0.SetMeshFile(dircase+'/maill.01.med') homard.AssociateIterHypo('Iter_0', 'Hypo_0') - codret = homard.Compute('Iter_0', 1) + codret = Iter_0.Compute(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) + codret = Iter_1.Compute(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) + codret = Iter_2.Compute(1) .. note:: - Téléchargement des fichiers + Téléchargement des fichiers * :download:`maillage initial` * :download:`commandes python` @@ -61,7 +62,7 @@ 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. +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" @@ -69,16 +70,13 @@ On procède ici au raffinement selon des zones. Pour passer du maillage initial # 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) + Zone_0 = homard.CreateZoneBox('Zone_0', -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) + Zone_1 = homard.CreateZoneSphere('Zone_1', 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) + Zone_2 = homard.CreateZoneBox('Zone_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51) # # Hypothesis "Hypo_0" # =================== @@ -94,18 +92,18 @@ On procède ici au raffinement selon des zones. Pour passer du maillage initial homard.AssociateHypoZone('Zone_0', 'Hypo_1') homard.AssociateHypoZone('Zone_2', 'Hypo_1') # - # Case "Case_0" + # Case "Case_1" # ============= - Case_0 = homard.CreateCase('Case_0', 'MZERO', dircase+'/tutorial_2.00.med') - Case_0.SetDirName(dircase) + Case_1 = homard.CreateCase('Case_1', 'MZERO', dircase+'/tutorial_2.00.med') + Case_1.SetDirName(dircase) # # Iteration "Iter_0" # ================== - Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name()) + Iter_0 = homard.CreateIteration('Iter_0', Case_1.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) + codret = Iter_0.Compute(1) # # Iteration "Iter_1" # ================== @@ -113,10 +111,10 @@ On procède ici au raffinement selon des zones. Pour passer du maillage initial Iter_1.SetMeshName('M_2') Iter_1.SetMeshFile(dircase+'/maill.02.med') homard.AssociateIterHypo('Iter_1', 'Hypo_1') - codret = homard.Compute('Iter_1', 1) + codret = Iter_1.Compute(1) .. note:: - Téléchargement des fichiers + Téléchargement des fichiers * :download:`maillage initial` * :download:`commandes python` @@ -126,61 +124,229 @@ 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. +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. Des champs sur les noeuds ou sur les mailles sont interpolés. +Pour adapter le maillage H_1 issu de l'itération Iter_1, deux variantes sont appliquées. Dans la première, Iter_2, le champ est un champ scalaire d'indicateurs d'erreur et on découpe les 1.5% de mailles où l'erreur est la plus grande. Dans la seconde variante, Iter_2_bis, on se base sur un champ vectoriel et on examine le saut de ce vecteur entre une maille et ses voisines : on découpera là où la norme infinie de ce saut est supérieure au seuil absolu de 0.0001. :: dircase = "/tmp" # - # Hypothesis "Hypo_0" - # =================== - Hypo_0 = homard.CreateHypothesis('Hypo_0') - Hypo_0.SetAdapRefinUnRef(1, 1, 0) + # Hypothesis "Hypo_0vers1" + # ======================== + Hypo_0vers1 = homard.CreateHypothesis('Hypo_0vers1') + Hypo_0vers1.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) + Hypo_0vers1.SetField('SOLU_0__QIRE_ELEM_SIGM__________') + Hypo_0vers1.SetUseComp(0) + Hypo_0vers1.AddComp('ERREST ') + Hypo_0vers1.SetRefinThr(3, 1.0) + Hypo_0vers1.SetTypeFieldInterp(2) + Hypo_0vers1.AddFieldInterp('SOLU_0__DEPL____________________') + Hypo_0vers1.AddFieldInterp('SOLU_0__ERRE_ELEM_SIGM__________') # - # Hypothesis "Hypo_1" - # =================== - Hypo_1 = homard.CreateHypothesis('Hypo_1') - Hypo_1.SetAdapRefinUnRef(1, 1, 1) + # Hypothesis "Hypo_1vers2" + # ======================== + Hypo_1vers2 = homard.CreateHypothesis('Hypo_1vers2') + Hypo_1vers2.SetAdapRefinUnRef(1, 1, 1) + # Characterization of the field + Hypo_1vers2.SetField('SOLU_1__QIRE_ELEM_SIGM__________') + Hypo_1vers2.SetUseComp(0) + Hypo_1vers2.AddComp('ERREST ') + Hypo_1vers2.SetRefinThr(3, 1.5) + Hypo_1vers2.SetUnRefThr(3, 6.) + Hypo_1vers2.SetTypeFieldInterp(2) + Hypo_1vers2.AddFieldInterp('SOLU_1__DEPL____________________') + Hypo_1vers2.AddFieldInterp('SOLU_1__QIRE_ELEM_SIGM__________') + # + # Hypothesis "Hypo_1vers2_bis" + # ============================ + Hypo_1vers2_bis = homard.CreateHypothesis('Hypo_1vers2_bis') + Hypo_1vers2_bis.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.) + Hypo_1vers2_bis.SetField('SOLU_1__DEPL____________________') + Hypo_1vers2_bis.SetUseComp(1) + Hypo_1vers2_bis.AddComp('DX') + Hypo_1vers2_bis.AddComp('DY') + Hypo_1vers2_bis.AddComp('DZ') + Hypo_1vers2_bis.SetRefinThr(1, 0.0001) + Hypo_1vers2_bis.SetUnRefThr(1, 0.000001) + Hypo_1vers2_bis.SetTypeFieldInterp(0) # - # Case "Case_0" + # Case "Case_1" # ============= - Case_0 = homard.CreateCase('Case_0', 'G_0', dircase+'/tutorial_3.00.med') - Case_0.SetDirName(dircase) + Case_1 = homard.CreateCase('Case_1', 'G_0', dircase+'/tutorial_3.00.med') + Case_1.SetDirName(dircase) # - # Iteration "Iter_0" + # Iteration "Iter_1" # ================== - 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) + Iter_1 = homard.CreateIteration('Iter_1', Case_1.GetIter0Name()) + Iter_1.SetMeshName('H_1') + Iter_1.SetMeshFile(dircase+'/maill.01.med') + Iter_1.SetFieldFile(dircase+'/tutorial_3.00.med') + Iter_1.SetTimeStepRank( 1, 1) + homard.AssociateIterHypo('Iter_1', 'Hypo_0vers1') + codret = Iter_1.Compute(1) + # + # Iteration "Iter_2" + # ================== + Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1') + Iter_2.SetMeshName('H_2') + Iter_2.SetMeshFile(dircase+'/maill.02.med') + Iter_2.SetFieldFile(dircase+'/tutorial_3.01.med') + Iter_2.SetTimeStepRank(1, 1) + homard.AssociateIterHypo('Iter_2', 'Hypo_1vers2') + codret = Iter_2.Compute(1) + # + # Iteration "Iter_2_bis" + # ====================== + Iter_2_bis = homard.CreateIteration('Iter_2_bis', 'Iter_1') + Iter_2_bis.SetMeshName('H_2_bis') + Iter_2_bis.SetMeshFile(dircase+'/maill.02.bis.med') + Iter_2_bis.SetFieldFile(dircase+'/tutorial_3.01.med') + Iter_2_bis.SetTimeStepRank(1, 1) + homard.AssociateIterHypo('Iter_2_bis', 'Hypo_1vers2_bis') + codret = Iter_2_bis.Compute(1) + +.. note:: + Téléchargement des fichiers + + * :download:`maillage et champ étape 0` + * :download:`maillage et champ étape 1` + * :download:`commandes python` + + +Suivi de frontières courbes +""""""""""""""""""""""""""" +.. index:: single: champ + +On teste ici le suivi des frontières courbes : des frontières analytiques pour décrire les différentes surfaces des tuyaux et une frontière discrète pour décrire les lignes d'intersection des deux tuyaux. Le pilotage du raffinement est le suivant : raffinement uniforme de toutes les mailles contenues dans des groupes désignés. +:: + + dircase = "/tmp" + # + # Creation of the boundaries + # ========================== + Boundary_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', dircase+'/tutorial_4.fr.med') + # + Boundary_2 = homard.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.) + # + Boundary_3 = homard.CreateBoundaryCylinder('cyl_2_ext', 17.5, -2.5, -12.5, -100., -75., -25., 50.) + # + Boundary_4 = homard.CreateBoundaryCylinder('cyl_1_int', 0.0, 25., -25., 25., 50., 75., 75.) + # + Boundary_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100., -75., -25., 25.) + # + # Hypothesis "Hypo" + # =================== + # Creation of the hypothesis Hypo_1 + Hypo_1 = homard.CreateHypothesis('Hypo_1') + Hypo_1.SetAdapRefinUnRef(-1, 1, 0) + Hypo_1.AddGroup('T1_INT_I') + Hypo_1.AddGroup('T1_INT_O') + Hypo_1.AddGroup('T2_INT') + # Creation of the hypothesis Hypo_2 + Hypo_2 = homard.CreateHypothesis('Hypo_2') + Hypo_2.SetAdapRefinUnRef(-1, 1, 0) + Hypo_2.AddGroup('T1_EXT_I') + Hypo_2.AddGroup('T1_EXT_O') + Hypo_2.AddGroup('T2_EXT') + # + # Case "Case" + # ============= + Case = homard.CreateCase('Case', 'PIQUAGE', dircase+'/tutorial_4.00.med') + Case.SetDirName(dircase) + Case.AddBoundaryGroup( 'intersection', '' ) + Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' ) + Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' ) + Case.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' ) + Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' ) + Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' ) + Case.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' ) + # + # Creation of the iterations + # ========================== + # Creation of the iteration Iter_1 + Iter_1 = homard.CreateIteration('Iter_1', Case.GetIter0Name() ) + Iter_1.SetMeshName('PIQUAGE_1') + Iter_1.SetMeshFile(dircase+'/maill.01.med') + homard.AssociateIterHypo('Iter_1', 'Hypo_1') + codret = Iter_1.Compute(1) + # Creation of the iteration Iter_2 + Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1' ) + Iter_2.SetMeshName('PIQUAGE_2') + Iter_2.SetMeshFile(dircase+'/maill.02.med') + homard.AssociateIterHypo('Iter_2', 'Hypo_2') + codret = Iter_2.Compute(1) + +.. note:: + Téléchargement des fichiers + + * :download:`maillage initial` + * :download:`maillage de la frontière discrète` + * :download:`commandes python` + + +Instructions spécifiques au 2D +"""""""""""""""""""""""""""""" +.. index:: single: 2D + +Les instructions pour adapter un maillage 2D sont exactement identiques à celles nécessaires à l'adaptation d'un maillage 3D. La seule exception concerne le raffinement selon des zones géométriques : des fonctions différentes sont utilisées pour pouvoir définir des zones 2D. On donne alors les coordonnées 2D des zones, en précisant l'orientation du plan du maillage. +Dans le cas présenté ici, on raffine une première fois toutes les mailles contenues dans un disque percé, puis dans une seconde itération, toutes les mailles contenues dans un rectangle. On notera l'utilisation du suivi des frontières circulaires du domaine. +:: + + dircase = "/tmp" + # + # Creation of the boundaries + # ========================== + # Creation of the discrete boundary Boun_1 + Boun_1 = homard.CreateBoundaryDi('Boun_1', 'MAIL_EXT', dircase+'/tutorial_5.fr.med') + # + # Creation of the zones + # ===================== + # Creation of the disk with hole enveloppe + enveloppe = homard.CreateZoneDiskWithHole( 'enveloppe', 0., 0., 250., 193., 1 ) + # Creation of the rectangle quart_sup + quart_sup = homard.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 ) + # + # Hypothesis + # ========== + # Creation of the hypothesis Hypo_1 + Hypo_1 = homard.CreateHypothesis('Hypo_1') + Hypo_1.SetAdapRefinUnRef(0, 1, 0) + homard.AssociateHypoZone('enveloppe', 'Hypo_1') + # Creation of the hypothesis Hypo_2 + Hypo_2 = homard.CreateHypothesis('Hypo_2') + Hypo_2.SetAdapRefinUnRef(0, 1, 0) + homard.AssociateHypoZone('quart_sup', 'Hypo_2') + # + # Case "Case_1" + # ============= + Case_1 = homard.CreateCase('Case_1', 'COEUR_2D', dircase+'/tutorial_5.00.med') + Case_1.SetDirName(dircase) + Case_1.SetConfType(3) + Case_1.AddBoundaryGroup('Boun_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) + Iter_1 = homard.CreateIteration('Iter_1', Case_1.GetIter0Name()) + Iter_1.SetMeshName('COEUR_2D_01') + Iter_1.SetMeshFile(dircase+'/maill.01.med') homard.AssociateIterHypo('Iter_1', 'Hypo_1') - codret = homard.Compute('Iter_1', 1) + codret = Iter_1.Compute(1) + # + # Iteration "Iter_2" + # ================== + Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1') + Iter_2.SetMeshName('COEUR_2D_02') + Iter_2.SetMeshFile(dircase+'/maill.02.med') + homard.AssociateIterHypo('Iter_2', 'Hypo_2') + codret = Iter_2.Compute(1) .. note:: - Téléchargement des fichiers + Téléchargement des fichiers - * :download:`maillage et champ étape 0` - * :download:`maillage et champ étape 1` - * :download:`commandes python` + * :download:`maillage initial` + * :download:`maillage de la frontière discrète` + * :download:`commandes python` .. toctree:: diff --git a/idl/Gen.xml b/idl/Gen.xml new file mode 100644 index 00000000..4902bdf5 --- /dev/null +++ b/idl/Gen.xml @@ -0,0 +1,1107 @@ + + + + + + + + + + + + + + HOMARD + HOMARD + OTHER + HOMARD team - EDF RD + 1.1 + unknown + 1 + 1 + HOMARD_2.png + + + HOMARD + unknown + + + CreateCase + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + CaseName + string + unknown + + + MeshName + string + unknown + + + FileName + string + unknown + + + + + return + HOMARD/HOMARD_Cas + unknown + + + + + + CreateHypothesis + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + HypoName + string + unknown + + + + + return + HOMARD/HOMARD_Hypothesis + unknown + + + + + + CreateIteration + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + PreviousIterName + string + unknown + + + + + return + HOMARD/HOMARD_Iteration + unknown + + + + + + CreateZoneBox + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xmini + double + unknown + + + Xmaxi + double + unknown + + + Ymini + double + unknown + + + Ymaxi + double + unknown + + + Zmini + double + unknown + + + Zmaxi + double + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + CreateZoneSphere + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Radius + double + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + CreateZoneCylinder + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Xaxis + double + unknown + + + Yaxis + double + unknown + + + Zaxis + double + unknown + + + Radius + double + unknown + + + Height + double + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + CreateZonePipe + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Xaxis + double + unknown + + + Yaxis + double + unknown + + + Zaxis + double + unknown + + + Radius + double + unknown + + + Height + double + unknown + + + InternalRadius + double + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + CreateZoneBox2D + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Umini + double + unknown + + + Umaxi + double + unknown + + + Vmini + double + unknown + + + Vmaxi + double + unknown + + + Orient + long + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + CreateZoneDisk + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Ucentre + double + unknown + + + Vcentre + double + unknown + + + Radius + double + unknown + + + Orient + long + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + CreateZoneDiskWithHole + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Ucentre + double + unknown + + + Vcentre + double + unknown + + + Radius + double + unknown + + + InternalRadius + double + unknown + + + Orient + long + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + CreateBoundaryDi + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + MeshName + string + unknown + + + FileName + string + unknown + + + + + return + HOMARD/HOMARD_Boundary + unknown + + + + + + CreateBoundaryCylinder + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Xaxis + double + unknown + + + Yaxis + double + unknown + + + Zaxis + double + unknown + + + Radius + double + unknown + + + + + return + HOMARD/HOMARD_Boundary + unknown + + + + + + CreateBoundarySphere + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Radius + double + unknown + + + + + return + HOMARD/HOMARD_Boundary + unknown + + + + + + AssociateIterHypo + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + HypoName + string + unknown + + + + + + + AssociateHypoZone + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + HypoName + string + unknown + + + + + + + GetCaseName + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + + + return + string + unknown + + + + + + GetCas + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + CaseName + string + unknown + + + + + return + HOMARD/HOMARD_Cas + unknown + + + + + + GetBoundary + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + + + return + HOMARD/HOMARD_Boundary + unknown + + + + + + GetZone + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + + + return + HOMARD/HOMARD_Zone + unknown + + + + + + GetHypothesis + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + HypoName + string + unknown + + + + + return + HOMARD/HOMARD_Hypothesis + unknown + + + + + + GetIteration + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + + + return + HOMARD/HOMARD_Iteration + unknown + + + + + + GetAllCases + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeCases + unknown + + + + + + GetAllBoundarys + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeBoundarys + unknown + + + + + + GetAllHypotheses + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeHypotheses + unknown + + + + + + GetAllZones + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeZones + unknown + + + + + + GetAllIterations + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeIterations + unknown + + + + + + SetCurrentStudy + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + theStudy + SALOMEDS/Study + unknown + + + + + + + AssociateIterIter + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + PreviousIterName + string + unknown + + + IterName + string + unknown + + + + + + + DissociateHypoZone + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + HypoName + string + unknown + + + + + + + InvalideBoundary + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + + + + + InvalideZone + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + + + + + InvalideHypo + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + HypoName + string + unknown + + + + + + + InvalideIter + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + + + + + Compute + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + etatMenage + long + unknown + + + + + return + boolean + unknown + + + + + + VerifieDir + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + + + return + boolean + unknown + + + + + + PublishFileUnderIteration + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + NomIter + string + unknown + + + NomFich + string + unknown + + + Commentaire + string + unknown + + + + + + + PublishResultInSmesh + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + NomFich + string + unknown + + + IconeType + long + unknown + + + + + + + GetCurrentStudy + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + SALOMEDS/Study + unknown + + + + + + GetCurrentStudyID + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + long + unknown + + + + + + + + + diff --git a/idl/HOMARD_Boundary.idl b/idl/HOMARD_Boundary.idl index 628b0b0f..79131c7b 100644 --- a/idl/HOMARD_Boundary.idl +++ b/idl/HOMARD_Boundary.idl @@ -1,14 +1,36 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_Boundary_IDL #define _HOMARD_Boundary_IDL +#include "SALOME_Component.idl" #include "SALOME_Exception.idl" +#include "SALOMEDS.idl" + #include "HOMARD_Cas.idl" #include "HOMARD_Zone.idl" module HOMARD { - interface HOMARD_Boundary + interface HOMARD_Boundary : Engines::EngineComponent { void SetName (in string NomBoundary) raises (SALOME::SALOME_Exception); @@ -26,11 +48,11 @@ module HOMARD 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); + + HOMARD::double_array GetCoords() raises (SALOME::SALOME_Exception); void SetLimit (in double Xincr, in double Yincr, in double Zincr) raises (SALOME::SALOME_Exception); diff --git a/idl/HOMARD_Cas.idl b/idl/HOMARD_Cas.idl index 7804983f..d79354bc 100644 --- a/idl/HOMARD_Cas.idl +++ b/idl/HOMARD_Cas.idl @@ -1,7 +1,28 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_CAS_IDL #define _HOMARD_CAS_IDL +#include "SALOME_Component.idl" #include "SALOME_Exception.idl" +#include "SALOMEDS.idl" module HOMARD { @@ -10,7 +31,7 @@ module HOMARD typedef sequence ListBoundaryGroupType ; - interface HOMARD_Cas + interface HOMARD_Cas : Engines::EngineComponent { void SetName(in string NomCas) raises (SALOME::SALOME_Exception); @@ -39,6 +60,9 @@ module HOMARD void AddBoundaryGroup(in string NomBoundary, in string Group) raises (SALOME::SALOME_Exception); + void SetPyram(in long Pyram) raises (SALOME::SALOME_Exception); + long GetPyram() raises (SALOME::SALOME_Exception); + }; }; #endif diff --git a/idl/HOMARD_Gen.idl b/idl/HOMARD_Gen.idl index a84e1765..49f7180f 100644 --- a/idl/HOMARD_Gen.idl +++ b/idl/HOMARD_Gen.idl @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef __HOMARD_GEN__ #define __HOMARD_GEN__ @@ -19,57 +38,116 @@ module HOMARD typedef sequence listeCases; typedef sequence listeBoundarys; - interface HOMARD_Gen : Engines::Component, SALOMEDS::Driver + interface HOMARD_Gen : Engines::EngineComponent, SALOMEDS::Driver { - HOMARD_Cas CreateCase(in string nomCas, in string MeshName, in string FileName ) +// +// A. Les methodes qui suivent sont celles que l'on retrouvera dans +// le fichier resources/HOMARDCatalog.xml.in pour definir le composant HOMARD dans YACS +// A priori, ce sont les seules sont l'utilisateur doit connaitre l'existence. +// +// A.1. Les creations +// + HOMARD_Cas CreateCase(in string CaseName, in string MeshName, in string FileName ) raises (SALOME::SALOME_Exception); - HOMARD_Hypothesis CreateHypothesis(in string nomHypothesis ) + HOMARD_Hypothesis CreateHypothesis(in string HypoName ) raises (SALOME::SALOME_Exception); - HOMARD_Iteration CreateIteration(in string nomIter, in string nomIterParent ) + HOMARD_Iteration CreateIteration(in string IterName, in string PreviousIterName ) raises (SALOME::SALOME_Exception); - HOMARD_Zone CreateZone(in string nomZone, in long typeZone) + HOMARD_Zone CreateZoneBox (in string ZoneName, + in double Xmini, in double Xmaxi, + in double Ymini, in double Ymaxi, + in double Zmini, in double Zmaxi) raises (SALOME::SALOME_Exception); - HOMARD_Boundary CreateBoundary(in string nomBoundary, in long typeBoundary) + HOMARD_Zone CreateZoneSphere (in string ZoneName, + in double Xcentre, in double Ycentre, in double Zcentre, + in double Radius) raises (SALOME::SALOME_Exception); - - void AssociateIterIter(in string nomIterParent, in string nomIter) + HOMARD_Zone CreateZoneCylinder (in string ZoneName, + in double Xcentre, in double Ycentre, in double Zcentre, + in double Xaxis, in double Yaxis, in double Zaxis, + in double Radius, in double Height) + raises (SALOME::SALOME_Exception); + HOMARD_Zone CreateZonePipe (in string ZoneName, + in double Xcentre, in double Ycentre, in double Zcentre, + in double Xaxis, in double Yaxis, in double Zaxis, + in double Radius, in double Height, in double InternalRadius) + raises (SALOME::SALOME_Exception); + HOMARD_Zone CreateZoneBox2D (in string ZoneName, + in double Umini, in double Umaxi, + in double Vmini, in double Vmaxi, + in long Orient) + raises (SALOME::SALOME_Exception); + HOMARD_Zone CreateZoneDisk (in string ZoneName, + in double Ucentre, in double Vcentre, + in double Radius, in long Orient) + raises (SALOME::SALOME_Exception); + HOMARD_Zone CreateZoneDiskWithHole (in string ZoneName, + in double Ucentre, in double Vcentre, + in double Radius, in double InternalRadius, + in long Orient) raises (SALOME::SALOME_Exception); - void AssociateIterHypo(in string nomIter, in string nomHypothesis) + HOMARD_Boundary CreateBoundaryDi (in string BounName, in string MeshName, in string FileName) raises (SALOME::SALOME_Exception); - void AssociateHypoZone(in string nomZone, in string nomHypothesis) + HOMARD_Boundary CreateBoundaryCylinder (in string BounName, + in double Xcentre, in double Ycentre, in double Zcentre, + in double Xaxis, in double Yaxis, in double Zaxis, + in double Radius) + raises (SALOME::SALOME_Exception); + HOMARD_Boundary CreateBoundarySphere (in string BounName, + in double Xcentre, in double Ycentre, in double Zcentre, + in double Radius) + raises (SALOME::SALOME_Exception); +// +// A.2. Les associations +// + void AssociateIterHypo(in string IterName, in string HypoName) + raises (SALOME::SALOME_Exception); + void AssociateHypoZone(in string HypoName, in string ZoneName, in long TypeUse) + raises (SALOME::SALOME_Exception); +// +// A.3. Les informations +// + string GetCaseName(in string IterName) raises (SALOME::SALOME_Exception); + HOMARD_Cas GetCas(in string CaseName) raises (SALOME::SALOME_Exception); + HOMARD_Boundary GetBoundary(in string BounName) raises (SALOME::SALOME_Exception); + HOMARD_Zone GetZone(in string ZoneName) raises (SALOME::SALOME_Exception); + HOMARD_Hypothesis GetHypothesis(in string HypoName) raises (SALOME::SALOME_Exception); + HOMARD_Iteration GetIteration(in string IterName) 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); +// +// A.4. L'etude +// + void SetCurrentStudy(in SALOMEDS::Study theStudy) raises (SALOME::SALOME_Exception); +// +// B. Les methodes qui suivent n'apparaissent pas dans le composant HOMARD dans YACS +// L'utilisateur ne devrait pas les connaitre (ni s'en servir, a fortiori) +// + void AssociateIterIter(in string PreviousIterName, in string IterName) raises (SALOME::SALOME_Exception); - void DissociateHypoZone(in string nomZone, in string nomHypothesis) + void DissociateHypoZone(in string ZoneName, in string HypoName) 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); + void InvalideBoundary (in string BounName) raises (SALOME::SALOME_Exception); + void InvalideZone (in string ZoneName) raises (SALOME::SALOME_Exception); + void InvalideHypo (in string HypoName) raises (SALOME::SALOME_Exception); + void InvalideIter (in string IterName) raises (SALOME::SALOME_Exception); - boolean Compute (in string nomIter, in long etatMenage) + long Compute (in string IterName, 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); + boolean VerifieDir (in string IterName) 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); + long GetCurrentStudyID() raises (SALOME::SALOME_Exception); }; }; diff --git a/idl/HOMARD_Hypothesis.idl b/idl/HOMARD_Hypothesis.idl index cef2b040..7ff0b81b 100644 --- a/idl/HOMARD_Hypothesis.idl +++ b/idl/HOMARD_Hypothesis.idl @@ -1,7 +1,29 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_HYPOTHESIS_IDL #define _HOMARD_HYPOTHESIS_IDL +#include "SALOME_Component.idl" #include "SALOME_Exception.idl" +#include "SALOMEDS.idl" + #include "HOMARD_Cas.idl" module HOMARD @@ -11,7 +33,7 @@ module HOMARD typedef sequence listeComposantsHypo ; typedef sequence listeTypes; typedef sequence listFieldInterpHypo; - + struct InfosHypo { string FieldName; @@ -23,7 +45,7 @@ module HOMARD double ThreshC; }; - interface HOMARD_Hypothesis + interface HOMARD_Hypothesis : Engines::EngineComponent { void SetName(in string NomHypothesis) raises (SALOME::SALOME_Exception); @@ -55,7 +77,7 @@ module HOMARD void SupprComp() raises (SALOME::SALOME_Exception); listeComposantsHypo GetListComp() raises (SALOME::SALOME_Exception); - void AddZone(in string NomZone) raises (SALOME::SALOME_Exception); + void AddZone(in string NomZone, in long TypeUse) raises (SALOME::SALOME_Exception); void SupprZone(in string NomZone) raises (SALOME::SALOME_Exception); listeZonesHypo GetZones() raises (SALOME::SALOME_Exception); @@ -72,6 +94,15 @@ module HOMARD void SupprFieldInterp() raises (SALOME::SALOME_Exception); listFieldInterpHypo GetListFieldInterp() raises (SALOME::SALOME_Exception); + void SetNivMax(in long NivMax) raises (SALOME::SALOME_Exception); + long GetNivMax() raises (SALOME::SALOME_Exception); + + void SetDiamMin(in double DiamMin) raises (SALOME::SALOME_Exception); + double GetDiamMin() raises (SALOME::SALOME_Exception); + + void SetAdapInit(in long AdapInit) raises (SALOME::SALOME_Exception); + long GetAdapInit() raises (SALOME::SALOME_Exception); + string GetDumpPython() raises (SALOME::SALOME_Exception); }; diff --git a/idl/HOMARD_Iteration.idl b/idl/HOMARD_Iteration.idl index b6b73417..12612c05 100644 --- a/idl/HOMARD_Iteration.idl +++ b/idl/HOMARD_Iteration.idl @@ -1,13 +1,34 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_ITERATION_IDL #define _HOMARD_ITERATION_IDL +#include "SALOME_Component.idl" #include "SALOME_Exception.idl" +#include "SALOMEDS.idl" module HOMARD { typedef sequence listeIterFilles ; - interface HOMARD_Iteration + interface HOMARD_Iteration : Engines::EngineComponent { void SetName(in string NomIter) raises (SALOME::SALOME_Exception); string GetName() raises (SALOME::SALOME_Exception); @@ -49,7 +70,7 @@ module HOMARD void SetMessFile(in string MessFile) raises (SALOME::SALOME_Exception); string GetMessFile() raises (SALOME::SALOME_Exception); - boolean Compute() raises (SALOME::SALOME_Exception); + long Compute(in long etatMenage) raises (SALOME::SALOME_Exception); string GetDumpPython() raises (SALOME::SALOME_Exception); }; diff --git a/idl/HOMARD_Zone.idl b/idl/HOMARD_Zone.idl index cc337b2a..1ae7aaec 100644 --- a/idl/HOMARD_Zone.idl +++ b/idl/HOMARD_Zone.idl @@ -1,14 +1,35 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_Zone_IDL #define _HOMARD_Zone_IDL +#include "SALOME_Component.idl" #include "SALOME_Exception.idl" +#include "SALOMEDS.idl" module HOMARD { typedef sequence double_array ; typedef sequence listeHypo ; - interface HOMARD_Zone + interface HOMARD_Zone : Engines::EngineComponent { void SetName (in string NomZone) raises (SALOME::SALOME_Exception); @@ -17,13 +38,20 @@ module HOMARD 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, + 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 SetCylinder (in double Xcentre, in double Ycentre, in double Zcentre, + in double Xaxis, in double Yaxis, in double Zaxis, + in double Rayon, in double Haut) + raises (SALOME::SALOME_Exception); + void SetPipe( in double Xcentre, in double Ycentre, in double ZCentre, + in double Xaxis, in double Yaxis, in double Zaxis, + in double Rayon, in double Haut, in double Rayonint ) + raises (SALOME::SALOME_Exception); + double_array GetCoords() 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); diff --git a/idl/Makefile.am b/idl/Makefile.am index 6f0537d8..f6e520d4 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -1,24 +1,22 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# 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 @@ -28,6 +26,8 @@ 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 +BASEIDL_FILES_PY=$(BASEIDL_FILES:%.idl=%_idl.py) + # This variable defines the files to be installed dist_salomeidl_DATA = $(BASEIDL_FILES) @@ -43,12 +43,14 @@ nodist_libSalomeIDLHOMARD_la_SOURCES = \ HOMARD_BoundarySK.cc \ HOMARD_GenSK.cc +BUILT_SOURCES = $(nodist_libSalomeIDLHOMARD_la_SOURCES) + # 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)/adm_local/unix \ -I$(top_builddir)/idl \ $(MED_CXXFLAGS) \ @CORBA_CXXFLAGS@ \ @@ -75,7 +77,7 @@ IDLCXXFLAGS = \ -I$(top_builddir)/idl/salome \ -I$(KERNEL_ROOT_DIR)/idl/salome \ -I$(MED_ROOT_DIR)/idl/salome \ - -I$(top_builddir)/salome_adm/unix + -I$(top_builddir)/adm_local/unix IDLPYFLAGS = \ @IDLPYFLAGS@ \ -I$(KERNEL_ROOT_DIR)/idl/salome \ @@ -85,8 +87,8 @@ IDLPYFLAGS = \ SUFFIXES = .idl .hh SK.cc .idlSK.cc: $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< -.idl.hh: - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< +#.idl.hh: +# $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%) $(INSTALL) -d $(DESTDIR)$(salomepythondir) @@ -94,9 +96,15 @@ install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%) $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \ done -# uninstall-local removes too much, but it works in distcheck +# we want to remove only staff generated for IDL files and nothing more uninstall-local: - rm -rf $(DESTDIR)$(salomepythondir)/* + @for modulen in HOMARD ; do \ + test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \ + test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \ + done ; \ + for filen in $(BASEIDL_FILES_PY) ; do \ + echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \ + done mostlyclean-local: -rm -f *.hh *.cc .depidl diff --git a/resources/HOMARDCatalog.xml b/resources/HOMARDCatalog.xml deleted file mode 100644 index 659b9ac3..00000000 --- a/resources/HOMARDCatalog.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - HOMARD - HOMARD GUI - Data - C. Caremoli - 1.0 - EDF - RD - 1 - HOMARD.png - 'linux' ~ OS - - - - diff --git a/resources/HOMARDCatalog.xml.in b/resources/HOMARDCatalog.xml.in new file mode 100644 index 00000000..6aee5c2f --- /dev/null +++ b/resources/HOMARDCatalog.xml.in @@ -0,0 +1,910 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HOMARD + HOMARD + OTHER + HOMARD team - EDF RD + 1.0 + unknown + 1 + 1 + HOMARD_2.png + + + HOMARD_Gen + unknown + + + CreateCase + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + CaseName + string + unknown + + + MeshName + string + unknown + + + FileName + string + unknown + + + + + return + HOMARD_Cas + unknown + + + + + + CreateHypothesis + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + HypoName + string + unknown + + + + + return + HOMARD_Hypothesis + unknown + + + + + + CreateIteration + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + PreviousIterName + string + unknown + + + + + return + HOMARD_Iteration + unknown + + + + + + CreateZoneBox + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xmini + double + unknown + + + Xmaxi + double + unknown + + + Ymini + double + unknown + + + Ymaxi + double + unknown + + + Zmini + double + unknown + + + Zmaxi + double + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + CreateZoneSphere + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Radius + double + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + CreateZoneCylinder + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Xaxis + double + unknown + + + Yaxis + double + unknown + + + Zaxis + double + unknown + + + Radius + double + unknown + + + Height + double + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + CreateZonePipe + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Xaxis + double + unknown + + + Yaxis + double + unknown + + + Zaxis + double + unknown + + + Radius + double + unknown + + + Height + double + unknown + + + InternalRadius + double + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + CreateZoneBox2D + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Umini + double + unknown + + + Umaxi + double + unknown + + + Vmini + double + unknown + + + Vmaxi + double + unknown + + + Orient + long + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + CreateZoneDisk + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Ucentre + double + unknown + + + Vcentre + double + unknown + + + Radius + double + unknown + + + Orient + long + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + CreateZoneDiskWithHole + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + Ucentre + double + unknown + + + Vcentre + double + unknown + + + Radius + double + unknown + + + InternalRadius + double + unknown + + + Orient + long + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + CreateBoundaryDi + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + MeshName + string + unknown + + + FileName + string + unknown + + + + + return + HOMARD_Boundary + unknown + + + + + + CreateBoundaryCylinder + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Xaxis + double + unknown + + + Yaxis + double + unknown + + + Zaxis + double + unknown + + + Radius + double + unknown + + + + + return + HOMARD_Boundary + unknown + + + + + + CreateBoundarySphere + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + Xcentre + double + unknown + + + Ycentre + double + unknown + + + Zcentre + double + unknown + + + Radius + double + unknown + + + + + return + HOMARD_Boundary + unknown + + + + + + AssociateIterHypo + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + HypoName + string + unknown + + + + + + + AssociateHypoZone + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + HypoName + string + unknown + + + + + + + GetCaseName + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + + + return + string + unknown + + + + + + GetCas + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + CaseName + string + unknown + + + + + return + HOMARD_Cas + unknown + + + + + + GetBoundary + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + BounName + string + unknown + + + + + return + HOMARD_Boundary + unknown + + + + + + GetZone + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + ZoneName + string + unknown + + + + + return + HOMARD_Zone + unknown + + + + + + GetHypothesis + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + HypoName + string + unknown + + + + + return + HOMARD_Hypothesis + unknown + + + + + + GetIteration + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + IterName + string + unknown + + + + + return + HOMARD_Iteration + unknown + + + + + + GetAllCases + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeCases + unknown + + + + + + GetAllBoundarys + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeBoundarys + unknown + + + + + + GetAllHypotheses + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeHypotheses + unknown + + + + + + GetAllZones + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeZones + unknown + + + + + + GetAllIterations + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + + return + HOMARD/listeIterations + unknown + + + + + + SetCurrentStudy + HOMARD team - EDF RD + 1.1 + unknown + 0 + + + theStudy + Study + unknown + + + + + + + + + + diff --git a/resources/HOMARD_en.xml b/resources/HOMARD_en.xml index 02b505b7..573fadb5 100644 --- a/resources/HOMARD_en.xml +++ b/resources/HOMARD_en.xml @@ -1,4 +1,26 @@ + + + diff --git a/resources/HOMARD_fr.xml b/resources/HOMARD_fr.xml index 104871ac..0b933122 100644 --- a/resources/HOMARD_fr.xml +++ b/resources/HOMARD_fr.xml @@ -1,4 +1,26 @@ + + + diff --git a/resources/Makefile.am b/resources/Makefile.am index b5b55686..d2a60218 100644 --- a/resources/Makefile.am +++ b/resources/Makefile.am @@ -1,53 +1,69 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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$ +# 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 = \ - SalomeApp.xml \ + $(top_builddir)/resources/SalomeApp.xml \ + boxdxy.png \ + boxdxy_2.png \ boxdxyz.png \ boxdxyz_2.png \ cas_calcule.png \ + cas_non_calcule.png \ cylinderpointvector.png \ cylinderpointvector_2.png \ + delete.png \ + disk.png \ + disk_2.png \ + diskwithhole.png \ + diskwithhole_2.png \ HOMARD.png \ HOMARD_2.png \ hypotheses.png \ iter0.png \ iter_calculee.png \ + iter_calulee.png \ iter_next.png \ iter_non_calculee.png \ + iter_non_calulee.png \ med.png \ mesh_compute.png \ + mesh_hypo_edit.png \ mesh_tree_mesh.png \ + mesh_tree_importedmesh.png \ + mesh_whatis.png \ + pipe.png \ + pipe_2.png \ spherepoint.png \ spherepoint_2.png \ texte.png \ texte_2.png \ + triangle.png \ whatis.png \ + zone_boxdxyz.png \ + zone_boxdxyz_2.png \ zone_icone.png \ - zone_icone_2.png + zone_icone_2.png \ + zone_spherepoint.png \ + zone_spherepoint_2.png \ + zones.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 deleted file mode 100644 index 289cf172..00000000 --- a/resources/SalomeApp.xml +++ /dev/null @@ -1,11 +0,0 @@ - -
- - - -
-
- - -
-
diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in new file mode 100644 index 00000000..81767390 --- /dev/null +++ b/resources/SalomeApp.xml.in @@ -0,0 +1,38 @@ + + + +
+ + + + + +
+
+ + +
+
+ + +
+
diff --git a/resources/boxdxy.png b/resources/boxdxy.png new file mode 100644 index 00000000..8ef47521 Binary files /dev/null and b/resources/boxdxy.png differ diff --git a/resources/boxdxy_2.png b/resources/boxdxy_2.png new file mode 100644 index 00000000..b99611e2 Binary files /dev/null and b/resources/boxdxy_2.png differ diff --git a/resources/cylinderpointvector.png b/resources/cylinderpointvector.png index e37f4657..bdd3fd90 100644 Binary files a/resources/cylinderpointvector.png and b/resources/cylinderpointvector.png differ diff --git a/resources/disk.png b/resources/disk.png new file mode 100644 index 00000000..bec24143 Binary files /dev/null and b/resources/disk.png differ diff --git a/resources/disk_2.png b/resources/disk_2.png new file mode 100644 index 00000000..be5fb361 Binary files /dev/null and b/resources/disk_2.png differ diff --git a/resources/diskwithhole.png b/resources/diskwithhole.png new file mode 100644 index 00000000..f78fd7a1 Binary files /dev/null and b/resources/diskwithhole.png differ diff --git a/resources/diskwithhole_2.png b/resources/diskwithhole_2.png new file mode 100644 index 00000000..6f2db7cc Binary files /dev/null and b/resources/diskwithhole_2.png differ diff --git a/resources/pipe.png b/resources/pipe.png new file mode 100644 index 00000000..2bae2950 Binary files /dev/null and b/resources/pipe.png differ diff --git a/resources/pipe_2.png b/resources/pipe_2.png new file mode 100644 index 00000000..42a4936d Binary files /dev/null and b/resources/pipe_2.png differ diff --git a/resources/pipeold.png b/resources/pipeold.png new file mode 100644 index 00000000..b3ddac44 Binary files /dev/null and b/resources/pipeold.png differ diff --git a/resources/plane.png b/resources/plane.png new file mode 100644 index 00000000..cbea3344 Binary files /dev/null and b/resources/plane.png differ diff --git a/src/HOMARD/HOMARD_Boundary.cxx b/src/HOMARD/HOMARD_Boundary.cxx index d819555a..6414f6bc 100644 --- a/src/HOMARD/HOMARD_Boundary.cxx +++ b/src/HOMARD/HOMARD_Boundary.cxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Boundary.cxx // Author : Paul RASCLE, EDF @@ -67,45 +64,32 @@ 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; + aScript << "discrete boundary " << _NomBoundary << "\n"; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryDi(\"" << _NomBoundary << "\", "; + aScript << "\"" << _MeshName << "\", "; + aScript << "\"" << _MeshFile << "\")\n"; + break ; } - case 1: { - aScript << "\t" << _NomBoundary << ".SetCylinder(" ; + aScript << "cylinder " << _NomBoundary << "\n"; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryCylinder(\"" << _NomBoundary << "\", "; aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _rayon << ")\n"; - break; + break ; } - case 2: { - aScript << "\t" << _NomBoundary << ".SetSphere(" ; + aScript << "sphere" << _NomBoundary << "\n"; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundarySphere(\"" << _NomBoundary << "\", "; aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n"; - break; + break ; } } - aScript << "\t" <<_NomBoundary << ".SetCaseCreation('"; - aScript << _NomCasCreation << "')\n"; - - std::list::const_iterator it; - for ( it=_ListGroupSelected.begin(); it!=_ListGroupSelected.end();it++) - aScript << "\t" << _NomBoundary << ".AddGroup('" << (*it) << "')\n" ; - return aScript.str(); } @@ -177,27 +161,35 @@ std::vector HOMARD_Boundary::GetLimit() const } //======================================================================================= -std::vector HOMARD_Boundary::GetCylinder() const +std::vector HOMARD_Boundary::GetCoords() const { std::vector 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 HOMARD_Boundary::GetSphere() const -{ - std::vector mesCoor; - mesCoor.push_back( _Xcentre ); - mesCoor.push_back( _Ycentre ); - mesCoor.push_back( _Zcentre ); - mesCoor.push_back( _rayon ); +// + switch (_BoundaryType) + { +// Cylindre + case 1: + { + 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 ); + break ; + } +// Sphere + case 2: + { + mesCoor.push_back( _Xcentre ); + mesCoor.push_back( _Ycentre ); + mesCoor.push_back( _Zcentre ); + mesCoor.push_back( _rayon ); + break ; + } + ASSERT ( _BoundaryType == -1 ) ; + } return mesCoor; } //============================================================================= diff --git a/src/HOMARD/HOMARD_Boundary.hxx b/src/HOMARD/HOMARD_Boundary.hxx index 50eceede..011a9998 100644 --- a/src/HOMARD/HOMARD_Boundary.hxx +++ b/src/HOMARD/HOMARD_Boundary.hxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Boundary.hxx // Author : Paul RASCLE, EDF @@ -53,10 +50,8 @@ public: void SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 ); - std::vector GetCylinder() const; - void SetSphere( double X0, double X1, double X2, double X3 ); - std::vector GetSphere() const; + std::vector GetCoords() const; void SetBoundaryType( int BoundaryType ); int GetBoundaryType() const; diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx index 9683beb0..17537bea 100644 --- a/src/HOMARD/HOMARD_Cas.cxx +++ b/src/HOMARD/HOMARD_Cas.cxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Cas.cxx // Author : Paul RASCLE, EDF @@ -29,6 +26,10 @@ #include "utilities.h" #include +#ifndef WIN32 +# include +#endif + //============================================================================= /*! * default constructor: @@ -56,7 +57,7 @@ void HOMARD_Cas::SetDirName( const char* NomDir ) { _NomDir = std::string( NomDir ); } - else + else { // GERALD -- QMESSAGE BOX // std::cerr << "Pb pour entrer dans le repertoire : "<::const_iterator it = _ListBoundaryGroup.begin(); while(it != _ListBoundaryGroup.end()) { - aScript << "\t" <<_NomCas << ".AddBoundaryGroup('"; - aScript << *it << "', '"; + aScript << "\t" <<_NomCas << ".AddBoundaryGroup(\""; + aScript << *it << "\", \""; it++; - aScript << *it << "')\n"; + aScript << *it << "\")\n"; it++; } + if ( _Pyram > 0 ) + { + aScript << "\t" <<_NomCas << ".SetPyram("; + aScript << _Pyram << ")\n"; + } + return aScript.str(); } -//AddBoundaryGroup( 'cyl_4', 'T2_INT' ) //============================================================================= void HOMARD_Cas::AddIteration( const char* NomIteration ) //============================================================================= @@ -150,7 +156,7 @@ const int HOMARD_Cas::GetConfType() const return _ConfType; } //============================================================================= -int HOMARD_Cas::GetNumber() +int HOMARD_Cas::GetNumber() //============================================================================= { @@ -227,4 +233,17 @@ void HOMARD_Cas::SupprBoundaryGroup() { _ListBoundaryGroup.clear(); } - +//============================================================================= +void HOMARD_Cas::SetPyram( int Pyram ) +//============================================================================= +{ + MESSAGE ("SetPyram, Pyram = " << Pyram ); + _Pyram = Pyram; +} +//============================================================================= +const int HOMARD_Cas::GetPyram() const +//============================================================================= +{ + MESSAGE ("GetPyram, Pyram = " << _Pyram ); + return _Pyram; +} diff --git a/src/HOMARD/HOMARD_Cas.hxx b/src/HOMARD/HOMARD_Cas.hxx index 68e391f3..30dda077 100644 --- a/src/HOMARD/HOMARD_Cas.hxx +++ b/src/HOMARD/HOMARD_Cas.hxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Cas.hxx // Author : Paul RASCLE, EDF @@ -70,6 +67,9 @@ public: const std::list& GetBoundaryGroup() const; void SupprBoundaryGroup(); + void SetPyram( int Pyram ); + const int GetPyram() const; + private: std::string _NomCas; std::string _NomDir; @@ -79,6 +79,8 @@ private: std::list _ListGroup; std::list _ListBoundaryGroup; + int _Pyram; + typedef std::string IterName; typedef std::list IterNames; IterNames _ListIter; diff --git a/src/HOMARD/HOMARD_DriverTools.cxx b/src/HOMARD/HOMARD_DriverTools.cxx index 49dbd12b..ccd5429f 100644 --- a/src/HOMARD/HOMARD_DriverTools.cxx +++ b/src/HOMARD/HOMARD_DriverTools.cxx @@ -1,23 +1,20 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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. +// 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 +// 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 -// -// ---------------------------------------------------------------------------- +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_DriverTools.cxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) @@ -42,13 +39,13 @@ namespace HOMARD /*! \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 @@ -132,6 +129,10 @@ namespace HOMARD os << separator() << ListString.size(); for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; + + os << separator() << cas.GetPyram(); + +// MESSAGE( ". Fin avec "< ListString = hypothesis.GetIterations(); std::list::const_iterator it; os << separator() << ListString.size(); @@ -222,6 +225,11 @@ namespace HOMARD os << separator() << ListString.size(); for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; + + os << separator() << hypothesis.GetNivMax(); + os << separator() << hypothesis.GetDiamMin(); + +// MESSAGE( ". Fin avec "< box = zone.GetBox(); - for ( int i = 0; i < box.size(); i++ ) - os << separator() << ( i < box.size() ? box[i] : 0. ); - - std::vector sphere = zone.GetSphere(); - for ( int i = 0; i < 4; i++ ) - os << separator() << ( i < sphere.size() ? sphere[i] : 0. ); + std::vector coords = zone.GetCoords(); + for ( int i = 0; i < coords.size(); i++ ) + os << separator() << ( i < coords.size() ? coords[i] : 0. ); std::vector limit = zone.GetLimit(); for ( int i = 0; i < 3; i++ ) @@ -256,9 +261,9 @@ namespace HOMARD std::list::const_iterator it; for ( it = hypos.begin(); it != hypos.end(); ++it ) os << separator() << *it; - return os.str(); - +// MESSAGE( ". Fin avec "< 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(); + if ( BoundaryType == 0 ) + { + os << separator() << boundary.GetMeshName(); + os << separator() << boundary.GetMeshFile(); + } + else { + std::vector coor = boundary.GetCoords() ; + for ( int i = 0; i < coor.size(); i++ ) + os << separator() << coor[i]; + std::vector limit = boundary.GetLimit(); + for ( int i = 0; i < limit.size(); i++ ) + os << separator() << limit[i]; + } std::list ListString = boundary.GetGroups(); std::list::const_iterator it; @@ -298,6 +305,8 @@ namespace HOMARD for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; +// MESSAGE( ". Fin avec "< coords; - coords.resize( 6 ); - for ( int i = 0; i < 6; i++ ) { + int lgcoords ; + if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) { lgcoords = 6 ; } + else if ( ZoneType == 4 ) { lgcoords = 4 ; } + else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) { lgcoords = 8 ; } + else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) { lgcoords = 9 ; } + else return false; + coords.resize( lgcoords ); + for ( int i = 0; i < lgcoords; 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] ); - - // + if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) + { zone.SetBox( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5] ); } + else if ( ZoneType == 4 ) + { zone.SetSphere( coords[0], coords[1], coords[2], coords[3] ); } + else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) + { zone.SetCylinder( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7] ); } + else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) + { zone.SetPipe( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7], coords[8] ); } + // Remarque : la taille de coords est suffisante pour les limites for ( int i = 0; i < 3; i++ ) { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; @@ -614,7 +652,6 @@ namespace HOMARD return true; } - // // 2.5. Restauration d'une frontiere // ================================= @@ -637,46 +674,51 @@ namespace HOMARD chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - boundary.SetBoundaryType(atoi( chunk.c_str()) ); + int BoundaryType = atoi( chunk.c_str() ) ; + boundary.SetBoundaryType( BoundaryType ); 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 coords; - coords.resize( 3 ); - for ( int i = 0; i < 3; i++ ) { + // Si analytique, les coordonnees des frontieres : le nombre depend du type + // Si discret, le maillage + int lgcoords ; + if ( BoundaryType == 1 ) { lgcoords = 7 ; } + else if ( BoundaryType == 2 ) { lgcoords = 4 ; } + else { lgcoords = 0 ; } +// + if ( lgcoords == 0 ) + { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - coords[i] = strtod( chunk.c_str(), 0 ); - } - boundary.SetLimit( coords[0], coords[1], coords[2]); + boundary.SetMeshName( chunk.c_str() ); - 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.SetMeshFile( chunk.c_str() ); } - 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 ); + else + { std::vector coords; + coords.resize( lgcoords ); + for ( int i = 0; i < lgcoords; i++ ) { + chunk = getNextChunk( stream, start, ok ); + if ( !ok ) return false; + coords[i] = strtod( chunk.c_str(), 0 ); + } + if ( BoundaryType == 1 ) + { boundary.SetCylinder(coords[0],coords[1],coords[2],coords[3],coords[4],coords[5],coords[6]); } + else if ( BoundaryType == 2 ) + { boundary.SetSphere( coords[0], coords[1], coords[2], coords[3]); } + // Remarque : la taille de coords est suffisante pour les limites + 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]); } - boundary.SetSphere( coords[0], coords[1], coords[2], coords[3]); - + // Les groupes chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; int size = atoi( chunk.c_str() ); diff --git a/src/HOMARD/HOMARD_DriverTools.hxx b/src/HOMARD/HOMARD_DriverTools.hxx index b5bf3231..9ddd76d8 100644 --- a/src/HOMARD/HOMARD_DriverTools.hxx +++ b/src/HOMARD/HOMARD_DriverTools.hxx @@ -1,23 +1,20 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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. +// 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 +// 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 -// -// ---------------------------------------------------------------------------- +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_DriverTools.hxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) diff --git a/src/HOMARD/HOMARD_Gen.cxx b/src/HOMARD/HOMARD_Gen.cxx index 9fa39797..7b140e70 100644 --- a/src/HOMARD/HOMARD_Gen.cxx +++ b/src/HOMARD/HOMARD_Gen.cxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Gen.cxx // Author : Paul RASCLE, EDF diff --git a/src/HOMARD/HOMARD_Gen.hxx b/src/HOMARD/HOMARD_Gen.hxx index 5293fe30..f82c805e 100644 --- a/src/HOMARD/HOMARD_Gen.hxx +++ b/src/HOMARD/HOMARD_Gen.hxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Gen.hxx // Author : Paul RASCLE, EDF diff --git a/src/HOMARD/HOMARD_Hypothesis.cxx b/src/HOMARD/HOMARD_Hypothesis.cxx index 4da42dd2..40874c53 100644 --- a/src/HOMARD/HOMARD_Hypothesis.cxx +++ b/src/HOMARD/HOMARD_Hypothesis.cxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Hypothesis.cxx // Author : Paul RASCLE, EDF @@ -39,7 +36,7 @@ HOMARD_Hypothesis::HOMARD_Hypothesis(): _Field(""), _TypeThR(0), _ThreshR(0), _TypeThC(0), _ThreshC(0), - _UsCmpI(0), _TypeFieldInterp(0) + _UsField(0), _UsCmpI(0), _TypeFieldInterp(0) { MESSAGE("HOMARD_Hypothesis"); } @@ -91,28 +88,33 @@ std::string HOMARD_Hypothesis::GetName() const 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 << "\n# Creation of the hypothesis " << _NomHypo << "\n" ; + aScript << "\t" << _NomHypo << " = homard.CreateHypothesis(\"" << _NomHypo << "\")\n"; aScript << "\t" << _NomHypo << ".SetAdapRefinUnRef(" << _TypeAdap << ", " << _TypeRaff << ", " << _TypeDera << ")\n"; // Raffinement selon des zones geometriques std::list::const_iterator it = _ListZone.begin(); + int TypeUse ; while(it != _ListZone.end()) { - aScript << "\thomard.AssociateHypoZone('"<< *it << "', '" <<_NomHypo << "')\n"; + aScript << "\thomard.AssociateHypoZone(\""<< _NomHypo << "\", \"" << *it; + it++; + if ( *it == "1" ) { TypeUse = 1 ; } + else { TypeUse = -1 ; } + aScript << "\", " << TypeUse << ")\n"; it++; } // Raffinement selon un champ if ( _TypeAdap == 1 ) { - aScript << "\t" << _NomHypo << ".SetField('" << _Field << "')\n"; + aScript << "\t" << _NomHypo << ".SetField(\"" << _Field << "\")\n"; + aScript << "\t" << _NomHypo << ".SetUseField(" << _UsField << ")\n"; aScript << "\t" << _NomHypo << ".SetUseComp(" << _UsCmpI << ")\n"; std::list::const_iterator it_comp = _ListComposant.begin(); - while(it_comp != _ListComposant.end()) + while(it_comp != _ListComposant.end()) { - aScript << "\t" << _NomHypo << ".AddComp('" << *it_comp << "')\n"; + aScript << "\t" << _NomHypo << ".AddComp(\"" << *it_comp << "\")\n"; it_comp++; } if ( _TypeRaff == 1 ) @@ -129,7 +131,7 @@ std::string HOMARD_Hypothesis::GetDumpPython() const // Filtrage du raffinement par des groupes for ( it=_ListGroupSelected.begin(); it!=_ListGroupSelected.end();it++) - aScript << "\t" << _NomHypo << ".AddGroup('" << (*it) << "')\n" ; + aScript << "\t" << _NomHypo << ".AddGroup(\"" << (*it) << "\")\n" ; // Interpolation champ aScript << "\t" << _NomHypo << ".SetTypeFieldInterp(" << _TypeFieldInterp << ")\n"; @@ -138,10 +140,25 @@ std::string HOMARD_Hypothesis::GetDumpPython() const std::list::const_iterator it_champ = _ListFieldInterp.begin(); while(it_champ != _ListFieldInterp.end()) { - aScript << "\t" << _NomHypo << ".AddFieldInterp('" << *it_champ << "')\n"; + aScript << "\t" << _NomHypo << ".AddFieldInterp(\"" << *it_champ << "\")\n"; it_champ++; } } + if ( _NivMax > 0 ) + { + aScript << "\tNivMax = " << _NivMax << "\n"; + aScript << "\t" <<_NomHypo << ".SetNivMax(NivMax)\n"; + } + if ( _DiamMin > 0 ) + { + aScript << "\tDiamMin = " << _DiamMin << "\n"; + aScript << "\t" <<_NomHypo << ".SetDiamMin(DiamMin)\n"; + } + if ( _AdapInit != 0 ) + { + aScript << "\tAdapInit = " << _AdapInit << "\n"; + aScript << "\t" <<_NomHypo << ".SetAdapInit(AdapInit)\n"; + } return aScript.str(); } @@ -203,11 +220,12 @@ int HOMARD_Hypothesis::GetUnRefType() const void HOMARD_Hypothesis::SetField( const char* FieldName ) { _Field = std::string( FieldName ); - MESSAGE( "dans SetField, FieldName : " << FieldName ); + MESSAGE( "SetField : FieldName = " << FieldName ); } //============================================================================= void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR ) { + MESSAGE( "SetRefinThr : TypeThR = " << TypeThR << ", ThreshR = " << ThreshR ); ASSERT(!(( TypeThR < 0) or (TypeThR > 3 ))); _TypeThR = TypeThR; _ThreshR = ThreshR; @@ -229,7 +247,7 @@ void HOMARD_Hypothesis::SetUseComp( int UsCmpI ) void HOMARD_Hypothesis::SetUseField( int UsField ) { ASSERT(!((UsField < 0) or (UsField > 1 ))); - MESSAGE( "SetUseField a programmer "); + _UsField = UsField; } //============================================================================= @@ -240,45 +258,32 @@ 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::GetUseField() const +{ + return _UsField; +} //============================================================================= int HOMARD_Hypothesis::GetUseCompI() const { @@ -306,9 +311,13 @@ const std::list& HOMARD_Hypothesis::GetIterations() const /*! */ //============================================================================= -void HOMARD_Hypothesis::AddZone( const char* NomZone ) +void HOMARD_Hypothesis::AddZone( const char* NomZone, int TypeUse ) { _ListZone.push_back( std::string( NomZone ) ); + std::stringstream saux1 ; + saux1 << TypeUse ; + std::string saux2 = saux1.str() ; + _ListZone.push_back( saux2 ); } //============================================================================= void HOMARD_Hypothesis::SupprZone( const char* NomZone ) @@ -361,7 +370,7 @@ void HOMARD_Hypothesis::SetGroups( const std::list& ListGroup ) { _ListGroupSelected.clear(); std::list::const_iterator it = ListGroup.begin(); - while(it != ListGroup.end()) + while(it != ListGroup.end()) _ListGroupSelected.push_back((*it++)); } //============================================================================= @@ -405,4 +414,39 @@ const std::list& HOMARD_Hypothesis::GetListFieldInterp() const { return _ListFieldInterp; } - +//============================================================================= +void HOMARD_Hypothesis::SetNivMax( int NivMax ) +//============================================================================= +{ + _NivMax = NivMax; +} +//============================================================================= +const int HOMARD_Hypothesis::GetNivMax() const +//============================================================================= +{ + return _NivMax; +} +//============================================================================= +void HOMARD_Hypothesis::SetAdapInit( int AdapInit ) +//============================================================================= +{ + _AdapInit = AdapInit; +} +//============================================================================= +const int HOMARD_Hypothesis::GetAdapInit() const +//============================================================================= +{ + return _AdapInit; +} +//============================================================================= +void HOMARD_Hypothesis::SetDiamMin( double DiamMin ) +//============================================================================= +{ + _DiamMin = DiamMin; +} +//============================================================================= +const double HOMARD_Hypothesis::GetDiamMin() const +//============================================================================= +{ + return _DiamMin; +} diff --git a/src/HOMARD/HOMARD_Hypothesis.hxx b/src/HOMARD/HOMARD_Hypothesis.hxx index fbf42325..c641cf9b 100644 --- a/src/HOMARD/HOMARD_Hypothesis.hxx +++ b/src/HOMARD/HOMARD_Hypothesis.hxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Hypothesis.hxx // Author : Paul RASCLE, EDF @@ -60,6 +57,7 @@ public: double GetThreshR() const; int GetUnRefThrType() const; double GetThreshC() const; + int GetUseField() const; int GetUseCompI() const; void AddComp( const char* NomComposant ); @@ -70,7 +68,7 @@ public: void SupprIterations(); const std::list& GetIterations() const; - void AddZone( const char* NomZone ); + void AddZone( const char* NomZone, int TypeUse ); void SupprZone( const char* NomZone ); void SupprZones(); const std::list& GetZones() const; @@ -85,15 +83,20 @@ public: void SupprFieldInterp(); const std::list& GetListFieldInterp() const; - + void SetNivMax( int NivMax ); + const int GetNivMax() const; + void SetDiamMin( double DiamMin ); + const double GetDiamMin() const; + void SetAdapInit( int AdapInit ); + const int GetAdapInit() const; private: std::string _NomHypo; std::string _NomCasCreation; - int _TypeAdap; // -1 pour une adapation Uniforme, - // 0 si l adaptation depend des zones, + int _TypeAdap; // -1 pour une adapation Uniforme, + // 0 si l adaptation depend des zones, // 1 pour des champs int _TypeRaff; @@ -104,10 +107,14 @@ private: int _TypeThC; double _ThreshR; double _ThreshC; + int _UsField; int _UsCmpI; - int _TypeFieldInterp; // 0 pour aucune interpolation, - // 1 pour interpolation de tous les champs, + int _TypeFieldInterp; // 0 pour aucune interpolation, + // 1 pour interpolation de tous les champs, // 2 pour une liste + int _NivMax; + double _DiamMin; + int _AdapInit; std::list _ListIter; std::list _ListZone; diff --git a/src/HOMARD/HOMARD_Iteration.cxx b/src/HOMARD/HOMARD_Iteration.cxx index 4953f568..3dcd98b1 100644 --- a/src/HOMARD/HOMARD_Iteration.cxx +++ b/src/HOMARD/HOMARD_Iteration.cxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Iteration.cxx // Author : Paul RASCLE, EDF @@ -55,18 +52,6 @@ HOMARD_Iteration::~HOMARD_Iteration() MESSAGE("~HOMARD_Iteration"); } -//============================================================================= -/*! - * - */ -//============================================================================= -bool HOMARD_Iteration::Compute() -{ - MESSAGE("Compute --> ne fait rien"); - _Etat=true; - return true; -} - //============================================================================= /*! */ @@ -97,31 +82,33 @@ std::string HOMARD_Iteration::GetDumpPython() const aScript << "\n# Creation of the iteration " << _NomIter << "\n"; if( _NumIter == 1 ) { - aScript << "\t" << _NomIter << " = homard.CreateIteration('"; - aScript << _NomIter << "', "<< _NomCas << ".GetIter0Name() )\n"; + aScript << "\t" << _NomIter << " = homard.CreateIteration(\""; + aScript << _NomIter << "\", "<< _NomCas << ".GetIter0Name() )\n"; } else { - aScript << "\t" << _NomIter << " = homard.CreateIteration('"; - aScript << _NomIter << "', '" << _IterParent << "')\n"; + aScript << "\t" << _NomIter << " = homard.CreateIteration(\""; + aScript << _NomIter << "\", \"" << _IterParent << "\")\n"; } // Le nom du maillage produit - aScript << "\t" << _NomIter << ".SetMeshName('" << _NomMesh << "')\n" ; + aScript << "\t" << _NomIter << ".SetMeshName(\"" << _NomMesh << "\")\n" ; // Le fichier du maillage produit - aScript << "\t" << _NomIter << ".SetMeshFile('" << _MeshFile << "')\n"; + aScript << "\t" << _NomIter << ".SetMeshFile(\"" << _MeshFile << "\")\n"; if (_FieldFile != "") { - aScript << "\t" << _NomIter << ".SetFieldFile('" << _FieldFile << "')\n"; - aScript << "\t" << _NomIter << ".SetTimeStepRank(" << _Rank << ", " << _TimeStep << ")\n"; + aScript << "\t" << _NomIter << ".SetFieldFile(\"" << _FieldFile << "\")\n"; + aScript << "\tTimeStep = " << _TimeStep << "\n"; + aScript << "\tRank = " << _Rank << "\n"; + aScript << "\t" << _NomIter << ".SetTimeStepRank( TimeStep, Rank )\n"; } - aScript << "\thomard.AssociateIterHypo('" <<_NomIter << "', '" << _NomHypo << "')\n"; + aScript << "\thomard.AssociateIterHypo(\"" <<_NomIter << "\", \"" << _NomHypo << "\")\n"; if (_Etat == true) { - aScript << "\tresult = homard.Compute('" <<_NomIter << "', 1)\n"; + aScript << "\tcodret = homard.Compute(\"" <<_NomIter << "\", 1)\n"; } else { - aScript << "\t# result = homard.Compute('" <<_NomIter << "', 1)\n"; + aScript << "\t#codret = homard.Compute(\"" <<_NomIter << "\", 1)\n"; } return aScript.str(); diff --git a/src/HOMARD/HOMARD_Iteration.hxx b/src/HOMARD/HOMARD_Iteration.hxx index 6a64be83..8e579371 100644 --- a/src/HOMARD/HOMARD_Iteration.hxx +++ b/src/HOMARD/HOMARD_Iteration.hxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Iteration.hxx // Author : Paul RASCLE, EDF @@ -37,8 +34,6 @@ public: HOMARD_Iteration(); ~HOMARD_Iteration(); - bool Compute(); - void SetName( const char* NomIter ); std::string GetName() const; std::string GetDumpPython() const; diff --git a/src/HOMARD/HOMARD_Zone.cxx b/src/HOMARD/HOMARD_Zone.cxx index 07bd8e98..0b23732d 100644 --- a/src/HOMARD/HOMARD_Zone.cxx +++ b/src/HOMARD/HOMARD_Zone.cxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Zone.cxx // Author : Paul RASCLE, EDF @@ -36,22 +33,23 @@ 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 ), + _Xcentre( 0 ), _Ycentre( 0 ), _Zcentre( 0 ), _Rayon( 0 ), + _Xaxe( 0 ), _Yaxe( 0 ), _Zaxe( 0 ), _Haut( 0 ), _Xincr( 0 ), _Yincr( 0 ), _Zincr( 0 ) { - MESSAGE("HOMARD_Zone"); + MESSAGE("HOMARD_Zone") ; } //============================================================================= HOMARD_Zone::~HOMARD_Zone() { - MESSAGE("~HOMARD_Zone"); + MESSAGE("~HOMARD_Zone") ; } //============================================================================= void HOMARD_Zone::SetName( const char* NomZone ) { - _NomZone = std::string( NomZone ); + _NomZone = std::string( NomZone ) ; } //============================================================================= @@ -63,35 +61,83 @@ std::string HOMARD_Zone::GetName() const //============================================================================= std::string HOMARD_Zone::GetDumpPython() const { +// MESSAGE("GetDumpPython avec _ZoneType " << _ZoneType) ; +// MESSAGE("GetDumpPython avec _NomZone " << _NomZone) ; 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"; + if ( _ZoneType >= 11 and _ZoneType <= 13 ) { aScript << "rectangle " ; } + else if ( _ZoneType == 2 ) { aScript << "box " ;} + else if ( _ZoneType >= 31 and _ZoneType <= 33 ) { aScript << "disk " ;} + else if ( _ZoneType == 4 ) { aScript << "sphere " ; } + else if ( _ZoneType == 5 ) { aScript << "cylinder " ; } + else if ( _ZoneType >= 61 and _ZoneType <= 63 ) { aScript << "disk with hole " ;} + else if ( _ZoneType == 7 ) { aScript << "pipe " ; } + aScript << _NomZone << "\n" ; +// + aScript << "\t" << _NomZone << " = homard.CreateZone" ; // switch (_ZoneType) { + case 11: + { aScript << "Box2D( \"" << _NomZone << "\", " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", 1 )\n"; + break ; + } + case 12: + { aScript << "Box2D( \"" << _NomZone << "\", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ", 2 )\n"; + break ; + } + case 13: + { aScript << "Box2D( \"" << _NomZone << "\", " << _Zmin << ", " << _Zmax << ", " << _Xmin << ", " << _Xmax << ", 3 )\n"; + break ; + } case 2: - { - aScript << "\t" << _NomZone << ".SetBox(" ; - aScript << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ")\n"; - break; + { aScript << "Box( \"" << _NomZone << "\", " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ")\n"; + break ; } case 4: - { - aScript << "\t" << _NomZone << ".SetSphere(" ; - aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n"; - break; + { aScript << "Sphere( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ")\n"; + break ; + } + + case 31: + { aScript << "Disk( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", 1 )\n"; + break ; + } + case 32: + { aScript << "Disk( \"" << _NomZone << "\", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", 2 )\n"; + break ; + } + case 33: + { aScript << "Disk( \"" << _NomZone << "\", " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", 3 )\n"; + break ; + } + case 5: + { aScript << "Cylinder( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ")\n"; + break ; + } + + case 61: + { aScript << "DiskWithHole( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", " << _Rayonint << ", 1 )\n"; + break ; + } + case 62: + { aScript << "DiskWithHole( \"" << _NomZone << "\", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", " << _Rayonint << ", 2 )\n"; + break ; + } + case 63: + { aScript << "DiskWithHole( \"" << _NomZone << "\", " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", " << _Rayonint << ", 3 )\n"; + break ; + } + case 7: + { aScript << "Pipe( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ", " << _Rayonint << ")\n"; + break ; } } - return aScript.str(); + return aScript.str() ; } - //============================================================================= void HOMARD_Zone::SetZoneType( int ZoneType ) { @@ -120,55 +166,141 @@ void HOMARD_Zone::SetBox( double X0, double X1, double X2, double X3, double X4, //====================================================================== void HOMARD_Zone::SetSphere( double X0, double X1, double X2, double X3 ) { - _Xcentre = X0; _Ycentre = X1; _Zcentre = X2; - _rayon = X3; + _Xcentre = X0; + _Ycentre = X1; + _Zcentre = X2; + _Rayon = X3; } //======================================================================================= -std::vector HOMARD_Zone::GetLimit() const +void HOMARD_Zone::SetCylinder( double X0, double X1, double X2, + double X3, double X4, double X5, double X6, double X7 ) { - std::vector mesLimit; - mesLimit.push_back( _Xincr ); - mesLimit.push_back( _Yincr ); - mesLimit.push_back( _Zincr ); - return mesLimit; + _Xcentre = X0; + _Ycentre = X1; + _Zcentre = X2; + _Xaxe = X3; + _Yaxe = X4; + _Zaxe = X5; + _Rayon = X6; + _Haut = X7; +} +//======================================================================================= +void HOMARD_Zone::SetPipe( double X0, double X1, double X2, + double X3, double X4, double X5, double X6, double X7, double X8 ) +{ + _Xcentre = X0; + _Ycentre = X1; + _Zcentre = X2; + _Xaxe = X3; + _Yaxe = X4; + _Zaxe = X5; + _Rayon = X6; + _Haut = X7; + _Rayonint = X8; } //======================================================================================= -std::vector HOMARD_Zone::GetBox() const +std::vector HOMARD_Zone::GetLimit() const { - std::vector 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 mesLimit; + mesLimit.push_back( _Xincr ) ; + mesLimit.push_back( _Yincr ) ; + mesLimit.push_back( _Zincr ) ; + return mesLimit; } //======================================================================================= -std::vector HOMARD_Zone::GetSphere() const +std::vector HOMARD_Zone::GetCoords() const { std::vector mesCoor; - mesCoor.push_back( _Xcentre ); - mesCoor.push_back( _Ycentre ); - mesCoor.push_back( _Zcentre ); - mesCoor.push_back( _rayon ); +// + switch (_ZoneType) + { +// Rectangle ou parallelepipede + case 11: + { } + case 12: + { } + case 13: + { } + case 2: + { + mesCoor.push_back( _Xmin ) ; + mesCoor.push_back( _Xmax ) ; + mesCoor.push_back( _Ymin ) ; + mesCoor.push_back( _Ymax ) ; + mesCoor.push_back( _Zmin ) ; + mesCoor.push_back( _Zmax ) ; + break ; + } +// Sphere + case 4: + { + mesCoor.push_back( _Xcentre ) ; + mesCoor.push_back( _Ycentre ) ; + mesCoor.push_back( _Zcentre ) ; + mesCoor.push_back( _Rayon ) ; + break ; + } +// Disque ou cylindre + case 31: + { } + case 32: + { } + case 33: + { } + case 5: + { + 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 ) ; + mesCoor.push_back( _Haut ) ; + break ; + } +// Disque avec trou ou tuyau + case 61: + { } + case 62: + { } + case 63: + { } + case 7: + { + 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 ) ; + mesCoor.push_back( _Haut ) ; + mesCoor.push_back( _Rayonint ) ; + break ; + } + ASSERT ( _ZoneType == -1 ) ; + } return mesCoor; } //============================================================================= void HOMARD_Zone::AddHypo( const char* NomHypo ) { - _ListHypo.push_back( std::string( NomHypo ) ); + _ListHypo.push_back( std::string( NomHypo ) ) ; } //============================================================================= void HOMARD_Zone::SupprHypo( const char* NomHypo ) { - std::list::iterator it = find( _ListHypo.begin(), _ListHypo.end(), NomHypo ); - if ( it != _ListHypo.end() ) + std::list::iterator it = find( _ListHypo.begin(), _ListHypo.end(), NomHypo ) ; + if ( it != _ListHypo.end() ) { - MESSAGE ("Dans SupprHypo pour " << NomHypo); - _ListHypo.erase( it ); + MESSAGE ("Dans SupprHypo pour " << NomHypo) ; + _ListHypo.erase( it ) ; } } @@ -181,5 +313,5 @@ const std::list& HOMARD_Zone::GetHypo() const //============================================================================= void HOMARD_Zone::SupprHypos() { - _ListHypo.clear(); + _ListHypo.clear() ; } diff --git a/src/HOMARD/HOMARD_Zone.hxx b/src/HOMARD/HOMARD_Zone.hxx index 1adcfa8d..e8906bb2 100644 --- a/src/HOMARD/HOMARD_Zone.hxx +++ b/src/HOMARD/HOMARD_Zone.hxx @@ -1,25 +1,22 @@ // 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 +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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 +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : HOMARD_Zone.hxx // Author : Paul RASCLE, EDF @@ -41,21 +38,24 @@ public: 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 GetBox() const; - void SetSphere( double X0, double X1, - double X2, double X3 ); - std::vector GetSphere() const; + void SetBox( double X0, double X1, double X2, + double X3, double X4, double X5 ); + std::vector GetCoords() const; + + void SetSphere( double X0, double X1, double X2, double X3 ); + + void SetCylinder( double X0, double X1, double X2, double X3, + double X4, double X5, double X6, double X7 ); + void SetPipe( double X0, double X1, double X2, double X3, + double X4, double X5, double X6, double X7, double X8 ); void SetLimit( double X0, double X1, double X2 ); std::vector GetLimit() const; - + void SetZoneType( int ZoneType ); int GetZoneType() const; - + void AddHypo( const char* NomHypo ); void SupprHypo( const char* NomHypo ); const std::list& GetHypo() const; @@ -66,7 +66,8 @@ private: int _ZoneType; std::list _ListHypo; double _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax; - double _Xcentre, _Ycentre, _Zcentre, _rayon; + double _Xcentre, _Ycentre, _Zcentre, _Rayon, _Rayonint; + double _Xaxe, _Yaxe, _Zaxe, _Haut; double _Xincr, _Yincr, _Zincr; }; diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx index 04c46302..c025a5e2 100644 --- a/src/HOMARD/HomardDriver.cxx +++ b/src/HOMARD/HomardDriver.cxx @@ -1,3 +1,24 @@ +// HOMARD HOMARD : implementaion of HOMARD idl descriptions +// +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include #include #include @@ -17,15 +38,16 @@ HomardDriver::HomardDriver(const std::string siter, const std::string siterp1): 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); + if ( !(dirchar = getenv("HOMARD_REP_EXE_PRIVATE")) ) + { dirchar = getenv("HOMARD_REP_EXE") ; } + dir = std::string(dirchar); + MESSAGE("HomardDriver, dirchar ="<0 signifie que l'on raffinera les mailles contenues dans la zone, +// <0 signifie que l'on deraffinera +// + int ZoneTypeHOMARD ; + if ( ZoneType >= 11 and ZoneType <= 13 ) { ZoneTypeHOMARD = 1 ; } + else if ( ZoneType >= 31 and ZoneType <= 33 ) { ZoneTypeHOMARD = 3 ; } + else if ( ZoneType >= 61 and ZoneType <= 63 ) { ZoneTypeHOMARD = 6 ; } + else { ZoneTypeHOMARD = ZoneType ; } +// + if ( TypeUse < 0 ) { ZoneTypeHOMARD = -ZoneTypeHOMARD ; } // std::stringstream saux1 ; saux1 << NumeZone ; @@ -169,14 +203,94 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, saux = "#\n# Zone numero " + saux2 + "\n" ; // { std::stringstream saux1 ; - saux1 << NumeZone << " " << ZoneType ; + saux1 << NumeZone << " " << ZoneTypeHOMARD ; saux2 = saux1.str() ; saux += "ZoRaType " + saux2 + "\n" ; } // -// Cas du rectangle/parallelepipede +// Cas du rectangle +// + if ( ZoneType == 11 ) // Z est constant X Homard <=> X Salome +// Y Homard <=> Y Salome + { + saux += "#Rectangle\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" ; + } + } +// + else if ( ZoneType == 12 ) // X est constant X Homard <=> Y Salome +// Y Homard <=> Z Salome + { + saux += "#Rectangle\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaXmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x3 ; + saux2 = saux1.str() ; + saux += "ZoRaXmax " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x4 ; + saux2 = saux1.str() ; + saux += "ZoRaYmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x5 ; + saux2 = saux1.str() ; + saux += "ZoRaYmax " + saux2 + "\n" ; + } + } // - if ( ZoneType == 2 ) + else if ( ZoneType == 13 ) // Y est constant X Homard <=> X Salome +// Y Homard <=> Z Salome + { + saux += "#Rectangle\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 << " " << x4 ; + saux2 = saux1.str() ; + saux += "ZoRaYmin " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x5 ; + saux2 = saux1.str() ; + saux += "ZoRaYmax " + saux2 + "\n" ; + } + } +// +// Cas du parallelepipede +// + else if ( ZoneType == 2 ) { saux += "# Boite\n" ; { std::stringstream saux1 ; @@ -211,7 +325,88 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, } } // -// Cas du cercle/sphere +// Cas du disque +// + else if ( ZoneType == 31 or ZoneType == 61 ) + { + 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 << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 61 ) { saux += "ZoRaRayE " + saux2 + "\n" ; } + else { saux += "ZoRaRayo " + saux2 + "\n" ; } + } + if ( ZoneType == 61 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } + else if ( ZoneType == 32 or ZoneType == 62 ) + { + saux += "# Sphere\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x1 ; + saux2 = saux1.str() ; + saux += "ZoRaXCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaYCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 62 ) { saux += "ZoRaRayE " + saux2 + "\n" ; } + else { saux += "ZoRaRayo " + saux2 + "\n" ; } + } + if ( ZoneType == 62 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } + else if ( ZoneType == 33 or ZoneType == 63 ) + { + saux += "# Sphere\n" ; + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x0 ; + saux2 = saux1.str() ; + saux += "ZoRaXCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaYCen " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 63 ) { saux += "ZoRaRayE " + saux2 + "\n" ; } + else { saux += "ZoRaRayo " + saux2 + "\n" ; } + } + if ( ZoneType == 63 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } +// +// Cas de la sphere // else if ( ZoneType == 4 ) { @@ -237,15 +432,71 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, double x0, double x1, saux += "ZoRaRayo " + saux2 + "\n" ; } } +// +// Cas du cylindre ou du tuyau +// + else if ( ZoneType == 5 or ZoneType == 7 ) + { + if ( ZoneType == 5 ) { saux += "# Cylindre\n" ; } + else { saux += "# Tuyau\n" ; } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x0 ; + saux2 = saux1.str() ; + saux += "ZoRaXBas " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x1 ; + saux2 = saux1.str() ; + saux += "ZoRaYBas " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x2 ; + saux2 = saux1.str() ; + saux += "ZoRaZBas " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x3 ; + saux2 = saux1.str() ; + saux += "ZoRaXAxe " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x4 ; + saux2 = saux1.str() ; + saux += "ZoRaYAxe " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x5 ; + saux2 = saux1.str() ; + saux += "ZoRaZAxe " + saux2 + "\n" ; + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x6 ; + saux2 = saux1.str() ; + if ( ZoneType == 5 ) { saux += "ZoRaRayo " + saux2 + "\n" ; } + else { saux += "ZoRaRayE " + saux2 + "\n" ; } + } + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x7 ; + saux2 = saux1.str() ; + saux += "ZoRaHaut " + saux2 + "\n" ; + } + if ( ZoneType == 7 ) + { std::stringstream saux1 ; + saux1 << NumeZone << " " << x8 ; + saux2 = saux1.str() ; + saux += "ZoRaRayI " + saux2 + "\n" ; + } + } // _Texte += saux + "#\n" ; // -// std::cerr << "A la fin de TexteZone _Texte ="<<_Texte << std::endl; +// MESSAGE("A la fin de HomardDriver::TexteZone, _Texte ="<<_Texte); } ////============================================================================= 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 ) + int TypeThR, double ThreshR, int TypeThC, double ThreshC, + int UsField, int UsCmpI ) { MESSAGE("TexteField, FieldName = "< 0 ) + { + _Texte += "# Niveaux extremes\n" ; + { std::stringstream saux1 ; + saux1 << NivMax ; + std::string saux2 = saux1.str() ; + _Texte += "NiveauMa " + saux2 + "\n" ; + } + } + if ( DiamMin > 0 ) + { + _Texte += "# Diametre minimal\n" ; + { std::stringstream saux1 ; + saux1 << DiamMin ; + std::string saux2 = saux1.str() ; + _Texte += "DiametMi " + saux2 + "\n" ; + } + } + if ( AdapInit != 0 ) + { + if ( AdapInit > 0 ) + { _Texte += "# Raffinement" ; } + else + { _Texte += "# Deraffinement" ; } + _Texte += " des regions sans indicateur\n" ; + { std::stringstream saux1 ; + saux1 << AdapInit ; + std::string saux2 = saux1.str() ; + _Texte += "AdapInit " + saux2 + "\n" ; + } + } +} ////============================================================================= void HomardDriver::CreeFichier( ) diff --git a/src/HOMARD/HomardDriver.hxx b/src/HOMARD/HomardDriver.hxx index 5324b067..3c1c0a01 100644 --- a/src/HOMARD/HomardDriver.hxx +++ b/src/HOMARD/HomardDriver.hxx @@ -1,3 +1,24 @@ +// HOMARD HOMARD : implementaion of HOMARD idl descriptions +// +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + # ifndef __HOMARDDRIVER_H__ # define __HOMARDDRIVER_H__ @@ -14,20 +35,24 @@ public: 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 TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8 ); 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 ); + int TypeThR, double ThreshR, int TypeThC, double ThreshC, + int UsField, 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 TexteBoundaryDiGr( const std::string GroupName ); + void TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6 ); + void TexteBoundaryAnGr( const std::string NameBoundary, int NumeBoundary, const std::string GroupName ); 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 TexteAdvanced( int Pyram, int NivMax, double DiamMin, int AdapInit); void CloseFichier(); // int ExecuteHomard(); diff --git a/src/HOMARD/Makefile.am b/src/HOMARD/Makefile.am index 1213d1af..49ef0d09 100755 --- a/src/HOMARD/Makefile.am +++ b/src/HOMARD/Makefile.am @@ -1,25 +1,21 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 # -# 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 @@ -56,10 +52,10 @@ libHOMARDImpl_la_LDFLAGS = \ $(KERNEL_LDFLAGS) \ -lSALOMELocalTrace -check_PROGRAMS = testhomard - -TESTS = $(check_PROGRAMS) - -testhomard_SOURCES = testhomard.cxx - -testhomard_LDADD = libHOMARDImpl.la +# check_PROGRAMS = testhomard +# +# TESTS = $(check_PROGRAMS) +# +# testhomard_SOURCES = testhomard.cxx +# +# testhomard_LDADD = libHOMARDImpl.la diff --git a/src/HOMARDGUI/CreateBoundaryAn.h b/src/HOMARDGUI/CreateBoundaryAn.h new file mode 100644 index 00000000..c41dfbdd --- /dev/null +++ b/src/HOMARDGUI/CreateBoundaryAn.h @@ -0,0 +1,444 @@ +/******************************************************************************** +** Form generated from reading ui file 'CreateBoundaryAn.ui' +** +** Created: Fri Sep 2 14:55:24 2011 +** by: Qt User Interface Compiler version 4.2.1 +** +** WARNING! All changes made in this file will be lost when recompiling ui file! +********************************************************************************/ + +#ifndef CREATEBOUNDARYAN_H +#define CREATEBOUNDARYAN_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class Ui_CreateBoundaryAn +{ +public: + QGridLayout *gridLayout; + QGroupBox *GBButtons; + QGridLayout *gridLayout1; + QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; + QLabel *Name; + QLineEdit *LEBoundaryName; + QGroupBox *TypeBoundary; + QHBoxLayout *hboxLayout; + QRadioButton *RBCylindre; + QRadioButton *RBSphere; + QGroupBox *gBSphere; + QGridLayout *gridLayout2; + QDoubleSpinBox *SpinBox_Rayon; + QDoubleSpinBox *SpinBox_Zcentre; + QLabel *TLRayon; + QLabel *TLZcentre; + QLabel *TLYcentre; + QDoubleSpinBox *SpinBox_Ycentre; + QDoubleSpinBox *SpinBox_Xcentre; + QLabel *TLXcentre; + QGroupBox *gBCylindre; + QGridLayout *gridLayout3; + QDoubleSpinBox *SpinBox_Xcent; + QLabel *TLXcent; + QDoubleSpinBox *SpinBox_Radius; + QDoubleSpinBox *SpinBox_Zcent; + QLabel *TLradius; + QLabel *TLZcent; + QLabel *TLYcent; + QDoubleSpinBox *SpinBox_Ycent; + QLabel *TLXaxis; + QLabel *TLYaxis; + QLabel *TLZaxis; + QDoubleSpinBox *SpinBox_Zaxis; + QDoubleSpinBox *SpinBox_Yaxis; + QDoubleSpinBox *SpinBox_Xaxis; + + void setupUi(QDialog *CreateBoundaryAn) + { + CreateBoundaryAn->setObjectName(QString::fromUtf8("CreateBoundaryAn")); + CreateBoundaryAn->setAutoFillBackground(true); + CreateBoundaryAn->setSizeGripEnabled(true); + gridLayout = new QGridLayout(CreateBoundaryAn); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + GBButtons = new QGroupBox(CreateBoundaryAn); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); + GBButtons->setSizePolicy(sizePolicy); + gridLayout1 = new QGridLayout(GBButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); + + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); + + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); + + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); + + + gridLayout->addWidget(GBButtons, 4, 0, 1, 2); + + Name = new QLabel(CreateBoundaryAn); + Name->setObjectName(QString::fromUtf8("Name")); + + gridLayout->addWidget(Name, 0, 0, 1, 1); + + LEBoundaryName = new QLineEdit(CreateBoundaryAn); + LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); + LEBoundaryName->setMaxLength(32); + + gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 1); + + TypeBoundary = new QGroupBox(CreateBoundaryAn); + TypeBoundary->setObjectName(QString::fromUtf8("TypeBoundary")); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(TypeBoundary->sizePolicy().hasHeightForWidth()); + TypeBoundary->setSizePolicy(sizePolicy1); + TypeBoundary->setMinimumSize(QSize(340, 0)); + hboxLayout = new QHBoxLayout(TypeBoundary); + hboxLayout->setSpacing(6); + hboxLayout->setMargin(9); + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + RBCylindre = new QRadioButton(TypeBoundary); + RBCylindre->setObjectName(QString::fromUtf8("RBCylindre")); + RBCylindre->setIcon(QIcon(QString::fromUtf8("../../resources/cylinderpointvector.png"))); + RBCylindre->setCheckable(true); + RBCylindre->setChecked(true); + + hboxLayout->addWidget(RBCylindre); + + RBSphere = new QRadioButton(TypeBoundary); + RBSphere->setObjectName(QString::fromUtf8("RBSphere")); + RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); + + hboxLayout->addWidget(RBSphere); + + + gridLayout->addWidget(TypeBoundary, 1, 0, 1, 2); + + gBSphere = new QGroupBox(CreateBoundaryAn); + gBSphere->setObjectName(QString::fromUtf8("gBSphere")); + QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); + gBSphere->setSizePolicy(sizePolicy2); + gridLayout2 = new QGridLayout(gBSphere); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + SpinBox_Rayon = new QDoubleSpinBox(gBSphere); + SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon")); + SpinBox_Rayon->setDecimals(5); + SpinBox_Rayon->setMaximum(1e+09); + SpinBox_Rayon->setMinimum(0); + SpinBox_Rayon->setValue(0); + + gridLayout2->addWidget(SpinBox_Rayon, 1, 3, 1, 1); + + SpinBox_Zcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre")); + SpinBox_Zcentre->setDecimals(5); + SpinBox_Zcentre->setMaximum(1e+09); + SpinBox_Zcentre->setMinimum(-1e+09); + SpinBox_Zcentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); + + TLRayon = new QLabel(gBSphere); + TLRayon->setObjectName(QString::fromUtf8("TLRayon")); + QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); + TLRayon->setSizePolicy(sizePolicy3); + TLRayon->setWordWrap(false); + + gridLayout2->addWidget(TLRayon, 1, 2, 1, 1); + + TLZcentre = new QLabel(gBSphere); + TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); + QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); + sizePolicy4.setHorizontalStretch(0); + sizePolicy4.setVerticalStretch(0); + sizePolicy4.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); + TLZcentre->setSizePolicy(sizePolicy4); + TLZcentre->setWordWrap(false); + + gridLayout2->addWidget(TLZcentre, 2, 0, 1, 1); + + TLYcentre = new QLabel(gBSphere); + TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); + QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); + sizePolicy5.setHorizontalStretch(0); + sizePolicy5.setVerticalStretch(0); + sizePolicy5.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); + TLYcentre->setSizePolicy(sizePolicy5); + TLYcentre->setWordWrap(false); + + gridLayout2->addWidget(TLYcentre, 1, 0, 1, 1); + + SpinBox_Ycentre = new QDoubleSpinBox(gBSphere); + SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre")); + SpinBox_Ycentre->setDecimals(5); + SpinBox_Ycentre->setMaximum(1e+09); + SpinBox_Ycentre->setMinimum(-1e+09); + SpinBox_Ycentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); + + SpinBox_Xcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre")); + SpinBox_Xcentre->setDecimals(5); + SpinBox_Xcentre->setMaximum(1e+09); + SpinBox_Xcentre->setMinimum(-1e+09); + SpinBox_Xcentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); + + TLXcentre = new QLabel(gBSphere); + TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); + QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); + sizePolicy6.setHorizontalStretch(0); + sizePolicy6.setVerticalStretch(0); + sizePolicy6.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); + TLXcentre->setSizePolicy(sizePolicy6); + TLXcentre->setWordWrap(false); + + gridLayout2->addWidget(TLXcentre, 0, 0, 1, 1); + + + gridLayout->addWidget(gBSphere, 3, 0, 1, 2); + + gBCylindre = new QGroupBox(CreateBoundaryAn); + gBCylindre->setObjectName(QString::fromUtf8("gBCylindre")); + QSizePolicy sizePolicy7(static_cast(0), static_cast(0)); + sizePolicy7.setHorizontalStretch(0); + sizePolicy7.setVerticalStretch(0); + sizePolicy7.setHeightForWidth(gBCylindre->sizePolicy().hasHeightForWidth()); + gBCylindre->setSizePolicy(sizePolicy7); + gridLayout3 = new QGridLayout(gBCylindre); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + SpinBox_Xcent = new QDoubleSpinBox(gBCylindre); + SpinBox_Xcent->setObjectName(QString::fromUtf8("SpinBox_Xcent")); + SpinBox_Xcent->setDecimals(5); + SpinBox_Xcent->setMaximum(1e+09); + SpinBox_Xcent->setMinimum(-1e+09); + SpinBox_Xcent->setValue(0); + + gridLayout3->addWidget(SpinBox_Xcent, 0, 1, 1, 1); + + TLXcent = new QLabel(gBCylindre); + TLXcent->setObjectName(QString::fromUtf8("TLXcent")); + QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); + sizePolicy8.setHorizontalStretch(0); + sizePolicy8.setVerticalStretch(0); + sizePolicy8.setHeightForWidth(TLXcent->sizePolicy().hasHeightForWidth()); + TLXcent->setSizePolicy(sizePolicy8); + TLXcent->setWordWrap(false); + + gridLayout3->addWidget(TLXcent, 0, 0, 1, 1); + + SpinBox_Radius = new QDoubleSpinBox(gBCylindre); + SpinBox_Radius->setObjectName(QString::fromUtf8("SpinBox_Radius")); + SpinBox_Radius->setDecimals(5); + SpinBox_Radius->setMaximum(1e+09); + + gridLayout3->addWidget(SpinBox_Radius, 3, 1, 1, 2); + + SpinBox_Zcent = new QDoubleSpinBox(gBCylindre); + SpinBox_Zcent->setObjectName(QString::fromUtf8("SpinBox_Zcent")); + SpinBox_Zcent->setDecimals(5); + SpinBox_Zcent->setMaximum(1e+09); + SpinBox_Zcent->setMinimum(-1e+09); + SpinBox_Zcent->setValue(0); + + gridLayout3->addWidget(SpinBox_Zcent, 2, 1, 1, 1); + + TLradius = new QLabel(gBCylindre); + TLradius->setObjectName(QString::fromUtf8("TLradius")); + QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); + sizePolicy9.setHorizontalStretch(0); + sizePolicy9.setVerticalStretch(0); + sizePolicy9.setHeightForWidth(TLradius->sizePolicy().hasHeightForWidth()); + TLradius->setSizePolicy(sizePolicy9); + TLradius->setWordWrap(false); + + gridLayout3->addWidget(TLradius, 3, 0, 1, 1); + + TLZcent = new QLabel(gBCylindre); + TLZcent->setObjectName(QString::fromUtf8("TLZcent")); + QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); + sizePolicy10.setHorizontalStretch(0); + sizePolicy10.setVerticalStretch(0); + sizePolicy10.setHeightForWidth(TLZcent->sizePolicy().hasHeightForWidth()); + TLZcent->setSizePolicy(sizePolicy10); + TLZcent->setWordWrap(false); + + gridLayout3->addWidget(TLZcent, 2, 0, 1, 1); + + TLYcent = new QLabel(gBCylindre); + TLYcent->setObjectName(QString::fromUtf8("TLYcent")); + QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); + sizePolicy11.setHorizontalStretch(0); + sizePolicy11.setVerticalStretch(0); + sizePolicy11.setHeightForWidth(TLYcent->sizePolicy().hasHeightForWidth()); + TLYcent->setSizePolicy(sizePolicy11); + TLYcent->setWordWrap(false); + + gridLayout3->addWidget(TLYcent, 1, 0, 1, 1); + + SpinBox_Ycent = new QDoubleSpinBox(gBCylindre); + SpinBox_Ycent->setObjectName(QString::fromUtf8("SpinBox_Ycent")); + SpinBox_Ycent->setDecimals(5); + SpinBox_Ycent->setMaximum(1e+09); + SpinBox_Ycent->setMinimum(-1e+09); + SpinBox_Ycent->setValue(0); + + gridLayout3->addWidget(SpinBox_Ycent, 1, 1, 1, 1); + + TLXaxis = new QLabel(gBCylindre); + TLXaxis->setObjectName(QString::fromUtf8("TLXaxis")); + QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); + sizePolicy12.setHorizontalStretch(0); + sizePolicy12.setVerticalStretch(0); + sizePolicy12.setHeightForWidth(TLXaxis->sizePolicy().hasHeightForWidth()); + TLXaxis->setSizePolicy(sizePolicy12); + TLXaxis->setWordWrap(false); + + gridLayout3->addWidget(TLXaxis, 0, 2, 1, 1); + + TLYaxis = new QLabel(gBCylindre); + TLYaxis->setObjectName(QString::fromUtf8("TLYaxis")); + QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); + sizePolicy13.setHorizontalStretch(0); + sizePolicy13.setVerticalStretch(0); + sizePolicy13.setHeightForWidth(TLYaxis->sizePolicy().hasHeightForWidth()); + TLYaxis->setSizePolicy(sizePolicy13); + TLYaxis->setWordWrap(false); + + gridLayout3->addWidget(TLYaxis, 1, 2, 1, 1); + + TLZaxis = new QLabel(gBCylindre); + TLZaxis->setObjectName(QString::fromUtf8("TLZaxis")); + QSizePolicy sizePolicy14(static_cast(0), static_cast(0)); + sizePolicy14.setHorizontalStretch(0); + sizePolicy14.setVerticalStretch(0); + sizePolicy14.setHeightForWidth(TLZaxis->sizePolicy().hasHeightForWidth()); + TLZaxis->setSizePolicy(sizePolicy14); + TLZaxis->setWordWrap(false); + + gridLayout3->addWidget(TLZaxis, 2, 2, 1, 1); + + SpinBox_Zaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Zaxis->setObjectName(QString::fromUtf8("SpinBox_Zaxis")); + SpinBox_Zaxis->setDecimals(5); + SpinBox_Zaxis->setMaximum(1e+09); + SpinBox_Zaxis->setMinimum(-1e+09); + SpinBox_Zaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Zaxis, 2, 3, 1, 1); + + SpinBox_Yaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Yaxis->setObjectName(QString::fromUtf8("SpinBox_Yaxis")); + SpinBox_Yaxis->setDecimals(5); + SpinBox_Yaxis->setMaximum(1e+09); + SpinBox_Yaxis->setMinimum(-1e+09); + SpinBox_Yaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Yaxis, 1, 3, 1, 1); + + SpinBox_Xaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Xaxis->setObjectName(QString::fromUtf8("SpinBox_Xaxis")); + SpinBox_Xaxis->setDecimals(5); + SpinBox_Xaxis->setMaximum(1e+09); + SpinBox_Xaxis->setMinimum(-1e+09); + SpinBox_Xaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Xaxis, 0, 3, 1, 1); + + + gridLayout->addWidget(gBCylindre, 2, 0, 1, 2); + + + retranslateUi(CreateBoundaryAn); + + QSize size(458, 500); + size = size.expandedTo(CreateBoundaryAn->minimumSizeHint()); + CreateBoundaryAn->resize(size); + + + QMetaObject::connectSlotsByName(CreateBoundaryAn); + } // setupUi + + void retranslateUi(QDialog *CreateBoundaryAn) + { + CreateBoundaryAn->setWindowTitle(QApplication::translate("CreateBoundaryAn", "Create an analytical boundary", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateBoundaryAn", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateBoundaryAn", "OK", 0, QApplication::UnicodeUTF8)); + Name->setText(QApplication::translate("CreateBoundaryAn", "Name", 0, QApplication::UnicodeUTF8)); + TypeBoundary->setTitle(QApplication::translate("CreateBoundaryAn", "Type of boundary", 0, QApplication::UnicodeUTF8)); + RBCylindre->setText(QApplication::translate("CreateBoundaryAn", "Cylinder", 0, QApplication::UnicodeUTF8)); + RBSphere->setText(QApplication::translate("CreateBoundaryAn", "Sphere", 0, QApplication::UnicodeUTF8)); + gBSphere->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLRayon->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); + TLZcentre->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); + TLYcentre->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); + TLXcentre->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); + gBCylindre->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLXcent->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); + TLradius->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); + TLZcent->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); + TLYcent->setText(QApplication::translate("CreateBoundaryAn", "Y centre", 0, QApplication::UnicodeUTF8)); + TLXaxis->setText(QApplication::translate("CreateBoundaryAn", "X axis", 0, QApplication::UnicodeUTF8)); + TLYaxis->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8)); + TLZaxis->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(CreateBoundaryAn); + } // retranslateUi + +}; + +namespace Ui { + class CreateBoundaryAn: public Ui_CreateBoundaryAn {}; +} // namespace Ui + +#endif // CREATEBOUNDARYAN_H diff --git a/src/HOMARDGUI/CreateBoundaryAn.ui b/src/HOMARDGUI/CreateBoundaryAn.ui new file mode 100644 index 00000000..0750df02 --- /dev/null +++ b/src/HOMARDGUI/CreateBoundaryAn.ui @@ -0,0 +1,566 @@ + + CreateBoundaryAn + + + + 0 + 0 + 458 + 500 + + + + Create an analytical boundary + + + true + + + true + + + + 9 + + + 6 + + + + + + 0 + 0 + 0 + 0 + + + + + + + + 9 + + + 6 + + + + + Help + + + + + + + Cancel + + + + + + + Apply + + + + + + + OK + + + + + + + + + + Name + + + + + + + 32 + + + + + + + + 0 + 0 + 0 + 0 + + + + + 340 + 0 + + + + Type of boundary + + + + 9 + + + 6 + + + + + Cylinder + + + ../../resources/cylinderpointvector.png + + + true + + + true + + + + + + + Sphere + + + ../../resources/zone_spherepoint.png + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + Coordinates + + + + 9 + + + 6 + + + + + 5 + + + 999999999.000000000000000 + + + 0.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Radius + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z centre + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Y centre + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X centre + + + false + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + Coordinates + + + + 9 + + + 6 + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X centre + + + false + + + + + + + 5 + + + 1000000000.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Radius + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z centre + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Y centre + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X axis + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Y axis + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z axis + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + + + + diff --git a/src/HOMARDGUI/CreateBoundaryDi.h b/src/HOMARDGUI/CreateBoundaryDi.h index 816d59fc..7caf93da 100644 --- a/src/HOMARDGUI/CreateBoundaryDi.h +++ b/src/HOMARDGUI/CreateBoundaryDi.h @@ -1,8 +1,8 @@ /******************************************************************************** ** 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 +** Created: Thu Sep 1 16:37:21 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -22,117 +22,122 @@ #include #include -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; + QGridLayout *gridLayout1; QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; + QCheckBox *CBGroupe; + QLineEdit *LEFileName; + QPushButton *PushFichier; + QLabel *Mesh; + QLineEdit *LEBoundaryName; + QLabel *Name; void setupUi(QDialog *CreateBoundaryDi) { - if (CreateBoundaryDi->objectName().isEmpty()) - CreateBoundaryDi->setObjectName(QString::fromUtf8("CreateBoundaryDi")); - CreateBoundaryDi->resize(566, 169); - QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + CreateBoundaryDi->setObjectName(QString::fromUtf8("CreateBoundaryDi")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(CreateBoundaryDi->sizePolicy().hasHeightForWidth()); CreateBoundaryDi->setSizePolicy(sizePolicy); - CreateBoundaryDi->setAutoFillBackground(false); + CreateBoundaryDi->setAutoFillBackground(true); CreateBoundaryDi->setSizeGripEnabled(true); gridLayout = new QGridLayout(CreateBoundaryDi); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - Name = new QLabel(CreateBoundaryDi); - Name->setObjectName(QString::fromUtf8("Name")); + GBButtons = new QGroupBox(CreateBoundaryDi); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + gridLayout1 = new QGridLayout(GBButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout->addWidget(Name, 0, 0, 1, 1); + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); - LEBoundaryName = new QLineEdit(CreateBoundaryDi); - LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); - LEBoundaryName->setMinimumSize(QSize(382, 21)); - LEBoundaryName->setMaxLength(32); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 2); + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); - Mesh = new QLabel(CreateBoundaryDi); - Mesh->setObjectName(QString::fromUtf8("Mesh")); + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout->addWidget(Mesh, 1, 0, 1, 1); + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); - PushFichier = new QPushButton(CreateBoundaryDi); - PushFichier->setObjectName(QString::fromUtf8("PushFichier")); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout->addWidget(PushFichier, 1, 1, 1, 1); + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); - LEFileName = new QLineEdit(CreateBoundaryDi); - LEFileName->setObjectName(QString::fromUtf8("LEFileName")); - LEFileName->setMinimumSize(QSize(370, 21)); - gridLayout->addWidget(LEFileName, 1, 2, 1, 1); + gridLayout->addWidget(GBButtons, 3, 0, 1, 3); 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")); + LEFileName = new QLineEdit(CreateBoundaryDi); + LEFileName->setObjectName(QString::fromUtf8("LEFileName")); + LEFileName->setMinimumSize(QSize(370, 21)); - gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout->addWidget(LEFileName, 1, 2, 1, 1); - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + PushFichier = new QPushButton(CreateBoundaryDi); + PushFichier->setObjectName(QString::fromUtf8("PushFichier")); - gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout->addWidget(PushFichier, 1, 1, 1, 1); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + Mesh = new QLabel(CreateBoundaryDi); + Mesh->setObjectName(QString::fromUtf8("Mesh")); - gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout->addWidget(Mesh, 1, 0, 1, 1); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + LEBoundaryName = new QLineEdit(CreateBoundaryDi); + LEBoundaryName->setObjectName(QString::fromUtf8("LEBoundaryName")); + LEBoundaryName->setMinimumSize(QSize(382, 21)); + LEBoundaryName->setMaxLength(32); - gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout->addWidget(LEBoundaryName, 0, 1, 1, 2); + Name = new QLabel(CreateBoundaryDi); + Name->setObjectName(QString::fromUtf8("Name")); - gridLayout->addWidget(GBButtons, 3, 0, 1, 3); + gridLayout->addWidget(Name, 0, 0, 1, 1); retranslateUi(CreateBoundaryDi); + QSize size(566, 169); + size = size.expandedTo(CreateBoundaryDi->minimumSizeHint()); + CreateBoundaryDi->resize(size); + + 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)); + CreateBoundaryDi->setWindowTitle(QApplication::translate("CreateBoundaryDi", "Create a discrete boundary", 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)); + buttonHelp->setText(QApplication::translate("CreateBoundaryDi", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateBoundaryDi", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateBoundaryDi", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateBoundaryDi", "OK", 0, QApplication::UnicodeUTF8)); + CBGroupe->setText(QApplication::translate("CreateBoundaryDi", "Filtering with groups", 0, QApplication::UnicodeUTF8)); + PushFichier->setText(QString()); + Mesh->setText(QApplication::translate("CreateBoundaryDi", "Mesh", 0, QApplication::UnicodeUTF8)); + Name->setText(QApplication::translate("CreateBoundaryDi", "Name", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateBoundaryDi); } // retranslateUi @@ -142,6 +147,4 @@ 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 index b97931d9..3cc0ec09 100644 --- a/src/HOMARDGUI/CreateBoundaryDi.ui +++ b/src/HOMARDGUI/CreateBoundaryDi.ui @@ -10,107 +10,121 @@ - + + 0 + 0 0 0 - Create Discrete Boundary + Create a discrete boundary - false + true true - - - + + + 9 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + Help + + + + + + + Cancel + + + + + + + Apply + + + + + + + OK + + + + + + + + - Name + Filtering with groups - - + + - 382 + 370 21 - - 32 - - - + + - Mesh + - - + + - + Mesh - - + + - 370 + 382 21 - - - - - - Filtering with groups + + 32 - - - - + + + + Name - - - - - &Ok - - - - - - - &Apply - - - - - - - &Cancel - - - - - - - &Help - - - - diff --git a/src/HOMARDGUI/CreateCase.h b/src/HOMARDGUI/CreateCase.h index f3010ccb..46af698f 100644 --- a/src/HOMARDGUI/CreateCase.h +++ b/src/HOMARDGUI/CreateCase.h @@ -1,10 +1,10 @@ /******************************************************************************** -** Form generated from reading ui file 'CreateCase.ui' +** 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 +** Created: Wed Feb 15 18:15:40 2012 +** by: Qt User Interface Compiler version 4.6.3 ** -** WARNING! All changes made in this file will be lost when recompiling ui file! +** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef CREATECASE_H @@ -17,17 +17,17 @@ #include #include #include +#include #include #include #include +#include #include #include #include #include #include #include -#include -#include QT_BEGIN_NAMESPACE @@ -35,351 +35,446 @@ class Ui_CreateCase { public: QGridLayout *gridLayout_2; - QHBoxLayout *horizontalLayout_5; + QHBoxLayout *hboxLayout; QLabel *Name; QLineEdit *LECaseName; - QHBoxLayout *horizontalLayout_4; + QHBoxLayout *hboxLayout1; QLabel *Directory; QPushButton *PushDir; QLineEdit *LEDirName; - QHBoxLayout *horizontalLayout_3; + QSpacerItem *spacerItem; + QHBoxLayout *hboxLayout2; QLabel *Mesh_2; QPushButton *PushFichier; QLineEdit *LEFileName; - QSpacerItem *verticalSpacer_2; + QSpacerItem *spacerItem1; QGroupBox *GBTypeConf; - QHBoxLayout *horizontalLayout; + QHBoxLayout *hboxLayout3; QRadioButton *RBConforme; QRadioButton *RBNonConforme; - QSpacerItem *verticalSpacer_3; + QSpacerItem *spacerItem2; QGroupBox *GBTypeNoConf; - QHBoxLayout *horizontalLayout_2; + QHBoxLayout *hboxLayout4; QRadioButton *RB1NpM; QRadioButton *RB1NpA; QRadioButton *RBQuelconque; - QSpacerItem *verticalSpacer_4; - QHBoxLayout *horizontalLayout_6; + QSpacerItem *spacerItem3; + QHBoxLayout *hboxLayout5; QCheckBox *CBBoundaryD; QCheckBox *CBBoundaryA; - QSpacerItem *verticalSpacer_7; + QSpacerItem *spacerItem4; QGroupBox *GBBoundaryD; - QGridLayout *gridLayout_3; - QComboBox *CBBoundaryDi; - QSpacerItem *spacer_2; + QGridLayout *gridLayout; QPushButton *PBBoundaryDiEdit; QPushButton *PBBoundaryDiNew; + QComboBox *CBBoundaryDi; + QSpacerItem *spacerItem5; + QPushButton *PBBoundaryDiHelp; QGroupBox *GBBoundaryA; + QFormLayout *formLayout; QTableWidget *TWBoundary; - QWidget *layoutWidget; - QVBoxLayout *verticalLayout_4; - QPushButton *PBBoundaryNew; - QPushButton *PBBoundaryEdit; - QPushButton *PBBoundaryDelete; + QGridLayout *gridLayout1; + QPushButton *PBBoundaryAnEdit; + QPushButton *PBBoundaryAnNew; + QPushButton *PBBoundaryAnHelp; + QSpacerItem *spacer; + QCheckBox *CBAdvanced; + QGroupBox *GBAdvancedOptions; + QGridLayout *gridLayout2; + QCheckBox *CBPyramid; + QSpacerItem *spacer_3; + QSpacerItem *spacer_4; QGroupBox *GroupButtons; - QGridLayout *gridLayout; - QPushButton *buttonOk; + QGridLayout *gridLayout3; + QPushButton *buttonHelp; QPushButton *buttonApply; + QPushButton *buttonOk; QPushButton *buttonCancel; - QPushButton *buttonHelp; - QSpacerItem *verticalSpacer_5; + QSpacerItem *spacer_2; 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")); + if (CreateCase->objectName().isEmpty()) + CreateCase->setObjectName(QString::fromUtf8("CreateCase")); + CreateCase->resize(601, 1070); + QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(CreateCase->sizePolicy().hasHeightForWidth()); + CreateCase->setSizePolicy(sizePolicy); + CreateCase->setAutoFillBackground(true); + gridLayout_2 = new QGridLayout(CreateCase); + gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + hboxLayout = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout->setSpacing(6); +#endif +#ifndef Q_OS_MAC + hboxLayout->setContentsMargins(0, 0, 0, 0); +#endif + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + Name = new QLabel(CreateCase); + Name->setObjectName(QString::fromUtf8("Name")); + + hboxLayout->addWidget(Name); + + LECaseName = new QLineEdit(CreateCase); + LECaseName->setObjectName(QString::fromUtf8("LECaseName")); + LECaseName->setMinimumSize(QSize(382, 21)); + + hboxLayout->addWidget(LECaseName); + + + gridLayout_2->addLayout(hboxLayout, 0, 0, 1, 4); + + hboxLayout1 = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout1->setSpacing(6); +#endif + hboxLayout1->setContentsMargins(0, 0, 0, 0); + hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + Directory = new QLabel(CreateCase); + Directory->setObjectName(QString::fromUtf8("Directory")); + + hboxLayout1->addWidget(Directory); + + PushDir = new QPushButton(CreateCase); + PushDir->setObjectName(QString::fromUtf8("PushDir")); + PushDir->setAutoDefault(false); + + hboxLayout1->addWidget(PushDir); + + LEDirName = new QLineEdit(CreateCase); + LEDirName->setObjectName(QString::fromUtf8("LEDirName")); + LEDirName->setMinimumSize(QSize(382, 21)); + + hboxLayout1->addWidget(LEDirName); + + + gridLayout_2->addLayout(hboxLayout1, 1, 0, 1, 4); + + spacerItem = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_2->addItem(spacerItem, 2, 1, 1, 1); + + hboxLayout2 = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout2->setSpacing(6); +#endif + hboxLayout2->setContentsMargins(0, 0, 0, 0); + hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + Mesh_2 = new QLabel(CreateCase); + Mesh_2->setObjectName(QString::fromUtf8("Mesh_2")); + + hboxLayout2->addWidget(Mesh_2); + + PushFichier = new QPushButton(CreateCase); + PushFichier->setObjectName(QString::fromUtf8("PushFichier")); + PushFichier->setAutoDefault(false); + + hboxLayout2->addWidget(PushFichier); + + LEFileName = new QLineEdit(CreateCase); + LEFileName->setObjectName(QString::fromUtf8("LEFileName")); + LEFileName->setMinimumSize(QSize(382, 21)); - horizontalLayout_5->addWidget(Name); + hboxLayout2->addWidget(LEFileName); - LECaseName = new QLineEdit(CreateCase); - LECaseName->setObjectName(QString::fromUtf8("LECaseName")); - LECaseName->setMinimumSize(QSize(382, 21)); - horizontalLayout_5->addWidget(LECaseName); + gridLayout_2->addLayout(hboxLayout2, 3, 0, 1, 4); + spacerItem1 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addLayout(horizontalLayout_5, 0, 0, 1, 2); + gridLayout_2->addItem(spacerItem1, 4, 1, 1, 3); - horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); - Directory = new QLabel(CreateCase); - Directory->setObjectName(QString::fromUtf8("Directory")); + GBTypeConf = new QGroupBox(CreateCase); + GBTypeConf->setObjectName(QString::fromUtf8("GBTypeConf")); + hboxLayout3 = new QHBoxLayout(GBTypeConf); +#ifndef Q_OS_MAC + hboxLayout3->setSpacing(6); +#endif +#ifndef Q_OS_MAC + hboxLayout3->setContentsMargins(9, 9, 9, 9); +#endif + hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + RBConforme = new QRadioButton(GBTypeConf); + RBConforme->setObjectName(QString::fromUtf8("RBConforme")); + RBConforme->setChecked(true); - horizontalLayout_4->addWidget(Directory); + hboxLayout3->addWidget(RBConforme); - PushDir = new QPushButton(CreateCase); - PushDir->setObjectName(QString::fromUtf8("PushDir")); - PushDir->setAutoDefault(false); + RBNonConforme = new QRadioButton(GBTypeConf); + RBNonConforme->setObjectName(QString::fromUtf8("RBNonConforme")); - horizontalLayout_4->addWidget(PushDir); + hboxLayout3->addWidget(RBNonConforme); - LEDirName = new QLineEdit(CreateCase); - LEDirName->setObjectName(QString::fromUtf8("LEDirName")); - LEDirName->setMinimumSize(QSize(382, 21)); - horizontalLayout_4->addWidget(LEDirName); + gridLayout_2->addWidget(GBTypeConf, 5, 0, 1, 1); + spacerItem2 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addLayout(horizontalLayout_4, 1, 0, 1, 1); + gridLayout_2->addItem(spacerItem2, 6, 1, 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")); + GBTypeNoConf = new QGroupBox(CreateCase); + GBTypeNoConf->setObjectName(QString::fromUtf8("GBTypeNoConf")); + hboxLayout4 = new QHBoxLayout(GBTypeNoConf); +#ifndef Q_OS_MAC + hboxLayout4->setSpacing(6); +#endif +#ifndef Q_OS_MAC + hboxLayout4->setContentsMargins(9, 9, 9, 9); +#endif + hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + RB1NpM = new QRadioButton(GBTypeNoConf); + RB1NpM->setObjectName(QString::fromUtf8("RB1NpM")); - horizontalLayout_3->addWidget(Mesh_2); + hboxLayout4->addWidget(RB1NpM); - PushFichier = new QPushButton(CreateCase); - PushFichier->setObjectName(QString::fromUtf8("PushFichier")); - PushFichier->setAutoDefault(false); + RB1NpA = new QRadioButton(GBTypeNoConf); + RB1NpA->setObjectName(QString::fromUtf8("RB1NpA")); - horizontalLayout_3->addWidget(PushFichier); + hboxLayout4->addWidget(RB1NpA); - LEFileName = new QLineEdit(CreateCase); - LEFileName->setObjectName(QString::fromUtf8("LEFileName")); - LEFileName->setMinimumSize(QSize(382, 21)); + RBQuelconque = new QRadioButton(GBTypeNoConf); + RBQuelconque->setObjectName(QString::fromUtf8("RBQuelconque")); - horizontalLayout_3->addWidget(LEFileName); + hboxLayout4->addWidget(RBQuelconque); - gridLayout_2->addLayout(horizontalLayout_3, 3, 0, 1, 2); + gridLayout_2->addWidget(GBTypeNoConf, 7, 0, 1, 3); - verticalSpacer_2 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem3 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_2, 4, 0, 1, 1); + gridLayout_2->addItem(spacerItem3, 8, 1, 1, 3); - 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); + hboxLayout5 = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout5->setSpacing(6); +#endif + hboxLayout5->setContentsMargins(0, 0, 0, 0); + hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5")); + CBBoundaryD = new QCheckBox(CreateCase); + CBBoundaryD->setObjectName(QString::fromUtf8("CBBoundaryD")); - horizontalLayout->addWidget(RBConforme); + hboxLayout5->addWidget(CBBoundaryD); - RBNonConforme = new QRadioButton(GBTypeConf); - RBNonConforme->setObjectName(QString::fromUtf8("RBNonConforme")); + CBBoundaryA = new QCheckBox(CreateCase); + CBBoundaryA->setObjectName(QString::fromUtf8("CBBoundaryA")); - horizontalLayout->addWidget(RBNonConforme); + hboxLayout5->addWidget(CBBoundaryA); - RBNonConforme->raise(); - RBConforme->raise(); - gridLayout_2->addWidget(GBTypeConf, 5, 0, 1, 2); + gridLayout_2->addLayout(hboxLayout5, 9, 0, 1, 2); - verticalSpacer_3 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem4 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_3, 6, 0, 1, 1); + gridLayout_2->addItem(spacerItem4, 10, 1, 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")); + GBBoundaryD = new QGroupBox(CreateCase); + GBBoundaryD->setObjectName(QString::fromUtf8("GBBoundaryD")); + sizePolicy.setHeightForWidth(GBBoundaryD->sizePolicy().hasHeightForWidth()); + GBBoundaryD->setSizePolicy(sizePolicy); + gridLayout = new QGridLayout(GBBoundaryD); +#ifndef Q_OS_MAC + gridLayout->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + PBBoundaryDiEdit = new QPushButton(GBBoundaryD); + PBBoundaryDiEdit->setObjectName(QString::fromUtf8("PBBoundaryDiEdit")); + PBBoundaryDiEdit->setAutoDefault(false); - horizontalLayout_2->addWidget(RB1NpM); + gridLayout->addWidget(PBBoundaryDiEdit, 0, 3, 1, 1); - RB1NpA = new QRadioButton(GBTypeNoConf); - RB1NpA->setObjectName(QString::fromUtf8("RB1NpA")); + PBBoundaryDiNew = new QPushButton(GBBoundaryD); + PBBoundaryDiNew->setObjectName(QString::fromUtf8("PBBoundaryDiNew")); + PBBoundaryDiNew->setAutoDefault(false); - horizontalLayout_2->addWidget(RB1NpA); + gridLayout->addWidget(PBBoundaryDiNew, 0, 2, 1, 1); - RBQuelconque = new QRadioButton(GBTypeNoConf); - RBQuelconque->setObjectName(QString::fromUtf8("RBQuelconque")); + CBBoundaryDi = new QComboBox(GBBoundaryD); + CBBoundaryDi->setObjectName(QString::fromUtf8("CBBoundaryDi")); + CBBoundaryDi->setSizeAdjustPolicy(QComboBox::AdjustToContents); - horizontalLayout_2->addWidget(RBQuelconque); + gridLayout->addWidget(CBBoundaryDi, 0, 0, 1, 1); + spacerItem5 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout_2->addWidget(GBTypeNoConf, 7, 0, 1, 2); + gridLayout->addItem(spacerItem5, 0, 1, 1, 1); - verticalSpacer_4 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + PBBoundaryDiHelp = new QPushButton(GBBoundaryD); + PBBoundaryDiHelp->setObjectName(QString::fromUtf8("PBBoundaryDiHelp")); + PBBoundaryDiHelp->setAutoDefault(false); - gridLayout_2->addItem(verticalSpacer_4, 8, 0, 1, 1); + gridLayout->addWidget(PBBoundaryDiHelp, 0, 4, 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); + gridLayout_2->addWidget(GBBoundaryD, 11, 0, 1, 3); - CBBoundaryA = new QCheckBox(CreateCase); - CBBoundaryA->setObjectName(QString::fromUtf8("CBBoundaryA")); + GBBoundaryA = new QGroupBox(CreateCase); + GBBoundaryA->setObjectName(QString::fromUtf8("GBBoundaryA")); + GBBoundaryA->setMinimumSize(QSize(548, 200)); + formLayout = new QFormLayout(GBBoundaryA); + formLayout->setObjectName(QString::fromUtf8("formLayout")); + TWBoundary = new QTableWidget(GBBoundaryA); + if (TWBoundary->columnCount() < 1) + TWBoundary->setColumnCount(1); + QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem(); + TWBoundary->setHorizontalHeaderItem(0, __qtablewidgetitem); + TWBoundary->setObjectName(QString::fromUtf8("TWBoundary")); + TWBoundary->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked); + TWBoundary->setShowGrid(true); + TWBoundary->setRowCount(0); + TWBoundary->setColumnCount(1); - horizontalLayout_6->addWidget(CBBoundaryA); + formLayout->setWidget(0, QFormLayout::LabelRole, TWBoundary); + gridLayout1 = new QGridLayout(); +#ifndef Q_OS_MAC + gridLayout1->setSpacing(6); +#endif + gridLayout1->setContentsMargins(0, 0, 0, 0); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + PBBoundaryAnEdit = new QPushButton(GBBoundaryA); + PBBoundaryAnEdit->setObjectName(QString::fromUtf8("PBBoundaryAnEdit")); + PBBoundaryAnEdit->setAutoDefault(false); - gridLayout_2->addLayout(horizontalLayout_6, 9, 0, 1, 1); + gridLayout1->addWidget(PBBoundaryAnEdit, 1, 0, 1, 1); - verticalSpacer_7 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding); + PBBoundaryAnNew = new QPushButton(GBBoundaryA); + PBBoundaryAnNew->setObjectName(QString::fromUtf8("PBBoundaryAnNew")); + PBBoundaryAnNew->setAutoDefault(false); - gridLayout_2->addItem(verticalSpacer_7, 10, 0, 1, 1); + gridLayout1->addWidget(PBBoundaryAnNew, 0, 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); + PBBoundaryAnHelp = new QPushButton(GBBoundaryA); + PBBoundaryAnHelp->setObjectName(QString::fromUtf8("PBBoundaryAnHelp")); + PBBoundaryAnHelp->setAutoDefault(false); - gridLayout_3->addWidget(CBBoundaryDi, 0, 0, 1, 1); + gridLayout1->addWidget(PBBoundaryAnHelp, 2, 0, 1, 1); - spacer_2 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout_3->addItem(spacer_2, 0, 1, 1, 1); + formLayout->setLayout(0, QFormLayout::FieldRole, gridLayout1); - PBBoundaryDiEdit = new QPushButton(GBBoundaryD); - PBBoundaryDiEdit->setObjectName(QString::fromUtf8("PBBoundaryDiEdit")); - PBBoundaryDiEdit->setAutoDefault(false); - gridLayout_3->addWidget(PBBoundaryDiEdit, 0, 2, 1, 1); + gridLayout_2->addWidget(GBBoundaryA, 12, 0, 1, 4); - PBBoundaryDiNew = new QPushButton(GBBoundaryD); - PBBoundaryDiNew->setObjectName(QString::fromUtf8("PBBoundaryDiNew")); - PBBoundaryDiNew->setAutoDefault(false); + spacer = new QSpacerItem(239, 41, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_3->addWidget(PBBoundaryDiNew, 0, 3, 1, 1); + gridLayout_2->addItem(spacer, 13, 0, 1, 1); + CBAdvanced = new QCheckBox(CreateCase); + CBAdvanced->setObjectName(QString::fromUtf8("CBAdvanced")); - gridLayout_2->addWidget(GBBoundaryD, 11, 0, 1, 1); + gridLayout_2->addWidget(CBAdvanced, 14, 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); + GBAdvancedOptions = new QGroupBox(CreateCase); + GBAdvancedOptions->setObjectName(QString::fromUtf8("GBAdvancedOptions")); + gridLayout2 = new QGridLayout(GBAdvancedOptions); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + CBPyramid = new QCheckBox(GBAdvancedOptions); + CBPyramid->setObjectName(QString::fromUtf8("CBPyramid")); - verticalLayout_4->addWidget(PBBoundaryNew); + gridLayout2->addWidget(CBPyramid, 0, 0, 1, 1); - PBBoundaryEdit = new QPushButton(layoutWidget); - PBBoundaryEdit->setObjectName(QString::fromUtf8("PBBoundaryEdit")); - PBBoundaryEdit->setAutoDefault(false); - verticalLayout_4->addWidget(PBBoundaryEdit); + gridLayout_2->addWidget(GBAdvancedOptions, 15, 0, 1, 2); - PBBoundaryDelete = new QPushButton(layoutWidget); - PBBoundaryDelete->setObjectName(QString::fromUtf8("PBBoundaryDelete")); - PBBoundaryDelete->setAutoDefault(false); + spacer_3 = new QSpacerItem(128, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - verticalLayout_4->addWidget(PBBoundaryDelete); + gridLayout_2->addItem(spacer_3, 15, 2, 1, 2); + spacer_4 = new QSpacerItem(239, 41, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addWidget(GBBoundaryA, 12, 0, 1, 2); + gridLayout_2->addItem(spacer_4, 16, 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); + GroupButtons = new QGroupBox(CreateCase); + GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); + gridLayout3 = new QGridLayout(GroupButtons); +#ifndef Q_OS_MAC + gridLayout3->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout3->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + buttonHelp = new QPushButton(GroupButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + buttonHelp->setAutoDefault(false); - gridLayout->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout3->addWidget(buttonHelp, 0, 4, 1, 1); - buttonApply = new QPushButton(GroupButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - buttonApply->setAutoDefault(false); + buttonApply = new QPushButton(GroupButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + buttonApply->setAutoDefault(false); - gridLayout->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout3->addWidget(buttonApply, 0, 1, 1, 1); - buttonCancel = new QPushButton(GroupButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - buttonCancel->setAutoDefault(false); + buttonOk = new QPushButton(GroupButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonOk->setAutoDefault(false); - gridLayout->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout3->addWidget(buttonOk, 0, 0, 1, 1); - buttonHelp = new QPushButton(GroupButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - buttonHelp->setAutoDefault(false); + buttonCancel = new QPushButton(GroupButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setAutoDefault(false); - gridLayout->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout3->addWidget(buttonCancel, 0, 2, 1, 1); - gridLayout_2->addWidget(GroupButtons, 13, 0, 1, 2); + gridLayout_2->addWidget(GroupButtons, 17, 0, 1, 3); - verticalSpacer_5 = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacer_2 = new QSpacerItem(128, 25, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout_2->addItem(verticalSpacer_5, 2, 1, 1, 1); + gridLayout_2->addItem(spacer_2, 17, 3, 1, 1); - retranslateUi(CreateCase); + retranslateUi(CreateCase); - CBBoundaryDi->setCurrentIndex(-1); + CBBoundaryDi->setCurrentIndex(-1); - QMetaObject::connectSlotsByName(CreateCase); + 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); + CreateCase->setWindowTitle(QApplication::translate("CreateCase", "Create a 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", "Analytical 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)); + PBBoundaryDiHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + GBBoundaryA->setTitle(QApplication::translate("CreateCase", "Analytical boundary", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem = TWBoundary->horizontalHeaderItem(0); + ___qtablewidgetitem->setText(QApplication::translate("CreateCase", "a_virer", 0, QApplication::UnicodeUTF8)); + PBBoundaryAnEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8)); + PBBoundaryAnNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); + PBBoundaryAnHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + CBAdvanced->setText(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8)); + GBAdvancedOptions->setTitle(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8)); + CBPyramid->setText(QApplication::translate("CreateCase", "Authorized pyramids", 0, QApplication::UnicodeUTF8)); + GroupButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateCase", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateCase", "OK", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateCase", "Cancel", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; diff --git a/src/HOMARDGUI/CreateCase.ui b/src/HOMARDGUI/CreateCase.ui index abfe1cf8..95204dcd 100644 --- a/src/HOMARDGUI/CreateCase.ui +++ b/src/HOMARDGUI/CreateCase.ui @@ -1,39 +1,46 @@ - + + CreateCase - - + + 0 0 - 589 - 675 + 601 + 1070 - - + + 0 0 - - Create Case + + Create a case - - false + + true - - - + + + + + 6 + + + 0 + - - + + Name - - + + 382 21 @@ -43,28 +50,34 @@ - - + + + + 6 + + + 0 + - - + + Directory - - + + - + false - - + + 382 21 @@ -74,28 +87,47 @@ - - + + + + Qt::Vertical + + + + 20 + 18 + + + + + + + + 6 + + + 0 + - - + + Mesh - - + + - + false - - + + 382 21 @@ -105,12 +137,12 @@ - - - + + + Qt::Vertical - + 20 0 @@ -118,40 +150,44 @@ - - - - Conformity Type + + + + Conformity type - + + + 6 + + + 9 + - - + + Conformal - + true - - + + Non conformal - RBNonConforme - RBConforme - - - + + + Qt::Vertical - + 20 1 @@ -159,42 +195,48 @@ - - - - Non Conformal option + + + + Non conformal option - + + + 6 + + + 9 + - - + + 1 hanging node per mesh - - + + 1 node per edge - - - free + + + Free - - - + + + Qt::Vertical - + 20 0 @@ -202,30 +244,36 @@ - - + + + + 6 + + + 0 + - - - Discrete Boundary + + + Discrete boundary - - - Analytic Boundary + + + Analytical boundary - - - + + + Qt::Vertical - + 20 2 @@ -233,37 +281,63 @@ - - - - + + + + 0 0 - - Discrete Boundary + + Discrete boundary - - - - + + + 9 + + + 6 + + + + + Edit + + + false + + + + + + + New + + + false + + + + + + -1 - + QComboBox::AdjustToContents - - - + + + Qt::Horizontal - + QSizePolicy::Fixed - + 40 13 @@ -271,161 +345,208 @@ - - - - Edit + + + + Help - + false - - - - New + + + + + + + + 548 + 200 + + + + Analytical boundary + + + + + + QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked - - false + + true + + + 0 + + 1 + + + + a_virer + + + + + + 0 + + + 6 + + + + + Edit + + + false + + + + + + + New + + + false + + + + + + + Help + + + false + + + + + - - - + + + + Qt::Vertical + + - 548 - 150 + 239 + 41 - - Analytic Boundary - - - - - 4 - 20 - 371 - 121 - - - - 16 - - - QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked - - - true - - - 0 - - - 2 - - - - Group - - - - - Boundary - - - - - - - 410 - 20 - 120 - 110 - - - - - - - New - - - false - - - - - - - Edit - - - false - - - - - - - - - - false - - - - - + + + + + + Advanced options + + + + + + + Advanced options + + + + + + Authorized pyramids + + + + - - - + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 128 + 13 + + + + + + + + Qt::Vertical + + + + 239 + 41 + + + + + + + - - - - - &Ok + + + 9 + + + 6 + + + + + Help - + false - - - - &Apply + + + + Apply - + false - - - - &Cancel + + + + OK - + false - - - - &Help + + + + Cancel - + false @@ -433,15 +554,18 @@ - - - - Qt::Vertical + + + + Qt::Horizontal - + + QSizePolicy::Fixed + + - 20 - 18 + 128 + 25 diff --git a/src/HOMARDGUI/CreateHypothesis.h b/src/HOMARDGUI/CreateHypothesis.h index 1d10a3f2..e40b04b8 100644 --- a/src/HOMARDGUI/CreateHypothesis.h +++ b/src/HOMARDGUI/CreateHypothesis.h @@ -1,10 +1,10 @@ /******************************************************************************** -** Form generated from reading ui file 'CreateHypothesis.ui' +** 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 +** Created: Wed Apr 11 11:35:26 2012 +** by: Qt User Interface Compiler version 4.6.3 ** -** WARNING! All changes made in this file will be lost when recompiling ui file! +** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef CREATEHYPOTHESIS_H @@ -21,11 +21,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include @@ -34,38 +36,38 @@ QT_BEGIN_NAMESPACE class Ui_CreateHypothesis { public: - QGridLayout *gridLayout_10; - QLabel *Name; + QGridLayout *gridLayout_3; QLineEdit *LEHypothesisName; QGroupBox *GBTypeAdaptation; - QHBoxLayout *horizontalLayout; + QHBoxLayout *hboxLayout; QRadioButton *RBUniforme; QRadioButton *RBChamp; QRadioButton *RBZone; QGroupBox *GBUniform; - QGridLayout *gridLayout_2; + QGridLayout *gridLayout; QRadioButton *RBUniDera; QRadioButton *RBUniRaff; QGroupBox *GBFieldFile; - QGridLayout *gridLayout_9; + QGridLayout *gridLayout1; QLabel *FieldFile; QLineEdit *LEFieldFile; QGroupBox *GBFieldManagement; - QGridLayout *gridLayout_6; - QHBoxLayout *horizontalLayout_6; + QGridLayout *gridLayout2; + QHBoxLayout *hboxLayout1; QLabel *FieldName; QComboBox *CBFieldName; - QSpacerItem *horizontalSpacer_3; - QHBoxLayout *horizontalLayout_7; + QSpacerItem *spacerItem; + QHBoxLayout *hboxLayout2; QTableWidget *TWCMP; - QSpacerItem *horizontalSpacer_4; - QVBoxLayout *verticalLayout_3; - QHBoxLayout *horizontalLayout_3; + QSpacerItem *spacerItem1; + QVBoxLayout *vboxLayout; + QHBoxLayout *hboxLayout3; QRadioButton *RBL2; QRadioButton *RBInf; - QHBoxLayout *horizontalLayout_2; + QCheckBox *CBJump; + QHBoxLayout *hboxLayout4; QGroupBox *GBRefinementThresholds; - QGridLayout *gridLayout; + QGridLayout *gridLayout3; QRadioButton *RBRPE; QDoubleSpinBox *SpinBox_RPE; QRadioButton *RBRRel; @@ -74,7 +76,7 @@ public: QDoubleSpinBox *SpinBox_RAbs; QRadioButton *RBRNo; QGroupBox *GBCoarseningThresholds; - QGridLayout *gridLayout_4; + QGridLayout *gridLayout4; QRadioButton *RBCPE; QDoubleSpinBox *SpinBox_CPE; QRadioButton *RBCRel; @@ -83,499 +85,703 @@ public: QDoubleSpinBox *SpinBox_CAbs; QRadioButton *RBCNo; QGroupBox *GBAreaManagement; - QGridLayout *gridLayout_3; + QGridLayout *gridLayout_4; QTableWidget *TWZone; - QVBoxLayout *verticalLayout_2; - QVBoxLayout *verticalLayout; + QSpacerItem *horizontalSpacer; + QVBoxLayout *vboxLayout1; + QVBoxLayout *vboxLayout2; QPushButton *PBZoneNew; QPushButton *PBZoneEdit; QPushButton *PBZoneDelete; - QSpacerItem *verticalSpacer; + QSpacerItem *spacerItem2; QGroupBox *GBField; - QGridLayout *gridLayout_8; - QGridLayout *gridLayout_7; + QGridLayout *gridLayout5; + QGridLayout *gridLayout6; QRadioButton *RBFieldNo; QRadioButton *RBFieldAll; QRadioButton *RBFieldChosen; QTableWidget *TWField; QCheckBox *CBGroupe; + QCheckBox *CBAdvanced; + QGroupBox *GBAdvancedOptions; + QGridLayout *gridLayout_1; + QLabel *TLMinimalDiameter; + QDoubleSpinBox *doubleSpinBoxDiamMin; + QLabel *TLMaximalLevel; + QSpinBox *spinBoxNivMax; + QGroupBox *GBAdapInit; + QGridLayout *gridLayout_2; + QRadioButton *RBAIN; + QRadioButton *RBAIR; + QRadioButton *RBAID; QGroupBox *GBButtons; - QGridLayout *gridLayout_5; + QGridLayout *gridLayout7; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; QPushButton *buttonHelp; + QLabel *Name; 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); + if (CreateHypothesis->objectName().isEmpty()) + CreateHypothesis->setObjectName(QString::fromUtf8("CreateHypothesis")); + CreateHypothesis->resize(770, 1428); + QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(CreateHypothesis->sizePolicy().hasHeightForWidth()); + CreateHypothesis->setSizePolicy(sizePolicy); + CreateHypothesis->setAutoFillBackground(true); + CreateHypothesis->setSizeGripEnabled(true); + gridLayout_3 = new QGridLayout(CreateHypothesis); + gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + LEHypothesisName = new QLineEdit(CreateHypothesis); + LEHypothesisName->setObjectName(QString::fromUtf8("LEHypothesisName")); + LEHypothesisName->setMinimumSize(QSize(382, 31)); + LEHypothesisName->setMaxLength(32); + + gridLayout_3->addWidget(LEHypothesisName, 0, 1, 1, 1); + + GBTypeAdaptation = new QGroupBox(CreateHypothesis); + GBTypeAdaptation->setObjectName(QString::fromUtf8("GBTypeAdaptation")); + hboxLayout = new QHBoxLayout(GBTypeAdaptation); +#ifndef Q_OS_MAC + hboxLayout->setSpacing(6); +#endif +#ifndef Q_OS_MAC + hboxLayout->setContentsMargins(9, 9, 9, 9); +#endif + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + RBUniforme = new QRadioButton(GBTypeAdaptation); + RBUniforme->setObjectName(QString::fromUtf8("RBUniforme")); + RBUniforme->setCheckable(true); + + hboxLayout->addWidget(RBUniforme); + + RBChamp = new QRadioButton(GBTypeAdaptation); + RBChamp->setObjectName(QString::fromUtf8("RBChamp")); + + hboxLayout->addWidget(RBChamp); + + RBZone = new QRadioButton(GBTypeAdaptation); + RBZone->setObjectName(QString::fromUtf8("RBZone")); + + hboxLayout->addWidget(RBZone); + + + gridLayout_3->addWidget(GBTypeAdaptation, 1, 0, 1, 2); + + GBUniform = new QGroupBox(CreateHypothesis); + GBUniform->setObjectName(QString::fromUtf8("GBUniform")); + gridLayout = new QGridLayout(GBUniform); +#ifndef Q_OS_MAC + gridLayout->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + RBUniDera = new QRadioButton(GBUniform); + RBUniDera->setObjectName(QString::fromUtf8("RBUniDera")); + + gridLayout->addWidget(RBUniDera, 0, 1, 1, 1); + + RBUniRaff = new QRadioButton(GBUniform); + RBUniRaff->setObjectName(QString::fromUtf8("RBUniRaff")); + RBUniRaff->setChecked(true); + + gridLayout->addWidget(RBUniRaff, 0, 0, 1, 1); + + + gridLayout_3->addWidget(GBUniform, 2, 0, 1, 2); + + GBFieldFile = new QGroupBox(CreateHypothesis); + GBFieldFile->setObjectName(QString::fromUtf8("GBFieldFile")); + gridLayout1 = new QGridLayout(GBFieldFile); +#ifndef Q_OS_MAC + gridLayout1->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout1->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + FieldFile = new QLabel(GBFieldFile); + FieldFile->setObjectName(QString::fromUtf8("FieldFile")); + + gridLayout1->addWidget(FieldFile, 0, 0, 1, 1); + + LEFieldFile = new QLineEdit(GBFieldFile); + LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); + LEFieldFile->setMinimumSize(QSize(282, 31)); + + gridLayout1->addWidget(LEFieldFile, 0, 1, 1, 1); + + + gridLayout_3->addWidget(GBFieldFile, 3, 0, 1, 2); + + GBFieldManagement = new QGroupBox(CreateHypothesis); + GBFieldManagement->setObjectName(QString::fromUtf8("GBFieldManagement")); + sizePolicy.setHeightForWidth(GBFieldManagement->sizePolicy().hasHeightForWidth()); + GBFieldManagement->setSizePolicy(sizePolicy); + gridLayout2 = new QGridLayout(GBFieldManagement); +#ifndef Q_OS_MAC + gridLayout2->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout2->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + hboxLayout1 = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout1->setSpacing(6); +#endif +#ifndef Q_OS_MAC + hboxLayout1->setContentsMargins(0, 0, 0, 0); +#endif + hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + FieldName = new QLabel(GBFieldManagement); + FieldName->setObjectName(QString::fromUtf8("FieldName")); + + hboxLayout1->addWidget(FieldName); + + CBFieldName = new QComboBox(GBFieldManagement); + CBFieldName->setObjectName(QString::fromUtf8("CBFieldName")); + sizePolicy.setHeightForWidth(CBFieldName->sizePolicy().hasHeightForWidth()); + CBFieldName->setSizePolicy(sizePolicy); + CBFieldName->setEditable(false); + CBFieldName->setSizeAdjustPolicy(QComboBox::AdjustToContents); + + hboxLayout1->addWidget(CBFieldName); + + spacerItem = new QSpacerItem(48, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + hboxLayout1->addItem(spacerItem); + + + gridLayout2->addLayout(hboxLayout1, 0, 0, 1, 1); + + hboxLayout2 = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout2->setSpacing(6); +#endif + hboxLayout2->setContentsMargins(0, 0, 0, 0); + hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + TWCMP = new QTableWidget(GBFieldManagement); + if (TWCMP->columnCount() < 2) + TWCMP->setColumnCount(2); + QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem(); + TWCMP->setHorizontalHeaderItem(0, __qtablewidgetitem); + QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem(); + TWCMP->setHorizontalHeaderItem(1, __qtablewidgetitem1); + TWCMP->setObjectName(QString::fromUtf8("TWCMP")); + TWCMP->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked); + TWCMP->setShowGrid(true); + TWCMP->setRowCount(0); + TWCMP->setColumnCount(2); - gridLayout_2->addWidget(RBUniRaff, 0, 0, 1, 1); + hboxLayout2->addWidget(TWCMP); + spacerItem1 = new QSpacerItem(60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - gridLayout_10->addWidget(GBUniform, 2, 0, 1, 2); + hboxLayout2->addItem(spacerItem1); - 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")); + vboxLayout = new QVBoxLayout(); +#ifndef Q_OS_MAC + vboxLayout->setSpacing(6); +#endif + vboxLayout->setContentsMargins(0, 0, 0, 0); + vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + hboxLayout3 = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout3->setSpacing(6); +#endif +#ifndef Q_OS_MAC + hboxLayout3->setContentsMargins(0, 0, 0, 0); +#endif + hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + RBL2 = new QRadioButton(GBFieldManagement); + RBL2->setObjectName(QString::fromUtf8("RBL2")); + RBL2->setChecked(true); - gridLayout_9->addWidget(FieldFile, 0, 0, 1, 1); + hboxLayout3->addWidget(RBL2); - LEFieldFile = new QLineEdit(GBFieldFile); - LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); - LEFieldFile->setMinimumSize(QSize(282, 31)); + RBInf = new QRadioButton(GBFieldManagement); + RBInf->setObjectName(QString::fromUtf8("RBInf")); + RBInf->setChecked(false); - gridLayout_9->addWidget(LEFieldFile, 0, 1, 1, 1); + hboxLayout3->addWidget(RBInf); - gridLayout_10->addWidget(GBFieldFile, 3, 0, 1, 2); + vboxLayout->addLayout(hboxLayout3); - 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")); + CBJump = new QCheckBox(GBFieldManagement); + CBJump->setObjectName(QString::fromUtf8("CBJump")); + + vboxLayout->addWidget(CBJump); - 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); + hboxLayout2->addLayout(vboxLayout); - horizontalLayout_6->addWidget(CBFieldName); - horizontalSpacer_3 = new QSpacerItem(48, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + gridLayout2->addLayout(hboxLayout2, 1, 0, 1, 1); - horizontalLayout_6->addItem(horizontalSpacer_3); + hboxLayout4 = new QHBoxLayout(); +#ifndef Q_OS_MAC + hboxLayout4->setSpacing(6); +#endif + hboxLayout4->setContentsMargins(0, 0, 0, 0); + hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + GBRefinementThresholds = new QGroupBox(GBFieldManagement); + GBRefinementThresholds->setObjectName(QString::fromUtf8("GBRefinementThresholds")); + sizePolicy.setHeightForWidth(GBRefinementThresholds->sizePolicy().hasHeightForWidth()); + GBRefinementThresholds->setSizePolicy(sizePolicy); + gridLayout3 = new QGridLayout(GBRefinementThresholds); +#ifndef Q_OS_MAC + gridLayout3->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout3->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + RBRPE = new QRadioButton(GBRefinementThresholds); + RBRPE->setObjectName(QString::fromUtf8("RBRPE")); + RBRPE->setCheckable(true); + RBRPE->setChecked(true); + gridLayout3->addWidget(RBRPE, 0, 0, 1, 1); - gridLayout_6->addLayout(horizontalLayout_6, 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(2); - 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); + gridLayout3->addWidget(SpinBox_RPE, 0, 1, 1, 1); - horizontalLayout_7->addWidget(TWCMP); + RBRRel = new QRadioButton(GBRefinementThresholds); + RBRRel->setObjectName(QString::fromUtf8("RBRRel")); - horizontalSpacer_4 = new QSpacerItem(60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + gridLayout3->addWidget(RBRRel, 1, 0, 1, 1); - horizontalLayout_7->addItem(horizontalSpacer_4); + 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); - 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); + gridLayout3->addWidget(SpinBox_RRel, 1, 1, 1, 1); - horizontalLayout_3->addWidget(RBL2); + RBRAbs = new QRadioButton(GBRefinementThresholds); + RBRAbs->setObjectName(QString::fromUtf8("RBRAbs")); - RBInf = new QRadioButton(GBFieldManagement); - RBInf->setObjectName(QString::fromUtf8("RBInf")); - RBInf->setChecked(false); + gridLayout3->addWidget(RBRAbs, 2, 0, 1, 1); - horizontalLayout_3->addWidget(RBInf); + SpinBox_RAbs = new QDoubleSpinBox(GBRefinementThresholds); + SpinBox_RAbs->setObjectName(QString::fromUtf8("SpinBox_RAbs")); + SpinBox_RAbs->setEnabled(false); + SpinBox_RAbs->setDecimals(8); + SpinBox_RAbs->setMinimum(-1e+12); + SpinBox_RAbs->setMaximum(1e+12); + SpinBox_RAbs->setSingleStep(0.1); + + gridLayout3->addWidget(SpinBox_RAbs, 2, 1, 1, 1); + + RBRNo = new QRadioButton(GBRefinementThresholds); + RBRNo->setObjectName(QString::fromUtf8("RBRNo")); + gridLayout3->addWidget(RBRNo, 3, 0, 1, 1); - verticalLayout_3->addLayout(horizontalLayout_3); + hboxLayout4->addWidget(GBRefinementThresholds); - horizontalLayout_7->addLayout(verticalLayout_3); + GBCoarseningThresholds = new QGroupBox(GBFieldManagement); + GBCoarseningThresholds->setObjectName(QString::fromUtf8("GBCoarseningThresholds")); + gridLayout4 = new QGridLayout(GBCoarseningThresholds); +#ifndef Q_OS_MAC + gridLayout4->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout4->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout4->setObjectName(QString::fromUtf8("gridLayout4")); + RBCPE = new QRadioButton(GBCoarseningThresholds); + RBCPE->setObjectName(QString::fromUtf8("RBCPE")); + RBCPE->setCheckable(true); + RBCPE->setChecked(false); + gridLayout4->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); + + gridLayout4->addWidget(SpinBox_CPE, 0, 1, 1, 1); + + RBCRel = new QRadioButton(GBCoarseningThresholds); + RBCRel->setObjectName(QString::fromUtf8("RBCRel")); + + gridLayout4->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_6->addLayout(horizontalLayout_7, 1, 0, 1, 1); + gridLayout4->addWidget(SpinBox_CRel, 1, 1, 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); + RBCAbs = new QRadioButton(GBCoarseningThresholds); + RBCAbs->setObjectName(QString::fromUtf8("RBCAbs")); - gridLayout->addWidget(RBRPE, 0, 0, 1, 1); + gridLayout4->addWidget(RBCAbs, 2, 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); + SpinBox_CAbs = new QDoubleSpinBox(GBCoarseningThresholds); + SpinBox_CAbs->setObjectName(QString::fromUtf8("SpinBox_CAbs")); + SpinBox_CAbs->setEnabled(false); + SpinBox_CAbs->setDecimals(8); + SpinBox_CAbs->setMinimum(-1e+12); + SpinBox_CAbs->setMaximum(1e+12); + SpinBox_CAbs->setSingleStep(0.1); - gridLayout->addWidget(SpinBox_RPE, 0, 1, 1, 1); + gridLayout4->addWidget(SpinBox_CAbs, 2, 1, 1, 1); - RBRRel = new QRadioButton(GBRefinementThresholds); - RBRRel->setObjectName(QString::fromUtf8("RBRRel")); + RBCNo = new QRadioButton(GBCoarseningThresholds); + RBCNo->setObjectName(QString::fromUtf8("RBCNo")); + RBCNo->setChecked(true); - gridLayout->addWidget(RBRRel, 1, 0, 1, 1); + gridLayout4->addWidget(RBCNo, 3, 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); + hboxLayout4->addWidget(GBCoarseningThresholds); - RBRAbs = new QRadioButton(GBRefinementThresholds); - RBRAbs->setObjectName(QString::fromUtf8("RBRAbs")); - gridLayout->addWidget(RBRAbs, 2, 0, 1, 1); + gridLayout2->addLayout(hboxLayout4, 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); + gridLayout_3->addWidget(GBFieldManagement, 4, 0, 1, 2); - RBRNo = new QRadioButton(GBRefinementThresholds); - RBRNo->setObjectName(QString::fromUtf8("RBRNo")); + GBAreaManagement = new QGroupBox(CreateHypothesis); + GBAreaManagement->setObjectName(QString::fromUtf8("GBAreaManagement")); + sizePolicy.setHeightForWidth(GBAreaManagement->sizePolicy().hasHeightForWidth()); + GBAreaManagement->setSizePolicy(sizePolicy); + gridLayout_4 = new QGridLayout(GBAreaManagement); + gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + TWZone = new QTableWidget(GBAreaManagement); + if (TWZone->columnCount() < 3) + TWZone->setColumnCount(3); + QTableWidgetItem *__qtablewidgetitem2 = new QTableWidgetItem(); + TWZone->setHorizontalHeaderItem(0, __qtablewidgetitem2); + QTableWidgetItem *__qtablewidgetitem3 = new QTableWidgetItem(); + TWZone->setHorizontalHeaderItem(1, __qtablewidgetitem3); + QTableWidgetItem *__qtablewidgetitem4 = new QTableWidgetItem(); + TWZone->setHorizontalHeaderItem(2, __qtablewidgetitem4); + TWZone->setObjectName(QString::fromUtf8("TWZone")); + TWZone->setMinimumSize(QSize(400, 0)); + TWZone->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked); + TWZone->setShowGrid(true); + TWZone->setRowCount(0); + TWZone->setColumnCount(3); - gridLayout->addWidget(RBRNo, 3, 0, 1, 1); + gridLayout_4->addWidget(TWZone, 0, 0, 1, 1); + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_2->addWidget(GBRefinementThresholds); + gridLayout_4->addItem(horizontalSpacer, 0, 1, 1, 1); - 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); + vboxLayout1 = new QVBoxLayout(); +#ifndef Q_OS_MAC + vboxLayout1->setSpacing(6); +#endif + vboxLayout1->setContentsMargins(0, 0, 0, 0); + vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout2 = new QVBoxLayout(); +#ifndef Q_OS_MAC + vboxLayout2->setSpacing(6); +#endif +#ifndef Q_OS_MAC + vboxLayout2->setContentsMargins(0, 0, 0, 0); +#endif + vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + PBZoneNew = new QPushButton(GBAreaManagement); + PBZoneNew->setObjectName(QString::fromUtf8("PBZoneNew")); - gridLayout_4->addWidget(RBCPE, 0, 0, 1, 1); + vboxLayout2->addWidget(PBZoneNew); - 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); + PBZoneEdit = new QPushButton(GBAreaManagement); + PBZoneEdit->setObjectName(QString::fromUtf8("PBZoneEdit")); - gridLayout_4->addWidget(SpinBox_CPE, 0, 1, 1, 1); + vboxLayout2->addWidget(PBZoneEdit); - RBCRel = new QRadioButton(GBCoarseningThresholds); - RBCRel->setObjectName(QString::fromUtf8("RBCRel")); + PBZoneDelete = new QPushButton(GBAreaManagement); + PBZoneDelete->setObjectName(QString::fromUtf8("PBZoneDelete")); - gridLayout_4->addWidget(RBCRel, 1, 0, 1, 1); + vboxLayout2->addWidget(PBZoneDelete); - 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); + vboxLayout1->addLayout(vboxLayout2); - RBCAbs = new QRadioButton(GBCoarseningThresholds); - RBCAbs->setObjectName(QString::fromUtf8("RBCAbs")); + spacerItem2 = new QSpacerItem(20, 48, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_4->addWidget(RBCAbs, 2, 0, 1, 1); + vboxLayout1->addItem(spacerItem2); - 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); + gridLayout_4->addLayout(vboxLayout1, 0, 2, 1, 1); - RBCNo = new QRadioButton(GBCoarseningThresholds); - RBCNo->setObjectName(QString::fromUtf8("RBCNo")); - RBCNo->setChecked(true); - gridLayout_4->addWidget(RBCNo, 3, 0, 1, 1); + gridLayout_3->addWidget(GBAreaManagement, 5, 0, 1, 2); + GBField = new QGroupBox(CreateHypothesis); + GBField->setObjectName(QString::fromUtf8("GBField")); + gridLayout5 = new QGridLayout(GBField); +#ifndef Q_OS_MAC + gridLayout5->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout5->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout5->setObjectName(QString::fromUtf8("gridLayout5")); + gridLayout6 = new QGridLayout(); +#ifndef Q_OS_MAC + gridLayout6->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout6->setContentsMargins(0, 0, 0, 0); +#endif + gridLayout6->setObjectName(QString::fromUtf8("gridLayout6")); + RBFieldNo = new QRadioButton(GBField); + RBFieldNo->setObjectName(QString::fromUtf8("RBFieldNo")); + RBFieldNo->setChecked(true); - horizontalLayout_2->addWidget(GBCoarseningThresholds); + gridLayout6->addWidget(RBFieldNo, 0, 0, 1, 1); + RBFieldAll = new QRadioButton(GBField); + RBFieldAll->setObjectName(QString::fromUtf8("RBFieldAll")); + RBFieldAll->setChecked(false); - gridLayout_6->addLayout(horizontalLayout_2, 2, 0, 1, 1); + gridLayout6->addWidget(RBFieldAll, 0, 1, 1, 1); + RBFieldChosen = new QRadioButton(GBField); + RBFieldChosen->setObjectName(QString::fromUtf8("RBFieldChosen")); + RBFieldChosen->setChecked(false); - gridLayout_10->addWidget(GBFieldManagement, 4, 0, 1, 2); + gridLayout6->addWidget(RBFieldChosen, 0, 2, 1, 1); - 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); + gridLayout5->addLayout(gridLayout6, 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")); + TWField = new QTableWidget(GBField); + if (TWField->columnCount() < 2) + TWField->setColumnCount(2); + QTableWidgetItem *__qtablewidgetitem5 = new QTableWidgetItem(); + TWField->setHorizontalHeaderItem(0, __qtablewidgetitem5); + QTableWidgetItem *__qtablewidgetitem6 = new QTableWidgetItem(); + TWField->setHorizontalHeaderItem(1, __qtablewidgetitem6); + TWField->setObjectName(QString::fromUtf8("TWField")); - verticalLayout->addWidget(PBZoneNew); + gridLayout5->addWidget(TWField, 1, 0, 1, 1); - PBZoneEdit = new QPushButton(GBAreaManagement); - PBZoneEdit->setObjectName(QString::fromUtf8("PBZoneEdit")); - verticalLayout->addWidget(PBZoneEdit); + gridLayout_3->addWidget(GBField, 6, 0, 1, 2); - PBZoneDelete = new QPushButton(GBAreaManagement); - PBZoneDelete->setObjectName(QString::fromUtf8("PBZoneDelete")); + CBGroupe = new QCheckBox(CreateHypothesis); + CBGroupe->setObjectName(QString::fromUtf8("CBGroupe")); - verticalLayout->addWidget(PBZoneDelete); + gridLayout_3->addWidget(CBGroupe, 7, 0, 1, 2); + CBAdvanced = new QCheckBox(CreateHypothesis); + CBAdvanced->setObjectName(QString::fromUtf8("CBAdvanced")); - verticalLayout_2->addLayout(verticalLayout); + gridLayout_3->addWidget(CBAdvanced, 8, 0, 1, 2); - verticalSpacer = new QSpacerItem(20, 48, QSizePolicy::Minimum, QSizePolicy::Expanding); + GBAdvancedOptions = new QGroupBox(CreateHypothesis); + GBAdvancedOptions->setObjectName(QString::fromUtf8("GBAdvancedOptions")); + gridLayout_1 = new QGridLayout(GBAdvancedOptions); + gridLayout_1->setObjectName(QString::fromUtf8("gridLayout_1")); + TLMinimalDiameter = new QLabel(GBAdvancedOptions); + TLMinimalDiameter->setObjectName(QString::fromUtf8("TLMinimalDiameter")); + sizePolicy.setHeightForWidth(TLMinimalDiameter->sizePolicy().hasHeightForWidth()); + TLMinimalDiameter->setSizePolicy(sizePolicy); + TLMinimalDiameter->setWordWrap(false); - verticalLayout_2->addItem(verticalSpacer); + gridLayout_1->addWidget(TLMinimalDiameter, 0, 0, 1, 1); + doubleSpinBoxDiamMin = new QDoubleSpinBox(GBAdvancedOptions); + doubleSpinBoxDiamMin->setObjectName(QString::fromUtf8("doubleSpinBoxDiamMin")); + doubleSpinBoxDiamMin->setDecimals(5); - gridLayout_3->addLayout(verticalLayout_2, 0, 1, 1, 1); + gridLayout_1->addWidget(doubleSpinBoxDiamMin, 0, 1, 1, 1); + TLMaximalLevel = new QLabel(GBAdvancedOptions); + TLMaximalLevel->setObjectName(QString::fromUtf8("TLMaximalLevel")); + sizePolicy.setHeightForWidth(TLMaximalLevel->sizePolicy().hasHeightForWidth()); + TLMaximalLevel->setSizePolicy(sizePolicy); + TLMaximalLevel->setWordWrap(false); - gridLayout_10->addWidget(GBAreaManagement, 5, 0, 1, 2); + gridLayout_1->addWidget(TLMaximalLevel, 1, 0, 1, 1); - 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); + spinBoxNivMax = new QSpinBox(GBAdvancedOptions); + spinBoxNivMax->setObjectName(QString::fromUtf8("spinBoxNivMax")); + spinBoxNivMax->setValue(99); - gridLayout_7->addWidget(RBFieldNo, 0, 0, 1, 1); + gridLayout_1->addWidget(spinBoxNivMax, 1, 1, 1, 1); - RBFieldAll = new QRadioButton(GBField); - RBFieldAll->setObjectName(QString::fromUtf8("RBFieldAll")); - RBFieldAll->setChecked(false); + GBAdapInit = new QGroupBox(GBAdvancedOptions); + GBAdapInit->setObjectName(QString::fromUtf8("GBAdapInit")); + gridLayout_2 = new QGridLayout(GBAdapInit); + gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + RBAIN = new QRadioButton(GBAdapInit); + RBAIN->setObjectName(QString::fromUtf8("RBAIN")); + RBAIN->setChecked(true); - gridLayout_7->addWidget(RBFieldAll, 0, 1, 1, 1); + gridLayout_2->addWidget(RBAIN, 0, 0, 1, 1); - RBFieldChosen = new QRadioButton(GBField); - RBFieldChosen->setObjectName(QString::fromUtf8("RBFieldChosen")); - RBFieldChosen->setChecked(false); + RBAIR = new QRadioButton(GBAdapInit); + RBAIR->setObjectName(QString::fromUtf8("RBAIR")); - gridLayout_7->addWidget(RBFieldChosen, 0, 2, 1, 1); + gridLayout_2->addWidget(RBAIR, 0, 1, 1, 1); + RBAID = new QRadioButton(GBAdapInit); + RBAID->setObjectName(QString::fromUtf8("RBAID")); - gridLayout_8->addLayout(gridLayout_7, 0, 0, 1, 1); + gridLayout_2->addWidget(RBAID, 0, 2, 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_1->addWidget(GBAdapInit, 2, 0, 1, 2); - gridLayout_10->addWidget(GBField, 6, 0, 1, 2); + gridLayout_3->addWidget(GBAdvancedOptions, 9, 0, 1, 2); - CBGroupe = new QCheckBox(CreateHypothesis); - CBGroupe->setObjectName(QString::fromUtf8("CBGroupe")); + GBButtons = new QGroupBox(CreateHypothesis); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + gridLayout7 = new QGridLayout(GBButtons); +#ifndef Q_OS_MAC + gridLayout7->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout7->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout7->setObjectName(QString::fromUtf8("gridLayout7")); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout_10->addWidget(CBGroupe, 7, 0, 1, 2); + gridLayout7->addWidget(buttonOk, 0, 0, 1, 1); - 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")); + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout7->addWidget(buttonApply, 0, 1, 1, 1); - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout7->addWidget(buttonCancel, 0, 2, 1, 1); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout7->addWidget(buttonHelp, 0, 3, 1, 1); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout_3->addWidget(GBButtons, 10, 0, 1, 2); + Name = new QLabel(CreateHypothesis); + Name->setObjectName(QString::fromUtf8("Name")); - gridLayout_10->addWidget(GBButtons, 8, 0, 1, 2); + gridLayout_3->addWidget(Name, 0, 0, 1, 1); + LEHypothesisName->raise(); + GBTypeAdaptation->raise(); + GBUniform->raise(); + GBFieldFile->raise(); + GBFieldManagement->raise(); + GBAreaManagement->raise(); + GBField->raise(); + CBGroupe->raise(); + CBAdvanced->raise(); + GBAdvancedOptions->raise(); + GBButtons->raise(); + Name->raise(); - retranslateUi(CreateHypothesis); + retranslateUi(CreateHypothesis); - QMetaObject::connectSlotsByName(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); + CreateHypothesis->setWindowTitle(QApplication::translate("CreateHypothesis", "Create an hypothesis", 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", "Driven by 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)); + QTableWidgetItem *___qtablewidgetitem = TWCMP->horizontalHeaderItem(0); + ___qtablewidgetitem->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem1 = TWCMP->horizontalHeaderItem(1); + ___qtablewidgetitem1->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)); + CBJump->setText(QApplication::translate("CreateHypothesis", "Jump between elements", 0, QApplication::UnicodeUTF8)); + GBRefinementThresholds->setTitle(QApplication::translate("CreateHypothesis", "Refinement threshold", 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 threshold", 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", "Zone management", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem2 = TWZone->horizontalHeaderItem(0); + ___qtablewidgetitem2->setText(QApplication::translate("CreateHypothesis", "Refinement", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem3 = TWZone->horizontalHeaderItem(1); + ___qtablewidgetitem3->setText(QApplication::translate("CreateHypothesis", "Coarsening", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem4 = TWZone->horizontalHeaderItem(2); + ___qtablewidgetitem4->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)); + QTableWidgetItem *___qtablewidgetitem5 = TWField->horizontalHeaderItem(0); + ___qtablewidgetitem5->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem6 = TWField->horizontalHeaderItem(1); + ___qtablewidgetitem6->setText(QApplication::translate("CreateHypothesis", "Field Name", 0, QApplication::UnicodeUTF8)); + CBGroupe->setText(QApplication::translate("CreateHypothesis", "Filtering with groups", 0, QApplication::UnicodeUTF8)); + CBAdvanced->setText(QApplication::translate("CreateHypothesis", "Advanced options", 0, QApplication::UnicodeUTF8)); + GBAdvancedOptions->setTitle(QApplication::translate("CreateHypothesis", "Advanced options", 0, QApplication::UnicodeUTF8)); + TLMinimalDiameter->setText(QApplication::translate("CreateHypothesis", "Minimal diameter", 0, QApplication::UnicodeUTF8)); + TLMaximalLevel->setText(QApplication::translate("CreateHypothesis", "Maximal level", 0, QApplication::UnicodeUTF8)); + GBAdapInit->setTitle(QApplication::translate("CreateHypothesis", "Initialization of adaptation", 0, QApplication::UnicodeUTF8)); + RBAIN->setText(QApplication::translate("CreateHypothesis", "Nothing", 0, QApplication::UnicodeUTF8)); + RBAIR->setText(QApplication::translate("CreateHypothesis", "Refinement", 0, QApplication::UnicodeUTF8)); + RBAID->setText(QApplication::translate("CreateHypothesis", "Coarsening", 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)); + Name->setText(QApplication::translate("CreateHypothesis", "Name", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; diff --git a/src/HOMARDGUI/CreateHypothesis.ui b/src/HOMARDGUI/CreateHypothesis.ui index 7e5bc80e..686a25ab 100644 --- a/src/HOMARDGUI/CreateHypothesis.ui +++ b/src/HOMARDGUI/CreateHypothesis.ui @@ -1,76 +1,76 @@ - + + CreateHypothesis - - + + 0 0 - 717 - 1005 + 770 + 1428 - - + + 0 0 - - Create Hypothesis + + Create an hypothesis - - false + + true - + true - - - - - Name - - - - - - + + + + 382 31 - + 32 - - - + + + Type of adaptation - + + + 6 + + + 9 + - - + + Uniform - + true - - - Following a field + + + Driven by a field - - + + With geometrical zones @@ -78,25 +78,31 @@ - - - + + + Uniform adaptation - - - - + + + 9 + + + 6 + + + + Coarsening - - - + + + Refinement - + true @@ -104,22 +110,28 @@ - - - + + + - - - - + + + 9 + + + 6 + + + + File of the fields - - - + + + 282 31 @@ -130,49 +142,61 @@ - - - - + + + + 0 0 - + Governing field for the adaptation - - - + + + 9 + + + 6 + + + + + 6 + + + 0 + - - - Field Name + + + Field name - - - + + + 0 0 - + false - + QComboBox::AdjustToContents - - + + Qt::Horizontal - + 48 20 @@ -182,40 +206,46 @@ - - + + + + 6 + + + 0 + - - + + QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked - + true - + 0 - + 2 - + Selection - + Component - - + + Qt::Horizontal - + 60 20 @@ -224,133 +254,167 @@ - + + + 6 + + + 0 + - + + + 6 + + + 0 + - - + + L2 norm - + true - - + + Infinite norm - + false + + + + Jump between elements + + + - - + + + + 6 + + + 0 + - - - + + + 0 0 - - Refinement thresholds + + Refinement threshold - - - - + + + 9 + + + 6 + + + + Percentage of meshes - + true - + true - - - + + + % - + 3 - + 100.000000000000000 - + 0.100000000000000 - - 3.000000000000000 + + 2.000000000000000 - - - + + + Relative - - - + + + false - + % - + 3 - + 100.000000000000000 - + 0.100000000000000 - - - + + + Absolute - - - + + + false - - 3 + + 8 - - 100.000000000000000 + + -1000000000000.000000000000000 + + + 1000000000000.000000000000000 - + 0.100000000000000 - - - + + + No refinement @@ -359,98 +423,107 @@ - - - Coarsening thresholds + + + Coarsening threshold - - - - + + + 9 + + + 6 + + + + Percentage of meshes - + true - + false - - - + + + false - + % - + 3 - + 100.000000000000000 - + 0.100000000000000 - - - + + + Relative - - - + + + false - + % - + 3 - + 100.000000000000000 - + 0.100000000000000 - - - + + + Absolute - - - + + + false - - 3 + + 8 - - 100.000000000000000 + + -1000000000000.000000000000000 + + + 1000000000000.000000000000000 - + 0.100000000000000 - - - + + + No coarsening - + true @@ -463,65 +536,101 @@ - - - - + + + + 0 0 - - Area management + + Zone management - - - - + + + + + + 400 + 0 + + + QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked - + true - + 0 - - 2 + + 3 - - Selection + + Refinement - + + Coarsening + + + + Zone name - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 6 + + + 0 + - + + + 6 + + + 0 + - - + + New - - + + Edit - - + + @@ -529,11 +638,11 @@ - - + + Qt::Vertical - + 20 48 @@ -546,55 +655,67 @@ - - - + + + Field Interpolation - - - - - - + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + None - + true - - - + + + All - + false - - - + + + Chosen - + false - - + + - + Selection - + Field Name @@ -603,51 +724,172 @@ - - - + + + Filtering with groups - - - + + + + Advanced options + + + + + + + Advanced options + + + + + + + 0 + 0 + + + + Minimal diameter + + + false + + + + + + + 5 + + + + + + + + 0 + 0 + + + + Maximal level + + + false + + + + + + + 99 + + + + + + + Initialization of adaptation + + + + + + Nothing + + + true + + + + + + + Refinement + + + + + + + Coarsening + + + + + + + + + + + + - - - - - &Ok + + + 9 + + + 6 + + + + + OK - - - - &Apply + + + + Apply - - - - &Cancel + + + + Cancel - - - - &Help + + + + Help + + + + Name + + + + LEHypothesisName + GBTypeAdaptation + GBUniform + GBFieldFile + GBFieldManagement + GBAreaManagement + GBField + CBGroupe + CBAdvanced + GBAdvancedOptions + GBButtons + + Name diff --git a/src/HOMARDGUI/CreateIteration.h b/src/HOMARDGUI/CreateIteration.h index a1d65484..c3e48c90 100644 --- a/src/HOMARDGUI/CreateIteration.h +++ b/src/HOMARDGUI/CreateIteration.h @@ -1,10 +1,10 @@ /******************************************************************************** -** Form generated from reading ui file 'CreateIteration.ui' +** 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 +** Created: Wed Apr 11 11:35:39 2012 +** by: Qt User Interface Compiler version 4.6.3 ** -** WARNING! All changes made in this file will be lost when recompiling ui file! +** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef CREATEITERATION_H @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -30,46 +31,46 @@ QT_BEGIN_NAMESPACE class Ui_CreateIteration { public: - QGridLayout *gridLayout_2; + QGridLayout *gridLayout; + QGroupBox *GBField; + QGridLayout *gridLayout1; + QLineEdit *LEFieldFile; + QSpacerItem *spacerItem; + QRadioButton *RBChosen; + QSpacerItem *spacerItem1; + QSpinBox *SpinBox_Rank; + QLabel *Rank; + QSpacerItem *spacerItem2; + QSpinBox *SpinBox_TimeStep; + QLabel *TimeStep; + QSpacerItem *spacerItem3; + QRadioButton *RBLast; + QRadioButton *RBNo; + QPushButton *PushFieldFile; + QLabel *FieldFile; QLabel *Iteration_Name; QLineEdit *LEIterationName; QLabel *Iter_Parent; - QSpacerItem *verticalSpacer; + QSpacerItem *spacerItem4; QPushButton *PBIterParent; QLineEdit *LEIterationParentName; QLabel *Mesh_n; - QSpacerItem *verticalSpacer_6; + QSpacerItem *spacerItem5; QLineEdit *LEMeshName_n; - QSpacerItem *verticalSpacer_1; + QSpacerItem *spacerItem6; 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; + QSpacerItem *spacerItem7; + QSpacerItem *spacerItem8; QGroupBox *Hypothese; - QGridLayout *gridLayout_3; + QGridLayout *gridLayout2; QComboBox *CBHypothese; - QSpacerItem *spacer_2; + QSpacerItem *spacerItem9; QPushButton *PBHypoEdit; QPushButton *PBHypoNew; - QSpacerItem *verticalSpacer_5; + QSpacerItem *spacerItem10; QGroupBox *GroupButtons; - QGridLayout *gridLayout_4; + QGridLayout *gridLayout3; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; @@ -77,264 +78,287 @@ public: 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")); + if (CreateIteration->objectName().isEmpty()) + CreateIteration->setObjectName(QString::fromUtf8("CreateIteration")); + CreateIteration->resize(610, 598); + gridLayout = new QGridLayout(CreateIteration); +#ifndef Q_OS_MAC + gridLayout->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + GBField = new QGroupBox(CreateIteration); + GBField->setObjectName(QString::fromUtf8("GBField")); + gridLayout1 = new QGridLayout(GBField); +#ifndef Q_OS_MAC + gridLayout1->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout1->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + LEFieldFile = new QLineEdit(GBField); + LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); + LEFieldFile->setMinimumSize(QSize(282, 21)); - gridLayout_2->addWidget(Iteration_Name, 0, 0, 1, 2); + gridLayout1->addWidget(LEFieldFile, 0, 2, 1, 5); - LEIterationName = new QLineEdit(CreateIteration); - LEIterationName->setObjectName(QString::fromUtf8("LEIterationName")); - LEIterationName->setMinimumSize(QSize(290, 21)); - LEIterationName->setMaxLength(200); + spacerItem = new QSpacerItem(138, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addWidget(LEIterationName, 0, 2, 1, 2); + gridLayout1->addItem(spacerItem, 1, 3, 1, 4); - Iter_Parent = new QLabel(CreateIteration); - Iter_Parent->setObjectName(QString::fromUtf8("Iter_Parent")); + RBChosen = new QRadioButton(GBField); + RBChosen->setObjectName(QString::fromUtf8("RBChosen")); - gridLayout_2->addWidget(Iter_Parent, 1, 0, 1, 1); + gridLayout1->addWidget(RBChosen, 2, 6, 1, 1); - verticalSpacer = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(255, 13, QSizePolicy::Expanding, QSizePolicy::Minimum); - gridLayout_2->addItem(verticalSpacer, 1, 1, 1, 1); + gridLayout1->addItem(spacerItem1, 4, 6, 1, 1); - PBIterParent = new QPushButton(CreateIteration); - PBIterParent->setObjectName(QString::fromUtf8("PBIterParent")); - PBIterParent->setEnabled(true); - PBIterParent->setMaximumSize(QSize(50, 27)); + SpinBox_Rank = new QSpinBox(GBField); + SpinBox_Rank->setObjectName(QString::fromUtf8("SpinBox_Rank")); + SpinBox_Rank->setMaximum(1010000); + SpinBox_Rank->setMinimum(-1); + SpinBox_Rank->setValue(1); - gridLayout_2->addWidget(PBIterParent, 1, 2, 1, 1); + gridLayout1->addWidget(SpinBox_Rank, 4, 5, 1, 1); - LEIterationParentName = new QLineEdit(CreateIteration); - LEIterationParentName->setObjectName(QString::fromUtf8("LEIterationParentName")); - LEIterationParentName->setMinimumSize(QSize(0, 21)); - LEIterationParentName->setMaxLength(200); - LEIterationParentName->setReadOnly(true); + Rank = new QLabel(GBField); + Rank->setObjectName(QString::fromUtf8("Rank")); - gridLayout_2->addWidget(LEIterationParentName, 1, 3, 1, 1); + gridLayout1->addWidget(Rank, 4, 4, 1, 1); - Mesh_n = new QLabel(CreateIteration); - Mesh_n->setObjectName(QString::fromUtf8("Mesh_n")); + spacerItem2 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout_2->addWidget(Mesh_n, 2, 0, 1, 1); + gridLayout1->addItem(spacerItem2, 4, 2, 1, 2); - verticalSpacer_6 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); + SpinBox_TimeStep = new QSpinBox(GBField); + SpinBox_TimeStep->setObjectName(QString::fromUtf8("SpinBox_TimeStep")); + SpinBox_TimeStep->setMaximum(100000); + SpinBox_TimeStep->setMinimum(-2); + SpinBox_TimeStep->setValue(-1); - gridLayout_2->addItem(verticalSpacer_6, 2, 1, 1, 1); + gridLayout1->addWidget(SpinBox_TimeStep, 4, 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); + TimeStep = new QLabel(GBField); + TimeStep->setObjectName(QString::fromUtf8("TimeStep")); - gridLayout_2->addWidget(LEMeshName_n, 2, 2, 1, 2); + gridLayout1->addWidget(TimeStep, 4, 0, 1, 1); - verticalSpacer_1 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem3 = new QSpacerItem(138, 28, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_1, 3, 1, 1, 1); + gridLayout1->addItem(spacerItem3, 3, 0, 1, 4); - Mesh_np1 = new QLabel(CreateIteration); - Mesh_np1->setObjectName(QString::fromUtf8("Mesh_np1")); + RBLast = new QRadioButton(GBField); + RBLast->setObjectName(QString::fromUtf8("RBLast")); - gridLayout_2->addWidget(Mesh_np1, 4, 0, 1, 2); + gridLayout1->addWidget(RBLast, 2, 3, 1, 3); - LEMeshName_np1 = new QLineEdit(CreateIteration); - LEMeshName_np1->setObjectName(QString::fromUtf8("LEMeshName_np1")); - LEMeshName_np1->setMinimumSize(QSize(290, 21)); - LEMeshName_np1->setMaxLength(32); + RBNo = new QRadioButton(GBField); + RBNo->setObjectName(QString::fromUtf8("RBNo")); + RBNo->setCheckable(true); + RBNo->setChecked(true); - gridLayout_2->addWidget(LEMeshName_np1, 4, 2, 1, 2); + gridLayout1->addWidget(RBNo, 2, 0, 1, 3); - verticalSpacer_3 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); + PushFieldFile = new QPushButton(GBField); + PushFieldFile->setObjectName(QString::fromUtf8("PushFieldFile")); - gridLayout_2->addItem(verticalSpacer_3, 5, 1, 1, 1); + gridLayout1->addWidget(PushFieldFile, 0, 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")); + FieldFile = new QLabel(GBField); + FieldFile->setObjectName(QString::fromUtf8("FieldFile")); - gridLayout->addWidget(FieldFile, 0, 0, 1, 1); + gridLayout1->addWidget(FieldFile, 0, 0, 1, 1); - PushFieldFile = new QPushButton(GBField); - PushFieldFile->setObjectName(QString::fromUtf8("PushFieldFile")); - gridLayout->addWidget(PushFieldFile, 0, 1, 1, 1); + gridLayout->addWidget(GBField, 6, 0, 1, 4); - LEFieldFile = new QLineEdit(GBField); - LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); - LEFieldFile->setMinimumSize(QSize(282, 21)); + Iteration_Name = new QLabel(CreateIteration); + Iteration_Name->setObjectName(QString::fromUtf8("Iteration_Name")); - gridLayout->addWidget(LEFieldFile, 0, 2, 1, 6); + gridLayout->addWidget(Iteration_Name, 0, 0, 1, 2); - verticalSpacer_7 = new QSpacerItem(138, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); + LEIterationName = new QLineEdit(CreateIteration); + LEIterationName->setObjectName(QString::fromUtf8("LEIterationName")); + LEIterationName->setMinimumSize(QSize(290, 21)); + LEIterationName->setMaxLength(200); - gridLayout->addItem(verticalSpacer_7, 1, 3, 1, 4); + gridLayout->addWidget(LEIterationName, 0, 2, 1, 2); - RBNo = new QRadioButton(GBField); - RBNo->setObjectName(QString::fromUtf8("RBNo")); - RBNo->setCheckable(true); - RBNo->setChecked(true); + Iter_Parent = new QLabel(CreateIteration); + Iter_Parent->setObjectName(QString::fromUtf8("Iter_Parent")); - gridLayout->addWidget(RBNo, 2, 0, 1, 3); + gridLayout->addWidget(Iter_Parent, 1, 0, 1, 1); - RBLast = new QRadioButton(GBField); - RBLast->setObjectName(QString::fromUtf8("RBLast")); + spacerItem4 = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addWidget(RBLast, 2, 3, 1, 3); + gridLayout->addItem(spacerItem4, 1, 1, 1, 1); - RBChosen = new QRadioButton(GBField); - RBChosen->setObjectName(QString::fromUtf8("RBChosen")); + PBIterParent = new QPushButton(CreateIteration); + PBIterParent->setObjectName(QString::fromUtf8("PBIterParent")); + PBIterParent->setEnabled(true); + PBIterParent->setMaximumSize(QSize(50, 27)); - gridLayout->addWidget(RBChosen, 2, 7, 1, 1); + gridLayout->addWidget(PBIterParent, 1, 2, 1, 1); - verticalSpacer_4 = new QSpacerItem(138, 28, QSizePolicy::Minimum, QSizePolicy::Expanding); + LEIterationParentName = new QLineEdit(CreateIteration); + LEIterationParentName->setObjectName(QString::fromUtf8("LEIterationParentName")); + LEIterationParentName->setMinimumSize(QSize(0, 21)); + LEIterationParentName->setMaxLength(200); + LEIterationParentName->setReadOnly(true); - gridLayout->addItem(verticalSpacer_4, 3, 0, 1, 4); + gridLayout->addWidget(LEIterationParentName, 1, 3, 1, 1); - TimeStep = new QLabel(GBField); - TimeStep->setObjectName(QString::fromUtf8("TimeStep")); + Mesh_n = new QLabel(CreateIteration); + Mesh_n->setObjectName(QString::fromUtf8("Mesh_n")); - gridLayout->addWidget(TimeStep, 4, 0, 1, 1); + gridLayout->addWidget(Mesh_n, 2, 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); + spacerItem5 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addWidget(SpinBox_TimeStep, 4, 1, 1, 1); + gridLayout->addItem(spacerItem5, 2, 1, 1, 1); - spacer = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); + 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->addItem(spacer, 4, 2, 1, 2); + gridLayout->addWidget(LEMeshName_n, 2, 2, 1, 2); - Rank = new QLabel(GBField); - Rank->setObjectName(QString::fromUtf8("Rank")); + spacerItem6 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addWidget(Rank, 4, 4, 1, 1); + gridLayout->addItem(spacerItem6, 3, 1, 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); + Mesh_np1 = new QLabel(CreateIteration); + Mesh_np1->setObjectName(QString::fromUtf8("Mesh_np1")); - gridLayout->addWidget(SpinBox_Rank, 4, 5, 1, 1); + gridLayout->addWidget(Mesh_np1, 4, 0, 1, 2); - spacer_3 = new QSpacerItem(255, 13, QSizePolicy::Expanding, QSizePolicy::Minimum); + LEMeshName_np1 = new QLineEdit(CreateIteration); + LEMeshName_np1->setObjectName(QString::fromUtf8("LEMeshName_np1")); + LEMeshName_np1->setMinimumSize(QSize(290, 21)); + LEMeshName_np1->setMaxLength(32); - gridLayout->addItem(spacer_3, 4, 6, 1, 2); + gridLayout->addWidget(LEMeshName_np1, 4, 2, 1, 2); + spacerItem7 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addWidget(GBField, 6, 0, 1, 4); + gridLayout->addItem(spacerItem7, 5, 1, 1, 1); - verticalSpacer_2 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem8 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_2, 7, 1, 1, 1); + gridLayout->addItem(spacerItem8, 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); + Hypothese = new QGroupBox(CreateIteration); + Hypothese->setObjectName(QString::fromUtf8("Hypothese")); + gridLayout2 = new QGridLayout(Hypothese); +#ifndef Q_OS_MAC + gridLayout2->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout2->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + CBHypothese = new QComboBox(Hypothese); + CBHypothese->setObjectName(QString::fromUtf8("CBHypothese")); + CBHypothese->setSizeAdjustPolicy(QComboBox::AdjustToContents); - gridLayout_3->addWidget(CBHypothese, 0, 0, 1, 1); + gridLayout2->addWidget(CBHypothese, 0, 0, 1, 1); - spacer_2 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem9 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout_3->addItem(spacer_2, 0, 1, 1, 1); + gridLayout2->addItem(spacerItem9, 0, 1, 1, 1); - PBHypoEdit = new QPushButton(Hypothese); - PBHypoEdit->setObjectName(QString::fromUtf8("PBHypoEdit")); + PBHypoEdit = new QPushButton(Hypothese); + PBHypoEdit->setObjectName(QString::fromUtf8("PBHypoEdit")); - gridLayout_3->addWidget(PBHypoEdit, 0, 2, 1, 1); + gridLayout2->addWidget(PBHypoEdit, 0, 2, 1, 1); - PBHypoNew = new QPushButton(Hypothese); - PBHypoNew->setObjectName(QString::fromUtf8("PBHypoNew")); + PBHypoNew = new QPushButton(Hypothese); + PBHypoNew->setObjectName(QString::fromUtf8("PBHypoNew")); - gridLayout_3->addWidget(PBHypoNew, 0, 3, 1, 1); + gridLayout2->addWidget(PBHypoNew, 0, 3, 1, 1); - gridLayout_2->addWidget(Hypothese, 8, 0, 1, 4); + gridLayout->addWidget(Hypothese, 8, 0, 1, 4); - verticalSpacer_5 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem10 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_5, 9, 0, 1, 2); + gridLayout->addItem(spacerItem10, 9, 0, 1, 1); - 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); + GroupButtons = new QGroupBox(CreateIteration); + GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); + gridLayout3 = new QGridLayout(GroupButtons); +#ifndef Q_OS_MAC + gridLayout3->setSpacing(6); +#endif +#ifndef Q_OS_MAC + gridLayout3->setContentsMargins(9, 9, 9, 9); +#endif + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + buttonOk = new QPushButton(GroupButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonOk->setAutoDefault(false); + buttonOk->setDefault(false); - gridLayout_4->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout3->addWidget(buttonOk, 0, 0, 1, 1); - buttonApply = new QPushButton(GroupButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + buttonApply = new QPushButton(GroupButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_4->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout3->addWidget(buttonApply, 0, 1, 1, 1); - buttonCancel = new QPushButton(GroupButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel = new QPushButton(GroupButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_4->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout3->addWidget(buttonCancel, 0, 2, 1, 1); - buttonHelp = new QPushButton(GroupButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + buttonHelp = new QPushButton(GroupButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_4->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout3->addWidget(buttonHelp, 0, 3, 1, 1); - gridLayout_2->addWidget(GroupButtons, 10, 0, 1, 4); + gridLayout->addWidget(GroupButtons, 10, 0, 1, 4); - retranslateUi(CreateIteration); + retranslateUi(CreateIteration); - CBHypothese->setCurrentIndex(-1); + CBHypothese->setCurrentIndex(-1); - QMetaObject::connectSlotsByName(CreateIteration); + 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); + CreateIteration->setWindowTitle(QApplication::translate("CreateIteration", "Create an iteration", 0, QApplication::UnicodeUTF8)); + GBField->setTitle(QApplication::translate("CreateIteration", "Field information", 0, QApplication::UnicodeUTF8)); + RBChosen->setText(QApplication::translate("CreateIteration", "Chosen time step", 0, QApplication::UnicodeUTF8)); + Rank->setText(QApplication::translate("CreateIteration", "Rank", 0, QApplication::UnicodeUTF8)); + TimeStep->setText(QApplication::translate("CreateIteration", "Time step", 0, QApplication::UnicodeUTF8)); + RBLast->setText(QApplication::translate("CreateIteration", "Last time step", 0, QApplication::UnicodeUTF8)); + RBNo->setText(QApplication::translate("CreateIteration", "No time step", 0, QApplication::UnicodeUTF8)); + PushFieldFile->setText(QString()); + FieldFile->setText(QApplication::translate("CreateIteration", "Field file", 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)); + 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)); } // retranslateUi }; diff --git a/src/HOMARDGUI/CreateIteration.ui b/src/HOMARDGUI/CreateIteration.ui index dbe973d0..01a0d38b 100644 --- a/src/HOMARDGUI/CreateIteration.ui +++ b/src/HOMARDGUI/CreateIteration.ui @@ -5,14 +5,184 @@ 0 0 - 587 + 610 598 - Create_Iteration + Create an iteration - + + + 9 + + + 6 + + + + + Field information + + + + 9 + + + 6 + + + + + + 282 + 21 + + + + + + + + Qt::Vertical + + + + 138 + 18 + + + + + + + + Chosen time step + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 255 + 13 + + + + + + + + 1010000 + + + -1 + + + 1 + + + + + + + Rank + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + 100000 + + + -2 + + + -1 + + + + + + + Time step + + + + + + + Qt::Vertical + + + + 138 + 28 + + + + + + + + Last time step + + + + + + + No time step + + + true + + + true + + + + + + + + + + + + + + Field file + + + + + + @@ -41,11 +211,11 @@ - + Qt::Vertical - + 20 24 @@ -93,11 +263,11 @@ - + Qt::Vertical - + 20 21 @@ -122,11 +292,11 @@ - + Qt::Vertical - + 20 22 @@ -155,11 +325,11 @@ - + Qt::Vertical - + 20 21 @@ -167,170 +337,12 @@ - - - - Field information - - - - - - Field File - - - - - - - - - - - - - - - 282 - 21 - - - - - - - - Qt::Vertical - - - - 138 - 18 - - - - - - - - No Time Step - - - true - - - true - - - - - - - Last Time Step - - - - - - - Chosen time step - - - - - - - Qt::Vertical - - - - 138 - 28 - - - - - - - - Time Step - - - - - - - -2 - - - 100000 - - - -1 - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 40 - 13 - - - - - - - - Rank - - - - - - - -1 - - - 1010000 - - - 1 - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 255 - 13 - - - - - - - - + Qt::Vertical - + 20 22 @@ -343,7 +355,13 @@ Hypothesis - + + + 9 + + + 6 + @@ -355,14 +373,14 @@ - + Qt::Horizontal QSizePolicy::Fixed - + 40 13 @@ -387,12 +405,12 @@ - - + + Qt::Vertical - + 20 21 @@ -405,11 +423,17 @@ - + + + 9 + + + 6 + - &Ok + OK false @@ -422,21 +446,21 @@ - &Apply + Apply - &Cancel + Cancel - &Help + Help diff --git a/src/HOMARDGUI/CreateListGroup.h b/src/HOMARDGUI/CreateListGroup.h index cf645bcd..f57ebc20 100644 --- a/src/HOMARDGUI/CreateListGroup.h +++ b/src/HOMARDGUI/CreateListGroup.h @@ -1,8 +1,8 @@ /******************************************************************************** ** 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 +** Created: Thu Sep 1 16:35:32 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -17,108 +17,114 @@ #include #include #include -#include #include #include -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; + QGridLayout *gridLayout1; QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; + QGroupBox *GBOptions; + QGridLayout *gridLayout2; + QTableWidget *TWGroupe; 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); + CreateListGroup->setObjectName(QString::fromUtf8("CreateListGroup")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(CreateListGroup->sizePolicy().hasHeightForWidth()); + CreateListGroup->setSizePolicy(sizePolicy); + CreateListGroup->setAutoFillBackground(true); + CreateListGroup->setSizeGripEnabled(true); + gridLayout = new QGridLayout(CreateListGroup); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + GBButtons = new QGroupBox(CreateListGroup); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + gridLayout1 = new QGridLayout(GBButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); + + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_7->addWidget(TWGroupe, 0, 0, 1, 1); + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout->addWidget(GBOptions, 0, 0, 1, 1); + gridLayout1->addWidget(buttonApply, 0, 1, 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")); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout->addWidget(GBButtons, 1, 0, 1, 1); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + GBOptions = new QGroupBox(CreateListGroup); + GBOptions->setObjectName(QString::fromUtf8("GBOptions")); + gridLayout2 = new QGridLayout(GBOptions); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + TWGroupe = new QTableWidget(GBOptions); + TWGroupe->setObjectName(QString::fromUtf8("TWGroupe")); + TWGroupe->setShowGrid(true); + TWGroupe->setRowCount(0); + TWGroupe->setColumnCount(2); - gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout2->addWidget(TWGroupe, 0, 0, 1, 1); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout->addWidget(GBOptions, 0, 0, 1, 1); - gridLayout->addWidget(GBButtons, 1, 0, 1, 1); + retranslateUi(CreateListGroup); + QSize size(717, 600); + size = size.expandedTo(CreateListGroup->minimumSizeHint()); + CreateListGroup->resize(size); - retranslateUi(CreateListGroup); - QMetaObject::connectSlotsByName(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); + CreateListGroup->setWindowTitle(QApplication::translate("CreateListGroup", "Selection of groups", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateListGroup", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateListGroup", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateListGroup", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateListGroup", "OK", 0, QApplication::UnicodeUTF8)); + GBOptions->setTitle(QApplication::translate("CreateListGroup", "Selected groups", 0, QApplication::UnicodeUTF8)); + if (TWGroupe->columnCount() < 2) + TWGroupe->setColumnCount(2); + + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateListGroup", "Selection", 0, QApplication::UnicodeUTF8)); + TWGroupe->setHorizontalHeaderItem(0, __colItem); + + QTableWidgetItem *__colItem1 = new QTableWidgetItem(); + __colItem1->setText(QApplication::translate("CreateListGroup", "Group", 0, QApplication::UnicodeUTF8)); + TWGroupe->setHorizontalHeaderItem(1, __colItem1); + Q_UNUSED(CreateListGroup); } // retranslateUi }; @@ -127,6 +133,4 @@ 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 index f496638b..06c60611 100644 --- a/src/HOMARDGUI/CreateListGroup.ui +++ b/src/HOMARDGUI/CreateListGroup.ui @@ -10,27 +10,84 @@ - + + 0 + 0 0 0 - Create Hypothesis - Group selection + Selection of groups - false + true true - + + + 9 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + Help + + + + + + + Cancel + + + + + + + Apply + + + + + + + OK + + + + + + Selected groups - + + + 9 + + + 6 + @@ -57,43 +114,6 @@ - - - - - - - - - - &Ok - - - - - - - &Apply - - - - - - - &Cancel - - - - - - - &Help - - - - - - diff --git a/src/HOMARDGUI/CreateZone.h b/src/HOMARDGUI/CreateZone.h index bce2565e..70b1d125 100644 --- a/src/HOMARDGUI/CreateZone.h +++ b/src/HOMARDGUI/CreateZone.h @@ -1,8 +1,8 @@ /******************************************************************************** ** 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 +** Created: Thu Sep 1 13:03:50 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -18,27 +18,57 @@ #include #include #include -#include -#include #include #include #include #include -QT_BEGIN_NAMESPACE - class Ui_CreateZone { public: - QGridLayout *gridLayout_3; - QLabel *Name; - QLineEdit *LEZoneName; + QGridLayout *gridLayout; + QGroupBox *GBButtons; + QGridLayout *gridLayout1; + QPushButton *buttonHelp; + QPushButton *buttonCancel; + QPushButton *buttonApply; + QPushButton *buttonOk; QGroupBox *TypeZone; - QHBoxLayout *horizontalLayout; - QRadioButton *RBBox; + QGridLayout *gridLayout2; QRadioButton *RBSphere; + QRadioButton *RBPipe; + QRadioButton *RBCylinder; + QRadioButton *RBBox; + QGroupBox *gBCylindre; + QGridLayout *gridLayout3; + QDoubleSpinBox *SpinBox_Haut; + QLabel *TLHaut; + QLabel *TLRadius; + QDoubleSpinBox *SpinBox_Xaxis; + QDoubleSpinBox *SpinBox_Yaxis; + QDoubleSpinBox *SpinBox_Zaxis; + QLabel *TLZaxis; + QLabel *TLYaxis; + QLabel *TLXaxis; + QDoubleSpinBox *SpinBox_Ybase; + QLabel *TLYbase; + QLabel *TLZbase; + QDoubleSpinBox *SpinBox_Zbase; + QDoubleSpinBox *SpinBox_Radius; + QLabel *TLXbase; + QDoubleSpinBox *SpinBox_Xbase; + QGroupBox *gBSphere; + QGridLayout *gridLayout4; + QLabel *TLXcentre; + QDoubleSpinBox *SpinBox_Xcentre; + QLabel *TLYcentre; + QDoubleSpinBox *SpinBox_Ycentre; + QLabel *TLRayon; + QDoubleSpinBox *SpinBox_Rayon; + QLabel *TLZcentre; + QDoubleSpinBox *SpinBox_Zcentre; QGroupBox *gBBox; - QGridLayout *gridLayout; + QGridLayout *gridLayout5; QLabel *TLXmini; QDoubleSpinBox *SpinBox_Xmini; QLabel *TLYmini; @@ -51,328 +81,768 @@ public: 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; + QLineEdit *LEZoneName; + QLabel *Name; + QGroupBox *gBPipe; + QGridLayout *gridLayout6; + QLabel *TLHaut_p; + QDoubleSpinBox *SpinBox_Xbase_p; + QLabel *TLXbase_p; + QDoubleSpinBox *SpinBox_Radius_int; + QDoubleSpinBox *SpinBox_Zbase_p; + QLabel *TLRadius_int; + QLabel *TLZbase_p; + QLabel *TLYbase_p; + QDoubleSpinBox *SpinBox_Ybase_p; + QLabel *TLXaxis_p; + QLabel *TLYaxis_p; + QLabel *TLZaxis_p; + QDoubleSpinBox *SpinBox_Zaxis_p; + QDoubleSpinBox *SpinBox_Yaxis_p; + QDoubleSpinBox *SpinBox_Xaxis_p; + QDoubleSpinBox *SpinBox_Radius_ext; + QLabel *TLRadius_ext; + QDoubleSpinBox *SpinBox_Haut_p; 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); + CreateZone->setObjectName(QString::fromUtf8("CreateZone")); + CreateZone->setAutoFillBackground(true); + CreateZone->setSizeGripEnabled(true); + gridLayout = new QGridLayout(CreateZone); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + GBButtons = new QGroupBox(CreateZone); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); + GBButtons->setSizePolicy(sizePolicy); + gridLayout1 = new QGridLayout(GBButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); + + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); + + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); + + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); + + + gridLayout->addWidget(GBButtons, 6, 0, 1, 2); + + TypeZone = new QGroupBox(CreateZone); + TypeZone->setObjectName(QString::fromUtf8("TypeZone")); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(TypeZone->sizePolicy().hasHeightForWidth()); + TypeZone->setSizePolicy(sizePolicy1); + TypeZone->setMinimumSize(QSize(340, 0)); + gridLayout2 = new QGridLayout(TypeZone); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + RBSphere = new QRadioButton(TypeZone); + RBSphere->setObjectName(QString::fromUtf8("RBSphere")); + RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); + + gridLayout2->addWidget(RBSphere, 0, 3, 1, 1); + + RBPipe = new QRadioButton(TypeZone); + RBPipe->setObjectName(QString::fromUtf8("RBPipe")); + RBPipe->setIcon(QIcon(QString::fromUtf8("../../resources/pipe.png"))); + + gridLayout2->addWidget(RBPipe, 0, 2, 1, 1); + + RBCylinder = new QRadioButton(TypeZone); + RBCylinder->setObjectName(QString::fromUtf8("RBCylinder")); + RBCylinder->setIcon(QIcon(QString::fromUtf8("../../resources/cylinderpointvector.png"))); + + gridLayout2->addWidget(RBCylinder, 0, 1, 1, 1); + + RBBox = new QRadioButton(TypeZone); + RBBox->setObjectName(QString::fromUtf8("RBBox")); + RBBox->setIcon(QIcon(QString::fromUtf8("../../resources/zone_boxdxyz.png"))); + RBBox->setCheckable(true); + RBBox->setChecked(true); + + gridLayout2->addWidget(RBBox, 0, 0, 1, 1); + + + gridLayout->addWidget(TypeZone, 1, 0, 1, 2); + + gBCylindre = new QGroupBox(CreateZone); + gBCylindre->setObjectName(QString::fromUtf8("gBCylindre")); + QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(gBCylindre->sizePolicy().hasHeightForWidth()); + gBCylindre->setSizePolicy(sizePolicy2); + gBCylindre->setFocusPolicy(Qt::TabFocus); + gridLayout3 = new QGridLayout(gBCylindre); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + SpinBox_Haut = new QDoubleSpinBox(gBCylindre); + SpinBox_Haut->setObjectName(QString::fromUtf8("SpinBox_Haut")); + SpinBox_Haut->setDecimals(5); + SpinBox_Haut->setMaximum(1e+09); + + gridLayout3->addWidget(SpinBox_Haut, 4, 1, 1, 1); + + TLHaut = new QLabel(gBCylindre); + TLHaut->setObjectName(QString::fromUtf8("TLHaut")); + QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(TLHaut->sizePolicy().hasHeightForWidth()); + TLHaut->setSizePolicy(sizePolicy3); + TLHaut->setWordWrap(false); + + gridLayout3->addWidget(TLHaut, 4, 0, 1, 1); + + TLRadius = new QLabel(gBCylindre); + TLRadius->setObjectName(QString::fromUtf8("TLRadius")); + QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); + sizePolicy4.setHorizontalStretch(0); + sizePolicy4.setVerticalStretch(0); + sizePolicy4.setHeightForWidth(TLRadius->sizePolicy().hasHeightForWidth()); + TLRadius->setSizePolicy(sizePolicy4); + TLRadius->setWordWrap(false); + + gridLayout3->addWidget(TLRadius, 3, 0, 1, 1); + + SpinBox_Xaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Xaxis->setObjectName(QString::fromUtf8("SpinBox_Xaxis")); + SpinBox_Xaxis->setDecimals(5); + SpinBox_Xaxis->setMaximum(1e+09); + SpinBox_Xaxis->setMinimum(-1e+09); + SpinBox_Xaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Xaxis, 0, 3, 1, 1); + + SpinBox_Yaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Yaxis->setObjectName(QString::fromUtf8("SpinBox_Yaxis")); + SpinBox_Yaxis->setDecimals(5); + SpinBox_Yaxis->setMaximum(1e+09); + SpinBox_Yaxis->setMinimum(-1e+09); + SpinBox_Yaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Yaxis, 1, 3, 1, 1); + + SpinBox_Zaxis = new QDoubleSpinBox(gBCylindre); + SpinBox_Zaxis->setObjectName(QString::fromUtf8("SpinBox_Zaxis")); + SpinBox_Zaxis->setDecimals(5); + SpinBox_Zaxis->setMaximum(1e+09); + SpinBox_Zaxis->setMinimum(-1e+09); + SpinBox_Zaxis->setValue(0); + + gridLayout3->addWidget(SpinBox_Zaxis, 2, 3, 1, 1); + + TLZaxis = new QLabel(gBCylindre); + TLZaxis->setObjectName(QString::fromUtf8("TLZaxis")); + QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); + sizePolicy5.setHorizontalStretch(0); + sizePolicy5.setVerticalStretch(0); + sizePolicy5.setHeightForWidth(TLZaxis->sizePolicy().hasHeightForWidth()); + TLZaxis->setSizePolicy(sizePolicy5); + TLZaxis->setWordWrap(false); + + gridLayout3->addWidget(TLZaxis, 2, 2, 1, 1); + + TLYaxis = new QLabel(gBCylindre); + TLYaxis->setObjectName(QString::fromUtf8("TLYaxis")); + QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); + sizePolicy6.setHorizontalStretch(0); + sizePolicy6.setVerticalStretch(0); + sizePolicy6.setHeightForWidth(TLYaxis->sizePolicy().hasHeightForWidth()); + TLYaxis->setSizePolicy(sizePolicy6); + TLYaxis->setWordWrap(false); + + gridLayout3->addWidget(TLYaxis, 1, 2, 1, 1); + + TLXaxis = new QLabel(gBCylindre); + TLXaxis->setObjectName(QString::fromUtf8("TLXaxis")); + QSizePolicy sizePolicy7(static_cast(0), static_cast(0)); + sizePolicy7.setHorizontalStretch(0); + sizePolicy7.setVerticalStretch(0); + sizePolicy7.setHeightForWidth(TLXaxis->sizePolicy().hasHeightForWidth()); + TLXaxis->setSizePolicy(sizePolicy7); + TLXaxis->setWordWrap(false); + + gridLayout3->addWidget(TLXaxis, 0, 2, 1, 1); + + SpinBox_Ybase = new QDoubleSpinBox(gBCylindre); + SpinBox_Ybase->setObjectName(QString::fromUtf8("SpinBox_Ybase")); + SpinBox_Ybase->setDecimals(5); + SpinBox_Ybase->setMaximum(1e+09); + SpinBox_Ybase->setMinimum(-1e+09); + SpinBox_Ybase->setValue(0); + + gridLayout3->addWidget(SpinBox_Ybase, 1, 1, 1, 1); + + TLYbase = new QLabel(gBCylindre); + TLYbase->setObjectName(QString::fromUtf8("TLYbase")); + QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); + sizePolicy8.setHorizontalStretch(0); + sizePolicy8.setVerticalStretch(0); + sizePolicy8.setHeightForWidth(TLYbase->sizePolicy().hasHeightForWidth()); + TLYbase->setSizePolicy(sizePolicy8); + TLYbase->setWordWrap(false); + + gridLayout3->addWidget(TLYbase, 1, 0, 1, 1); + + TLZbase = new QLabel(gBCylindre); + TLZbase->setObjectName(QString::fromUtf8("TLZbase")); + QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); + sizePolicy9.setHorizontalStretch(0); + sizePolicy9.setVerticalStretch(0); + sizePolicy9.setHeightForWidth(TLZbase->sizePolicy().hasHeightForWidth()); + TLZbase->setSizePolicy(sizePolicy9); + TLZbase->setWordWrap(false); + + gridLayout3->addWidget(TLZbase, 2, 0, 1, 1); + + SpinBox_Zbase = new QDoubleSpinBox(gBCylindre); + SpinBox_Zbase->setObjectName(QString::fromUtf8("SpinBox_Zbase")); + SpinBox_Zbase->setDecimals(5); + SpinBox_Zbase->setMaximum(1e+09); + SpinBox_Zbase->setMinimum(-1e+09); + SpinBox_Zbase->setValue(0); + + gridLayout3->addWidget(SpinBox_Zbase, 2, 1, 1, 1); + + SpinBox_Radius = new QDoubleSpinBox(gBCylindre); + SpinBox_Radius->setObjectName(QString::fromUtf8("SpinBox_Radius")); + SpinBox_Radius->setDecimals(5); + SpinBox_Radius->setMaximum(1e+09); + + gridLayout3->addWidget(SpinBox_Radius, 3, 1, 1, 1); + + TLXbase = new QLabel(gBCylindre); + TLXbase->setObjectName(QString::fromUtf8("TLXbase")); + QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); + sizePolicy10.setHorizontalStretch(0); + sizePolicy10.setVerticalStretch(0); + sizePolicy10.setHeightForWidth(TLXbase->sizePolicy().hasHeightForWidth()); + TLXbase->setSizePolicy(sizePolicy10); + TLXbase->setWordWrap(false); + + gridLayout3->addWidget(TLXbase, 0, 0, 1, 1); + + SpinBox_Xbase = new QDoubleSpinBox(gBCylindre); + SpinBox_Xbase->setObjectName(QString::fromUtf8("SpinBox_Xbase")); + SpinBox_Xbase->setDecimals(5); + SpinBox_Xbase->setMaximum(1e+09); + SpinBox_Xbase->setMinimum(-1e+09); + SpinBox_Xbase->setValue(0); + + gridLayout3->addWidget(SpinBox_Xbase, 0, 1, 1, 1); + + + gridLayout->addWidget(gBCylindre, 4, 0, 1, 2); + + gBSphere = new QGroupBox(CreateZone); + gBSphere->setObjectName(QString::fromUtf8("gBSphere")); + QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); + sizePolicy11.setHorizontalStretch(0); + sizePolicy11.setVerticalStretch(0); + sizePolicy11.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); + gBSphere->setSizePolicy(sizePolicy11); + gridLayout4 = new QGridLayout(gBSphere); + gridLayout4->setSpacing(6); + gridLayout4->setMargin(9); + gridLayout4->setObjectName(QString::fromUtf8("gridLayout4")); + TLXcentre = new QLabel(gBSphere); + TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); + QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); + sizePolicy12.setHorizontalStretch(0); + sizePolicy12.setVerticalStretch(0); + sizePolicy12.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); + TLXcentre->setSizePolicy(sizePolicy12); + TLXcentre->setWordWrap(false); + + gridLayout4->addWidget(TLXcentre, 0, 0, 1, 1); + + SpinBox_Xcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre")); + SpinBox_Xcentre->setDecimals(5); + SpinBox_Xcentre->setMaximum(1e+09); + SpinBox_Xcentre->setMinimum(-1e+09); + SpinBox_Xcentre->setValue(0); + + gridLayout4->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); + + TLYcentre = new QLabel(gBSphere); + TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); + QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); + sizePolicy13.setHorizontalStretch(0); + sizePolicy13.setVerticalStretch(0); + sizePolicy13.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); + TLYcentre->setSizePolicy(sizePolicy13); + TLYcentre->setWordWrap(false); + + gridLayout4->addWidget(TLYcentre, 1, 0, 1, 1); + + SpinBox_Ycentre = new QDoubleSpinBox(gBSphere); + SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre")); + SpinBox_Ycentre->setDecimals(5); + SpinBox_Ycentre->setMaximum(1e+09); + SpinBox_Ycentre->setMinimum(-1e+09); + SpinBox_Ycentre->setValue(0); + + gridLayout4->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); + + TLRayon = new QLabel(gBSphere); + TLRayon->setObjectName(QString::fromUtf8("TLRayon")); + QSizePolicy sizePolicy14(static_cast(0), static_cast(0)); + sizePolicy14.setHorizontalStretch(0); + sizePolicy14.setVerticalStretch(0); + sizePolicy14.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); + TLRayon->setSizePolicy(sizePolicy14); + TLRayon->setWordWrap(false); + + gridLayout4->addWidget(TLRayon, 1, 2, 1, 1); + + SpinBox_Rayon = new QDoubleSpinBox(gBSphere); + SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon")); + SpinBox_Rayon->setDecimals(5); + SpinBox_Rayon->setMaximum(1e+09); + SpinBox_Rayon->setMinimum(-1e+09); + SpinBox_Rayon->setValue(0); + + gridLayout4->addWidget(SpinBox_Rayon, 1, 3, 1, 1); + + TLZcentre = new QLabel(gBSphere); + TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); + QSizePolicy sizePolicy15(static_cast(0), static_cast(0)); + sizePolicy15.setHorizontalStretch(0); + sizePolicy15.setVerticalStretch(0); + sizePolicy15.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); + TLZcentre->setSizePolicy(sizePolicy15); + TLZcentre->setWordWrap(false); + + gridLayout4->addWidget(TLZcentre, 2, 0, 1, 1); + + SpinBox_Zcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre")); + SpinBox_Zcentre->setDecimals(5); + SpinBox_Zcentre->setMaximum(1e+09); + SpinBox_Zcentre->setMinimum(-1e+09); + SpinBox_Zcentre->setValue(0); + + gridLayout4->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); + + + gridLayout->addWidget(gBSphere, 3, 0, 1, 2); + + gBBox = new QGroupBox(CreateZone); + gBBox->setObjectName(QString::fromUtf8("gBBox")); + QSizePolicy sizePolicy16(static_cast(0), static_cast(0)); + sizePolicy16.setHorizontalStretch(0); + sizePolicy16.setVerticalStretch(0); + sizePolicy16.setHeightForWidth(gBBox->sizePolicy().hasHeightForWidth()); + gBBox->setSizePolicy(sizePolicy16); + gridLayout5 = new QGridLayout(gBBox); + gridLayout5->setSpacing(6); + gridLayout5->setMargin(9); + gridLayout5->setObjectName(QString::fromUtf8("gridLayout5")); + TLXmini = new QLabel(gBBox); + TLXmini->setObjectName(QString::fromUtf8("TLXmini")); + QSizePolicy sizePolicy17(static_cast(0), static_cast(0)); + sizePolicy17.setHorizontalStretch(0); + sizePolicy17.setVerticalStretch(0); + sizePolicy17.setHeightForWidth(TLXmini->sizePolicy().hasHeightForWidth()); + TLXmini->setSizePolicy(sizePolicy17); + TLXmini->setWordWrap(false); + + gridLayout5->addWidget(TLXmini, 0, 0, 1, 1); + + SpinBox_Xmini = new QDoubleSpinBox(gBBox); + SpinBox_Xmini->setObjectName(QString::fromUtf8("SpinBox_Xmini")); + SpinBox_Xmini->setDecimals(5); + SpinBox_Xmini->setMaximum(1e+09); + SpinBox_Xmini->setMinimum(-1e+09); + SpinBox_Xmini->setValue(0); + + gridLayout5->addWidget(SpinBox_Xmini, 0, 1, 1, 1); + + TLYmini = new QLabel(gBBox); + TLYmini->setObjectName(QString::fromUtf8("TLYmini")); + QSizePolicy sizePolicy18(static_cast(0), static_cast(0)); + sizePolicy18.setHorizontalStretch(0); + sizePolicy18.setVerticalStretch(0); + sizePolicy18.setHeightForWidth(TLYmini->sizePolicy().hasHeightForWidth()); + TLYmini->setSizePolicy(sizePolicy18); + TLYmini->setWordWrap(false); + + gridLayout5->addWidget(TLYmini, 1, 0, 1, 1); + + SpinBox_Ymini = new QDoubleSpinBox(gBBox); + SpinBox_Ymini->setObjectName(QString::fromUtf8("SpinBox_Ymini")); + SpinBox_Ymini->setDecimals(5); + SpinBox_Ymini->setMaximum(1e+09); + SpinBox_Ymini->setMinimum(-1e+09); + SpinBox_Ymini->setValue(0); + + gridLayout5->addWidget(SpinBox_Ymini, 1, 1, 1, 1); + + TLZmini = new QLabel(gBBox); + TLZmini->setObjectName(QString::fromUtf8("TLZmini")); + QSizePolicy sizePolicy19(static_cast(0), static_cast(0)); + sizePolicy19.setHorizontalStretch(0); + sizePolicy19.setVerticalStretch(0); + sizePolicy19.setHeightForWidth(TLZmini->sizePolicy().hasHeightForWidth()); + TLZmini->setSizePolicy(sizePolicy19); + TLZmini->setWordWrap(false); + + gridLayout5->addWidget(TLZmini, 2, 0, 1, 1); + + SpinBox_Zmini = new QDoubleSpinBox(gBBox); + SpinBox_Zmini->setObjectName(QString::fromUtf8("SpinBox_Zmini")); + SpinBox_Zmini->setDecimals(5); + SpinBox_Zmini->setMaximum(1e+09); + SpinBox_Zmini->setMinimum(-1e+09); + SpinBox_Zmini->setValue(0); + + gridLayout5->addWidget(SpinBox_Zmini, 2, 1, 1, 1); + + TLXmaxi = new QLabel(gBBox); + TLXmaxi->setObjectName(QString::fromUtf8("TLXmaxi")); + QSizePolicy sizePolicy20(static_cast(0), static_cast(0)); + sizePolicy20.setHorizontalStretch(0); + sizePolicy20.setVerticalStretch(0); + sizePolicy20.setHeightForWidth(TLXmaxi->sizePolicy().hasHeightForWidth()); + TLXmaxi->setSizePolicy(sizePolicy20); + TLXmaxi->setWordWrap(false); + + gridLayout5->addWidget(TLXmaxi, 0, 2, 1, 1); + + TLZmaxi = new QLabel(gBBox); + TLZmaxi->setObjectName(QString::fromUtf8("TLZmaxi")); + QSizePolicy sizePolicy21(static_cast(0), static_cast(0)); + sizePolicy21.setHorizontalStretch(0); + sizePolicy21.setVerticalStretch(0); + sizePolicy21.setHeightForWidth(TLZmaxi->sizePolicy().hasHeightForWidth()); + TLZmaxi->setSizePolicy(sizePolicy21); + TLZmaxi->setWordWrap(false); + + gridLayout5->addWidget(TLZmaxi, 2, 2, 1, 1); + + SpinBox_Zmaxi = new QDoubleSpinBox(gBBox); + SpinBox_Zmaxi->setObjectName(QString::fromUtf8("SpinBox_Zmaxi")); + SpinBox_Zmaxi->setDecimals(5); + SpinBox_Zmaxi->setMaximum(1e+09); + SpinBox_Zmaxi->setMinimum(-1e+09); + SpinBox_Zmaxi->setValue(0); + + gridLayout5->addWidget(SpinBox_Zmaxi, 2, 3, 1, 1); + + TLYmaxi = new QLabel(gBBox); + TLYmaxi->setObjectName(QString::fromUtf8("TLYmaxi")); + QSizePolicy sizePolicy22(static_cast(0), static_cast(0)); + sizePolicy22.setHorizontalStretch(0); + sizePolicy22.setVerticalStretch(0); + sizePolicy22.setHeightForWidth(TLYmaxi->sizePolicy().hasHeightForWidth()); + TLYmaxi->setSizePolicy(sizePolicy22); + TLYmaxi->setWordWrap(false); + + gridLayout5->addWidget(TLYmaxi, 1, 2, 1, 1); + + SpinBox_Xmaxi = new QDoubleSpinBox(gBBox); + SpinBox_Xmaxi->setObjectName(QString::fromUtf8("SpinBox_Xmaxi")); + SpinBox_Xmaxi->setDecimals(5); + SpinBox_Xmaxi->setMaximum(1e+09); + SpinBox_Xmaxi->setMinimum(-1e+09); + SpinBox_Xmaxi->setValue(0); + + gridLayout5->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->setMaximum(1e+09); + SpinBox_Ymaxi->setMinimum(-1e+09); + SpinBox_Ymaxi->setValue(0); + + gridLayout5->addWidget(SpinBox_Ymaxi, 1, 3, 1, 1); + + + gridLayout->addWidget(gBBox, 2, 0, 1, 2); + + LEZoneName = new QLineEdit(CreateZone); + LEZoneName->setObjectName(QString::fromUtf8("LEZoneName")); + LEZoneName->setMaxLength(32); + + gridLayout->addWidget(LEZoneName, 0, 1, 1, 1); + + Name = new QLabel(CreateZone); + Name->setObjectName(QString::fromUtf8("Name")); + + gridLayout->addWidget(Name, 0, 0, 1, 1); + + gBPipe = new QGroupBox(CreateZone); + gBPipe->setObjectName(QString::fromUtf8("gBPipe")); + QSizePolicy sizePolicy23(static_cast(0), static_cast(0)); + sizePolicy23.setHorizontalStretch(0); + sizePolicy23.setVerticalStretch(0); + sizePolicy23.setHeightForWidth(gBPipe->sizePolicy().hasHeightForWidth()); + gBPipe->setSizePolicy(sizePolicy23); + gridLayout6 = new QGridLayout(gBPipe); + gridLayout6->setSpacing(6); + gridLayout6->setMargin(9); + gridLayout6->setObjectName(QString::fromUtf8("gridLayout6")); + TLHaut_p = new QLabel(gBPipe); + TLHaut_p->setObjectName(QString::fromUtf8("TLHaut_p")); + QSizePolicy sizePolicy24(static_cast(0), static_cast(0)); + sizePolicy24.setHorizontalStretch(0); + sizePolicy24.setVerticalStretch(0); + sizePolicy24.setHeightForWidth(TLHaut_p->sizePolicy().hasHeightForWidth()); + TLHaut_p->setSizePolicy(sizePolicy24); + TLHaut_p->setWordWrap(false); + + gridLayout6->addWidget(TLHaut_p, 4, 0, 1, 1); + + SpinBox_Xbase_p = new QDoubleSpinBox(gBPipe); + SpinBox_Xbase_p->setObjectName(QString::fromUtf8("SpinBox_Xbase_p")); + SpinBox_Xbase_p->setDecimals(5); + SpinBox_Xbase_p->setMaximum(1e+09); + SpinBox_Xbase_p->setMinimum(-1e+09); + SpinBox_Xbase_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Xbase_p, 0, 1, 1, 1); + + TLXbase_p = new QLabel(gBPipe); + TLXbase_p->setObjectName(QString::fromUtf8("TLXbase_p")); + QSizePolicy sizePolicy25(static_cast(0), static_cast(0)); + sizePolicy25.setHorizontalStretch(0); + sizePolicy25.setVerticalStretch(0); + sizePolicy25.setHeightForWidth(TLXbase_p->sizePolicy().hasHeightForWidth()); + TLXbase_p->setSizePolicy(sizePolicy25); + TLXbase_p->setWordWrap(false); + + gridLayout6->addWidget(TLXbase_p, 0, 0, 1, 1); + + SpinBox_Radius_int = new QDoubleSpinBox(gBPipe); + SpinBox_Radius_int->setObjectName(QString::fromUtf8("SpinBox_Radius_int")); + SpinBox_Radius_int->setDecimals(5); + SpinBox_Radius_int->setMaximum(1e+09); + + gridLayout6->addWidget(SpinBox_Radius_int, 3, 1, 1, 1); + + SpinBox_Zbase_p = new QDoubleSpinBox(gBPipe); + SpinBox_Zbase_p->setObjectName(QString::fromUtf8("SpinBox_Zbase_p")); + SpinBox_Zbase_p->setDecimals(5); + SpinBox_Zbase_p->setMaximum(1e+09); + SpinBox_Zbase_p->setMinimum(-1e+09); + SpinBox_Zbase_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Zbase_p, 2, 1, 1, 1); + + TLRadius_int = new QLabel(gBPipe); + TLRadius_int->setObjectName(QString::fromUtf8("TLRadius_int")); + QSizePolicy sizePolicy26(static_cast(0), static_cast(0)); + sizePolicy26.setHorizontalStretch(0); + sizePolicy26.setVerticalStretch(0); + sizePolicy26.setHeightForWidth(TLRadius_int->sizePolicy().hasHeightForWidth()); + TLRadius_int->setSizePolicy(sizePolicy26); + TLRadius_int->setWordWrap(false); + + gridLayout6->addWidget(TLRadius_int, 3, 0, 1, 1); + + TLZbase_p = new QLabel(gBPipe); + TLZbase_p->setObjectName(QString::fromUtf8("TLZbase_p")); + QSizePolicy sizePolicy27(static_cast(0), static_cast(0)); + sizePolicy27.setHorizontalStretch(0); + sizePolicy27.setVerticalStretch(0); + sizePolicy27.setHeightForWidth(TLZbase_p->sizePolicy().hasHeightForWidth()); + TLZbase_p->setSizePolicy(sizePolicy27); + TLZbase_p->setWordWrap(false); + + gridLayout6->addWidget(TLZbase_p, 2, 0, 1, 1); + + TLYbase_p = new QLabel(gBPipe); + TLYbase_p->setObjectName(QString::fromUtf8("TLYbase_p")); + QSizePolicy sizePolicy28(static_cast(0), static_cast(0)); + sizePolicy28.setHorizontalStretch(0); + sizePolicy28.setVerticalStretch(0); + sizePolicy28.setHeightForWidth(TLYbase_p->sizePolicy().hasHeightForWidth()); + TLYbase_p->setSizePolicy(sizePolicy28); + TLYbase_p->setWordWrap(false); + + gridLayout6->addWidget(TLYbase_p, 1, 0, 1, 1); + + SpinBox_Ybase_p = new QDoubleSpinBox(gBPipe); + SpinBox_Ybase_p->setObjectName(QString::fromUtf8("SpinBox_Ybase_p")); + SpinBox_Ybase_p->setDecimals(5); + SpinBox_Ybase_p->setMaximum(1e+09); + SpinBox_Ybase_p->setMinimum(-1e+09); + SpinBox_Ybase_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Ybase_p, 1, 1, 1, 1); + + TLXaxis_p = new QLabel(gBPipe); + TLXaxis_p->setObjectName(QString::fromUtf8("TLXaxis_p")); + QSizePolicy sizePolicy29(static_cast(0), static_cast(0)); + sizePolicy29.setHorizontalStretch(0); + sizePolicy29.setVerticalStretch(0); + sizePolicy29.setHeightForWidth(TLXaxis_p->sizePolicy().hasHeightForWidth()); + TLXaxis_p->setSizePolicy(sizePolicy29); + TLXaxis_p->setWordWrap(false); + + gridLayout6->addWidget(TLXaxis_p, 0, 2, 1, 1); + + TLYaxis_p = new QLabel(gBPipe); + TLYaxis_p->setObjectName(QString::fromUtf8("TLYaxis_p")); + QSizePolicy sizePolicy30(static_cast(0), static_cast(0)); + sizePolicy30.setHorizontalStretch(0); + sizePolicy30.setVerticalStretch(0); + sizePolicy30.setHeightForWidth(TLYaxis_p->sizePolicy().hasHeightForWidth()); + TLYaxis_p->setSizePolicy(sizePolicy30); + TLYaxis_p->setWordWrap(false); + + gridLayout6->addWidget(TLYaxis_p, 1, 2, 1, 1); + + TLZaxis_p = new QLabel(gBPipe); + TLZaxis_p->setObjectName(QString::fromUtf8("TLZaxis_p")); + QSizePolicy sizePolicy31(static_cast(0), static_cast(0)); + sizePolicy31.setHorizontalStretch(0); + sizePolicy31.setVerticalStretch(0); + sizePolicy31.setHeightForWidth(TLZaxis_p->sizePolicy().hasHeightForWidth()); + TLZaxis_p->setSizePolicy(sizePolicy31); + TLZaxis_p->setWordWrap(false); + + gridLayout6->addWidget(TLZaxis_p, 2, 2, 1, 1); + + SpinBox_Zaxis_p = new QDoubleSpinBox(gBPipe); + SpinBox_Zaxis_p->setObjectName(QString::fromUtf8("SpinBox_Zaxis_p")); + SpinBox_Zaxis_p->setDecimals(5); + SpinBox_Zaxis_p->setMaximum(1e+09); + SpinBox_Zaxis_p->setMinimum(-1e+09); + SpinBox_Zaxis_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Zaxis_p, 2, 3, 1, 1); + + SpinBox_Yaxis_p = new QDoubleSpinBox(gBPipe); + SpinBox_Yaxis_p->setObjectName(QString::fromUtf8("SpinBox_Yaxis_p")); + SpinBox_Yaxis_p->setDecimals(5); + SpinBox_Yaxis_p->setMaximum(1e+09); + SpinBox_Yaxis_p->setMinimum(-1e+09); + SpinBox_Yaxis_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Yaxis_p, 1, 3, 1, 1); + + SpinBox_Xaxis_p = new QDoubleSpinBox(gBPipe); + SpinBox_Xaxis_p->setObjectName(QString::fromUtf8("SpinBox_Xaxis_p")); + SpinBox_Xaxis_p->setDecimals(5); + SpinBox_Xaxis_p->setMaximum(1e+09); + SpinBox_Xaxis_p->setMinimum(-1e+09); + SpinBox_Xaxis_p->setValue(0); + + gridLayout6->addWidget(SpinBox_Xaxis_p, 0, 3, 1, 1); + + SpinBox_Radius_ext = new QDoubleSpinBox(gBPipe); + SpinBox_Radius_ext->setObjectName(QString::fromUtf8("SpinBox_Radius_ext")); + SpinBox_Radius_ext->setDecimals(5); + SpinBox_Radius_ext->setMaximum(1e+09); + + gridLayout6->addWidget(SpinBox_Radius_ext, 3, 3, 1, 1); - gridLayout_2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); + TLRadius_ext = new QLabel(gBPipe); + TLRadius_ext->setObjectName(QString::fromUtf8("TLRadius_ext")); + QSizePolicy sizePolicy32(static_cast(0), static_cast(0)); + sizePolicy32.setHorizontalStretch(0); + sizePolicy32.setVerticalStretch(0); + sizePolicy32.setHeightForWidth(TLRadius_ext->sizePolicy().hasHeightForWidth()); + TLRadius_ext->setSizePolicy(sizePolicy32); + TLRadius_ext->setWordWrap(false); - TLRayon = new QLabel(gBSphere); - TLRayon->setObjectName(QString::fromUtf8("TLRayon")); - sizePolicy.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); - TLRayon->setSizePolicy(sizePolicy); - TLRayon->setWordWrap(false); + gridLayout6->addWidget(TLRadius_ext, 3, 2, 1, 1); - gridLayout_2->addWidget(TLRayon, 1, 2, 1, 1); + SpinBox_Haut_p = new QDoubleSpinBox(gBPipe); + SpinBox_Haut_p->setObjectName(QString::fromUtf8("SpinBox_Haut_p")); + SpinBox_Haut_p->setDecimals(5); + SpinBox_Haut_p->setMaximum(1e+09); - 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); + gridLayout6->addWidget(SpinBox_Haut_p, 4, 1, 1, 1); - 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->addWidget(gBPipe, 5, 0, 1, 2); - 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); + retranslateUi(CreateZone); - gridLayout_2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); + QSize size(551, 880); + size = size.expandedTo(CreateZone->minimumSizeHint()); + CreateZone->resize(size); - 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); + 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); + CreateZone->setWindowTitle(QApplication::translate("CreateZone", "Create a zone", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonHelp->setText(QApplication::translate("CreateZone", "Help", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateZone", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateZone", "Apply", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateZone", "OK", 0, QApplication::UnicodeUTF8)); + TypeZone->setTitle(QApplication::translate("CreateZone", "Type of zone", 0, QApplication::UnicodeUTF8)); + RBSphere->setText(QApplication::translate("CreateZone", "Sphere", 0, QApplication::UnicodeUTF8)); + RBPipe->setText(QApplication::translate("CreateZone", "Pipe", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Cylinder", 0, QApplication::UnicodeUTF8)); + RBBox->setText(QApplication::translate("CreateZone", "Box", 0, QApplication::UnicodeUTF8)); + gBCylindre->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLHaut->setText(QApplication::translate("CreateZone", "Height", 0, QApplication::UnicodeUTF8)); + TLRadius->setText(QApplication::translate("CreateZone", "Radius", 0, QApplication::UnicodeUTF8)); + TLZaxis->setText(QApplication::translate("CreateZone", "Z axis", 0, QApplication::UnicodeUTF8)); + TLYaxis->setText(QApplication::translate("CreateZone", "Y axis", 0, QApplication::UnicodeUTF8)); + TLXaxis->setText(QApplication::translate("CreateZone", "X axis", 0, QApplication::UnicodeUTF8)); + TLYbase->setText(QApplication::translate("CreateZone", "Y base", 0, QApplication::UnicodeUTF8)); + TLZbase->setText(QApplication::translate("CreateZone", "Z base", 0, QApplication::UnicodeUTF8)); + TLXbase->setText(QApplication::translate("CreateZone", "X base", 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)); + 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)); + Name->setText(QApplication::translate("CreateZone", "Name", 0, QApplication::UnicodeUTF8)); + gBPipe->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLHaut_p->setText(QApplication::translate("CreateZone", "Height", 0, QApplication::UnicodeUTF8)); + TLXbase_p->setText(QApplication::translate("CreateZone", "X base", 0, QApplication::UnicodeUTF8)); + TLRadius_int->setText(QApplication::translate("CreateZone", "Internal radius", 0, QApplication::UnicodeUTF8)); + TLZbase_p->setText(QApplication::translate("CreateZone", "Z base", 0, QApplication::UnicodeUTF8)); + TLYbase_p->setText(QApplication::translate("CreateZone", "Y base", 0, QApplication::UnicodeUTF8)); + TLXaxis_p->setText(QApplication::translate("CreateZone", "X axis", 0, QApplication::UnicodeUTF8)); + TLYaxis_p->setText(QApplication::translate("CreateZone", "Y axis", 0, QApplication::UnicodeUTF8)); + TLZaxis_p->setText(QApplication::translate("CreateZone", "Z axis", 0, QApplication::UnicodeUTF8)); + TLRadius_ext->setText(QApplication::translate("CreateZone", "External radius", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(CreateZone); } // retranslateUi }; @@ -381,6 +851,4 @@ 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 index 0c98d284..aef1b45f 100644 --- a/src/HOMARDGUI/CreateZone.ui +++ b/src/HOMARDGUI/CreateZone.ui @@ -1,288 +1,594 @@ - - + CreateZone - - + + 0 0 - 415 - 472 + 551 + 880 - - Create Zone + + Create a zone - - false + + true - + true - - - - - Name + + + 9 + + + 6 + + + + + + 0 + 0 + 0 + 0 + - - - - - - 32 + + + + + 9 + + + 6 + + + + + Help + + + + + + + Cancel + + + + + + + Apply + + + + + + + OK + + + + - - - - + + + + + 0 + 0 0 0 - + 340 0 - + Type of zone - - - - - + + + 9 + + + 6 + + + + + Sphere - - - ../../resources/zone_boxdxyz.png../../resources/zone_boxdxyz.png + + ../../resources/zone_spherepoint.png - - true + + + + + + Pipe - - true + + ../../resources/pipe.png - - - - + + + + Cylinder - - - ../../resources/zone_spherepoint.png../../resources/zone_spherepoint.png + + ../../resources/cylinderpointvector.png + + + + + + + Box + + + ../../resources/zone_boxdxyz.png + + + true + + + true - - - - + + + + + 0 + 0 0 0 - + + Qt::TabFocus + + Coordinates - - - - - + + + 9 + + + 6 + + + + + 5 + + + 1000000000.000000000000000 + + + + + + + + 0 + 0 0 0 - - X mini + + Height - + false - - - + + + + + 0 + 0 + 0 + 0 + + + + Radius + + + false + + + + + + 5 - + + 999999999.000000000000000 + + -999999999.000000000000000 - + + 0.000000000000000 + + + + + + + 5 + + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 0 0 - - Y mini + + Z axis - + false - - - - 5 + + + + + 0 + 0 + 0 + 0 + - - -999999999.000000000000000 + + Y axis - - 999999999.000000000000000 - - - 0.000000000000000 + + false - - - - + + + + + 0 + 0 0 0 - - Z mini + + X axis - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - - X maxi + + Y base - + false - - - - + + + + + 0 + 0 0 0 - - Z maxi + + Z base - + false - - - + + + 5 - + + 999999999.000000000000000 + + -999999999.000000000000000 - + + 0.000000000000000 + + + + + + + 5 + + + 1000000000.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X base + + + false + + + + + + + 5 + + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + + + + 0 + 0 + 0 + 0 + + + + Coordinates + + + + 9 + + + 6 + + + + + + 0 + 0 0 0 - - Y maxi + + X centre - + false - - - + + + 5 - + + 999999999.000000000000000 + + -999999999.000000000000000 - + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Y centre + + + false + + + + + + + 5 + + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - + + + + + 0 + 0 + 0 + 0 + + + + Radius + + + false + + + + + + 5 - + + 999999999.000000000000000 + + -999999999.000000000000000 - + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Z centre + + + false + + + + + + + 5 + + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 @@ -290,142 +596,226 @@ - - - - + + + + + 0 + 0 0 0 - + Coordinates - - - - - + + + 9 + + + 6 + + + + + + 0 + 0 0 0 - - X centre + + X mini - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - - Y centre + + Y mini - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - - Radius + + Z mini - + false - - - + + + 5 - + + 999999999.000000000000000 + + -999999999.000000000000000 - + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X maxi + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z maxi + + + false + + + + + + + 5 + + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - - Z centre + + Y maxi - + false - - - + + + 5 - + + 999999999.000000000000000 + + -999999999.000000000000000 - + + 0.000000000000000 + + + + + + + 5 + + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 @@ -433,49 +823,325 @@ - - - - + + + + 32 + + + + + + + Name + + + + + + + + 0 + 0 0 0 - - + + Coordinates - - - 6 - - + + 9 - - - - &Ok + + 6 + + + + + + 0 + 0 + 0 + 0 + + + + Height + + + false - - - - &Apply + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 - - - - &Cancel + + + + + 0 + 0 + 0 + 0 + + + + X base + + + false + + + + + + + 5 + + + 1000000000.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + Internal radius + + + false - - - - &Help + + + + + 0 + 0 + 0 + 0 + + + + Z base + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Y base + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + X axis + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Y axis + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + Z axis + + + false + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 999999999.000000000000000 + + + -999999999.000000000000000 + + + 0.000000000000000 + + + + + + + 5 + + + 1000000000.000000000000000 + + + + + + + + 0 + 0 + 0 + 0 + + + + External radius + + + false + + + + + + + 5 + + + 1000000000.000000000000000 diff --git a/src/HOMARDGUI/EditFile.h b/src/HOMARDGUI/EditFile.h index d6c0f9ae..4248dd51 100644 --- a/src/HOMARDGUI/EditFile.h +++ b/src/HOMARDGUI/EditFile.h @@ -1,8 +1,8 @@ /******************************************************************************** ** 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 +** Created: Tue Mar 15 10:38:58 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -16,90 +16,87 @@ #include #include #include -#include #include #include #include #include -QT_BEGIN_NAMESPACE - class Ui_EditFile { public: - QGridLayout *gridLayout_2; - QTextBrowser *QTBEditFile; - QSpacerItem *verticalSpacer; - QGroupBox *GroupButtons; QGridLayout *gridLayout; - QPushButton *buttonQuit; + QSpacerItem *spacerItem; + QGroupBox *GroupButtons; + QGridLayout *gridLayout1; QPushButton *buttonPrint; - QPushButton *buttonHelp; - QSpacerItem *horizontalSpacer; + QPushButton *buttonQuit; + QSpacerItem *spacerItem1; + QTextBrowser *QTBEditFile; 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); + EditFile->setObjectName(QString::fromUtf8("EditFile")); + gridLayout = new QGridLayout(EditFile); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + spacerItem = new QSpacerItem(331, 49, QSizePolicy::Expanding, QSizePolicy::Minimum); - gridLayout_2->addWidget(QTBEditFile, 0, 0, 1, 2); + gridLayout->addItem(spacerItem, 2, 1, 1, 1); - verticalSpacer = new QSpacerItem(20, 14, QSizePolicy::Minimum, QSizePolicy::Expanding); + GroupButtons = new QGroupBox(EditFile); + GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); + gridLayout1 = new QGridLayout(GroupButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + buttonPrint = new QPushButton(GroupButtons); + buttonPrint->setObjectName(QString::fromUtf8("buttonPrint")); - gridLayout_2->addItem(verticalSpacer, 1, 0, 1, 1); + gridLayout1->addWidget(buttonPrint, 0, 1, 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); + 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); + gridLayout1->addWidget(buttonQuit, 0, 0, 1, 1); - buttonPrint = new QPushButton(GroupButtons); - buttonPrint->setObjectName(QString::fromUtf8("buttonPrint")); - gridLayout->addWidget(buttonPrint, 0, 1, 1, 1); + gridLayout->addWidget(GroupButtons, 2, 0, 1, 1); - buttonHelp = new QPushButton(GroupButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); + spacerItem1 = new QSpacerItem(20, 14, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addWidget(buttonHelp, 0, 2, 1, 1); + gridLayout->addItem(spacerItem1, 1, 0, 1, 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(GroupButtons, 2, 0, 1, 1); + gridLayout->addWidget(QTBEditFile, 0, 0, 1, 2); - horizontalSpacer = new QSpacerItem(249, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - gridLayout_2->addItem(horizontalSpacer, 2, 1, 1, 1); + retranslateUi(EditFile); + QSize size(675, 901); + size = size.expandedTo(EditFile->minimumSizeHint()); + EditFile->resize(size); - retranslateUi(EditFile); - QMetaObject::connectSlotsByName(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); + EditFile->setWindowTitle(QApplication::translate("EditFile", "Edit a file", 0, QApplication::UnicodeUTF8)); + GroupButtons->setTitle(QString()); + buttonPrint->setText(QApplication::translate("EditFile", "Print", 0, QApplication::UnicodeUTF8)); + buttonQuit->setText(QApplication::translate("EditFile", "Quit", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(EditFile); } // retranslateUi }; @@ -108,6 +105,4 @@ 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 index cccd2d76..266c3d35 100644 --- a/src/HOMARDGUI/EditFile.ui +++ b/src/HOMARDGUI/EditFile.ui @@ -5,38 +5,29 @@ 0 0 - 548 + 675 901 - Edit File + Edit a file - - - - - - 530 - 800 - - - - - Courier New - - - - - - + + + 9 + + + 6 + + + - Qt::Vertical + Qt::Horizontal - + - 20 - 14 + 331 + 49 @@ -46,11 +37,24 @@ - + + + 9 + + + 6 + + + + + Print + + + - &Quit + Quit true @@ -63,36 +67,37 @@ - - - - &Print - - - - - - - &Help - - - - - + + - Qt::Horizontal + Qt::Vertical - + - 249 - 20 + 20 + 14 + + + + + 530 + 800 + + + + + Courier New + + + + diff --git a/src/HOMARDGUI/HOMARDGUI.cxx b/src/HOMARDGUI/HOMARDGUI.cxx index cd7a585b..aa243a99 100644 --- a/src/HOMARDGUI/HOMARDGUI.cxx +++ b/src/HOMARDGUI/HOMARDGUI.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + // File : HOMARDGUI.cxx // Author : Paul RASCLE, EDF // Module : HOMARD @@ -45,6 +64,7 @@ using namespace std; #include "MonEditIteration.h" #include "MonEditHypothesis.h" #include "MonEditZone.h" +#include "MonEditBoundaryAn.h" #include "MonEditBoundaryDi.h" #include "HomardQtCommun.h" @@ -82,7 +102,7 @@ HOMARDGUI::~HOMARDGUI() //======================================================================= HOMARD::HOMARD_Gen_var HOMARDGUI::InitHOMARDGen(SalomeApp_Application* app) { - Engines::Component_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer","HOMARD" ); + Engines::EngineComponent_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; @@ -106,6 +126,7 @@ void HOMARDGUI::initialize( CAM_Application* app ) //================================================ void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle ) { +// MESSAGE("HOMARDGUI::createHOMARDAction"); QIcon icon; QWidget* parent = application()->desktop(); SUIT_ResourceMgr* resMgr = application()->resourceMgr(); @@ -113,13 +134,13 @@ void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QS 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 ); + 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() ); + QString tooltip = tr(QString( "HOM_TOP_%1" ).arg( po_id ).toLatin1().data()), + menu = tr(QString( "HOM_MEN_%1" ).arg( po_id ).toLatin1().data()), + status_bar = tr(QString( "HOM_STB_%1" ).arg( po_id ).toLatin1().data()); createAction( id, tooltip, icon, menu, status_bar, key, parent, toggle, this, SLOT( OnGUIEvent() ) ); } @@ -161,6 +182,7 @@ void HOMARDGUI::createPreferences(){ // Verifier l'avant dernier nombre passe en parametre //================================================ void HOMARDGUI::createMenus(){ + MESSAGE("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 @@ -226,8 +248,9 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) { case 1101: // Creation d un Cas { + MESSAGE("etape 1101") MESSAGE("command " << theCommandID << " activated"); - MonCreateCase *aDlg = new MonCreateCase( parent, TRUE, + MonCreateCase *aDlg = new MonCreateCase( parent, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ; aDlg->show(); break; @@ -238,7 +261,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) 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, + MonCreateIteration *IterDlg = new MonCreateIteration( parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), IterParentName ) ; IterDlg->show(); break; @@ -255,9 +278,8 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) } catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } @@ -312,11 +334,20 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) { MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() ); _PTR(SObject) obj = chercheMonObjet(); - if ((obj) and (HOMARD_UTILS::isBoundaryDi(obj))) + if ((obj)) { - MESSAGE(".. Lancement de MonEditBoundaryDi" ); - MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ; - aDlg->show(); + if (HOMARD_UTILS::isBoundaryDi(obj)) + { + MESSAGE(".. Lancement de MonEditBoundaryDi" ); + MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ; + aDlg->show(); + } + if (HOMARD_UTILS::isBoundaryAn(obj)) + { + MESSAGE(".. Lancement de MonEditBoundaryAn" ); + MonEditBoundaryAn *aDlg = new MonEditBoundaryAn(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ; + aDlg->show(); + } } } @@ -388,13 +419,13 @@ void HOMARDGUI::windows( QMap& theMap ) const void HOMARDGUI::setOrb() //============================================================================= { - try + try { ORB_INIT &init = *SINGLETON_::Instance(); ASSERT(SINGLETON_::IsAlreadyExisting()); _orb = init( 0 , 0 ); - } - catch (...) + } + catch (...) { INFOS("internal error : orb not found"); _orb = 0; @@ -410,7 +441,7 @@ _PTR(SObject) HOMARDGUI::chercheMonObjet() _PTR(SObject) obj; SALOME_ListIO lst; getApp()->selectionMgr()->selectedObjects( lst ); - if ( lst.Extent() == 1 ) + if ( lst.Extent() == 1 ) { Handle(SALOME_InteractiveObject) io = lst.First(); SalomeApp_Study* appStudy = dynamic_cast( application()->activeStudy() ); @@ -426,7 +457,7 @@ _PTR(SObject) HOMARDGUI::chercheMonObjet() void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& title ) //============================================================================= { - MESSAGE("Debut de contextMenuPopup"); + MESSAGE("Debut de HOMARDGUI::contextMenuPopup"); _PTR(SObject) obj = chercheMonObjet(); if ( obj ) { @@ -434,39 +465,44 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t _ObjectName = title; SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); // - if ( HOMARD_UTILS::isBoundaryDi(obj) ) + if ( HOMARD_UTILS::isBoundaryAn(obj) ) + { + QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" ); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_BOUNDARY").toLatin1().data()), this,SLOT(EditBoDi())); + } + else if ( HOMARD_UTILS::isBoundaryDi(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix), "Edit boundary", this,SLOT(EditBoDi())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_BOUNDARY").toLatin1().data()), 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())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_ZONE").toLatin1().data()), 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())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_HYPO").toLatin1().data()), 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())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_NEW_ITERATION").toLatin1().data()), this,SLOT(NextIter())); QPixmap pix1 = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix1), "Edit iteration", this,SLOT(EditIter())); + menu->addAction(QIcon(pix1), tr(QString("HOM_MEN_EDIT_ITERATION").toLatin1().data()), this,SLOT(EditIter())); QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "mesh_compute.png" ); - menu->addAction(QIcon(pix2), "Compute", this,SLOT(LanceCalcul())); + menu->addAction(QIcon(pix2), tr(QString("HOM_MEN_COMPUTE").toLatin1().data()), 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())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_CASE").toLatin1().data()), 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())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_MESS_FILE").toLatin1().data()), this,SLOT(EditAsciiFile())); } } } @@ -486,9 +522,9 @@ void HOMARDGUI::EditCase() this->OnGUIEvent(1120); } -void HOMARDGUI::EditIter() +void HOMARDGUI::EditIter() { - this->OnGUIEvent(1121); + this->OnGUIEvent(1121); } void HOMARDGUI::EditHypo() diff --git a/src/HOMARDGUI/HOMARDGUI.h b/src/HOMARDGUI/HOMARDGUI.h index 9fe03d61..6db12449 100644 --- a/src/HOMARDGUI/HOMARDGUI.h +++ b/src/HOMARDGUI/HOMARDGUI.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + // HOMARDGUI : HOMARD component GUI implemetation // diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.cxx b/src/HOMARDGUI/HOMARDGUI_Utils.cxx index 2db82b83..91e47210 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.cxx +++ b/src/HOMARDGUI/HOMARDGUI_Utils.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HOMARDGUI_Utils.h" @@ -36,8 +55,8 @@ SALOME_ListIO HOMARD_UTILS::mySelected; { return theStudy->studyDS(); } - - + + //================================================================ // Function : GetActiveStudy // Returne un pointeur sur l'etude active @@ -50,7 +69,7 @@ SUIT_Study* HOMARD_UTILS::GetActiveStudy() else return NULL; } - + //================================================================ // Function : GetActiveStudyDocument // Returne un pointeur sur l'etude active @@ -64,7 +83,7 @@ _PTR(Study) HOMARD_UTILS::GetActiveStudyDocument() else return _PTR(Study)(); } - + //================================================================ // Function : updateObjBrowser // Purpose : met a jour l arbre d 'etude pour Homard @@ -74,14 +93,14 @@ void HOMARD_UTILS::updateObjBrowser() SalomeApp_Application* app = dynamic_cast(SUIT_Session::session()->activeApplication()); if (app) { // Le nom identifiant doit etre la valeur du parametre - // name de la section HOMARD du fichier SalomeApp.xml + // name de la section HOMARD du fichier SalomeApp.xml CAM_Module* module = app->module("Homard" ); SalomeApp_Module* appMod = dynamic_cast( module ); if ( appMod ) { app->updateObjectBrowser(); appMod->updateObjBrowser( true ); } - else + else MESSAGE( "--- HOMARD::updateObjBrowser: appMod = NULL"); } } @@ -97,13 +116,13 @@ const SALOME_ListIO& HOMARD_UTILS::selectedIO() if( aSelectionMgr ) { aSelectionMgr->selectedObjects( mySelected ); - for (SALOME_ListIteratorOfListIO it (mySelected); it.More(); it.Next()) + for (SALOME_ListIteratorOfListIO it (mySelected); it.More(); it.Next()) SCRUTE(it.Value()->getEntry()); }; return mySelected; - + } - + //================================================================ // Function : IObjectCount // Return the number of selected objects @@ -120,7 +139,7 @@ int HOMARD_UTILS::IObjectCount() } return 0; } - + //================================================================ // Function : firstIObject // Purpose : Return the first selected object in the selected object list @@ -191,6 +210,13 @@ bool HOMARD_UTILS::isObject(_PTR(SObject) MonObj, QString TypeObject, int option return bOK ; } //================================================================ +// Retourne vrai si l objet est une frontiere analytique +//================================================================ +bool HOMARD_UTILS::isBoundaryAn(_PTR(SObject) MonObj) +{ + return isObject( MonObj, QString("BoundaryAnHomard"), -1 ) ; +} +//================================================================ // Retourne vrai si l objet est une frontiere discrete //================================================================ bool HOMARD_UTILS::isBoundaryDi(_PTR(SObject) MonObj) @@ -239,125 +265,6 @@ 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) diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.h b/src/HOMARDGUI/HOMARDGUI_Utils.h index 54fe6806..f202cadb 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.h +++ b/src/HOMARDGUI/HOMARDGUI_Utils.h @@ -1,21 +1,21 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is 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. +// 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 +// 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 // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org #ifndef HOMARD_H_UTILS #define HOMARD_H_UTILS @@ -51,19 +51,19 @@ 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 @@ -73,6 +73,7 @@ namespace HOMARD_UTILS { // of selected objects bool isXmgrace(_PTR(SObject) MonObj); + bool isBoundaryAn(_PTR(SObject) MonObj); bool isBoundaryDi(_PTR(SObject) MonObj); bool isZone(_PTR(SObject) MonObj); bool isHypo(_PTR(SObject) MonObj); @@ -82,15 +83,8 @@ namespace HOMARD_UTILS { 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; } diff --git a/src/HOMARDGUI/HOMARD_icons.po b/src/HOMARDGUI/HOMARD_icons.po deleted file mode 100644 index b386757a..00000000 --- a/src/HOMARDGUI/HOMARD_icons.po +++ /dev/null @@ -1,11 +0,0 @@ -# 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 \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 deleted file mode 100644 index eea471a9..00000000 --- a/src/HOMARDGUI/HOMARD_msg_en.po +++ /dev/null @@ -1,111 +0,0 @@ -# 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 \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 index bcc2452b..ab5b6538 100644 --- a/src/HOMARDGUI/HOMARD_msg_en.ts +++ b/src/HOMARDGUI/HOMARD_msg_en.ts @@ -1,69 +1,335 @@ + - - - - @default - - MEN_HOMARD - HOMARD - - - MEN_NEW_CASE - New case - - - MEN_NEW_ITERATION - Next iteration - - - MEN_COMPUTE - Compute - - - MEN_EDIT_CASE - Edit case - - - MEN_EDIT_ITERATION - Edit iteration - - - MEN_EDIT_HYPO - Edit hypothesis - - - MEN_EDIT_ZONE - Edit zone - - - MEN_EDIT_BOUNDARY - Edit boundary - - - MEN_EDIT_MESS_FILE - Show file - - + + + @default + + HOM_MEN_HOMARD + HOMARD + + + HOM_MEN_NEW_CASE + New case + + + HOM_MEN_NEW_ITERATION + Next iteration + + + HOM_MEN_COMPUTE + Compute + + + HOM_MEN_EDIT_CASE + Edit the case + + + HOM_MEN_EDIT_ITERATION + Edit the iteration + + + HOM_MEN_EDIT_HYPO + Edit the hypothesis + + + HOM_MEN_EDIT_ZONE + Edit the zone + + + HOM_MEN_EDIT_BOUNDARY + Edit the boundary + + + HOM_MEN_EDIT_MESS_FILE + Show the file + + + HOM_TOP_HOMARD + HOMARD + + + HOM_TOP_NEW_CASE + New case + + + HOM_TOP_NEW_ITERATION + Next iteration + + + HOM_TOP_COMPUTE + Compute + + + HOM_TOP_EDIT_CASE + Edit the case + + + HOM_TOP_EDIT_ITERATION + Edit the iteration + + + HOM_TOP_EDIT_HYPO + Edit the hypothesis + + + HOM_TOP_EDIT_ZONE + Edit the zone + + + HOM_TOP_EDIT_BOUNDARY + Edit the boundary + + + HOM_TOP_EDIT_MESS_FILE + Show the file + + + HOM_STB_HOMARD + HOMARD + + + HOM_STB_NEW_CASE + New case + + + HOM_STB_NEW_ITERATION + Next iteration + + + HOM_STB_COMPUTE + Compute + + + HOM_STB_EDIT_CASE + Edit the case + + + HOM_STB_EDIT_ITERATION + Edit the iteration + + + HOM_STB_EDIT_HYPO + Edit the hypothesis + + + HOM_STB_EDIT_ZONE + Edit the zone + + + HOM_STB_EDIT_BOUNDARY + Edit the boundary + + + HOM_STB_EDIT_MESS_FILE + Show the file + + + HOM_WARNING + Warning + + + HOM_ERROR + Error + + + HOM_INACTIVE_BUTTON + Inactive button + + + HOM_SELECT_OBJECT_1 + Select an object. + + + HOM_SELECT_OBJECT_2 + Select only one object. + + + HOM_SELECT_OBJECT_3 + Select an object with type %1. + + + HOM_SELECT_FILE_1 + Select a file. + + + HOM_SELECT_FILE_2 + Select only one file. + + + HOM_MED_FILE_1 + This MED file cannot be read. + + + HOM_MED_FILE_2 + No mesh in this MED file. + + + HOM_MED_FILE_3 + More than one mesh in this MED file. + + + HOM_MED_FILE_4 + The mesh in this MED file cannot be read. + + + HOM_MED_FILE_5 + No field in this MED file. + + + HOM_MED_FILE_6 + The field(s) in this MED file cannot be read. + + + HOM_SELECT_STUDY + Select a study object with associated MED file \n or select a MED file. + + + HOM_CASE_NAME + The case must be named. + + + HOM_CASE_DIRECTORY_1 + A directory for the case must be selected. + + + HOM_CASE_DIRECTORY_2 + This directory is already used. + + + HOM_CASE_DIRECTORY_3 + A valid directory for the case must be selected. + + + HOM_CASE_MESH + The file of the initial mesh must be selected. + + + HOM_CASE_GROUP + The group "%1" cannot be given for more than 1 boundary. + + + HOM_CASE_EDIT_WINDOW_TITLE + Edition of a case + + + HOM_ITER_NAME + The iteration must be named. + + + HOM_ITER_STARTING_POINT + The previous iteration must be given. + + + HOM_ITER_MESH + Give a name for the final mesh. + + + HOM_ITER_HYPO + An hypothesis must be selected. + + + HOM_ITER_FIELD_FILE + With this hypothesis, a file for the field must be given. + + + HOM_ITER_STARTING_POINT_0 + Mesh + + + HOM_ITER_STARTING_POINT_1 + First iteration of the case + + + HOM_ITER_EDIT_WINDOW_TITLE + Edition of an iteration + + + HOM_HYPO_NAME + The hypothesis must be named. + + + HOM_HYPO_FIELD_FILE + A file for the field must be given. + + + HOM_HYPO_ZONE_1 + A zone must be selected. + + + HOM_HYPO_ZONE_2 + At least, one zone must be selected. + + + HOM_HYPO_ZONE_3 + Either refinement or coarsening, but not both. + + + HOM_HYPO_NORM_L2 + L2 norm + + + HOM_HYPO_NORM_INF + Infinite norm + + + HOM_HYPO_NORM_ABS + Absolute + + + HOM_HYPO_NORM_REL + Relative + + + HOM_HYPO_COMP + At least, one component must be selected. + + + HOM_HYPO_EDIT_WINDOW_TITLE + Edition of an hypothesis + + + HOM_ZONE_NAME + The zone must be named. + + + HOM_ZONE_LIMIT + %1 maxi must be greater than %1 mini. + + + HOM_ZONE_RAYON + The external radius must be greater than the internal radius. + + + HOM_ZONE_EDIT_WINDOW_TITLE + Edition of a zone + + + HOM_BOUN_NAME + The boundary must be named. + + + HOM_BOUN_MESH + The file for the mesh of the boundary must be selected. + + + HOM_BOUN_CASE + The meshfile of the case is unknown. + + + HOM_AXE + The axis must be a non 0 vector. + + + HOM_BOUN_A_EDIT_WINDOW_TITLE + Edition of an analytical boundary + + + HOM_BOUN_D_EDIT_WINDOW_TITLE + Edition of a discrete boundary + + + HOM_GROU_EDIT_WINDOW_TITLE + Selected groups + + diff --git a/src/HOMARDGUI/HOMARD_msg_fr.po b/src/HOMARDGUI/HOMARD_msg_fr.po deleted file mode 100644 index 9023c6a0..00000000 --- a/src/HOMARDGUI/HOMARD_msg_fr.po +++ /dev/null @@ -1,31 +0,0 @@ -# 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 \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 index 9a1a4271..5863f16a 100644 --- a/src/HOMARDGUI/HOMARD_msg_fr.ts +++ b/src/HOMARDGUI/HOMARD_msg_fr.ts @@ -1,65 +1,691 @@ + - - - - @default - - MEN_HOMARD - HOMARD - - - MEN_NEW_CASE - New case - - - MEN_NEW_ITERATION - New iteration - - - MEN_COMPUTE - Compute - - - MEN_EDIT_CASE - Edit case - - - MEN_EDIT_ITERATION - Edit iteration - - - MEN_EDIT_HYPO - Edit hypothesis - - - MEN_EDIT_ZONE - Edit zone - - - MEN_EDIT_BOUNDARY - Edit boundary - - + + + @default + + HOM_MEN_HOMARD + HOMARD + + + HOM_MEN_NEW_CASE + Nouveau cas + + + HOM_MEN_NEW_ITERATION + Nouvelle itération + + + HOM_MEN_COMPUTE + Calculer + + + HOM_MEN_EDIT_CASE + Editer le cas + + + HOM_MEN_EDIT_ITERATION + Editer l'itération + + + HOM_MEN_EDIT_HYPO + Editer l'hypothèse + + + HOM_MEN_EDIT_ZONE + Editer la zone + + + HOM_MEN_EDIT_BOUNDARY + Editer la frontière + + + HOM_MEN_EDIT_MESS_FILE + Afficher le fichier + + + HOM_TOP_HOMARD + HOMARD + + + HOM_TOP_NEW_CASE + Nouveau cas + + + HOM_TOP_NEW_ITERATION + Nouvelle itération + + + HOM_TOP_COMPUTE + Calculer + + + HOM_TOP_EDIT_CASE + Editer le cas + + + HOM_TOP_EDIT_ITERATION + Editer l'itération + + + HOM_TOP_EDIT_HYPO + Editer l'hypothèse + + + HOM_TOP_EDIT_ZONE + Editer la zone + + + HOM_TOP_EDIT_BOUNDARY + Editer la frontière + + + HOM_TOP_EDIT_MESS_FILE + Afficher le fichier + + + HOM_STB_HOMARD + HOMARD + + + HOM_STB_NEW_CASE + Nouveau cas + + + HOM_STB_NEW_ITERATION + Nouvelle itération + + + HOM_STB_COMPUTE + Calculer + + + HOM_STB_EDIT_CASE + Editer le cas + + + HOM_STB_EDIT_ITERATION + Editer l'itération + + + HOM_STB_EDIT_HYPO + Editer l'hypothèse + + + HOM_STB_EDIT_ZONE + Editer la zone + + + HOM_STB_EDIT_BOUNDARY + Editer la frontière + + + HOM_STB_EDIT_MESS_FILE + Afficher le fichier + + + HOM_WARNING + Avertissement + + + HOM_ERROR + Erreur + + + HOM_INACTIVE_BUTTON + Bouton inactif + + + OK + Appliquer et fermer + + + Apply + Appliquer + + + Cancel + Annuler + + + Help + Aide + + + New + Nouveau + + + Edit + Editer + + + Quit + Quitter + + + Name + Nom + + + Directory + Répertoire + + + Mesh + Maillage + + + Selection + Sélection + + + None + Aucun + + + All + Tout + + + HOM_SELECT_OBJECT_1 + Sélectionner un objet. + + + HOM_SELECT_OBJECT_2 + Sélectionner un seul objet. + + + HOM_SELECT_OBJECT_3 + Sélectionner un objet de type %1. + + + HOM_SELECT_FILE_1 + Sélectionner un fichier. + + + HOM_SELECT_FILE_2 + Sélectionner un seul fichier. + + + HOM_MED_FILE_1 + Ce fichier MED est illisible. + + + HOM_MED_FILE_2 + Ce fichier MED ne contient aucun maillage. + + + HOM_MED_FILE_3 + Ce fichier MED contient plus d'un maillage. + + + HOM_MED_FILE_4 + Impossible de lire le maillage de ce fichier MED. + + + HOM_MED_FILE_5 + Ce fichier MED ne contient aucun champ. + + + HOM_MED_FILE_6 + Impossible de lire le(s) champ(s) de ce fichier MED. + + + HOM_SELECT_STUDY + Sélectionner une étude avec un fichier MED associé\n ou sélectionner un fichier MED. + + + Create a case + Création d'un cas + + + HOM_CASE_NAME + Il faut donner un nom au cas. + + + HOM_CASE_DIRECTORY_1 + Il faut choisir un répertoire de travail pour le cas. + + + HOM_CASE_DIRECTORY_2 + Ce répertoire est déjà utilisé. + + + HOM_CASE_DIRECTORY_3 + Un répertoire valide doit être choisi. + + + HOM_CASE_MESH + Il faut choisir le maillage initial. + + + HOM_CASE_GROUP + Le groupe "%1" ne peut pas être attribué à plus d'une frontière. + + + HOM_CASE_EDIT_WINDOW_TITLE + Edition d'un cas + + + HOM_ITER_NAME + Il faut donner un nom à l'itération. + + + HOM_ITER_STARTING_POINT + Il faut désigner l'itération précédente. + + + HOM_ITER_MESH + Donner le nom du maillage final. + + + HOM_ITER_HYPO + Choisir une hypothèse. + + + HOM_ITER_FIELD_FILE + Avec cette hypothèse, il faut fournir le fichier du champ. + + + HOM_ITER_STARTING_POINT_0 + Maillage + + + HOM_ITER_STARTING_POINT_1 + Itération initiale du cas + + + HOM_ITER_EDIT_WINDOW_TITLE + Edition d'une itération + + + Discrete boundary + Frontière discrète + + + Analytical boundary + Frontière analytique + + + Conformity type + Type de conformité + + + Conformal + Conforme + + + Non conformal + Non conforme + + + Non conformal option + Option de non conformité + + + Free + Libre + + + 1 hanging node per mesh + 1 noeud pendant par maille + + + 1 node per edge + 1 noeud pendant par arête + + + Advanced options + Options avancées + + + Authorized pyramids + Pyramides autorisées + + + Minimal diameter + Diamètre minimal + + + Initialization of adaptation + Initialisation de l'adaptation + + + Maximal level + Niveau maximal + + + Create an iteration + Création d'une itération + + + Iteration Name + Nom de l'itération + + + Previous iteration + Itération précédente + + + Mesh n + Maillage n + + + Mesh n+1 + Maillage n+1 + + + Field information + Information sur les champs + + + Field file + Fichier des champs + + + No time step + Sans pas de temps + + + Last time step + Dernier pas de temps + + + Chosen time step + Pas de temps choisi + + + Time step + Pas de temps + + + Rank + Numéro d'ordre + + + Hypothesis + Hypothèse + + + Create an hypothesis + Création d'une hypothèse + + + HOM_HYPO_NAME + Il faut donner un nom à l'hypothèse. + + + HOM_HYPO_FIELD_FILE + Il faut fournir le fichier du champ. + + + HOM_HYPO_ZONE_1 + Choisir une zone. + + + HOM_HYPO_ZONE_2 + Il faut choisir au moins une zone. + + + HOM_HYPO_ZONE_3 + Raffinement ou déraffinement, mais pas les deux. + + + HOM_HYPO_NORM_L2 + Norme L2 + + + HOM_HYPO_NORM_INF + Norme infinie + + + HOM_HYPO_NORM_ABS + Absolu + + + HOM_HYPO_NORM_REL + Relatif + + + HOM_HYPO_COMP + Il faut choisir au moins une composante. + + + HOM_HYPO_EDIT_WINDOW_TITLE + Edition d'une hypothèse + + + Type of adaptation + Type d'adaptation + + + Uniform + Uniforme + + + Driven by a field + Pilotage par un champ + + + With geometrical zones + Selon des zones géométriques + + + Uniform adaptation + Adaptation uniforme + + + Coarsening + Déraffinement + + + Refinement + Raffinement + + + Nothing + Rien + + + File of the fields + Fichier des champs + + + Governing field for the adaptation + Champ pilotant l'adaptation + + + Field name + Nom du champ + + + Jump between elements + Saut entre éléments + + + Component + Composante + + + Refinement threshold + Seuil de raffinement + + + Coarsening threshold + Seuil de déraffinement + + + Percentage of meshes + Pourcentage de mailles + + + No refinement + Sans raffinement + + + No coarsening + Sans déraffinement + + + Zone management + Gestion des zones + + + Zone name + Nom de la zone + + + Field Interpolation + Interpolation des champs + + + Chosen + Choisi + + + Create a zone + Création d'une zone + + + HOM_ZONE_NAME + Il faut donner un nom à la zone. + + + HOM_ZONE_LIMIT + %1 maxi doit être plus grand que %1 mini. + + + HOM_ZONE_RAYON + Le rayon externe doit être supérieur au rayon interne. + + + HOM_ZONE_EDIT_WINDOW_TITLE + Edition d'une zone + + + Type of zone + Type de la zone + + + Box + Boîte + + + Sphere + Sphère + + + Cylinder + Cylindre + + + Disk + Disque + + + Disk with hole + Disque avec trou + + + Pipe + Tuyau + + + Coordinates + Coordonnées + + + Create an analytical boundary + Création d'une frontière analytique + + + Create a discrete boundary + Création d'une frontière discrète + + + Type of boundary + Type de la frontière + + + Radius + Rayon + + + External radius + Rayon externe + + + Internal radius + Rayon interne + + + Height + Hauteur + + + X axis + X axe + + + Y axis + Y axe + + + Z axis + Z axe + + + HOM_BOUN_NAME + Il faut donner un nom à la frontière. + + + HOM_BOUN_MESH + Il faut choisir le maillage qui contient la frontière. + + + HOM_BOUN_CASE + Le fichier du maillage du cas est inconnu. + + + HOM_AXE + L'axe doit être un vecteur non nul. + + + HOM_BOUN_A_EDIT_WINDOW_TITLE + Edition d'une frontière analytique + + + HOM_BOUN_D_EDIT_WINDOW_TITLE + Edition d'une frontière discrète + + + HOM_GROU_EDIT_WINDOW_TITLE + Groupes choisis + + + Filtering with groups + Filtrage par les groupes + + + Selection of groups + Choix des groupes + + + Selected groups + Groupes choisis + + + Group + Groupe + + + Edit a file + Affichage d'un fichier + + + Print + Imprimer + + diff --git a/src/HOMARDGUI/HomardConfigFile.cxx b/src/HOMARDGUI/HomardConfigFile.cxx deleted file mode 100644 index 834472dd..00000000 --- a/src/HOMARDGUI/HomardConfigFile.cxx +++ /dev/null @@ -1,195 +0,0 @@ -// -// 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 -#include -#include -#include -#include - - - - -//============================================================================= -/*! - * - */ -//============================================================================= - -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 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 l2(t2,t2+7); - _motscle_oui_non=l2; - - string t3[] = {string("ModeHOMA"), string("EcriFiHO")}; - std::list 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 & liste, const motcle motclef ) -{ - bool ok = false; - std::list::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::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 deleted file mode 100644 index 0c3de371..00000000 --- a/src/HOMARDGUI/HomardConfigFile.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// -// File : HomardConfigFile.hxx -// Author : Paul RASCLE, EDF -// Module : SMESH - - -#ifndef _HOMARD_CONFIG_FILE -#define _HOMARD_CONFIG_FILE - -#include -#include -#include - -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 _motscle_ss_valeur; - std::list _motscle_oui_non ; - std::list _motscle_autre; - - std::map _dictValeur; - std::map _dictValeuroui; - - string _nomFichier; - string _prefix; - bool _bBilan; - string _myDir; - - bool cherche_dans_liste(std::list & liste , const motcle motclef); -} ; -#endif diff --git a/src/HOMARDGUI/HomardDlg.h b/src/HOMARDGUI/HomardDlg.h deleted file mode 100644 index c4a1134e..00000000 --- a/src/HOMARDGUI/HomardDlg.h +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************** -** 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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 index 08ae65d5..1858afed 100644 --- a/src/HOMARDGUI/HomardQtCommun.cxx +++ b/src/HOMARDGUI/HomardQtCommun.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HomardQtCommun.h" #include "HOMARDGUI_Utils.h" @@ -15,7 +34,7 @@ #include "SalomeApp_Tools.h" using namespace std; -extern "C" +extern "C" { #include } @@ -30,141 +49,145 @@ QString HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int grave ) // 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(""); + int nbSel = HOMARD_UTILS::IObjectCount() ; + if ( nbSel == 0 ) + { + if ( grave == 1 ) + { + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_SELECT_OBJECT_1") ); } - - Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); - if ( aIO->hasEntry() ) + return QString(""); + } + if ( nbSel > 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_2") ); + 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(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 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_3").arg(commentaire) ); + return QString(""); + } + if (aSO->FindAttribute(anAttr, "AttributeName") ) { - _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; - } + _PTR(AttributeName) attributName = anAttr; + QString aName= QString(attributName->Value().data()); + return aName; } } - return QString(""); + } +// + 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(""); + QString aName = QString(""); + int nbSel = HOMARD_UTILS::IObjectCount() ; + if ( nbSel == 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_1") ); + return QString(""); + } + if ( nbSel > 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_2") ); + 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; } - 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(""); + return QString(""); } // ======================================================================= QString HOMARD_QT_COMMUN::PushNomFichier(bool avertir) // ======================================================================= -// Gestion les boutons qui permettent de +// 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 +// 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 ); + 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::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_FILE_2") ); + } + 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()); } } - aFile = QFileDialog::getOpenFileName(); - if (!aFile.isEmpty()) - { - aFile=aFile; - } + } } - } - return aFile; + } + + if ( aFile==QString::null ) + { + if ( avertir ) { + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_SELECT_STUDY") ); + } + aFile = QFileDialog::getOpenFileName(); + if (!aFile.isEmpty()) + { + aFile=aFile; + } + } + } + return aFile; } @@ -174,55 +197,76 @@ int HOMARD_QT_COMMUN::OuvrirFichier(QString aFile) // ======================================================================= // renvoie le medId associe au fichier Med apres ouverture { - int MedIdt = MEDouvrir(const_cast(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; + med_int medIdt = MEDfileOpen(aFile.toStdString().c_str(),MED_ACC_RDONLY); + if (medIdt <0) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_1") ); + } + return (int) 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; + med_int medIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile); + med_int numberOfMeshes = MEDnMesh(medIdt) ; + if (numberOfMeshes == 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_2") ); + } + if (numberOfMeshes > 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_3") ); + } + + QString nomMaillage= HOMARD_QT_COMMUN::LireNomMaillage(medIdt,1); + MEDfileClose(medIdt); + return nomMaillage; } // ======================================================================= -QString HOMARD_QT_COMMUN::LireNomMaillage(int MedIdt ,int MeshId) +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; + QString NomMaillage=QString::null; + char meshname[MED_NAME_SIZE+1]; + med_int spacedim,meshdim; + med_mesh_type meshtype; + char descriptionription[MED_COMMENT_SIZE+1]; + char dtunit[MED_SNAME_SIZE+1]; + med_sorting_type sortingtype; + med_int nstep; + med_axis_type axistype; + int naxis = MEDmeshnAxis(medIdt,1); + char *axisname=new char[naxis*MED_SNAME_SIZE+1]; + char *axisunit=new char[naxis*MED_SNAME_SIZE+1]; + med_err aRet = MEDmeshInfo(medIdt, + meshId, + meshname, + &spacedim, + &meshdim, + &meshtype, + descriptionription, + dtunit, + &sortingtype, + &nstep, + &axistype, + axisname, + axisunit); + + if ( aRet < 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_4") ); + } + else + { + NomMaillage=QString(meshname); + } + return NomMaillage; } @@ -232,182 +276,121 @@ std::list HOMARD_QT_COMMUN::GetListeChamps(QString aFile) { // Il faut voir si plusieurs maillages - MESSAGE("HOMARD_QT_COMMUN::GetListeChamps"); - std::list 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; - } + MESSAGE("HOMARD_QT_COMMUN::GetListeChamps"); + std::list ListeChamp; + + char *comp, *unit; + char nomcha [MED_NAME_SIZE+1]; + char meshname[MED_NAME_SIZE+1]; + med_field_type typcha; + med_int ncomp; + med_bool local; + med_int nbofcstp; + + SCRUTE(aFile.toStdString()); + med_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 = MEDnField(medIdt) ; + if (ncha < 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_5") ); + MEDfileClose(medIdt); + return ListeChamp; + } + + for (int i=0; i< ncha; i++) + { + /* Lecture du type du champ, des noms des composantes et du nom de l'unite*/ + ncomp = MEDfieldnComponent(medIdt,i+1); + comp = (char*) malloc(ncomp*MED_SNAME_SIZE+1); + unit = (char*) malloc(ncomp*MED_SNAME_SIZE+1); + char dtunit[MED_SNAME_SIZE+1]; + if ( MEDfieldInfo(medIdt,i+1,nomcha,meshname,&local,&typcha,comp,unit,dtunit,&nbofcstp) < 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_6") ); + MEDfileClose(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; + ListeChamp.push_back(QString(nomcha)); + free(comp); + free(unit); + } + MEDfileClose(medIdt); + return ListeChamp; } // ====================================================================================== std::list 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 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 ListeComposants; + + char *comp, *unit; + char nomcha [MED_NAME_SIZE+1]; + char meshname[MED_NAME_SIZE+1]; + med_field_type typcha; + med_int ncomp; + med_bool local; + med_int nbofcstp; + + int medIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile); + if ( medIdt < 0 ) { return ListeComposants; } + + + // Lecture du nombre de champs + med_int ncha = MEDnField(medIdt) ; + if (ncha < 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_5") ); + MEDfileClose(medIdt); + return ListeComposants; + } + + for (int i=0; i< ncha; i++) + { + /* Lecture du type du champ, des noms des composantes et du nom de l'unite*/ + ncomp = MEDfieldnComponent(medIdt,i+1); + comp = (char*) malloc(ncomp*MED_SNAME_SIZE+1); + unit = (char*) malloc(ncomp*MED_SNAME_SIZE+1); + char dtunit[MED_SNAME_SIZE+1]; + + if ( MEDfieldInfo(medIdt,i+1,nomcha,meshname,&local,&typcha,comp,unit,dtunit,&nbofcstp) < 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_6") ); + MEDfileClose(medIdt); + return ListeComposants; + } + + if ( QString(nomcha) != aChamp ) { + free(comp); + free(unit); + continue; + } -// ======================================================================= -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; - } - } + for (int j = 0; j #include #include -extern "C" -{ -#include -} class QComboBox; @@ -32,9 +47,6 @@ namespace HOMARD_QT_COMMUN std::list GetListeChamps(QString aFile); std::list GetListeComposants(QString aFile, QString aChamp); - void Recopie(QString aDir, QString aFichier); - void Creetmp(); - QString SelectionArbreEtude(QString commentaire, int grave ); QString SelectionCasEtude(); diff --git a/src/HOMARDGUI/Makefile.am b/src/HOMARDGUI/Makefile.am index 940c38ef..a1b64618 100644 --- a/src/HOMARDGUI/Makefile.am +++ b/src/HOMARDGUI/Makefile.am @@ -1,33 +1,32 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 # -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# -* Makefile *- -# Author : +# Author : # Modified by : Alexander BORODIN (OCN) - autotools usage # -# header files +# header files include $(top_srcdir)/adm_local/unix/make_common_starter.am salomeinclude_HEADERS = \ + MonCreateBoundaryAn.h \ + CreateBoundaryAn.h \ + MonEditBoundaryAn.h \ MonCreateBoundaryDi.h \ CreateBoundaryDi.h \ MonEditBoundaryDi.h \ @@ -41,13 +40,13 @@ salomeinclude_HEADERS = \ CreateHypothesis.h \ MonEditHypothesis.h \ MonCreateListGroup.h \ + CreateListGroup.h \ MonEditListGroup.h \ MonCreateIteration.h \ CreateIteration.h \ MonEditIteration.h \ HOMARDGUI.h \ HOMARDGUI_Utils.h \ - HomardDlg.h \ EditFile.h \ MonEditFile.h \ HomardQtCommun.h @@ -59,7 +58,8 @@ lib_LTLIBRARIES = libHOMARD.la dist_libHOMARD_la_SOURCES = \ HOMARDGUI.cxx \ HOMARDGUI_Utils.cxx \ - HomardConfigFile.cxx \ + MonCreateBoundaryAn.cxx \ + MonEditBoundaryAn.cxx \ MonCreateBoundaryDi.cxx \ MonEditBoundaryDi.cxx \ MonCreateCase.cxx \ @@ -78,6 +78,8 @@ dist_libHOMARD_la_SOURCES = \ # MOC pre-processing MOC_FILES = \ HOMARDGUI_moc.cxx \ + MonCreateBoundaryAn_moc.cxx \ + MonEditBoundaryAn_moc.cxx \ MonCreateBoundaryDi_moc.cxx \ MonEditBoundaryDi_moc.cxx \ MonCreateCase_moc.cxx \ @@ -98,8 +100,9 @@ libHOMARD_la_CPPFLAGS = \ $(QT_INCLUDES) \ $(CAS_CPPFLAGS) \ $(PYTHON_INCLUDES) \ - $(MED2_INCLUDES) \ + $(MED3_INCLUDES) \ $(HDF5_INCLUDES) \ + $(BOOST_CPPFLAGS) \ $(CORBA_CXXFLAGS) \ $(CORBA_INCLUDES) \ $(KERNEL_CXXFLAGS) \ @@ -107,15 +110,16 @@ libHOMARD_la_CPPFLAGS = \ -I$(srcdir)/../HOMARD \ -I$(srcdir)/../HOMARD_I \ -I$(top_builddir)/idl \ + -I$(top_builddir) \ -I$(VISU_ROOT_DIR)/include/salome \ -I$(MED_ROOT_DIR)/include/salome \ - -I$(top_builddir)/salome_adm/unix + -I$(top_builddir)/adm_local/unix libHOMARD_la_LDFLAGS = \ ../../idl/libSalomeIDLHOMARD.la \ ../HOMARD_I/libHOMARDEngine.la \ $(KERNEL_LDFLAGS) \ - $(MED2_LIBS) \ + $(MED3_LIBS) \ -lSalomeLifeCycleCORBA \ $(GUI_LDFLAGS) \ -lSalomeApp \ @@ -123,6 +127,17 @@ libHOMARD_la_LDFLAGS = \ # resources files nodist_salomeres_DATA = \ - HOMARD_msg_en.qm -# HOMARD_msg_fr.qm -# HOMARD_icons.qm + HOMARD_msg_en.qm \ + HOMARD_msg_fr.qm + +UI_FILES = \ +CreateBoundaryAn.ui \ +CreateBoundaryDi.ui \ +CreateCase.ui \ +CreateHypothesis.ui \ +CreateIteration.ui \ +CreateListGroup.ui \ +CreateZone.ui \ +EditFile.ui + +EXTRA_DIST += $(UI_FILES) diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.cxx b/src/HOMARDGUI/MonCreateBoundaryAn.cxx new file mode 100644 index 00000000..925e6978 --- /dev/null +++ b/src/HOMARDGUI/MonCreateBoundaryAn.cxx @@ -0,0 +1,351 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +using namespace std; + +#include "MonCreateBoundaryAn.h" +#include "MonCreateCase.h" + +#include +#include + +#include "SalomeApp_Tools.h" +#include "HOMARDGUI_Utils.h" +#include "HomardQtCommun.h" +#include + +#include +#include +#include +#include +#include + +// ------------------------------------------------------------------------------------------------------------------------ +MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal, + HOMARD::HOMARD_Gen_var myHomardGen, + QString caseName) : +// ------------------------------------------------------------------------------------------------------------------------------ +/* Constructs a MonCreateBoundaryAn + appele pour une vraie creation + initialise un cylindre et non une sphere +*/ + QDialog(0), Ui_CreateBoundaryAn(), + _parent(parent), + _aBoundaryAnName (""), + _aCaseName(caseName), + _BoundaryType(1), + _BoundaryAnXcentre(0), _BoundaryAnYcentre(0), _BoundaryAnZcentre(0), _BoundaryAnRayon(0), + _BoundaryAnXaxis(0), _BoundaryAnYaxis(0), _BoundaryAnZaxis(0), + _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(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", "cylinderpointvector.png" ); + QIcon IS2=QIcon(pix2); + RBCylindre->setIcon(IS2); + + InitConnect( ); + + SetNewBoundaryAnName() ; + InitValBoundaryAn(); // Cherche les valeurs de la boite englobante le maillage + InitMinMax(); // Initialise les bornes des boutons + SetCylinder(); // Propose un cylindre en premier choix + } +// -------------------------------------------------------------------------------------------------------------- +MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, + HOMARD::HOMARD_Gen_var myHomardGen, + QString caseName): +// -------------------------------------------------------------------------------------------------------------- +// Constructeur appele par MonEditBoundaryAn +// + QDialog(0), Ui_CreateBoundaryAn(), + _myHomardGen(myHomardGen), + _parent(parent), + _aBoundaryAnName (""), + _aCaseName(caseName), + _BoundaryType(1), + _BoundaryAnXcentre(0), _BoundaryAnYcentre(0), _BoundaryAnZcentre(0), _BoundaryAnRayon(0), + _BoundaryAnXaxis(0), _BoundaryAnYaxis(0), _BoundaryAnZaxis(0), + // Pour affichage lors de l edition d une BoundaryAn sans nom de Cas + _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0), + _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 MonCreateBoundaryAn") + 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", "cylinderpointvector.png" ); + QIcon IS2=QIcon(pix2); + RBCylindre->setIcon(IS2); + setModal(true); + InitConnect(); + } + +// ------------------------------------------------------------------------ +MonCreateBoundaryAn::~MonCreateBoundaryAn() +// ------------------------------------------------------------------------ +{ + // no need to delete child widgets, Qt does it all for us +} +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::InitConnect() +// ------------------------------------------------------------------------ +{ + connect( RBCylindre, SIGNAL(clicked()) , this, SLOT(SetCylinder()) ) ; + 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 MonCreateBoundaryAn::InitValBoundaryAn() +// ------------------------------------------------------------------------ +{ +// +// 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 frontieres +// en X + _Xcentre=(_Xmin + _Xmax)/2.; +// en Y + _Ycentre=(_Ymin + _Ymax)/2.; +// en Z + _Zcentre=(_Zmin + _Zmax)/2.; +// Rayon + _Rayon= _DMax/4.; +} + +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::InitMinMax() +// ------------------------------------------------------------------------ +{ +// en X + SpinBox_Xaxis->setSingleStep(0.1); + SpinBox_Xcentre->setSingleStep(_Xincr); +//en Y + SpinBox_Yaxis->setSingleStep(0.1); + SpinBox_Ycentre->setSingleStep(_Yincr); +//en Z + SpinBox_Zaxis->setSingleStep(0.1); + SpinBox_Zcentre->setSingleStep(_Zincr); +// Rayon + SpinBox_Radius->setSingleStep(_Rayon/10.); + SpinBox_Radius->setMinimum(0.); + SpinBox_Rayon->setSingleStep(_Rayon/10.); + SpinBox_Rayon->setMinimum(0.); +} +// ------------------------------------------------------------------------ +bool MonCreateBoundaryAn::PushOnApply() +// ------------------------------------------------------------------------ +// Appele lorsque l'un des boutons Ok ou Apply est presse +// +{ + std::cerr << LEBoundaryName->text().trimmed().toStdString() << std::endl; + if (LEBoundaryName->text().trimmed()=="") + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_NAME") ); + return false; + } + + switch (_BoundaryType) + { + case 1 : // il s agit d un cylindre + { + if ((_BoundaryAnXcentre != SpinBox_Xcent->value()) or + (_BoundaryAnYcentre != SpinBox_Ycent->value()) or + (_BoundaryAnZcentre != SpinBox_Zcent->value()) or + (_BoundaryAnRayon != SpinBox_Radius->value()) or + (_BoundaryAnXaxis != SpinBox_Xaxis->value()) or + (_BoundaryAnYaxis != SpinBox_Yaxis->value()) or + (_BoundaryAnZaxis != SpinBox_Zaxis->value()) ) + { + Chgt = true; + _BoundaryAnXaxis= SpinBox_Xaxis->value(); + _BoundaryAnYaxis= SpinBox_Yaxis->value(); + _BoundaryAnZaxis= SpinBox_Zaxis->value(); + _BoundaryAnXcentre=SpinBox_Xcent->value(); + _BoundaryAnYcentre=SpinBox_Ycent->value(); + _BoundaryAnZcentre=SpinBox_Zcent->value(); + _BoundaryAnRayon=SpinBox_Radius->value(); + double daux = _BoundaryAnXaxis*_BoundaryAnXaxis + _BoundaryAnYaxis*_BoundaryAnYaxis + _BoundaryAnZaxis*_BoundaryAnZaxis ; + if ( daux < 0.0000001 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_AXE") ); + return false; + } + } + break; + } + + case 2 : // il s agit d une sphere + { + if ((_BoundaryAnXcentre != SpinBox_Xcentre->value()) or + (_BoundaryAnYcentre != SpinBox_Ycentre->value()) or + (_BoundaryAnZcentre != SpinBox_Zcentre->value()) or + (_BoundaryAnRayon != SpinBox_Rayon->value()) ) + { + Chgt = true; + _BoundaryAnXcentre=SpinBox_Xcentre->value(); + _BoundaryAnYcentre=SpinBox_Ycentre->value(); + _BoundaryAnZcentre=SpinBox_Zcentre->value(); + _BoundaryAnRayon=SpinBox_Rayon->value(); + } + break; + } + } + + bool bOK = CreateOrUpdateBoundaryAn(); + return bOK; + +} +// --------------------------------------------------- +bool MonCreateBoundaryAn:: CreateOrUpdateBoundaryAn() +//---------------------------------------------------- +// Creation de l'objet boundary +{ + if (_aBoundaryAnName != LEBoundaryName->text().trimmed()) + { + _aBoundaryAnName = LEBoundaryName->text().trimmed(); + switch (_BoundaryType) + { + case 1 : // il s agit d un cylindre + { + aBoundaryAn = _myHomardGen->CreateBoundaryCylinder(CORBA::string_dup(_aBoundaryAnName.toStdString().c_str()), \ + _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); + break; + } + case 2 : // il s agit d une sphere + { + aBoundaryAn = _myHomardGen->CreateBoundarySphere(CORBA::string_dup(_aBoundaryAnName.toStdString().c_str()), \ + _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); + break; + } + } + _parent->addBoundaryAn(_aBoundaryAnName); + } +// Mise en place des attributs + aBoundaryAn->SetLimit(_Xincr, _Yincr, _Zincr); + + HOMARD_UTILS::updateObjBrowser(); + return true; +} +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::PushOnOK() +// ------------------------------------------------------------------------ +{ + if (PushOnApply()) this->close(); +} +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::PushOnHelp() +// ------------------------------------------------------------------------ +{ + HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html#un-cylindre") ) ; +} + +// ----------------------------------- +void MonCreateBoundaryAn::SetNewBoundaryAnName() +// ----------------------------------- +{ +// Recherche d'un nom par defaut qui n'existe pas encore + + HOMARD::listeBoundarys_var MyBoundaryAns = _myHomardGen->GetAllBoundarys(); + int num = 0; QString aBoundaryAnName=""; + while (aBoundaryAnName=="" ) + { + aBoundaryAnName.setNum(num+1) ; + aBoundaryAnName.insert(0, QString("Boun_")) ; + for ( int i=0; ilength(); i++) + { + if ( aBoundaryAnName == QString(MyBoundaryAns[i])) + { + num=num+1; + aBoundaryAnName=""; + break; + } + } + } + LEBoundaryName->clear() ; + LEBoundaryName->insert(aBoundaryAnName); +} +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::SetCylinder() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetCylinder") + gBCylindre->setVisible(1); + gBSphere->setVisible(0); + adjustSize(); + _BoundaryType=1; + SpinBox_Xcent->setValue(_Xcentre); + SpinBox_Xaxis->setValue(0.); + SpinBox_Ycent->setValue(_Ycentre); + SpinBox_Yaxis->setValue(0.); + SpinBox_Zcent->setValue(_Zcentre); + SpinBox_Zaxis->setValue(1.); + SpinBox_Radius->setValue(_Rayon); +// MESSAGE("Fin de SetCylinder") +} +// ------------------------------------------------------------------------ +void MonCreateBoundaryAn::SetSphere() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetSphere") + gBCylindre->setVisible(0); + gBSphere->setVisible(1); + adjustSize(); + _BoundaryType=2; + SpinBox_Xcentre->setValue(_Xcentre); + SpinBox_Ycentre->setValue(_Ycentre); + SpinBox_Zcentre->setValue(_Zcentre); + SpinBox_Rayon->setValue(_Rayon); +// MESSAGE("Fin de SetSphere") +} + + diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.h b/src/HOMARDGUI/MonCreateBoundaryAn.h new file mode 100644 index 00000000..7c0c22b8 --- /dev/null +++ b/src/HOMARDGUI/MonCreateBoundaryAn.h @@ -0,0 +1,82 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MON_CREATEBOUNDARYAN_H +#define MON_CREATEBOUNDARYAN_H + + +#include +#include + +#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) +#include CORBA_CLIENT_HEADER(HOMARD_Gen) +#include CORBA_CLIENT_HEADER(HOMARD_Boundary) + +#include +#include + +class MonCreateCase; +class MonCreateBoundaryAn : public QDialog, public Ui_CreateBoundaryAn +{ + Q_OBJECT + +public: + MonCreateBoundaryAn( MonCreateCase* parent, bool modal, + HOMARD::HOMARD_Gen_var myHomardGen, + QString caseName); + virtual ~MonCreateBoundaryAn(); + +protected : + MonCreateBoundaryAn( MonCreateCase* parent, + HOMARD::HOMARD_Gen_var myHomardGen, + QString caseName); + + MonCreateCase * _parent; + + QString _aBoundaryAnName; + QString _aCaseName; + + int _BoundaryType; + double _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon; + double _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis; + double _Xmin, _Xmax, _Xincr, _Ymin, _Ymax, _Yincr, _Zmin, _Zmax, _Zincr, _DMax ; + double _Xcentre, _Ycentre, _Zcentre, _Rayon ; + + + bool Chgt; + + HOMARD::HOMARD_Boundary_var aBoundaryAn ; + HOMARD::HOMARD_Gen_var _myHomardGen; + + virtual void InitConnect(); + virtual void InitValBoundaryAn(); + virtual void InitMinMax(); + virtual void SetNewBoundaryAnName(); + virtual bool CreateOrUpdateBoundaryAn(); + +public slots: + virtual void SetCylinder(); + virtual void SetSphere(); + virtual void PushOnOK(); + virtual bool PushOnApply(); + virtual void PushOnHelp(); + +}; + +#endif // MON_CREATEBOUNDARYAN_H diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.cxx b/src/HOMARDGUI/MonCreateBoundaryDi.cxx index db1edcd2..fde36eff 100644 --- a/src/HOMARDGUI/MonCreateBoundaryDi.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryDi.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonCreateBoundaryDi.h" @@ -60,9 +79,8 @@ bool MonCreateBoundaryDi::PushOnApply() QString aBoundaryName=LEBoundaryName->text().trimmed(); if (aBoundaryName=="") { - QMessageBox::information( 0, "Error", - "The boundary must be named.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_NAME") ); return false; } @@ -70,9 +88,8 @@ bool MonCreateBoundaryDi::PushOnApply() 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_MESH") ); return false; } @@ -80,34 +97,30 @@ bool MonCreateBoundaryDi::PushOnApply() QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aMeshFile); if (aMeshName == "" ) { - QMessageBox::information( 0, "Error", - QString("no mesh in mesh file"), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_2") ); return false; } // Creation de l'objet CORBA si ce n'est pas deja fait sous le meme nom if ( _aBoundaryName != aBoundaryName ) { - try + try { _aBoundaryName=aBoundaryName; - _aBoundary=_myHomardGen->CreateBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str()),0); + _aBoundary=_myHomardGen->CreateBoundaryDi(CORBA::string_dup(_aBoundaryName.toStdString().c_str()), aMeshName.toStdString().c_str(), aMeshFile.toStdString().c_str()); _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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); return false; } } -// Mise en place des attributs - _aBoundary->SetMeshFile(aMeshFile.toStdString().c_str()); - _aBoundary->SetMeshName(aMeshName.toStdString().c_str()); +// Les groupes AssocieLesGroupes(); HOMARD_UTILS::updateObjBrowser(); @@ -126,7 +139,7 @@ void MonCreateBoundaryDi::PushOnOK() void MonCreateBoundaryDi::PushOnHelp() // ------------------------------------------------------------------------ { - HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html")); + HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html#frontiere-discrete")); } // ------------------------------------------------------------------------ void MonCreateBoundaryDi::AssocieLesGroupes() @@ -183,16 +196,15 @@ void MonCreateBoundaryDi::setGroups (QStringList 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; - } + if (!CBGroupe->isChecked()) return; + if (_aCaseName.toStdString().c_str() == QString()) { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_CASE") ); + return; + } - MonCreateListGroup *aDlg = new MonCreateListGroup(NULL,this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), - _aCaseName, _listeGroupesBoundary) ; + 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 index 9b37ac4a..dc4b0b43 100644 --- a/src/HOMARDGUI/MonCreateBoundaryDi.h +++ b/src/HOMARDGUI/MonCreateBoundaryDi.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_CREATEBOUNDARYDI_H #define MON_CREATEBOUNDARYDI_H diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx index f84c53fb..2aaa85a1 100644 --- a/src/HOMARDGUI/MonCreateCase.cxx +++ b/src/HOMARDGUI/MonCreateCase.cxx @@ -1,6 +1,27 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonCreateCase.h" +#include "MonCreateBoundaryAn.h" +#include "MonEditBoundaryAn.h" #include "MonCreateBoundaryDi.h" #include "MonEditBoundaryDi.h" @@ -21,9 +42,11 @@ MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var * Sets attributes to default values */ : - Ui_CreateCase(), - _aCaseName(""),_aDirName(""), _ConfType(1) - { + Ui_CreateCase(), + _aCaseName(""),_aDirName(""), + _ConfType(1), + _Pyram(0) +{ _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); setupUi(this); setModal(modal); @@ -34,9 +57,9 @@ MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var GBBoundaryD->setVisible(0); GBTypeNoConf->setVisible(0); adjustSize(); - GetBoundarys(); - - } + GBAdvancedOptions->setVisible(0); + CBPyramid->setChecked(false); +} // ------------------------------------------------------------------------ MonCreateCase::~MonCreateCase() @@ -60,7 +83,13 @@ void MonCreateCase::InitConnect() connect( CBBoundaryD, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD())); connect( PBBoundaryDiNew, SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew())); connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) ); + connect( PBBoundaryDiHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) ); connect( CBBoundaryA, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA())); + connect( PBBoundaryAnNew, SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew())); + connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) ); + connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) ); + + connect( CBAdvanced, SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced())); connect( buttonOk, SIGNAL(pressed()), this, SLOT(PushOnOK())); connect( buttonApply, SIGNAL(pressed()), this, SLOT(PushOnApply())); @@ -69,19 +98,39 @@ void MonCreateCase::InitConnect() connect( LECaseName, SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged())); } // ------------------------------------------------------------------------ -void MonCreateCase::GetBoundarys() +void MonCreateCase::InitBoundarys() // ------------------------------------------------------------------------ +// Initialisation des menus avec les frontieres deja enregistrees { - HOMARD::HOMARD_Boundary_var myBoundary ; - HOMARD::listeBoundarys_var mesBoundarys = _myHomardGen->GetAllBoundarys(); - for (int i=0; ilength(); i++) - { - myBoundary = _myHomardGen->GetBoundary(mesBoundarys[i]); - int type_obj = myBoundary->GetBoundaryType() ; - if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); } - } + MESSAGE("InitBoundarys"); +// Pour les frontieres analytiques : la colonne des groupes + HOMARD::ListGroupType_var _listeGroupesCas = aCase->GetGroups(); + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateCase", "", 0, QApplication::UnicodeUTF8)); + TWBoundary->setHorizontalHeaderItem(0, __colItem); + for ( int i = 0; i < _listeGroupesCas->length(); i++ ) + { + TWBoundary->insertRow(i); + TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed())); + TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); + } +// Pour les frontieres discretes : la liste a saisir +// Pour les frontieres analytiques : les colonnes de chaque frontiere + HOMARD::HOMARD_Boundary_var myBoundary ; + HOMARD::listeBoundarys_var mesBoundarys = _myHomardGen->GetAllBoundarys(); +// MESSAGE("Nombre de frontieres enregistrees : "<length()); + for (int i=0; ilength(); i++) + { + myBoundary = _myHomardGen->GetBoundary(mesBoundarys[i]); + int type_obj = myBoundary->GetBoundaryType() ; + if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); } + else { addBoundaryAn(QString(mesBoundarys[i])); } + } +// Ajustement + TWBoundary->resizeColumnsToContents(); + TWBoundary->resizeRowsToContents(); + TWBoundary->clearSelection(); } - // ------------------------------- bool MonCreateCase::PushOnApply() // -------------------------------- @@ -90,53 +139,78 @@ bool MonCreateCase::PushOnApply() QString aCaseName=LECaseName->text().trimmed(); if ( aCaseName == "" ) { - QMessageBox::information( 0, "Error", - QString("The case must be named"), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_NAME") ); 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_DIRECTORY_1") ); 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_DIRECTORY_2") ); 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_DIRECTORY_3") ); 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_MESH") ); 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_2") ); return false; } + if (CBBoundaryA->isChecked()) + { + QStringList ListeGroup ; + QString NomGroup ; + int nbcol = TWBoundary->columnCount(); + int nbrow = TWBoundary->rowCount(); + for ( int col=1; col< nbcol; col++) + { + for ( int row=0; row< nbrow; row++) + { + if ( TWBoundary->item( row, col )->checkState() == Qt::Checked ) + { +// Nom du groupe + NomGroup = QString(TWBoundary->item(row, 0)->text()) ; +// MESSAGE("NomGroup "<GetCas(_aCaseName.toStdString().c_str()); @@ -167,21 +240,53 @@ bool MonCreateCase::PushOnApply() } LEFileName->setReadOnly(true); PushFichier->hide(); + InitBoundarys(); } aCase->SetDirName(aDirName.toStdString().c_str()); _aDirName=aDirName; aCase->SetConfType(_ConfType); +// Enregistrement de la frontiere discrete if (CBBoundaryD->isChecked()) { QString monBoundaryDiName=CBBoundaryDi->currentText(); if (monBoundaryDiName != "" ) { - aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), " "); + aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), ""); + } + } + +// Enregistrement des liens (groupe,frontiere analytique) + if (CBBoundaryA->isChecked()) + { + QString NomGroup ; + int nbcol = TWBoundary->columnCount(); + int nbrow = TWBoundary->rowCount(); + for ( int col=1; col< nbcol; col++) + { + for ( int row=0; row< nbrow; row++) + { + if ( TWBoundary->item( row, col )->checkState() == Qt::Checked ) + { +// Nom du groupe + NomGroup = QString(TWBoundary->item(row, 0)->text()) ; +// Nom de la frontiere + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem = TWBoundary->horizontalHeaderItem(col); + aCase->AddBoundaryGroup(QString(__colItem->text()).toStdString().c_str(), NomGroup.toStdString().c_str()); + } + } } } +// Options avancees + if (CBAdvanced->isChecked()) + { +// Autorisation des pyramides + if (CBPyramid->isChecked()) { _Pyram = 1 ; } + } + HOMARD_UTILS::updateObjBrowser(); return true; } @@ -233,8 +338,10 @@ void MonCreateCase::SetDirName() void MonCreateCase::SetFileName() // ------------------------------------------------------------------------ { + QString fileName0 = LEFileName->text().trimmed(); QString fileName = HOMARD_QT_COMMUN::PushNomFichier(); - if (!(fileName.isEmpty())) LEFileName->setText(fileName); + if (fileName.isEmpty()) fileName = fileName0 ; + LEFileName->setText(fileName); } // ------------------------------------------------------------------------ void MonCreateCase::SetConforme() @@ -275,10 +382,16 @@ void MonCreateCase::SetQuelconque() void MonCreateCase::SetBoundaryD() // ------------------------------------------------------------------------ { + MESSAGE("Debut de SetBoundaryD "); if (CBBoundaryD->isChecked()) - { GBBoundaryD->setVisible(1); } - else - { GBBoundaryD->setVisible(0); } + { + bool bOK = PushOnApply(); + if (bOK) { GBBoundaryD->setVisible(1); } + else { GBBoundaryD->setVisible(0); + CBBoundaryD->setChecked(0); + CBBoundaryD->setCheckState(Qt::Unchecked); } + } + else { GBBoundaryD->setVisible(0); } adjustSize(); } // ------------------------------------------------------------------------ @@ -292,7 +405,7 @@ void MonCreateCase::addBoundaryDi(QString newBoundary) void MonCreateCase::PushBoundaryDiNew() // ------------------------------------------------------------------------ { - MonCreateBoundaryDi *BoundaryDlg = new MonCreateBoundaryDi(this, true, + MonCreateBoundaryDi *BoundaryDlg = new MonCreateBoundaryDi(this, true, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName, "") ; BoundaryDlg->show(); } @@ -301,17 +414,93 @@ void MonCreateCase::PushBoundaryDiEdit() // ------------------------------------------------------------------------ { if (CBBoundaryDi->currentText() == QString("")) return; - MonEditBoundaryDi *BoundaryDlg = new MonEditBoundaryDi(this, true, + MonEditBoundaryDi *BoundaryDlg = new MonEditBoundaryDi(this, true, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName, CBBoundaryDi->currentText() ) ; BoundaryDlg->show(); } // ------------------------------------------------------------------------ +void MonCreateCase::PushBoundaryDiHelp() +// ------------------------------------------------------------------------ +{ + HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html#frontiere-discrete") ) ; +} +// ------------------------------------------------------------------------ void MonCreateCase::SetBoundaryA() // ------------------------------------------------------------------------ { - if (CBBoundaryA->isChecked()) { GBBoundaryA->setVisible(1); } + MESSAGE("Debut de SetBoundaryA "); + if (CBBoundaryA->isChecked()) + { + bool bOK = PushOnApply(); + if (bOK) { GBBoundaryA->setVisible(1); } + else { GBBoundaryA->setVisible(0); + CBBoundaryA->setChecked(0); + CBBoundaryA->setCheckState(Qt::Unchecked); } + } else { GBBoundaryA->setVisible(0); } adjustSize(); +// +// MESSAGE("Fin de SetBoundaryA "); +} +// ------------------------------------------------------------------------ +void MonCreateCase::addBoundaryAn(QString newBoundary) +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de addBoundaryAn "); +// Ajout d'une nouvelle colonne + int nbcol = TWBoundary->columnCount(); +// MESSAGE("nbcol " << nbcol); + nbcol += 1 ; + TWBoundary->setColumnCount ( nbcol ) ; + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateCase", newBoundary.toStdString().c_str(), 0, QApplication::UnicodeUTF8)); + TWBoundary->setHorizontalHeaderItem(nbcol-1, __colItem); +/* TWBoundary->horizontalHeaderItem(nbcol-1)->setFlags( Qt::ItemIsSelectable|Qt::ItemIsEnabled );*/ +// Chaque case est a cocher + int nbrow = TWBoundary->rowCount(); +// MESSAGE("nbrow " << nbrow); + for ( int i = 0; i < nbrow; i++ ) + { + TWBoundary->setItem( i, nbcol-1, new QTableWidgetItem( QString ("") ) ); + TWBoundary->item( i, nbcol-1 )->setFlags( 0 ); + TWBoundary->item( i, nbcol-1 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled ); + TWBoundary->item( i, nbcol-1 )->setCheckState( Qt::Unchecked ); + } + TWBoundary->resizeColumnToContents(nbcol-1); +// TWBoundary->resizeRowsToContents(); +// MESSAGE("Fin de addBoundaryAn "); +} +// ------------------------------------------------------------------------ +void MonCreateCase::PushBoundaryAnNew() +// ------------------------------------------------------------------------ +{ + MonCreateBoundaryAn *BoundaryDlg = new MonCreateBoundaryAn(this, true, + HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName) ; + BoundaryDlg->show(); +} +// ------------------------------------------------------------------------ +void MonCreateCase::PushBoundaryAnEdit() +// ------------------------------------------------------------------------ +{ + QString nom=""; + int nbcol = TWBoundary->columnCount(); + for ( int i = 1; i < nbcol; i++ ) + { + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem = TWBoundary->horizontalHeaderItem(i); + nom = QString(__colItem->text()) ; + MESSAGE("nom "<show(); } + } +} +// ------------------------------------------------------------------------ +void MonCreateCase::PushBoundaryAnHelp() +// ------------------------------------------------------------------------ +{ + HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html#frontiere-analytique") ) ; } // ------------------------------------------------------------------------ void MonCreateCase::CaseNameChanged() @@ -323,3 +512,16 @@ void MonCreateCase::CaseNameChanged() PushFichier->show(); } } +// ------------------------------------------------------------------------ +void MonCreateCase::SetAdvanced() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetAdvanced "); + if (CBAdvanced->isChecked()) { GBAdvancedOptions->setVisible(1); } + else + { GBAdvancedOptions->setVisible(0); + CBPyramid->setChecked(false); + _Pyram = 0 ; + } + adjustSize(); +} diff --git a/src/HOMARDGUI/MonCreateCase.h b/src/HOMARDGUI/MonCreateCase.h index 1cf0e4dc..34c66065 100644 --- a/src/HOMARDGUI/MonCreateCase.h +++ b/src/HOMARDGUI/MonCreateCase.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_CREATECASE_H #define MON_CREATECASE_H @@ -19,6 +38,7 @@ public: MonCreateCase( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen); ~MonCreateCase(); + void addBoundaryAn(QString newBoundary); void addBoundaryDi(QString newBoundary); protected : @@ -27,12 +47,13 @@ protected : int _ConfType; + int _Pyram; HOMARD::HOMARD_Cas_var aCase ; HOMARD::HOMARD_Gen_var _myHomardGen; virtual void InitConnect(); - virtual void GetBoundarys(); + virtual void InitBoundarys(); virtual void SetNewCaseName(); public slots: @@ -48,7 +69,13 @@ public slots: virtual void SetBoundaryD(); virtual void PushBoundaryDiNew(); virtual void PushBoundaryDiEdit(); + virtual void PushBoundaryDiHelp(); virtual void SetBoundaryA(); + virtual void PushBoundaryAnNew(); + virtual void PushBoundaryAnEdit(); + virtual void PushBoundaryAnHelp(); + + virtual void SetAdvanced(); virtual void PushOnOK(); virtual bool PushOnApply(); diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx index 60bd6c85..bffc7df5 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.cxx +++ b/src/HOMARDGUI/MonCreateHypothesis.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonCreateHypothesis.h" @@ -24,12 +43,15 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, : QDialog(0), Ui_CreateHypothesis(), _parent(parent), _aHypothesisName(aHypothesisName), - _aCaseName(caseName), _aFieldFile(aFieldFile), + _aCaseName(caseName), _aFieldFile(aFieldFile), _aFieldName(""), _aTypeAdap(-2), _aTypeRaff(1), _aTypeDera(0), _TypeThR(3), _ThreshR(0), _TypeThC(0), _ThreshC(0), - _UsCmpI(0), _TypeFieldInterp(0) + _UsField(0), _UsCmpI(0), _TypeFieldInterp(0), + _NivMax(-1), + _DiamMin(-1.), + _AdapInit(0) { MESSAGE("Constructeur") ; _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); @@ -38,14 +60,16 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, InitConnect(); SetNewHypothesisName(); - if (_aFieldFile != QString("")) { - RBChamp->setChecked(1); - SetChamp(); - } else { - RBUniforme->setChecked(1); - SetUniforme(); + if (_aFieldFile != QString("")) + { RBChamp->setChecked(1); + SetChamp(); + } + else + { RBUniforme->setChecked(1); + SetUniforme(); } SetFieldNo(); + GBAdvancedOptions->setVisible(0); } // ------------------------------------------------------------------------ @@ -63,6 +87,7 @@ void MonCreateHypothesis::InitConnect() 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())); @@ -74,13 +99,21 @@ void MonCreateHypothesis::InitConnect() connect( RBCNo, SIGNAL(clicked()), this, SLOT(SetCNo())); connect( RBL2, SIGNAL(clicked()), this, SLOT(SetUCL2())); connect( RBInf, SIGNAL(clicked()), this, SLOT(SetUCInf())); + connect( CBJump, SIGNAL(stateChanged(int)), this, SLOT(SetUseField())); 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( CBAdvanced, SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced())); + connect( RBAIN, SIGNAL(clicked()), this, SLOT(SetAIN())); + connect( RBAIR, SIGNAL(clicked()), this, SLOT(SetAIR())); + connect( RBAID, SIGNAL(clicked()), this, SLOT(SetAID())); + connect( buttonOk, SIGNAL(pressed()), this, SLOT( PushOnOK())); connect( buttonApply, SIGNAL(pressed()), this, SLOT( PushOnApply())); connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close())); @@ -97,13 +130,12 @@ bool MonCreateHypothesis::PushOnApply() if (LEHypothesisName->text().trimmed()=="") { - QMessageBox::information( 0, "Error", - "The hypothesis must be named.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_NAME") ); return false; } - if (VerifieZone() == false) 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 @@ -117,9 +149,8 @@ bool MonCreateHypothesis::PushOnApply() } catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); return false; } } @@ -134,6 +165,19 @@ bool MonCreateHypothesis::PushOnApply() AssocieLesGroupes(); AssocieFieldInterp(); +// Options avancees + if (CBAdvanced->isChecked()) + { +// Enregistrement du niveau maximal + _NivMax = spinBoxNivMax->value() ; + _aHypothesis->SetNivMax(_NivMax); +// Enregistrement du diametre minimal + _DiamMin = doubleSpinBoxDiamMin->value() ; + _aHypothesis->SetDiamMin(_DiamMin); +// Enregistrement de l'intialisation de l'adaptation + _aHypothesis->SetAdapInit(_AdapInit); + } + HOMARD_UTILS::updateObjBrowser(); return true; } @@ -158,7 +202,7 @@ void MonCreateHypothesis::SetNewHypothesisName() { HOMARD::listeHypotheses_var MyHypos = _myHomardGen->GetAllHypotheses(); - int num = 0;// + int num = 0;// QString aHypothesisName=""; while (aHypothesisName=="" ) { @@ -196,9 +240,8 @@ void MonCreateHypothesis::SetChamp() { if (_aFieldFile == QString("")) { - QMessageBox::information( 0, "Error", - QString("Enter FieldFile please "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_FIELD_FILE") ); close(); if ( _parent ) { _parent->raise(); _parent->activateWindow(); }; return; @@ -239,7 +282,7 @@ void MonCreateHypothesis::SetZone() void MonCreateHypothesis::PushZoneNew() // ------------------------------------------------------------------------ { - MESSAGE("Debut de PushZoneNew") + MESSAGE("Debut de MonCreateHypothesis::PushZoneNew") MonCreateZone *aDlg = new MonCreateZone(this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName) ; aDlg->show(); } @@ -248,14 +291,13 @@ void MonCreateHypothesis::PushZoneNew() void MonCreateHypothesis::PushZoneEdit() // ------------------------------------------------------------------------ { - MESSAGE("Debut de PushZoneEdit") + MESSAGE("Debut de MonCreateHypothesis::PushZoneEdit") int colonne = TWZone->currentColumn(); QTableWidgetItem * monItem = TWZone->currentItem(); - if (colonne !=1 or monItem == NULL) + if (colonne !=2 or monItem == NULL) { - QMessageBox::information( 0, "Error", - "Please, Select a Zone", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_ZONE_1") ); return; } QString zoneName = monItem->text().trimmed(); @@ -266,10 +308,9 @@ void MonCreateHypothesis::PushZoneEdit() void MonCreateHypothesis::PushZoneDelete() // ------------------------------------------------------------------------ { - MESSAGE("Debut de PushZoneDelete") - QMessageBox::information( 0, "Error", - "Inactive button.", - QMessageBox::Ok + QMessageBox::Default ); + MESSAGE("Debut de MonCreateHypothesis::PushZoneDelete") + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_INACTIVE_BUTTON") ); return; } @@ -277,11 +318,13 @@ void MonCreateHypothesis::PushZoneDelete() void MonCreateHypothesis::GetAllZones() // ------------------------------------------------------------------------ // Recuperation de toutes les zones enregistrees dans l'arbre d'etude +// et affichage dans le tableau +// Par defaut, aucune n'est selectionnee { - HOMARD::listeZones_var mesZones = _myHomardGen->GetAllZones(); - TWZone->clear(); - int stop=TWZone->rowCount(); - for ( int row=0; row< stop; row++) + MESSAGE("Debut de GetAllZones") ; + HOMARD::listeZones_var mesZones = _myHomardGen->GetAllZones(); + int nbrow=TWZone->rowCount(); + for ( int row=0; row< nbrow; row++) { TWZone->removeRow(row); } @@ -290,70 +333,113 @@ void MonCreateHypothesis::GetAllZones() for (int i=0; ilength(); 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->setItem( row, 1, new QTableWidgetItem( QString ("") ) ); + TWZone->item( row, 1 )->setFlags( 0 ); + TWZone->item( row, 1 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled ); + TWZone->item( row, 1 )->setCheckState( Qt::Unchecked ); +// + TWZone->setItem( row, 2, new QTableWidgetItem(QString(mesZones[i]).trimmed())); + TWZone->item( row, 2 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); +// + row += 1; } TWZone->resizeColumnsToContents(); TWZone->resizeRowsToContents(); TWZone->clearSelection(); } - // ------------------------------------------------------------------------ -void MonCreateHypothesis::addZone(QString newZone) +void MonCreateHypothesis::addZoneinTWZone(QString newZone) // ------------------------------------------------------------------------ { + MESSAGE("Debut de addZoneinTWZone") ; int row = TWZone->rowCount() ; +// Par defaut, on suppose qu'une nouvelle zone est destinee au raffinement TWZone->setRowCount( row+1 ); - TWZone->setItem( row, 0, new QTableWidgetItem( 0 ) ); +// + TWZone->setItem( row, 0, new QTableWidgetItem( QString ("") ) ); 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->setItem( row, 1, new QTableWidgetItem( QString ("") ) ); + TWZone->item( row, 1 )->setFlags( Qt::ItemIsEditable|Qt::ItemIsUserCheckable|Qt::ItemIsEnabled ); + TWZone->item( row, 1 )->setCheckState( Qt::Unchecked ); +// + TWZone->setItem( row, 2, new QTableWidgetItem( newZone ) ); + TWZone->scrollToItem( TWZone->item( row, 2 ) ); +// TWZone->resizeRowsToContents(); TWZone->resizeColumnToContents(1); TWZone->clearSelection(); - TWZone->item( row, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable ); +// + TWZone->item( row, 2 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable ); } - // ------------------------------------------------------------------------ QStringList MonCreateHypothesis::GetZonesChecked() // ------------------------------------------------------------------------ // Retourne les zones enregistrees { + MESSAGE("Debut de GetZonesChecked") ; QStringList ListeZone ; +// On ne peut pas avoir selectionne les deux options + int Pbm = 0 ; 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()) ) ; + if ( ( TWZone->item( row, 0 )->checkState() == Qt::Checked ) and ( TWZone->item( row, 1 )->checkState() == Qt::Checked ) ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_ZONE_3") ); + Pbm = 1 ; + } + } +// Si tout va bien, on affecte +// Attention, on insere en tete, donc on commence d'inserer le type, psui le nom de la zone + if ( Pbm == 0 ) + { + QString Raff = "1" ; + QString Dera = "-1" ; + for ( int row=0; row< TWZone->rowCount(); row++) + { +// MESSAGE ("row "<item(row, 2)->text().toStdString()); +// En raffinement : + if ( TWZone->item(row,0)->checkState() == Qt::Checked ) + { ListeZone.insert(0, Raff) ; + ListeZone.insert(0, QString(TWZone->item(row, 2)->text()) ) ; } +// En deraffinement : + if ( TWZone->item(row,1)->checkState() == Qt::Checked ) + { ListeZone.insert(0, Dera) ; + ListeZone.insert(0, QString(TWZone->item(row, 2)->text()) ) ; } + } + MESSAGE("Fin de GetZonesChecked ; longueur de ListeZone : "<rowCount(); row++) - if ( TWCMP->item( row, 0 )->checkState() == Qt::Checked ) + 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")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_ABS")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_REL")); } else - { RBL2->setText(QString("L2 norm")); - RBInf->setText(QString("Infinite Norm")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_L2")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_INF")); } return ListeComposant ; // @@ -364,7 +450,7 @@ void MonCreateHypothesis::AssocieFieldInterp() { if ( _TypeFieldInterp != 2 ) return; for ( int row=0; row< TWField->rowCount(); row++) - if ( TWField->item( row, 0 )->checkState() == Qt::Checked ) + if ( TWField->item( row, 0 )->checkState() == Qt::Checked ) { _aHypothesis->AddFieldInterp(TWField->item(row, 1)->text().toStdString().c_str()); } } // ------------------------------------------------------------------------ @@ -400,14 +486,16 @@ void MonCreateHypothesis::InitFields() void MonCreateHypothesis::SetFieldName() // ------------------------------------------- { + MESSAGE("Debut de SetFieldName"); _aFieldName=CBFieldName->currentText(); if (QString(_aFieldFile) == QString("") or QString(_aFieldName) == QString("") ) { return; } - for ( int row=0; row < TWCMP->rowCount() ; row++) + int nbrow= TWCMP->rowCount() ; + for ( int row=0; row < nbrow ; row++) { TWCMP->removeRow(row); } - //TWCMP->setRowCount(0); + TWCMP->setRowCount(0); //TWCMP->resizeRowsToContents(); std::list maListe =HOMARD_QT_COMMUN::GetListeComposants(_aFieldFile, _aFieldName); @@ -419,7 +507,7 @@ void MonCreateHypothesis::SetFieldName() 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->setItem( 0, 1, new QTableWidgetItem(QString((*it)).trimmed())); TWCMP->item( 0, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable ); } TWCMP->resizeColumnsToContents(); @@ -427,12 +515,12 @@ void MonCreateHypothesis::SetFieldName() 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")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_ABS")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_REL")); } else - { RBL2->setText(QString("L2 norm")); - RBInf->setText(QString("Infinite Norm")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_L2")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_INF")); } // Par defaut, on propose la valeur absolue / norme L2 SetUCL2(); @@ -540,6 +628,13 @@ void MonCreateHypothesis::SetUCInf() RBInf->setChecked(true); } // ------------------------------------------------------------------------ +void MonCreateHypothesis::SetUseField() +// ------------------------------------------------------------------------ +{ + if ( CBJump->isChecked() ) { _UsField = 1 ; } + else { _UsField = 0 ; } +} +// ------------------------------------------------------------------------ void MonCreateHypothesis::SetFiltrage() // ------------------------------------------------------------------------ { @@ -559,14 +654,16 @@ bool MonCreateHypothesis::VerifieZone() // ------------------------------------------------------------------------ { if ( _aTypeAdap != 0 ) return true; + MESSAGE("Debut de VerifieZone") ; _aListeZone = GetZonesChecked() ; + MESSAGE(". Longueur de _aListeZone : "<<_aListeZone.count()) ; if (_aListeZone.count() == 0) { - QMessageBox::information( 0, "Error", - QString("At least, one zone must be given."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_ZONE_2") ); return false; } + MESSAGE("Fin de VerifieZone") ; return true; } // ------------------------------------------------------------------------ @@ -577,9 +674,8 @@ bool MonCreateHypothesis::VerifieComposant() _aListeComposant = GetListCompChecked() ; if (_aListeComposant.count() == 0) { - QMessageBox::information( 0, "Error", - QString("At least, one composant must be given."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_COMP") ); return false; } return true; @@ -589,10 +685,19 @@ bool MonCreateHypothesis::VerifieComposant() void MonCreateHypothesis::AssocieLesZones() // ------------------------------------------------------------------------ { + MESSAGE( "Debut de AssocieLesZones" ); if ( _aTypeAdap != 0 ) return; _aListeZone = GetZonesChecked() ; + MESSAGE(". Longueur de _aListeZone : "<<_aListeZone.count()) ; + QString Raff = "1" ; + int TypeUse ; for ( int i=0 ; i< _aListeZone.count() ; i++ ) - { _myHomardGen->AssociateHypoZone(_aListeZone[i].toStdString().c_str(),_aHypothesisName.toStdString().c_str()); } + { if ( _aListeZone[i+1] == Raff ) { TypeUse = 1 ; } + else { TypeUse = -1 ; } + _myHomardGen->AssociateHypoZone(_aHypothesisName.toStdString().c_str(), _aListeZone[i].toStdString().c_str(), TypeUse); + i += 1 ; + } + MESSAGE( "Fin de AssocieLesZones" ); }; // ------------------------------------------------------------------------ void MonCreateHypothesis::AssocieComposants() @@ -616,6 +721,7 @@ void MonCreateHypothesis::AssocieComposants() _aHypothesis->SetField(CORBA::string_dup(_aFieldName.toStdString().c_str()) ) ; _aHypothesis->SetRefinThr( _TypeThR, _ThreshR ) ; _aHypothesis->SetUnRefThr( _TypeThC, _ThreshC ) ; + _aHypothesis->SetUseField( _UsField ) ; _aHypothesis->SetUseComp( _UsCmpI ) ; _aListeComposant = GetListCompChecked() ; for ( int i=0 ; i< _aListeComposant.count() ; i++ ) @@ -653,9 +759,8 @@ void MonCreateHypothesis::SetFieldAll() { if (_aFieldFile == QString("")) { - QMessageBox::information( 0, "Error", - QString("Enter FieldFile please "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_FIELD_FILE") ); close(); if ( _parent ) { _parent->raise(); _parent->activateWindow(); }; return; @@ -674,9 +779,8 @@ void MonCreateHypothesis::SetFieldChosen() { if (_aFieldFile == QString("")) { - QMessageBox::information( 0, "Error", - QString("Enter FieldFile please "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_FIELD_FILE") ); close(); if ( _parent ) { _parent->raise(); _parent->activateWindow(); }; return; @@ -689,9 +793,11 @@ void MonCreateHypothesis::SetFieldChosen() // Initialisation de la table TWField->clear(); - for ( int row=0; row< TWField->rowCount(); row++) + int nbrow=TWField->rowCount(); + for ( int row=0; row< nbrow; row++) + { TWField->removeRow(row); - + } TWField->setRowCount(0); std:: list::const_iterator it; int row=0; @@ -702,7 +808,7 @@ void MonCreateHypothesis::SetFieldChosen() 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->setItem( row, 1, new QTableWidgetItem(QString(*it).trimmed())); TWField->item( row, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); row=row+1; } @@ -714,3 +820,46 @@ void MonCreateHypothesis::SetFieldChosen() _TypeFieldInterp = 2 ; adjustSize(); } +// ------------------------------------------------------------------------ +void MonCreateHypothesis::SetAdvanced() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetAdvanced "); + if (CBAdvanced->isChecked()) + { GBAdvancedOptions->setVisible(1); + if (_aFieldFile != QString("")) + { GBAdapInit->setVisible(1) ; + } + else + { GBAdapInit->setVisible(0) ; + } + } + else + { GBAdvancedOptions->setVisible(0); + _NivMax = -1 ; + _DiamMin = -1. ; + _AdapInit = 0 ; + } + adjustSize(); +} +// ------------------------------------------------------------------------ +void MonCreateHypothesis::SetAIN() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetAIN "); + _AdapInit = 0 ; +} +// ------------------------------------------------------------------------ +void MonCreateHypothesis::SetAIR() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetAIR "); + _AdapInit = 1 ; +} +// ------------------------------------------------------------------------ +void MonCreateHypothesis::SetAID() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetAID "); + _AdapInit = -1 ; +} diff --git a/src/HOMARDGUI/MonCreateHypothesis.h b/src/HOMARDGUI/MonCreateHypothesis.h index de4dc21f..a1271157 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.h +++ b/src/HOMARDGUI/MonCreateHypothesis.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_CREATEHYPOTHESIS_H #define MON_CREATEHYPOTHESIS_H @@ -14,7 +33,7 @@ class MonCreateIteration; class MonCreateHypothesis : public QDialog, public Ui_CreateHypothesis -{ +{ Q_OBJECT public: @@ -22,7 +41,7 @@ public: QString aHypotheseName, QString caseName, QString aFieldFile); ~MonCreateHypothesis(); - virtual void addZone(QString newZone); + virtual void addZoneinTWZone(QString newZone); virtual void setGroups(QStringList listGroup); protected : @@ -45,9 +64,14 @@ protected : int _TypeThC; double _ThreshC; + int _UsField; int _UsCmpI; int _TypeFieldInterp; + int _NivMax; + double _DiamMin; + int _AdapInit; + HOMARD::HOMARD_Gen_var _myHomardGen; HOMARD::HOMARD_Hypothesis_var _aHypothesis; @@ -88,6 +112,7 @@ public slots: virtual void SetCNo(); virtual void SetUCL2(); virtual void SetUCInf(); + virtual void SetUseField(); virtual void PushZoneNew(); virtual void PushZoneEdit(); virtual void PushZoneDelete(); @@ -95,6 +120,12 @@ public slots: virtual void SetFieldNo(); virtual void SetFieldAll(); virtual void SetFieldChosen(); + + virtual void SetAdvanced(); + virtual void SetAIN(); + virtual void SetAIR(); + virtual void SetAID(); + virtual void PushOnOK(); virtual bool PushOnApply(); virtual void PushOnHelp(); diff --git a/src/HOMARDGUI/MonCreateIteration.cxx b/src/HOMARDGUI/MonCreateIteration.cxx index ae49c2b2..fc3b05c5 100644 --- a/src/HOMARDGUI/MonCreateIteration.cxx +++ b/src/HOMARDGUI/MonCreateIteration.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonCreateIteration.h" @@ -14,7 +33,7 @@ using namespace std; // ----------------------------------------------------------------------------------------------------- -MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, +MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString IterParentName ): // ----------------------------------------------------------------------------------------------------- /* Constructs a MonCreateIteration @@ -35,9 +54,9 @@ MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, SetNewIterationName(); GetHypotheses(); - if (_IterParentName != QString("")) + if (_IterParentName != QString("")) { SetIterParentName(); } - else + else {setModal(false); /* permet selection de l iteration dans l arbre d etude */} SetTSNo(); } @@ -81,38 +100,34 @@ bool MonCreateIteration::PushOnApply() // ------------------------------------------------------------------------ // Appele lorsque l'un des boutons Ok ou Apply est presse { - MESSAGE("PushOnApply"); + MESSAGE("MonCreateIteration::PushOnApply"); // QString aIterationName = LEIterationName->text().trimmed(); if ( aIterationName == QString ("")) { - QMessageBox::information( 0, "Error", - QString(" Nommer l iteration "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_NAME") ); return false; } if ( _IterParentName == QString ("")) { - QMessageBox::information( 0, "Error", - QString(" Donner le point de depart "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_STARTING_POINT") ); 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_MESH") ); return false; } QString monHypoName=CBHypothese->currentText(); if (monHypoName == "" ) { - QMessageBox::information( 0, "Error", - QString(" Choisir une hypothese "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_HYPO") ); return false; } HOMARD::HOMARD_Hypothesis_var _myHypothesis = _myHomardGen->GetHypothesis(monHypoName.toStdString().c_str()); @@ -120,9 +135,8 @@ bool MonCreateIteration::PushOnApply() 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_FIELD_FILE") ); return false; } @@ -141,11 +155,10 @@ bool MonCreateIteration::PushOnApply() CORBA::string_dup(_IterationName.toStdString().c_str()), CORBA::string_dup(_IterParentName.toStdString().c_str())); } - catch( SALOME::SALOME_Exception& S_ex ) + catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); return false; } } @@ -160,7 +173,7 @@ bool MonCreateIteration::PushOnApply() int rank = SpinBox_Rank->value(); int step = SpinBox_TimeStep->value(); aIter->SetFieldFile(CORBA::string_dup(FieldFile.toStdString().c_str())); - aIter->SetTimeStepRank(rank,step); + aIter->SetTimeStepRank(step,rank); } _myHomardGen->AssociateIterHypo (IterName, monHypoName.toStdString().c_str()); aIter->SetMeshName(CORBA::string_dup(aMeshName_np1.toStdString().c_str())); @@ -181,7 +194,7 @@ void MonCreateIteration::PushOnOK() void MonCreateIteration::PushOnHelp() // ------------------------------------------------------------------------ { - HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html")); + HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html")); } // ------------------------------------------------------------------------ @@ -199,7 +212,7 @@ void MonCreateIteration::SetIterParentName() LEMeshName_n->setText(MeshName); LEMeshName_n->setReadOnly(1); LEMeshName_np1->setText(MeshName); - + LEIterationParentName->setText(_IterParentName); } @@ -210,7 +223,7 @@ void MonCreateIteration::SetNewIterationName() // Recherche d'un nom par defaut qui n'existe pas encore HOMARD::listeIterations_var myIters=_myHomardGen->GetAllIterations(); - int num = 0;// + int num = 0;// QString aIterationName=""; while (aIterationName=="" ) { @@ -237,11 +250,10 @@ 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; + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_STARTING_POINT") ); + raise(); + return; } QString aFieldFile=LEFieldFile->text().trimmed(); MonEditHypothesis *HypoDlg = new MonEditHypothesis(this,TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),CBHypothese->currentText(), _CaseName, aFieldFile) ; @@ -252,28 +264,27 @@ void MonCreateIteration::PushHypoEdit() void MonCreateIteration::addHypothese(QString newHypothese) // ------------------------------------------------------------------------ { - CBHypothese->insertItem(0,newHypothese); - CBHypothese->setCurrentIndex(0); + 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(); + if (_IterParentName == QString("")) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_STARTING_POINT") ); + 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(); } // ------------------------------------------------------------------------ diff --git a/src/HOMARDGUI/MonCreateIteration.h b/src/HOMARDGUI/MonCreateIteration.h index 141619fd..bb5e9bdd 100644 --- a/src/HOMARDGUI/MonCreateIteration.h +++ b/src/HOMARDGUI/MonCreateIteration.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_CREATEITERATION_H #define MON_CREATEITERATION_H diff --git a/src/HOMARDGUI/MonCreateListGroup.cxx b/src/HOMARDGUI/MonCreateListGroup.cxx index 47121c7b..53ee6629 100644 --- a/src/HOMARDGUI/MonCreateListGroup.cxx +++ b/src/HOMARDGUI/MonCreateListGroup.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonCreateListGroup.h" @@ -5,7 +24,6 @@ using namespace std; #include "MonCreateBoundaryDi.h" #include -#include #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" @@ -19,8 +37,8 @@ using namespace std; #include // -------------------------------------------------------------------------------------------------------------- -MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, - HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : +MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, + HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : // -------------------------------------------------------------------------------------------------------------- // QDialog(0), Ui_CreateListGroup(), @@ -37,8 +55,8 @@ MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreate InitGroupes(); } // -------------------------------------------------------------------------------------------------------------- -MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, - HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : +MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, + HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : // -------------------------------------------------------------------------------------------------------------- // QDialog(0), Ui_CreateListGroup(), @@ -103,7 +121,7 @@ void MonCreateListGroup::PushOnHelp() void MonCreateListGroup::InitGroupes() // ------------------------------------------------------------------------ { - MESSAGE("Debut de InitGroupes "); + MESSAGE("Debut de MonCreateListGroup::InitGroupes "); for ( int row=0; row< TWGroupe->rowCount(); row++) TWGroupe->removeRow(row); TWGroupe->setRowCount(0); @@ -120,12 +138,12 @@ void MonCreateListGroup::InitGroupes() {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->setItem( i, 1, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed())); TWGroupe->item( i, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); } TWGroupe->resizeColumnsToContents(); TWGroupe->resizeRowsToContents(); TWGroupe->clearSelection(); - MESSAGE("Fin de InitGroupes "); +// MESSAGE("Fin de MonCreateListGroup::InitGroupes "); } diff --git a/src/HOMARDGUI/MonCreateListGroup.h b/src/HOMARDGUI/MonCreateListGroup.h index c9e3e22e..321ddd44 100644 --- a/src/HOMARDGUI/MonCreateListGroup.h +++ b/src/HOMARDGUI/MonCreateListGroup.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_CREATELISTGROUP_H #define MON_CREATELISTGROUP_H diff --git a/src/HOMARDGUI/MonCreateZone.cxx b/src/HOMARDGUI/MonCreateZone.cxx index 6fbea3d2..86c71d9e 100644 --- a/src/HOMARDGUI/MonCreateZone.cxx +++ b/src/HOMARDGUI/MonCreateZone.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonCreateZone.h" @@ -30,33 +49,28 @@ MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, bool modal, _parent(parent), _aZoneName (""), _aCaseName(caseName), + _Orient(0), _ZoneType(2), _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0), _ZoneXcentre(0), _ZoneYcentre(0), _ZoneZcentre(0), _ZoneRayon(0), + _Xmin(0), _Xmax(0), _Xincr(0), _Ymin(0), _Ymax(0), _Yincr(0), _Zmin(0), _Zmax(0), _Zincr(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), + _Xaxis(0), _Yaxis(0), _Zaxis(0), _RayonInt(0), _Haut(0), + _ZoneXaxis(0), _ZoneYaxis(0), _ZoneZaxis(0), _ZoneRayonInt(0), _ZoneHaut(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( ); + _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen) ; + setupUi(this) ; + setModal(modal) ; + 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 + 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, @@ -70,25 +84,23 @@ MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, _parent(parent), _aZoneName (""), _aCaseName(caseName), + _Orient(0), _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), + _Xaxis(0), _Yaxis(0), _Zaxis(0), _RayonInt(0), _Haut(0), + _ZoneXaxis(0), _ZoneYaxis(0), _ZoneZaxis(0), _ZoneRayonInt(0), _ZoneHaut(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), + _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(); + setupUi(this) ; + + setModal(true) ; + InitConnect() ; } // ------------------------------------------------------------------------ @@ -103,10 +115,12 @@ 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() ) ); + connect( RBCylinder, SIGNAL(clicked()) , this, SLOT(SetCylinder()) ) ; + connect( RBPipe, SIGNAL(clicked()) , this, SLOT(SetPipe()) ) ; + 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() @@ -115,60 +129,96 @@ 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); + 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]; + if ( _Xincr < 0 ) { _Orient = 2 ; } + else if ( _Yincr < 0 ) { _Orient = 3 ; } + else if ( _Zincr < 0 ) { _Orient = 1 ; } + MESSAGE ("_Xmin : " << _Xmin << " _Xmax : " << _Xmax << " _Xincr : " << _Xincr ) ; + MESSAGE ("_Ymin : " << _Ymin << " _Ymax : " << _Ymax << " _Yincr : " << _Yincr ) ; + MESSAGE ("_Zmin : " << _Zmin << " _Zmax : " << _Zmax << " _Zincr : " << _Zincr) ; + MESSAGE ("_DMax : " << _DMax) ; + MESSAGE ("_Orient : " << _Orient) ; // 2. Caracteristiques des zones // en X - if ( _Xincr < 0 ) - { - _ZoneXmin = _Xmin; - _ZoneXmax = _Xmax; - } - else - { - _ZoneXmin = _Xmin - _Xincr; - _ZoneXmax = _Xmax + _Xincr; - } - _Xcentre=(_Xmin + _Xmax)/2.; + 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.; + 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.; + if ( _Zincr < 0 ) + { + _ZoneZmin = _Zmin; + _ZoneZmax = _Zmax; + } + else + { + _ZoneZmin = _Zmin - _Zincr; + _ZoneZmax = _Zmax + _Zincr; + } + _Zcentre=(_Zmin + _Zmax)/2.; +// Rayons + _Rayon= _DMax/4.; + _RayonInt= _DMax/8.; +// Axe et hauteur pour cylindre et tuyau + _Haut= _DMax/2.; +// 3. Gestion des icones + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" ) ; + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "boxdxyz.png" ) ; } + else { pix = resMgr->loadPixmap( "HOMARD", "boxdxy.png" ) ; } + QIcon IS=QIcon(pix) ; + RBBox->setIcon(IS) ; + + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "cylinderpointvector.png" ) ; } + else { pix = resMgr->loadPixmap( "HOMARD", "disk.png" ) ; + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + TLXbase->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); } + IS=QIcon(pix) ; + RBCylinder->setIcon(IS) ; + + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "pipe.png" ) ; } + else { pix = resMgr->loadPixmap( "HOMARD", "diskwithhole.png" ) ; + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + TLXbase_p->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase_p->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase_p->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); } + IS=QIcon(pix) ; + RBPipe->setIcon(IS) ; + + if ( _Orient == 0 ) { pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" ) ; + IS=QIcon(pix) ; + RBSphere->setIcon(IS) ; } + else { RBSphere->setVisible(0) ; } } // ------------------------------------------------------------------------ @@ -177,52 +227,99 @@ 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); + 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_Xcentre->setValue(_Xcentre) ; + SpinBox_Xbase->setValue(_Xcentre) ; + SpinBox_Xbase_p->setValue(_Xcentre) ; SpinBox_Xmini->setEnabled(false) ; SpinBox_Xmaxi->setEnabled(false) ; SpinBox_Xcentre->setEnabled(false) ; + SpinBox_Xbase->setEnabled(false) ; + SpinBox_Xbase_p->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); + 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_Ycentre->setValue(_Ycentre) ; + SpinBox_Ybase->setValue(_Ycentre) ; + SpinBox_Ybase_p->setValue(_Ycentre) ; SpinBox_Ymini->setEnabled(false) ; SpinBox_Ymaxi->setEnabled(false) ; SpinBox_Ycentre->setEnabled(false) ; + SpinBox_Ybase->setEnabled(false) ; + SpinBox_Ybase_p->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); + 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_Zcentre->setValue(_Zcentre) ; + SpinBox_Zbase->setValue(_Zcentre) ; + SpinBox_Zbase_p->setValue(_Zcentre) ; SpinBox_Zmini->setEnabled(false) ; SpinBox_Zmaxi->setEnabled(false) ; SpinBox_Zcentre->setEnabled(false) ; + SpinBox_Zbase->setEnabled(false) ; + SpinBox_Zbase_p->setEnabled(false) ; + } +// Rayons + SpinBox_Rayon->setSingleStep(_Rayon/10.) ; + SpinBox_Rayon->setMinimum(0.) ; + SpinBox_Radius->setSingleStep(_Rayon/10.) ; + SpinBox_Radius->setMinimum(0.) ; + SpinBox_Radius_int->setSingleStep(_Rayon/20.) ; + SpinBox_Radius_int->setMinimum(0.) ; + SpinBox_Radius_ext->setSingleStep(_Rayon/10.) ; + SpinBox_Radius_ext->setMinimum(0.) ; +// Axe et hauteur +// Si une coordonnee est constante, inutile de demander l'axe et la hauteur + if ( _Orient > 0) { + SpinBox_Xaxis->setVisible(0) ; + SpinBox_Yaxis->setVisible(0) ; + SpinBox_Zaxis->setVisible(0) ; + SpinBox_Haut->setVisible(0) ; + TLXaxis->setVisible(0) ; + TLYaxis->setVisible(0) ; + TLZaxis->setVisible(0) ; + TLHaut->setVisible(0) ; + SpinBox_Xaxis_p->setVisible(0) ; + SpinBox_Yaxis_p->setVisible(0) ; + SpinBox_Zaxis_p->setVisible(0) ; + SpinBox_Haut_p->setVisible(0) ; + TLXaxis_p->setVisible(0) ; + TLYaxis_p->setVisible(0) ; + TLZaxis_p->setVisible(0) ; + TLHaut_p->setVisible(0) ; + } + else { + SpinBox_Haut->setMinimum(0.) ; + SpinBox_Haut->setSingleStep(_Rayon/10.) ; + SpinBox_Haut_p->setMinimum(0.) ; + SpinBox_Haut_p->setSingleStep(_Rayon/10.) ; } -// Rayon - SpinBox_Rayon->setMinimum(0.); } // ------------------------------------------------------------------------ bool MonCreateZone::PushOnApply() @@ -233,61 +330,153 @@ bool MonCreateZone::PushOnApply() 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 ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_NAME") ) ; return false; } switch (_ZoneType) { - case 2 : // il s agit d une boite + case 11 : // il s agit d un rectangle + { } + case 12 : // il s agit d un rectangle + { } + case 13 : // il s agit d un rectangle + { } + case 2 : // il s agit d un parallelipipede rectangle + { + 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()) ) { - 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 + Chgt = true; + _ZoneXmin= SpinBox_Xmini->value() ; _ZoneXmax= SpinBox_Xmaxi->value() ; + _ZoneYmin= SpinBox_Ymini->value() ; _ZoneYmax= SpinBox_Ymaxi->value() ; + _ZoneZmin= SpinBox_Zmini->value() ; _ZoneZmax= SpinBox_Zmaxi->value() ; + } + break ; + } + case 4 : // il s agit d une sphere + { + if ( (_ZoneXcentre != SpinBox_Xcentre->value()) or + (_ZoneYcentre != SpinBox_Ycentre->value()) or + (_ZoneZcentre != SpinBox_Zbase->value()) or + (_ZoneRayon != SpinBox_Rayon->value()) ) + { + Chgt = true; + _ZoneXcentre=SpinBox_Xcentre->value() ; + _ZoneYcentre=SpinBox_Ycentre->value() ; + _ZoneZcentre=SpinBox_Zcentre->value() ; + _ZoneRayon=SpinBox_Rayon->value() ; + } + break ; + } + case 31 : // il s agit d un disque issu d'un cylindre + { } + case 32 : // il s agit d un disque issu d'un cylindre + { } + case 33 : // il s agit d un disque issu d'un cylindre + { } + case 5 : // il s agit d un cylindre + { + if ( (_ZoneXcentre != SpinBox_Xbase->value()) or + (_ZoneYcentre != SpinBox_Ybase->value()) or + (_ZoneZcentre != SpinBox_Zbase->value()) or + (_ZoneRayon != SpinBox_Radius->value()) or + (_ZoneHaut != SpinBox_Haut->value()) or + (_ZoneXaxis != SpinBox_Xaxis->value()) or + (_ZoneYaxis != SpinBox_Yaxis->value()) or + (_ZoneZaxis != SpinBox_Zaxis->value()) ) + { + Chgt = true; + _ZoneXcentre=SpinBox_Xbase->value() ; + _ZoneYcentre=SpinBox_Ybase->value() ; + _ZoneZcentre=SpinBox_Zbase->value() ; + _ZoneXaxis=SpinBox_Xaxis->value() ; + _ZoneYaxis=SpinBox_Yaxis->value() ; + _ZoneZaxis=SpinBox_Zaxis->value() ; + _ZoneRayon=SpinBox_Radius->value() ; + _ZoneHaut=SpinBox_Haut->value() ; + } + break ; + } + case 61 : // il s agit d un disque avec trou + { } + case 62 : // il s agit d un disque avec trou + { } + case 63 : // il s agit d un disque avec trou + { } + case 7 : // il s agit d un tuyau + { + if ( (_ZoneXcentre != SpinBox_Xbase_p->value()) or + (_ZoneYcentre != SpinBox_Ybase_p->value()) or + (_ZoneZcentre != SpinBox_Zbase_p->value()) or + (_ZoneRayonInt != SpinBox_Radius_int->value()) or + (_ZoneRayon != SpinBox_Radius_ext->value()) or + (_ZoneHaut != SpinBox_Haut_p->value()) or + (_ZoneXaxis != SpinBox_Xaxis_p->value()) or + (_ZoneYaxis != SpinBox_Yaxis_p->value()) or + (_ZoneZaxis != SpinBox_Zaxis_p->value()) ) { - if ((_ZoneXcentre != SpinBox_Xcentre->value()) or (_ZoneYcentre != SpinBox_Ycentre->value()) - or (_ZoneZcentre != SpinBox_Zcentre->value()) or (_ZoneRayon != SpinBox_Rayon->value())) - Chgt = true; - break; + Chgt = true; + _ZoneXcentre=SpinBox_Xbase_p->value() ; + _ZoneYcentre=SpinBox_Ybase_p->value() ; + _ZoneZcentre=SpinBox_Zbase_p->value() ; + _ZoneXaxis=SpinBox_Xaxis_p->value() ; + _ZoneYaxis=SpinBox_Yaxis_p->value() ; + _ZoneZaxis=SpinBox_Zaxis_p->value() ; + _ZoneRayonInt=SpinBox_Radius_int->value() ; + _ZoneRayon=SpinBox_Radius_ext->value() ; + _ZoneHaut=SpinBox_Haut_p->value() ; } + 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 ) +// Controles +// Pour un rectangle ou un parallelepipede : + if ( ( _ZoneType >= 11 and _ZoneType <= 13 ) or _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 ); + if ((_ZoneXmin >= _ZoneXmax) and (_Xincr > 0)) { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_LIMIT").arg("X") ) ; 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 ); + if ((_ZoneYmin >= _ZoneYmax) and (_Yincr > 0)) { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_LIMIT").arg("Y") ) ; 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 ); + if ((_ZoneZmin >= _ZoneZmax) and (_Zincr > 0)) { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_LIMIT").arg("Z") ) ; return false; } } - - bool bOK = CreateOrUpdateZone(); +// L'axe pour un cylindre ou un tuyau : + if ( _ZoneType == 5 or _ZoneType == 7 ) + { + double daux = _ZoneXaxis*_ZoneXaxis + _ZoneYaxis*_ZoneYaxis + _ZoneZaxis*_ZoneZaxis ; + if ( daux < 0.0000001 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_AXE") ); + return false; + } + } +// Rayons pour disque avec trou ou un tuyau : + if ( ( _ZoneType >= 61 and _ZoneType <= 63 ) or _ZoneType == 7 ) + { + if ( _ZoneRayonInt >= _ZoneRayon ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_RAYON") ); + return false; + } + } + bool bOK = CreateOrUpdateZone() ; return bOK; } @@ -295,41 +484,92 @@ bool MonCreateZone::PushOnApply() bool MonCreateZone:: CreateOrUpdateZone() //---------------------------------------------------- // Creation de la zone -// Mise a jour des attributs de la Zone - { + MESSAGE("CreateOrUpdateZone _ZoneType ="<<_ZoneType); if (_aZoneName != LEZoneName->text().trimmed()) { - try + _aZoneName = LEZoneName->text().trimmed() ; + switch (_ZoneType) { - _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; - } + case 11 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _Orient ); + break; + } + case 12 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax, _Orient ); + break; + } + case 13 : // il s agit d un rectangle + { aZone = _myHomardGen->CreateZoneBox2D(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZmin, _ZoneZmax, _ZoneXmin, _ZoneXmax, _Orient ); + break; + } + case 2 : // il s agit d un parallelepipede + { aZone = _myHomardGen->CreateZoneBox(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ); + break; + } + case 4 : // il s agit d une sphere + { aZone = _myHomardGen->CreateZoneSphere(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ); + break; + } + case 31 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _Orient ); + break; + } + case 32 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _Orient ); + break; + } + case 33 : // il s agit d un disque issu d'un cylindre + { aZone = _myHomardGen->CreateZoneDisk(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _Orient ); + break; + } + case 5 : // il s agit d un cylindre + { aZone = _myHomardGen->CreateZoneCylinder(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut ); + break; + } + case 61 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 62 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneYcentre, _ZoneZcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 63 : // il s agit d un disque avec trou + { aZone = _myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneZcentre, _ZoneXcentre, _ZoneRayon, _ZoneRayonInt, _Orient ); + break; + } + case 7 : // il s agit d un tuyau + { aZone = _myHomardGen->CreateZonePipe(CORBA::string_dup(_aZoneName.toStdString().c_str()), \ + _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut, _ZoneRayonInt ); + break; + } + } + _parent->addZoneinTWZone(_aZoneName) ; } // 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); + aZone->SetLimit(_Xincr, _Yincr, _Zincr) ; - HOMARD_UTILS::updateObjBrowser(); + HOMARD_UTILS::updateObjBrowser() ; return true; } // ------------------------------------------------------------------------ void MonCreateZone::PushOnOK() // ------------------------------------------------------------------------ { - if (PushOnApply()) this->close(); + if (PushOnApply()) this->close() ; } // ------------------------------------------------------------------------ void MonCreateZone::PushOnHelp() @@ -344,67 +584,112 @@ void MonCreateZone::SetNewZoneName() { // Recherche d'un nom par defaut qui n'existe pas encore - HOMARD::listeZones_var MyZones = _myHomardGen->GetAllZones(); + HOMARD::listeZones_var MyZones = _myHomardGen->GetAllZones() ; int num = 0; QString aZoneName=""; - while (aZoneName=="" ) + while (aZoneName=="" ) { aZoneName.setNum(num+1) ; aZoneName.insert(0, QString("Zone_")) ; - for ( int i=0; ilength(); i++) + for ( int i=0; ilength() ; i++) { - if ( aZoneName == QString(MyZones[i])) + if ( aZoneName == QString(MyZones[i])) { num=num+1; aZoneName=""; break; - } - } + } + } } LEZoneName->clear() ; - LEZoneName->insert(aZoneName); + LEZoneName->insert(aZoneName) ; } // ------------------------------------------------------------------------ void MonCreateZone::SetBox() // ------------------------------------------------------------------------ { - gBBox->setVisible(1); - gBSphere->setVisible(0); - adjustSize(); + gBBox->setVisible(1) ; + gBSphere->setVisible(0) ; + gBCylindre->setVisible(0) ; + gBPipe->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); - } + if ( _Xincr > 0 ) { SpinBox_Xmini->setValue(_Xcentre-10*_Xincr) ; + SpinBox_Xmaxi->setValue(_Xcentre+10*_Xincr) ; } + else { _ZoneType=12 ; } + if ( _Yincr > 0 ) { SpinBox_Ymini->setValue(_Ycentre-10*_Yincr) ; + SpinBox_Ymaxi->setValue(_Ycentre+10*_Yincr) ; } + else { _ZoneType=13 ; } + if ( _Zincr > 0 ) { SpinBox_Zmini->setValue(_Zcentre-10*_Zincr) ; + SpinBox_Zmaxi->setValue(_Zcentre+10*_Zincr) ; } + else { _ZoneType=11 ; } } // ------------------------------------------------------------------------ void MonCreateZone::SetSphere() // ------------------------------------------------------------------------ { MESSAGE("Debut de SetSphere") - gBBox->setVisible(0); - gBSphere->setVisible(1); - adjustSize(); + gBBox->setVisible(0) ; + gBSphere->setVisible(1) ; + gBCylindre->setVisible(0) ; + gBPipe->setVisible(0) ; + 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); + SpinBox_Xcentre->setValue(_Xcentre) ; + SpinBox_Ycentre->setValue(_Ycentre) ; + SpinBox_Zcentre->setValue(_Zcentre) ; + SpinBox_Rayon->setValue(_Rayon) ; + MESSAGE("Fin de SetSphere") +} +// ------------------------------------------------------------------------ +void MonCreateZone::SetCylinder() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetCylinder") + gBBox->setVisible(0) ; + gBSphere->setVisible(0) ; + gBCylindre->setVisible(1) ; + gBPipe->setVisible(0) ; + adjustSize() ; + _ZoneType=5; + if ( _Xincr > 0 ) { SpinBox_Xbase->setValue(_Xcentre) ; + SpinBox_Xaxis->setValue(0.) ; } + else { _ZoneType=32 ; } + if ( _Yincr > 0 ) { SpinBox_Ybase->setValue(_Ycentre) ; + SpinBox_Yaxis->setValue(0.) ; } + else { _ZoneType=33 ; } + if ( _Zincr > 0 ) { SpinBox_Zbase->setValue(_Zcentre) ; + SpinBox_Zaxis->setValue(1.) ; } + else { _ZoneType=31 ; } + SpinBox_Radius->setValue(_Rayon) ; + SpinBox_Haut->setValue(_Haut) ; + MESSAGE("Fin de SetCylinder") +} +// ------------------------------------------------------------------------ +void MonCreateZone::SetPipe() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetPipe") + gBBox->setVisible(0) ; + gBSphere->setVisible(0) ; + gBCylindre->setVisible(0) ; + gBPipe->setVisible(1) ; + adjustSize() ; + _ZoneType=7; + if ( _Xincr > 0 ) { SpinBox_Xbase_p->setValue(_Xcentre) ; + SpinBox_Xaxis_p->setValue(0.) ; } + else { _ZoneType=62 ; } + if ( _Yincr > 0 ) { SpinBox_Ybase_p->setValue(_Ycentre) ; + SpinBox_Yaxis_p->setValue(0.) ; } + else { _ZoneType=63 ; } + if ( _Zincr > 0 ) { SpinBox_Zbase_p->setValue(_Zcentre) ; + SpinBox_Zaxis_p->setValue(1.) ; } + else { _ZoneType=61 ; } + SpinBox_Radius_int->setValue(_RayonInt) ; + SpinBox_Radius_ext->setValue(_Rayon) ; + SpinBox_Haut_p->setValue(_Haut) ; + MESSAGE("Fin de SetPipe") } diff --git a/src/HOMARDGUI/MonCreateZone.h b/src/HOMARDGUI/MonCreateZone.h index e00812e8..e1705be1 100644 --- a/src/HOMARDGUI/MonCreateZone.h +++ b/src/HOMARDGUI/MonCreateZone.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_CREATEZONE_H #define MON_CREATEZONE_H @@ -32,11 +51,15 @@ protected : QString _aZoneName; QString _aCaseName; + int _Orient; 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; + double _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ; + double _Xmin, _Xmax, _Xincr, _Ymin, _Ymax, _Yincr, _Zmin, _Zmax, _Zincr ; + double _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ; + double _Xaxis, _Yaxis, _Zaxis, _RayonInt, _Haut ; + double _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayonInt, _ZoneHaut ; + double _DMax ; bool Chgt; @@ -53,6 +76,8 @@ protected : public slots: virtual void SetBox(); virtual void SetSphere(); + virtual void SetCylinder(); + virtual void SetPipe(); virtual void PushOnOK(); virtual bool PushOnApply(); virtual void PushOnHelp(); diff --git a/src/HOMARDGUI/MonEditBoundaryAn.cxx b/src/HOMARDGUI/MonEditBoundaryAn.cxx new file mode 100644 index 00000000..bf91e602 --- /dev/null +++ b/src/HOMARDGUI/MonEditBoundaryAn.cxx @@ -0,0 +1,192 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +using namespace std; + +#include "MonEditBoundaryAn.h" + +#include "SalomeApp_Tools.h" +#include "HOMARDGUI_Utils.h" +#include + + +// ------------------------------------------------------------------------ +MonEditBoundaryAn::MonEditBoundaryAn( MonCreateCase* parent, bool modal, + HOMARD::HOMARD_Gen_var myHomardGen, + QString caseName, QString zoneName ): +// ------------------------------------------------------------------------ +/* Constructs a MonEditBoundaryAn + herite de MonCreateBoundaryAn +*/ + MonCreateBoundaryAn(parent, myHomardGen, caseName) +{ + MESSAGE("Debut de MonEditBoundaryAn pour " << zoneName.toStdString().c_str()); + setWindowTitle(QObject::tr("HOM_BOUN_A_EDIT_WINDOW_TITLE")); + _aBoundaryAnName=zoneName; + aBoundaryAn = _myHomardGen->GetBoundary(_aBoundaryAnName.toStdString().c_str()); + InitValEdit(); +} +// ------------------------------------------------------------------------ +MonEditBoundaryAn::~MonEditBoundaryAn() +// ------------------------------------------------------------------------ +{ + // no need to delete child widgets, Qt does it all for us +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::InitValEdit() +// ------------------------------------------------------------------------ +{ + LEBoundaryName->setText(_aBoundaryAnName); + LEBoundaryName->setReadOnly(true); + _BoundaryType = aBoundaryAn->GetBoundaryType(); + MESSAGE("_BoundaryType : "<<_BoundaryType); + InitValBoundaryAnLimit(); + if (_aCaseName != QString("")) InitValBoundaryAn(); + switch (_BoundaryType) + { + case 1 : // il s agit d un cylindre + { + InitValBoundaryAnCylindre(); + SetCylinder(); + break; + } + case 2: // il s agit d une sphere + { + InitValBoundaryAnSphere(); + SetSphere(); + break; + } + }; +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::InitValBoundaryAnLimit() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordLimits = aBoundaryAn->GetLimit(); + ASSERT(mesCoordLimits->length() == 3 ); + _Xincr=mesCoordLimits[0]; + _Yincr=mesCoordLimits[1]; + _Zincr=mesCoordLimits[2]; +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::InitValBoundaryAnCylindre() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetCoords(); + ASSERT(mesCoordBoundary->length() == 7 ); + _BoundaryAnXcentre=mesCoordBoundary[0]; + _BoundaryAnYcentre=mesCoordBoundary[1]; + _BoundaryAnZcentre=mesCoordBoundary[2]; + _BoundaryAnXaxis=mesCoordBoundary[3]; + _BoundaryAnYaxis=mesCoordBoundary[4]; + _BoundaryAnZaxis=mesCoordBoundary[5]; + _BoundaryAnRayon=mesCoordBoundary[6]; +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::InitValBoundaryAnSphere() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordBoundary = aBoundaryAn->GetCoords(); + ASSERT(mesCoordBoundary->length() == 4 ); + _BoundaryAnXcentre=mesCoordBoundary[0]; + _BoundaryAnYcentre=mesCoordBoundary[1]; + _BoundaryAnZcentre=mesCoordBoundary[2]; + _BoundaryAnRayon=mesCoordBoundary[3]; +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::SetCylinder() +// ------------------------------------------------------------------------ +{ + gBCylindre->setVisible(1); + gBSphere->setVisible(0); + RBCylindre->setChecked(1); + adjustSize(); + _BoundaryType=1; + RBSphere->setDisabled(true); + adjustSize(); + + SpinBox_Xcent->setValue(_BoundaryAnXcentre); + SpinBox_Ycent->setValue(_BoundaryAnYcentre); + SpinBox_Zcent->setValue(_BoundaryAnZcentre); + + SpinBox_Xaxis->setValue(_BoundaryAnXaxis); + SpinBox_Yaxis->setValue(_BoundaryAnYaxis); + SpinBox_Zaxis->setValue(_BoundaryAnZaxis); + + + SpinBox_Xaxis->setSingleStep(0.1); + SpinBox_Xcentre->setSingleStep(_Xincr); + SpinBox_Yaxis->setSingleStep(0.1); + SpinBox_Ycentre->setSingleStep(_Yincr); + SpinBox_Zaxis->setSingleStep(0.1); + SpinBox_Zcentre->setSingleStep(_Zincr); +// Rayon + SpinBox_Radius->setValue(_BoundaryAnRayon); + SpinBox_Radius->setSingleStep(_BoundaryAnRayon/10.); + +} +// ------------------------------------------------------------------------ +void MonEditBoundaryAn::SetSphere() +// ------------------------------------------------------------------------ +{ + gBCylindre->setVisible(0); + gBSphere->setVisible(1); + RBSphere->setChecked(1); + RBCylindre->setDisabled(true); + adjustSize(); + _BoundaryType=2 ; + + SpinBox_Xcentre->setValue(_BoundaryAnXcentre); + if ( _Xincr > 0) { SpinBox_Xcentre->setSingleStep(_Xincr); } + else { SpinBox_Xcentre->setSingleStep(1) ; } + + SpinBox_Ycentre->setValue(_BoundaryAnYcentre); + if ( _Yincr > 0) { SpinBox_Ycentre->setSingleStep(_Yincr); } + else { SpinBox_Ycentre->setSingleStep(1) ; } + + SpinBox_Zcentre->setValue(_BoundaryAnZcentre); + if ( _Zincr > 0) { SpinBox_Zcentre->setSingleStep(_Zincr); } + else { SpinBox_Zcentre->setSingleStep(1);} + + SpinBox_Rayon->setMinimum(0.); + SpinBox_Rayon->setValue(_BoundaryAnRayon); +} +// --------------------------------------------------- +bool MonEditBoundaryAn::CreateOrUpdateBoundaryAn() +//---------------------------------------------------- +// Mise a jour des attributs de la BoundaryAn +{ + switch (_BoundaryType) + { + case 1 : // il s agit d un cylindre + { + aBoundaryAn->SetCylinder(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon ); + break; + } + case 2 : // il s agit d une sphere + { + aBoundaryAn->SetSphere(_BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon); + break; + } + } + if (Chgt) _myHomardGen->InvalideBoundary(_aBoundaryAnName.toStdString().c_str()); + HOMARD_UTILS::updateObjBrowser(); + return true; +} + diff --git a/src/HOMARDGUI/MonEditBoundaryAn.h b/src/HOMARDGUI/MonEditBoundaryAn.h new file mode 100644 index 00000000..7e027564 --- /dev/null +++ b/src/HOMARDGUI/MonEditBoundaryAn.h @@ -0,0 +1,53 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MON_EDITBOUNDARYAN_H +#define MON_EDITBOUNDARYAN_H + +#include +#include + +#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) +#include CORBA_CLIENT_HEADER(HOMARD_Gen) + +#include + +class MonEditBoundaryAn : public MonCreateBoundaryAn +{ + Q_OBJECT +public: + MonEditBoundaryAn( MonCreateCase* parent, bool modal, + HOMARD::HOMARD_Gen_var myHomardGen, + QString caseName, QString zoneName); + virtual ~MonEditBoundaryAn(); + +protected : + void SetCylinder(); + void SetSphere(); + bool CreateOrUpdateBoundaryAn(); + void InitValEdit(); + void InitValBoundaryAnLimit(); + void InitValBoundaryAnCylindre(); + void InitValBoundaryAnSphere(); + +public slots: + +}; + +#endif // MON_EDITZONE_H diff --git a/src/HOMARDGUI/MonEditBoundaryDi.cxx b/src/HOMARDGUI/MonEditBoundaryDi.cxx index cae08250..66b453e9 100644 --- a/src/HOMARDGUI/MonEditBoundaryDi.cxx +++ b/src/HOMARDGUI/MonEditBoundaryDi.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonEditBoundaryDi.h" @@ -22,7 +41,7 @@ MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal, MonCreateBoundaryDi(parent, modal, myHomardGen, caseName, BoundaryName) { MESSAGE("Debut de Boundary pour " << BoundaryName.toStdString().c_str()); - setWindowTitle("Edit BoundaryDi"); + setWindowTitle(QObject::tr("HOM_BOUN_D_EDIT_WINDOW_TITLE")); try { _aBoundary=_myHomardGen->GetBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str())); @@ -31,10 +50,9 @@ MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal, } catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); - return; + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); + return; } HOMARD::ListGroupType_var maListe = _aBoundary->GetGroups(); @@ -71,19 +89,18 @@ bool MonEditBoundaryDi::PushOnApply() 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(); + if (!CBGroupe->isChecked()) return; + if (_aCaseName.toStdString().c_str() == QString()) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_CASE") ); + return; + } + HOMARD::HOMARD_Cas_var monCas= _myHomardGen->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(); + 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 index ce9efbb5..c9ce0826 100644 --- a/src/HOMARDGUI/MonEditBoundaryDi.h +++ b/src/HOMARDGUI/MonEditBoundaryDi.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_EDITBOUNDARYDI_H #define MON_EDITBOUNDARYDI_H diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx index ca060e3f..0045f9be 100644 --- a/src/HOMARDGUI/MonEditCase.cxx +++ b/src/HOMARDGUI/MonEditCase.cxx @@ -1,9 +1,26 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonEditCase.h" -#include - #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include "HomardQtCommun.h" @@ -21,7 +38,7 @@ MonEditCase::MonEditCase ( QWidget* parent, bool modal, MonCreateCase(parent, modal, myHomardGen) { MESSAGE("Debut de MonEditCase" << CaseName.toStdString().c_str()); - setWindowTitle("Edit case"); + setWindowTitle(QObject::tr("HOM_CASE_EDIT_WINDOW_TITLE")); _aCaseName = CaseName; aCase = _myHomardGen->GetCas(_aCaseName.toStdString().c_str()); InitValEdit(); @@ -37,79 +54,148 @@ 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) + MESSAGE("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); + +// Non affichage du mode de suivi de frontiere + CBBoundaryA->setVisible(0); + GBBoundaryA->setVisible(0); + CBBoundaryD->setVisible(0); + GBBoundaryD->setVisible(0); + +// On passe en revue tous les couples (frontiere,groupe) du cas + HOMARD::ListBoundaryGroupType_var mesBoundarys = aCase->GetBoundaryGroup(); + if (mesBoundarys->length()>0) + { + QStringList ListeFron ; + QString NomFron ; + bool BounDi = false ; + bool BounAn = false ; + for (int i=0; ilength(); i++) + { +// Nom de la frontiere + NomFron = mesBoundarys[i++]; + MESSAGE("NomFron "<GetBoundary(NomFron.toStdString().c_str()); + int type_obj = myBoundary->GetBoundaryType() ; +// C'est une frontiere discrete +// Rermarque : on ne gere pas les groupes + if ( type_obj==0 ) { - GBTypeNoConf->setVisible(0); - RBConforme->setChecked(true); + BounDi = true ; + CBBoundaryDi->addItem(NomFron); } +// C'est une frontiere analytique 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; ilength(); i++) + BounAn = true ; + int nbcol = TWBoundary->columnCount(); +// On ajoute une ligne pour le groupe + TWBoundary->insertRow(0); +// La colonne 0 comporte le nom du groupe + TWBoundary->setItem( 0, 0, new QTableWidgetItem(QString(mesBoundarys[i]).trimmed())); +// TWBoundary->item( 0, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable ); +// Chacune des colonnes suivantes est associé a une frontiere deja presente : on y met une +// case non cochee + for ( int j = 1; j < nbcol; j++ ) { - 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 ; - }; + TWBoundary->setItem( 0, j, new QTableWidgetItem( QString ("") ) ); + TWBoundary->item( 0, j )->setFlags( 0 ); + TWBoundary->item( 0, j )->setFlags( Qt::ItemIsUserCheckable ); + TWBoundary->item( 0, j )->setCheckState( Qt::Unchecked ); } - MESSAGE("BounDi "<setVisible(1); - GBBoundaryA->setDisabled(true);} - if ( BounDi ) - { GBBoundaryD->setVisible(1); - CBBoundaryDi->setDisabled(true); - PBBoundaryDiNew->setVisible(0);} +// On cherche si la frontiere en cours d'examen a deja ete rencontree : +// si oui, on stocke son numero de colonne + int ok = -1 ; + for ( int nufr = 0 ; nufritem( 0, ok )->setCheckState( Qt::Checked ); } + } + MESSAGE("BounDi "<setVisible(1); +// On rend les cases non modifiables. +// On ne peut pas le faire pour tout le tableau sinon on perd l'ascenseur ! + int nbcol = TWBoundary->columnCount(); + int nbrow = TWBoundary->rowCount(); + for ( int i = 0; i < nbrow; i++ ) + { for ( int j = 0; j < nbcol; j++ ) TWBoundary->item( i, j )->setFlags( Qt::ItemIsSelectable ); } +// on met un nom blanc au coin + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateCase", "", 0, QApplication::UnicodeUTF8)); + TWBoundary->setHorizontalHeaderItem(0, __colItem); +// on cache les boutons inutiles + PBBoundaryAnNew->setVisible(0); + PBBoundaryAnHelp->setVisible(0); + } + if ( BounDi ) + { GBBoundaryD->setVisible(1); + CBBoundaryDi->setDisabled(true); + PBBoundaryDiNew->setVisible(0); + PBBoundaryDiHelp->setVisible(0); } + } +// +// Les options avancees (non modifiables) + CBAdvanced->setVisible(0) ; + CBAdvanced->setEnabled(false) ; + int Pyram = aCase->GetPyram(); + MESSAGE("Pyram "< 0 ) + { GBAdvancedOptions->setVisible(1); + CBPyramid->setChecked(true); + CBPyramid->setEnabled(false); + } + else + { GBAdvancedOptions->setVisible(0); + CBPyramid->setChecked(false); + } +// + adjustSize(); } // ------------------------------------- @@ -117,5 +203,4 @@ bool MonEditCase::PushOnApply() // ------------------------------------- { return true ; - }; diff --git a/src/HOMARDGUI/MonEditCase.h b/src/HOMARDGUI/MonEditCase.h index f4e91c4b..60fcd288 100644 --- a/src/HOMARDGUI/MonEditCase.h +++ b/src/HOMARDGUI/MonEditCase.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_EDITCASE_H #define MON_EDITCASE_H diff --git a/src/HOMARDGUI/MonEditFile.cxx b/src/HOMARDGUI/MonEditFile.cxx index c73730c3..d399466f 100644 --- a/src/HOMARDGUI/MonEditFile.cxx +++ b/src/HOMARDGUI/MonEditFile.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonEditFile.h" @@ -15,12 +34,12 @@ using namespace std; * 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 + * et affiche le texte correspondant dans la fenetre de log * --------------------------------------------------------- */ /* --------------------------------------------------------- - * MonEditFile Constructeur + * MonEditFile Constructeur * --------------------------------------------------------- */ MonEditFile::MonEditFile( QWidget* parent, bool modal, @@ -48,7 +67,6 @@ 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() @@ -84,16 +102,9 @@ void MonEditFile::PushOnPrint() // ------------------------------------------------------------------------ { MESSAGE("Debut de MonEditFile::PushOnPrint") - QMessageBox::information( 0, "Error", - "Inactive button.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_INACTIVE_BUTTON") ); return; } -// ------------------------------------------------------------------------ -void MonEditFile::PushOnHelp() -// ------------------------------------------------------------------------ -{ - HOMARD_UTILS::PushOnHelp(QString("gui_usage.html")); -} diff --git a/src/HOMARDGUI/MonEditFile.h b/src/HOMARDGUI/MonEditFile.h index 22def7ac..d6e36501 100644 --- a/src/HOMARDGUI/MonEditFile.h +++ b/src/HOMARDGUI/MonEditFile.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_EDITFILE_H #define MON_EDITFILE_H @@ -36,7 +55,6 @@ protected : public slots: virtual void PushOnPrint(); - virtual void PushOnHelp(); }; diff --git a/src/HOMARDGUI/MonEditHypothesis.cxx b/src/HOMARDGUI/MonEditHypothesis.cxx index f1667f6f..38a9d024 100644 --- a/src/HOMARDGUI/MonEditHypothesis.cxx +++ b/src/HOMARDGUI/MonEditHypothesis.cxx @@ -1,29 +1,44 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonEditHypothesis.h" #include "MonEditListGroup.h" -#include - #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include "HomardQtCommun.h" #include - - -// ------------------------------------------------------------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- 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"); + setWindowTitle(QObject::tr("HOM_HYPO_EDIT_WINDOW_TITLE")); _aHypothesis = _myHomardGen->GetHypothesis(_aHypothesisName.toStdString().c_str()); if (caseName == QString("") ){ _aCaseName = _aHypothesis->GetCaseCreation();} InitValEdit(); @@ -49,39 +64,75 @@ void MonEditHypothesis::InitGroupes() 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]; + 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(); + if (_aTypeAdap == -1) InitAdaptUniforme(); + if (_aTypeAdap == 0) InitAdaptZone(); + if (_aTypeAdap == 1) InitAdaptChamps(); - RBUniDera->setDisabled(true); - RBUniRaff->setDisabled(true); + RBUniDera->setDisabled(true); + RBUniRaff->setDisabled(true); - InitFieldInterp(); + InitFieldInterp(); - if (_aTypeAdap == 1 or _TypeFieldInterp >= 1 ) - { - if (_aFieldFile == QString("")) { GBFieldFile->setVisible(0); } - else - { - GBFieldFile->setVisible(1); - LEFieldFile->setText(_aFieldFile); - LEFieldFile->setReadOnly(1); - } - } + 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); + } +// Les options avancees (non modifiables) + CBAdvanced->setVisible(0) ; + int NivMax = _aHypothesis->GetNivMax(); + double DiamMin = _aHypothesis->GetDiamMin(); + int AdapInit = _aHypothesis->GetAdapInit(); + if ( NivMax > 0 or DiamMin > 0 or AdapInit != 0 ) + { GBAdvancedOptions->setVisible(1); + if ( NivMax > 0 ) + { spinBoxNivMax->setValue(NivMax); + spinBoxNivMax->setDisabled(true); } + else + { TLMaximalLevel->setVisible(0); + spinBoxNivMax->setVisible(0); } + if ( DiamMin > 0 ) + { doubleSpinBoxDiamMin->setValue(DiamMin); + doubleSpinBoxDiamMin->setDisabled(true); } + else + { TLMinimalDiameter->setVisible(0); + doubleSpinBoxDiamMin->setVisible(0); } + if ( AdapInit != 0 ) + { + if ( AdapInit > 0 ) + { RBAIR->setChecked(true); } else - { - GBFieldFile->setVisible(0); - } - adjustSize(); + { RBAID->setChecked(true); } + RBAIN->setEnabled(false); + RBAIR->setEnabled(false); + RBAID->setEnabled(false); + } + else + { GBAdapInit->setVisible(0) ; + } + } + else + { GBAdvancedOptions->setVisible(0); } +// + adjustSize(); } // ---------------------------------------- void MonEditHypothesis::InitAdaptUniforme() @@ -118,8 +169,7 @@ void MonEditHypothesis::InitAdaptZone() // ------------------------------------- // Affichage des informations pour une adaptation selon des zones : { -// . Liste des zones - + MESSAGE ("Debut de InitAdaptZone"); // Choix des options generales GBUniform->setVisible(0); GBFieldManagement->setVisible(0); @@ -135,25 +185,38 @@ void MonEditHypothesis::InitAdaptZone() HOMARD::listeZonesHypo_var mesZonesAvant = _aHypothesis->GetZones(); for (int i=0; ilength(); i++) { - for ( int j =0 ; j < TWZone->rowCount(); j++) + MESSAGE ("i"<rowCount(); j++) + { + MESSAGE (". j"<item(j,2)->text().toStdString()); + if ( TWZone->item(j,2)->text().toStdString() == string(mesZonesAvant[i]) ) { - if (TWZone->item(j,1)->text().toStdString() == string(mesZonesAvant[i])) - { - TWZone->item( j,0 )->setCheckState( Qt::Checked ); - break; - } + MESSAGE ("OK avec "<item( j,0 )->setCheckState( Qt::Checked ); + TWZone->item( j,1 )->setCheckState( Qt::Unchecked ); } + else + { + MESSAGE ("... DERA"); + TWZone->item( j,0 )->setCheckState( Qt::Unchecked ); + TWZone->item( j,1 )->setCheckState( Qt::Checked ); } + break; } + } + i += 1 ; } // // Inactivation des choix for ( int j =0 ; j < TWZone->rowCount(); j++) { - TWZone->item( j, 0 )->setFlags(0); + TWZone->item( j, 0 )->setFlags(0); + TWZone->item( j, 1 )->setFlags(0); } PBZoneNew->setVisible(0); // } - // ------------------------------------- void MonEditHypothesis::InitAdaptChamps() // ------------------------------------- @@ -182,6 +245,7 @@ void MonEditHypothesis::InitAdaptChamps() _ThreshR = aInfosHypo->ThreshR; _TypeThC = aInfosHypo->TypeThC; _ThreshC = aInfosHypo->ThreshC; + _UsField = aInfosHypo->UsField; _UsCmpI = aInfosHypo->UsCmpI; @@ -201,7 +265,7 @@ void MonEditHypothesis::InitAdaptChamps() 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->setItem( 0, 1, new QTableWidgetItem(QString(mesComposantsAvant[i]).trimmed())); TWCMP->item( 0, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable ); } TWCMP->resizeColumnsToContents(); @@ -243,12 +307,18 @@ void MonEditHypothesis::InitAdaptChamps() } // Le choix de la prise en compte des composantes if ( TWCMP->rowCount() == 1 ) - { RBL2->setText(QString("Absolute value")); - RBInf->setText(QString("Relative value")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_ABS")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_REL")); + } + else + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_L2")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_INF")); } + if ( _UsField == 0 ) { CBJump->hide(); } else - { RBL2->setText(QString("L2 norm")); - RBInf->setText(QString("Infinite Norm")); + { + CBJump->setChecked(true); + CBJump->setEnabled(false); } if ( _UsCmpI == 0 ) { @@ -302,7 +372,7 @@ void MonEditHypothesis::InitFieldInterp() 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->setItem( 0, 1, new QTableWidgetItem(QString(mesChampsAvant[i]).trimmed())); TWField->item( 0, 1 )->setFlags( Qt::ItemIsEnabled |Qt::ItemIsSelectable ); } TWField->resizeColumnsToContents(); diff --git a/src/HOMARDGUI/MonEditHypothesis.h b/src/HOMARDGUI/MonEditHypothesis.h index c4184240..ef9c11b3 100644 --- a/src/HOMARDGUI/MonEditHypothesis.h +++ b/src/HOMARDGUI/MonEditHypothesis.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_EDITHYPOTHESIS_H #define MON_EDITHYPOTHESIS_H diff --git a/src/HOMARDGUI/MonEditIteration.cxx b/src/HOMARDGUI/MonEditIteration.cxx index 4363da12..a6368637 100644 --- a/src/HOMARDGUI/MonEditIteration.cxx +++ b/src/HOMARDGUI/MonEditIteration.cxx @@ -1,9 +1,26 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonEditIteration.h" -#include - #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include "HomardQtCommun.h" @@ -22,7 +39,7 @@ MonEditIteration::MonEditIteration ( QWidget* parent, bool modal, _rank(0), _step(0), _IterationName(""), _FieldFile(""),_aTypeAdap() { MESSAGE("Debut de MonEditIteration" << IterName.toStdString().c_str()); - setWindowTitle("Edit iteration"); + setWindowTitle(QObject::tr("HOM_ITER_EDIT_WINDOW_TITLE")); _IterationName = IterName; aIter = _myHomardGen->GetIteration(_IterationName.toStdString().c_str()); @@ -53,12 +70,12 @@ void MonEditIteration::InitValEdit0() // Affichage bloque du nom du maillage de l'iteration courante QString MeshName = aIter->GetMeshName(); - Mesh_n->setText(QString("Mesh name")); + Mesh_n->setText(QObject::tr("HOM_ITER_STARTING_POINT_0")); LEMeshName_n->setText(MeshName); LEMeshName_n->setReadOnly(1); // Message general - Mesh_np1->setText(QString("First iteration of the case.")); + Mesh_np1->setText(QObject::tr("HOM_ITER_STARTING_POINT_1")); LEMeshName_np1->setVisible(0); // // Invisibilite des hypotheses et des champs @@ -150,7 +167,7 @@ bool MonEditIteration::PushOnApply() if ( _aTypeAdap == 1) { // Pour du raffinement selon un champ, les instants ont-ils change ? - if ( (_FieldFile != LEFieldFile->text().trimmed()) or + if ( (_FieldFile != LEFieldFile->text().trimmed()) or ( _rank != SpinBox_Rank->value()) or ( _step != SpinBox_TimeStep->value())) { diff --git a/src/HOMARDGUI/MonEditIteration.h b/src/HOMARDGUI/MonEditIteration.h index e1da4039..f224fa84 100644 --- a/src/HOMARDGUI/MonEditIteration.h +++ b/src/HOMARDGUI/MonEditIteration.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_EDITITERATION_H #define MON_EDITITERATION_H diff --git a/src/HOMARDGUI/MonEditListGroup.cxx b/src/HOMARDGUI/MonEditListGroup.cxx index 40ee236b..691c0aa5 100644 --- a/src/HOMARDGUI/MonEditListGroup.cxx +++ b/src/HOMARDGUI/MonEditListGroup.cxx @@ -1,20 +1,39 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonEditListGroup.h" #include //--------------------------------------------------------------------- -MonEditListGroup::MonEditListGroup( MonCreateHypothesis* parentHyp, - MonCreateBoundaryDi* parentBound, - bool modal, - HOMARD::HOMARD_Gen_var myHomardGen, - QString aCaseName, +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"); + setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE")); setModal(true); InitGroupes(); } diff --git a/src/HOMARDGUI/MonEditListGroup.h b/src/HOMARDGUI/MonEditListGroup.h index f372ed1f..52616975 100644 --- a/src/HOMARDGUI/MonEditListGroup.h +++ b/src/HOMARDGUI/MonEditListGroup.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_EDITLISTGROUP_H #define MON_EDITLISTGROUP_H diff --git a/src/HOMARDGUI/MonEditZone.cxx b/src/HOMARDGUI/MonEditZone.cxx index afebbfbb..6febcd14 100644 --- a/src/HOMARDGUI/MonEditZone.cxx +++ b/src/HOMARDGUI/MonEditZone.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + using namespace std; #include "MonEditZone.h" @@ -5,6 +24,11 @@ using namespace std; #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include +#include +#include +#include +#include +#include // ------------------------------------------------------------------------ @@ -18,7 +42,7 @@ MonEditZone::MonEditZone( MonCreateHypothesis* parent, bool modal, MonCreateZone(parent, myHomardGen, caseName) { MESSAGE("Debut de MonEditZone pour " << zoneName.toStdString().c_str()); - setWindowTitle("Edit Zone"); + setWindowTitle(QObject::tr("HOM_ZONE_EDIT_WINDOW_TITLE")); _aZoneName=zoneName; aZone = _myHomardGen->GetZone(_aZoneName.toStdString().c_str()); InitValEdit(); @@ -33,93 +57,175 @@ MonEditZone::~MonEditZone() void MonEditZone::InitValEdit() // ------------------------------------------------------------------------ { - LEZoneName->setText(_aZoneName); - LEZoneName->setReadOnly(true); - _ZoneType = aZone->GetZoneType(); - InitValZoneLimit(); - if (_aCaseName != QString("")) InitValZone(); - switch (_ZoneType) + MESSAGE("InitValEdit "); + LEZoneName->setText(_aZoneName); + LEZoneName->setReadOnly(true); + _ZoneType = aZone->GetZoneType(); + MESSAGE("InitValEdit _ZoneType ="<<_ZoneType); + InitValZoneLimit(); + if (_aCaseName != QString("")) InitValZone(); + switch (_ZoneType) + { + case 11 : // il s agit d un rectangle + { } + case 12 : // il s agit d un rectangle + { } + case 13 : // il s agit d un rectangle + { } + case 2 : // il s agit d une boite { - case 2 : // il s agit d une boite - { - InitValZoneBox(); - SetBox(); - break; - } - case 4 : // il s agit d une sphere - { - InitValZoneSphere(); - SetSphere(); - break; - } - }; + InitValZoneBox(); + SetBox(); + break; + } + case 4 : // il s agit d une sphere + { + InitValZoneSphere(); + SetSphere(); + break; + } + case 31 : // il s agit d un cercle issu d'un cylindre + { } + case 32 : // il s agit d un cercle issu d'un cylindre + { } + case 33 : // il s agit d un cercle issu d'un cylindre + { } + case 5 : // il s agit d un cylindre + { + InitValZoneCylinder(); + SetCylinder(); + break; + } + case 61 : // il s agit d un disque avec trou issu d'un tuyau + { } + case 62 : // il s agit d un disque avec trou issu d'un tuyau + { } + case 63 : // il s agit d un disque avec trou issu d'un tuyau + { } + case 7 : // il s agit d un tuyau + { + InitValZonePipe(); + SetPipe(); + break; + } + }; } // ------------------------------------------------------------------------ void MonEditZone::InitValZoneLimit() // ------------------------------------------------------------------------ { - HOMARD::double_array_var mesCoordLimits = aZone->GetLimit(); - ASSERT(mesCoordLimits->length() == 3 ); - _Xincr=mesCoordLimits[0]; - _Yincr=mesCoordLimits[1]; - _Zincr=mesCoordLimits[2]; - + 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]; - + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + 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]; + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + ASSERT(mesCoordZones->length() == 4 ); + _ZoneXcentre=mesCoordZones[0]; + _ZoneYcentre=mesCoordZones[1]; + _ZoneZcentre=mesCoordZones[2]; + _ZoneRayon=mesCoordZones[3]; } // ------------------------------------------------------------------------ +void MonEditZone::InitValZoneCylinder() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + ASSERT(mesCoordZones->length() == 8 ); + _ZoneXcentre=mesCoordZones[0]; + _ZoneYcentre=mesCoordZones[1]; + _ZoneZcentre=mesCoordZones[2]; + _ZoneXaxis=mesCoordZones[3]; + _ZoneYaxis=mesCoordZones[4]; + _ZoneZaxis=mesCoordZones[5]; + _ZoneRayon=mesCoordZones[6]; + _ZoneHaut=mesCoordZones[7]; +} +// ------------------------------------------------------------------------ +void MonEditZone::InitValZonePipe() +// ------------------------------------------------------------------------ +{ + HOMARD::double_array_var mesCoordZones = aZone->GetCoords(); + ASSERT(mesCoordZones->length() == 9 ); + _ZoneXcentre=mesCoordZones[0]; + _ZoneYcentre=mesCoordZones[1]; + _ZoneZcentre=mesCoordZones[2]; + _ZoneXaxis=mesCoordZones[3]; + _ZoneYaxis=mesCoordZones[4]; + _ZoneZaxis=mesCoordZones[5]; + _ZoneRayon=mesCoordZones[6]; + _ZoneHaut=mesCoordZones[7]; + _ZoneRayonInt=mesCoordZones[8]; +} +// ------------------------------------------------------------------------ void MonEditZone::SetBox() // ------------------------------------------------------------------------ { + MESSAGE("SetBox "); gBBox->setVisible(1); gBSphere->setVisible(0); + gBCylindre->setVisible(0) ; + gBPipe->setVisible(0) ; RBBox->setChecked(1); adjustSize(); - _ZoneType=2; - RBSphere->setDisabled(true); + RBCylinder->setDisabled(true); + RBPipe->setDisabled(true); + if ( _ZoneType == 2 ) { RBSphere->setDisabled(true); } + else { RBSphere->setVisible(0); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "boxdxy.png" ) ; + QIcon IS=QIcon(pix) ; + RBBox->setIcon(IS) ; } adjustSize(); SpinBox_Xmini->setValue(_ZoneXmin); SpinBox_Xmaxi->setValue(_ZoneXmax); - int incr=1; - if ( _Xincr > 0 ) { incr=_Xincr;}; + double incr ; + if ( _Xincr > 0 ) {incr=_Xincr;} else{incr=1.;} SpinBox_Xmini->setSingleStep(incr); SpinBox_Xmaxi->setSingleStep(incr); SpinBox_Ymini->setValue(_ZoneYmin); SpinBox_Ymaxi->setValue(_ZoneYmax); - if ( _Yincr > 0 ) {incr=_Yincr;} else{incr=1;} + 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;} + if ( _Zincr > 0 ) {incr=_Zincr;} else{incr=1.;} SpinBox_Zmini->setSingleStep(incr); SpinBox_Zmaxi->setSingleStep(incr); + if ( _ZoneType == 12 ) { SpinBox_Xmini->setDisabled(true) ; + SpinBox_Xmaxi->setDisabled(true) ; } + else if ( _ZoneType == 13 ) { SpinBox_Ymini->setDisabled(true) ; + SpinBox_Ymaxi->setDisabled(true) ; } + else if ( _ZoneType == 11 ) { SpinBox_Zmini->setDisabled(true) ; + SpinBox_Zmaxi->setDisabled(true) ; } + } // ------------------------------------------------------------------------ void MonEditZone::SetSphere() @@ -127,10 +233,13 @@ void MonEditZone::SetSphere() { gBBox->setVisible(0); gBSphere->setVisible(1); + gBCylindre->setVisible(0) ; + gBPipe->setVisible(0) ; RBSphere->setChecked(1); RBBox->setDisabled(true); + RBCylinder->setDisabled(true); + RBPipe->setDisabled(true); adjustSize(); - _ZoneType=4 ; SpinBox_Xcentre->setValue(_ZoneXcentre); if ( _Xincr > 0) { SpinBox_Xcentre->setSingleStep(_Xincr); } @@ -147,25 +256,180 @@ void MonEditZone::SetSphere() SpinBox_Rayon->setMinimum(0.); SpinBox_Rayon->setValue(_ZoneRayon); } +// ------------------------------------------------------------------------ +void MonEditZone::SetCylinder() +// ------------------------------------------------------------------------ +{ + MESSAGE("SetCylinder _Xincr ="<<_Xincr<< " _Yincr ="<<_Yincr<< " _Zincr ="<<_Zincr); + gBBox->setVisible(0); + gBSphere->setVisible(0); + gBCylindre->setVisible(1) ; + gBPipe->setVisible(0) ; + RBCylinder->setChecked(1); + RBBox->setDisabled(true); + RBPipe->setDisabled(true); + if ( _ZoneType == 5 ) { RBSphere->setDisabled(true); } + else { RBSphere->setVisible(0); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + TLXbase->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "disk.png" ) ; + QIcon IS=QIcon(pix) ; + RBCylinder->setIcon(IS) ; } + adjustSize(); + + SpinBox_Xbase->setValue(_ZoneXcentre); + if ( _Xincr > 0) { SpinBox_Xbase->setSingleStep(_Xincr); } + else { SpinBox_Xbase->setSingleStep(1) ; } + + SpinBox_Ybase->setValue(_ZoneYcentre); + if ( _Yincr > 0) { SpinBox_Ybase->setSingleStep(_Yincr); } + else { SpinBox_Ybase->setSingleStep(1) ; } + + SpinBox_Zbase->setValue(_ZoneZcentre); + if ( _Zincr > 0) { SpinBox_Zbase->setSingleStep(_Zincr); } + else { SpinBox_Zbase->setSingleStep(1) ;} + + SpinBox_Radius->setMinimum(0.); + SpinBox_Radius->setValue(_ZoneRayon); + + if ( _ZoneType == 5 ) + { SpinBox_Xaxis->setValue(_ZoneXaxis) ; + SpinBox_Yaxis->setValue(_ZoneYaxis) ; + SpinBox_Zaxis->setValue(_ZoneZaxis) ; + SpinBox_Haut->setValue(_ZoneHaut) ; + } + else + { SpinBox_Xaxis->setVisible(0) ; + SpinBox_Yaxis->setVisible(0) ; + SpinBox_Zaxis->setVisible(0) ; + SpinBox_Haut->setVisible(0) ; + TLXaxis->setVisible(0) ; + TLYaxis->setVisible(0) ; + TLZaxis->setVisible(0) ; + TLHaut->setVisible(0) ; + if ( _ZoneType == 32 ) { SpinBox_Xbase->setDisabled(true) ; } + else if ( _ZoneType == 33 ) { SpinBox_Ybase->setDisabled(true) ; } + else if ( _ZoneType == 31 ) { SpinBox_Zbase->setDisabled(true) ; } + } +} +// ------------------------------------------------------------------------ +void MonEditZone::SetPipe() +// ------------------------------------------------------------------------ +{ + MESSAGE("SetPipe _Xincr ="<<_Xincr<< " _Yincr ="<<_Yincr<< " _Zincr ="<<_Zincr); + gBBox->setVisible(0); + gBSphere->setVisible(0); + gBCylindre->setVisible(0) ; + gBPipe->setVisible(1) ; + RBPipe->setChecked(1); + RBBox->setDisabled(true); + RBCylinder->setDisabled(true); + if ( _ZoneType == 7 ) { RBSphere->setDisabled(true); } + else { RBSphere->setVisible(0); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + TLXbase_p->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYbase_p->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLZbase_p->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; + QPixmap pix = resMgr->loadPixmap( "HOMARD", "diskwithhole.png" ) ; + QIcon IS=QIcon(pix) ; + RBPipe->setIcon(IS) ; } + adjustSize(); + + SpinBox_Xbase_p->setValue(_ZoneXcentre); + if ( _Xincr > 0) { SpinBox_Xbase_p->setSingleStep(_Xincr); } + else { SpinBox_Xbase_p->setSingleStep(1) ; } + + SpinBox_Ybase_p->setValue(_ZoneYcentre); + if ( _Yincr > 0) { SpinBox_Ybase_p->setSingleStep(_Yincr); } + else { SpinBox_Ybase_p->setSingleStep(1) ; } + + SpinBox_Zbase_p->setValue(_ZoneZcentre); + if ( _Zincr > 0) { SpinBox_Zbase_p->setSingleStep(_Zincr); } + else { SpinBox_Zbase_p->setSingleStep(1) ;} + + SpinBox_Radius_int->setMinimum(0.); + SpinBox_Radius_int->setValue(_ZoneRayonInt); + SpinBox_Radius_ext->setMinimum(0.); + SpinBox_Radius_ext->setValue(_ZoneRayon); + + if ( _ZoneType == 7 ) + { SpinBox_Xaxis_p->setValue(_ZoneXaxis) ; + SpinBox_Yaxis_p->setValue(_ZoneYaxis) ; + SpinBox_Zaxis_p->setValue(_ZoneZaxis) ; + SpinBox_Haut_p->setValue(_ZoneHaut) ; + } + else + { SpinBox_Xaxis_p->setVisible(0) ; + SpinBox_Yaxis_p->setVisible(0) ; + SpinBox_Zaxis_p->setVisible(0) ; + SpinBox_Haut_p->setVisible(0) ; + TLXaxis_p->setVisible(0) ; + TLYaxis_p->setVisible(0) ; + TLZaxis_p->setVisible(0) ; + TLHaut_p->setVisible(0) ; + if ( _ZoneType == 62 ) { SpinBox_Xbase_p->setDisabled(true) ; } + else if ( _ZoneType == 63 ) { SpinBox_Ybase_p->setDisabled(true) ; } + else if ( _ZoneType == 61 ) { SpinBox_Zbase_p->setDisabled(true) ; } + } +} // --------------------------------------------------- bool MonEditZone::CreateOrUpdateZone() //---------------------------------------------------- // Pas de Creation de la zone -// Mise a jour des attributs 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); + switch (_ZoneType) + { + case 11 : // il s agit d un rectangle + { } + case 12 : // il s agit d un rectangle + { } + case 13 : // il s agit d un rectangle + { } + case 2 : // il s agit d un parallelepipede + { aZone->SetBox( _ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax ); + break; + } + case 4 : // il s agit d une sphere + { aZone->SetSphere( _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon ); + break; + } + case 31 : // il s agit d un disque issu d'un cylindre + { } + case 32 : // il s agit d un disque issu d'un cylindre + { } + case 33 : // il s agit d un disque issu d'un cylindre + { } + case 5 : // il s agit d un cylindre + { aZone->SetCylinder( _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut ); + break; + } + case 61 : // il s agit d un disque issu d'un cylindre + { } + case 62 : // il s agit d un disque issu d'un cylindre + { } + case 63 : // il s agit d un disque issu d'un cylindre + { } + case 7 : // il s agit d un tuyau + { aZone->SetPipe( _ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut, _ZoneRayonInt ); + break; + } + } if (Chgt) _myHomardGen->InvalideZone(_aZoneName.toStdString().c_str()); HOMARD_UTILS::updateObjBrowser(); } catch( const SALOME::SALOME_Exception& S_ex ) { - SalomeApp_Tools::QtCatchCorbaException( S_ex ); + SalomeApp_Tools::QtCatchCorbaException( S_ex ); return false; } return true; diff --git a/src/HOMARDGUI/MonEditZone.h b/src/HOMARDGUI/MonEditZone.h index 6406409a..8bc9f8c8 100644 --- a/src/HOMARDGUI/MonEditZone.h +++ b/src/HOMARDGUI/MonEditZone.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef MON_EDITZONE_H #define MON_EDITZONE_H @@ -21,11 +40,15 @@ public: protected : void SetBox(); void SetSphere(); + void SetCylinder(); + void SetPipe(); bool CreateOrUpdateZone(); void InitValEdit(); void InitValZoneLimit(); void InitValZoneBox(); void InitValZoneSphere(); + void InitValZoneCylinder(); + void InitValZonePipe(); public slots: diff --git a/src/HOMARDGUI/MonHomardDlg.cxx b/src/HOMARDGUI/MonHomardDlg.cxx deleted file mode 100644 index a79e1376..00000000 --- a/src/HOMARDGUI/MonHomardDlg.cxx +++ /dev/null @@ -1,331 +0,0 @@ -#include "MonHomardDlg.h" -#include "HomardConfigFile.hxx" -#include "HomardQtCommun.h" - -#include - -#include -#include -#include - -#include "HOMARDGUI_Utils.h" - -#include -#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 deleted file mode 100644 index 2b044cf6..00000000 --- a/src/HOMARDGUI/MonHomardDlg.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef MONHOMARDDLG_H -#define MONHOMARDDLG_H - -#include "utilities.h" -#include "HomardDlg.h" -#include -#include -#include "SALOME_Selection.h" - -#include - -#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 deleted file mode 100644 index 555f866d..00000000 --- a/src/HOMARDGUI/ui/HomardCas.ui +++ /dev/null @@ -1,181 +0,0 @@ - -HomardCas - - - HomardCas - - - - 0 - 0 - 561 - 193 - - - - Analyse de maillage avec HOMARD - - - false - - - - GroupBox1 - - - - 10 - 10 - 540 - 130 - - - - Case - - - - textLabel1 - - - - 10 - 20 - 71 - 31 - - - - Name - - - - - NomCas - - - - 110 - 20 - 420 - 30 - - - - - - pushDirect - - - - 10 - 70 - 91 - 31 - - - - Directory - - - - - NomDirect - - - - 110 - 70 - 421 - 31 - - - - - - - ButtonOk - - - - 420 - 150 - 61 - 31 - - - - OK - - - - - ButtonCancel - - - - 490 - 150 - 61 - 31 - - - - Cancel - - - - - - NomCas - returnPressed() - HomardCas - SetNomCas() - - - NomCas - textChanged(const QString&) - HomardCas - SetNomCas(const QString&) - - - NomDirect - returnPressed() - HomardCas - SetDir2() - - - NomDirect - textChanged(const QString&) - HomardCas - SetDir2(const QString&) - - - pushDirect - pressed() - HomardCas - SetDir() - - - ButtonOk - pressed() - HomardCas - PushOnApply() - - - ButtonCancel - pressed() - HomardCas - close() - - - - PushOnApply() - SetDir() - SetDir2() - SetDir2( const QString & ) - SetNomCas() - SetNomCas( const QString & ) - - - diff --git a/src/HOMARDGUI/ui/HomardDlg.ui b/src/HOMARDGUI/ui/HomardDlg.ui deleted file mode 100644 index 69482bb3..00000000 --- a/src/HOMARDGUI/ui/HomardDlg.ui +++ /dev/null @@ -1,467 +0,0 @@ - -HomardDlg - - - HomardDlg - - - - 0 - 0 - 467 - 355 - - - - - 5 - 5 - 0 - 0 - - - - Homard : Analyse de maillage - - - true - - - - unnamed - - - - spacer10 - - - Vertical - - - Expanding - - - - 20 - 16 - - - - - - groupBox3 - - - - 5 - 5 - 0 - 0 - - - - Options - - - - unnamed - - - - layout30 - - - - unnamed - - - - Connexite - - - Connexité - - - true - - - - - Inter - - - Interpénétration - - - false - - - - - Volumes - - - Volumes/Surfaces/Longueurs - - - true - - - - - NbEntites - - - Nombre d'entités - - - true - - - - - Qualite - - - Qualité - - - true - - - - - - - - - groupBox4 - - - - - - - unnamed - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 290 - 20 - - - - - - lancement - - - &OK - - - - - - true - - - true - - - - - terminer - - - &Cancel - - - - - - true - - - - - - - groupBox7 - - - - 5 - 5 - 0 - 0 - - - - - 230 - 230 - 230 - - - - Raised - - - 1 - - - - - - - unnamed - - - - lblMesh - - - - 1 - 5 - 0 - 0 - - - - Mesh - - - - - lblCommande - - - - 1 - 5 - 0 - 0 - - - - MED File - - - - - PushFichier - - - - 0 - 0 - 0 - 0 - - - - - - - image0 - - - - - lblTypeMesh - - - - 1 - 5 - 0 - 0 - - - - - - - image1 - - - A quoi ça sert ? - - - - - NomFichier - - - - 300 - 21 - - - - - - ListeMeshName - - - - 300 - 31 - - - - - - - - groupBox3_2 - - - - 5 - 5 - 0 - 0 - - - - Conservation des résultats - - - - unnamed - - - - bilans - - - Bilan - - - true - - - - - Histo - - - Histogramme Qualité - - - true - - - - - - - - - 89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082 - - - 89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082 - - - - - lancement - pressed() - HomardDlg - Lancement() - - - terminer - pressed() - HomardDlg - close() - - - ListeMeshName - activated(int) - HomardDlg - SetMaillage() - - - NomFichier - returnPressed() - HomardDlg - SetNomFichier() - - - PushFichier - clicked() - HomardDlg - PushNomFichier() - - - Connexite - stateChanged(int) - HomardDlg - SetConnexite() - - - Inter - stateChanged(int) - HomardDlg - SetInter() - - - NbEntites - stateChanged(int) - HomardDlg - SetNbEntites() - - - Histo - stateChanged(int) - HomardDlg - SetHisto() - - - Qualite - stateChanged(int) - HomardDlg - SetQualite() - - - Volumes - stateChanged(int) - HomardDlg - SetVolumes() - - - bilans - stateChanged(int) - HomardDlg - SetBilans() - - - - SetNomFichier() - PushNomFichier() - SetMaillage() - SetNbEntites() - Lancement() - SetInter() - SetBilans() - SetConnexite() - SetHisto() - SetQualite() - SetVolumes() - - - diff --git a/src/HOMARDGUI/ui/HomardEditLog.ui b/src/HOMARDGUI/ui/HomardEditLog.ui deleted file mode 100644 index bc8613a3..00000000 --- a/src/HOMARDGUI/ui/HomardEditLog.ui +++ /dev/null @@ -1,60 +0,0 @@ - -HomardEditLog - - - HomardEditLog - - - - 0 - 0 - 487 - 338 - - - - Homard : - - - true - - - - lblTypeMesh - - - - 457 - 16 - 16 - 28 - - - - - - - image0 - - - - - FileEditeur - - - - 0 - 0 - 490 - 340 - - - - - - - 89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082 - - - - diff --git a/src/HOMARDGUI/ui/HomardIteration.ui b/src/HOMARDGUI/ui/HomardIteration.ui deleted file mode 100644 index 72e661a5..00000000 --- a/src/HOMARDGUI/ui/HomardIteration.ui +++ /dev/null @@ -1,218 +0,0 @@ - -HomardIteration - - - HomardIteration - - - - 0 - 0 - 533 - 112 - - - - Homard : Iteration Control - - - true - - - - lblTypeMesh - - - - 497 - 38 - 16 - 26 - - - - - - - image0 - - - - - IterBox - - - - 140 - 10 - 41 - 21 - - - - - - NomFichier - - - - 180 - 40 - 310 - 21 - - - - - 250 - 21 - - - - - - PushFichier - - - - 144 - 39 - 24 - 24 - - - - - - - image1 - - - - - buttonOk - - - - 366 - 80 - 58 - 21 - - - - Refine - - - - - - true - - - true - - - - - buttonCancel - - - - 430 - 80 - 60 - 21 - - - - &Cancel - - - - - - true - - - - - textLabel1 - - - - 10 - 10 - 120 - 21 - - - - Iteration Rank - - - - - lblCommande - - - - 7 - 37 - 128 - 28 - - - - Configuration File - - - - - - 89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082 - - - 89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082 - - - - - NomFichier - returnPressed() - HomardIteration - SetNomFichier() - - - buttonOk - clicked() - HomardIteration - Lancement() - - - buttonCancel - clicked() - HomardIteration - close() - - - PushFichier - pressed() - HomardIteration - PushNomFichier() - - - IterBox - valueChanged(int) - HomardIteration - ChangeIter(int) - - - - Lancement() - SetNomFichier() - PushNomFichier() - ChangeIter(int) - - - diff --git a/src/HOMARDGUI/ui/HomardPourLesNuls.ui b/src/HOMARDGUI/ui/HomardPourLesNuls.ui deleted file mode 100644 index 25b6d000..00000000 --- a/src/HOMARDGUI/ui/HomardPourLesNuls.ui +++ /dev/null @@ -1,738 +0,0 @@ - -HomardPourLesNuls - - - HomardPourLesNuls - - - - 0 - 0 - 563 - 375 - - - - Homard for Dummies - - - true - - - - unnamed - - - - layout27 - - - - unnamed - - - - layout49 - - - - unnamed - - - - lblCommande - - - MED File - - - - - spacer4 - - - Horizontal - - - Expanding - - - - 120 - 20 - - - - - - layout48 - - - - unnamed - - - - layout26 - - - - unnamed - - - - PushFichier - - - - - - image0 - - - - - NomFichier - - - - 382 - 21 - - - - - - - - lblTypeMesh - - - - - - image1 - - - - - - - - - spacer19 - - - Vertical - - - Expanding - - - - 20 - 29 - - - - - - layout26 - - - - unnamed - - - - spacer20 - - - Horizontal - - - Expanding - - - - 104 - 20 - - - - - - layout25 - - - - unnamed - - - - groupBox2 - - - - - - - unnamed - - - - layout43 - - - - unnamed - - - - layout41 - - - - unnamed - - - - layout34 - - - - unnamed - - - - lblMesh - - - Mesh - - - - - spacer5 - - - Horizontal - - - Expanding - - - - 70 - 20 - - - - - - ListeMeshName - - - - 350 - 31 - - - - - - - - spacer15 - - - Vertical - - - Expanding - - - - 20 - 31 - - - - - - layout40 - - - - unnamed - - - - layout34_2 - - - - unnamed - - - - lblMesh_3 - - - Error Field - - - - - spacer5_2 - - - Horizontal - - - Expanding - - - - 70 - 20 - - - - - - ListeField - - - - 350 - 31 - - - - - - - - layout34_3 - - - - unnamed - - - - lblMesh_2 - - - Componant - - - - - spacer5_3 - - - Horizontal - - - Expanding - - - - 70 - 20 - - - - - - ListeComponant - - - - 350 - 31 - - - - - - - - layout34_4 - - - - unnamed - - - - lblMesh_4 - - - Iteration - - - - - spacer5_4 - - - Horizontal - - - Expanding - - - - 70 - 20 - - - - - - ListeIteration - - - - 350 - 31 - - - - - - - - - - - - spacer16 - - - Vertical - - - Expanding - - - - 31 - 51 - - - - - - layout42 - - - - unnamed - - - - layout38 - - - - unnamed - - - - lblMesh_2_2_2_2 - - - Refinement % - - - - - spacer6_4 - - - Horizontal - - - Expanding - - - - 50 - 20 - - - - - - PRaf - - - - 350 - 0 - - - - false - - - false - - - 30 - - - Horizontal - - - Above - - - 10 - - - - - - - layout38_2 - - - - unnamed - - - - lblMesh_2_2_2_2_3 - - - Unrefinement % - - - - - spacer6_4_2 - - - Horizontal - - - Expanding - - - - 50 - 20 - - - - - - PDeRaf - - - - 350 - 0 - - - - false - - - 0 - - - Horizontal - - - Above - - - 10 - - - - - - - - - - - - - spacer18 - - - Vertical - - - Expanding - - - - 20 - 41 - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 0 - - - - - - buttonOk - - - &OK - - - - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - - - - true - - - - - - - - - - - - - - - 89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082 - - - 89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082 - - - - - buttonOk - clicked() - HomardPourLesNuls - Lancement() - - - buttonCancel - clicked() - HomardPourLesNuls - reject() - - - ListeComponant - activated(int) - HomardPourLesNuls - SetComponant() - - - ListeField - activated(int) - HomardPourLesNuls - SetError() - - - ListeIteration - activated(int) - HomardPourLesNuls - SetIter() - - - ListeMeshName - activated(int) - HomardPourLesNuls - SetMaillage() - - - NomFichier - returnPressed() - HomardPourLesNuls - SetNomFichier() - - - PRaf - valueChanged(int) - HomardPourLesNuls - ChangeRaf() - - - PRaf - valueChanged(int) - HomardPourLesNuls - ChangeDeRaf() - - - PushFichier - clicked() - HomardPourLesNuls - PushNomFichier() - - - - SetNomFichier() - PushNomFichier() - SetMaillage() - SetError() - SetComponant() - Lancement() - ChangeDeRaf() - SetIter() - ChangeRaf() - - - diff --git a/src/HOMARDGUI/ui/HomardRaffiUniforme.ui b/src/HOMARDGUI/ui/HomardRaffiUniforme.ui deleted file mode 100644 index ac5b4b53..00000000 --- a/src/HOMARDGUI/ui/HomardRaffiUniforme.ui +++ /dev/null @@ -1,383 +0,0 @@ - -HomardRaffi - - - HomardRaffi - - - - 0 - 0 - 533 - 206 - - - - Uniform Refinement - - - true - - - - unnamed - - - - layout32 - - - - unnamed - - - - layout49 - - - - unnamed - - - - lblCommande - - - MED File - - - - - spacer4 - - - Horizontal - - - Expanding - - - - 120 - 20 - - - - - - layout48 - - - - unnamed - - - - layout26 - - - - unnamed - - - - PushFichier - - - - - - image0 - - - - - NomFichier - - - - 382 - 21 - - - - - - - - lblTypeMesh - - - - - - image1 - - - - - - - - - spacer15 - - - Vertical - - - Expanding - - - - 21 - 41 - - - - - - layout31 - - - - unnamed - - - - spacer20 - - - Horizontal - - - Expanding - - - - 104 - 20 - - - - - - layout29 - - - - unnamed - - - - spacer19 - - - Vertical - - - Expanding - - - - 20 - 29 - - - - - - groupBox2 - - - - - - - unnamed - - - - layout34 - - - - unnamed - - - - lblMesh - - - Mesh - - - - - spacer5 - - - Horizontal - - - Expanding - - - - 70 - 20 - - - - - - ListeMeshName - - - - 350 - 31 - - - - - - - - - - spacer18 - - - Vertical - - - Expanding - - - - 20 - 41 - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 0 - - - - - - buttonOk - - - Refine - - - - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - - - - true - - - - - - - - - - - - - - - 89504e470d0a1a0a0000000d49484452000000140000001408060000008d891d0d0000009849444154388db5d4cb1180200c0450e3580f056c49f6c0c91e2c690bb0213d7110123e417373c0371b3408c9e5cb5a3fd5fe00b79e4d006e6b8da40c83a98ef37a3dc73d147bbac0940208778ee6d57d86009a583798635aaba99a2d6b18490182faa1aa092dacf68e5893e2c1cc845e4c0567b0029cc5d4843398097ab1022429710fcb715ed50b6128e12caa4e4a9a044fdbe68fedad0767bd6302a986f8310000000049454e44ae426082 - - - 89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000019449444154388da593316b1b411046df86341764588104b75708e2224d4c50bb1748e18021977f18489bceed152e03b96b83c14d2ae36295c2e41624d81108c6857cc9099f0dc1d30cb3cb37f398fdd6344dc373e2c5b3d4c0cb615196a55a6b89313296cfbf9d63ad65cbd68c12d88925dc0454f5418e3172fae994555c3d4e103791ec28e3eb97063b77c8bac3cd1d1fab575c5d2ac6185495b66dc777602796b44e07e24e3a7e7cffc3db77e6effd300e1af404923a9c73a49de07287887075a9c44da458142c4f96fa24819b3b92086e661111f2dc21d2117eed77911d654f13ecc53922c2ebdc219270b329d7b7ad699ac6b46dfbf82ba475c2e539b28bb8dcd16d3ab6bb9fe6faf75e5496a50e35e33b10c1cd1ce97e324055550a60ad6579b2d4be1e27984de924914d32fac9755d9beaacd27013288a82baae8df75e477d9024319d64ac6e3b0cff1c1a42a058147dd618e34302630cef3f141cbf317c3e3b06a0691ad34f1e12a8ea6183fa627f18c2bd8d43c07baf00c5a2a0bea84d9fabaad2b66d8df99fefecbdd7819d8df75eef005295fc1dc06daa230000000049454e44ae426082 - - - - - NomFichier - returnPressed() - HomardRaffi - SetNomFichier() - - - buttonOk - clicked() - HomardRaffi - Lancement() - - - buttonCancel - clicked() - HomardRaffi - close() - - - PushFichier - pressed() - HomardRaffi - PushNomFichier() - - - ListeMeshName - activated(const QString&) - HomardRaffi - SetMaillage() - - - - Lancement() - SetNomFichier() - SetMaillage() - PushNomFichier() - - - diff --git a/src/HOMARD_I/HOMARD_Boundary_i.cxx b/src/HOMARD_I/HOMARD_Boundary_i.cxx index aa3dbdf8..c483fe57 100644 --- a/src/HOMARD_I/HOMARD_Boundary_i.cxx +++ b/src/HOMARD_I/HOMARD_Boundary_i.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HOMARD_Boundary_i.hxx" #include "HOMARD_Gen_i.hxx" #include "HOMARD_Boundary.hxx" @@ -114,21 +133,6 @@ void HOMARD_Boundary_i::SetCylinder( double X0, double X1, double X2, double X3, 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 mesCoor = myHomardBoundary->GetCylinder(); - aResult->length( mesCoor .size() ); - std::vector::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 ) { @@ -137,11 +141,11 @@ void HOMARD_Boundary_i::SetSphere( double Xcentre, double Ycentre, double ZCentr } //============================================================================= -HOMARD::double_array* HOMARD_Boundary_i::GetSphere() +HOMARD::double_array* HOMARD_Boundary_i::GetCoords() { ASSERT( myHomardBoundary ); HOMARD::double_array_var aResult = new HOMARD::double_array(); - std::vector mesCoor = myHomardBoundary->GetSphere(); + std::vector mesCoor = myHomardBoundary->GetCoords(); aResult->length( mesCoor .size() ); std::vector::const_iterator it; int i = 0; diff --git a/src/HOMARD_I/HOMARD_Boundary_i.hxx b/src/HOMARD_I/HOMARD_Boundary_i.hxx index 081753e2..c048c9f4 100644 --- a/src/HOMARD_I/HOMARD_Boundary_i.hxx +++ b/src/HOMARD_I/HOMARD_Boundary_i.hxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_Boundary_I_HXX_ #define _HOMARD_Boundary_I_HXX_ @@ -5,25 +24,31 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Boundary) +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" +#include "Utils_CorbaException.hxx" + #include class HOMARD_Boundary; -class HOMARD_Boundary_i: public virtual POA_HOMARD::HOMARD_Boundary, - public virtual PortableServer::ServantBase -{ +class HOMARD_Boundary_i: + public virtual Engines_Component_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 ); @@ -31,20 +56,18 @@ public: 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* GetCoords(); + HOMARD::double_array* GetLimit(); void SetLimit( double Xincr, double Yincr, double Zincr); - - + + std::string Dump() const; bool Restore( const std::string& stream ); @@ -58,7 +81,7 @@ public: private: ::HOMARD_Boundary* myHomardBoundary; - + CORBA::ORB_ptr _orb; HOMARD::HOMARD_Gen_var _gen_i; }; diff --git a/src/HOMARD_I/HOMARD_Cas_i.cxx b/src/HOMARD_I/HOMARD_Cas_i.cxx index 96dc2ea7..7d75ff30 100755 --- a/src/HOMARD_I/HOMARD_Cas_i.cxx +++ b/src/HOMARD_I/HOMARD_Cas_i.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HOMARD_Cas_i.hxx" #include "HOMARD_Gen_i.hxx" #include "HOMARD_Cas.hxx" @@ -146,7 +165,7 @@ void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema ) { VExtrema[i] = LesExtrema[i]; } - + myHomardCas->SetBoundingBox( VExtrema ); } //============================================================================= @@ -186,14 +205,14 @@ HOMARD::ListGroupType* HOMARD_Cas_i::GetGroups() //============================================================================= void HOMARD_Cas_i::AddBoundaryGroup( const char* Boundary, const char* Group) { - MESSAGE ("Dans AddBoundaryGroup"); + MESSAGE ("AddBoundaryGroup"); ASSERT( myHomardCas ); myHomardCas->AddBoundaryGroup( Boundary, Group ); } //============================================================================= HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup() { - MESSAGE ("Dans GetBoundaryGroup"); + MESSAGE ("GetBoundaryGroup"); ASSERT(myHomardCas ); const std::list& ListString = myHomardCas->GetBoundaryGroup(); HOMARD::ListBoundaryGroupType_var aResult = new HOMARD::ListBoundaryGroupType(); @@ -207,6 +226,20 @@ HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup() return aResult._retn(); } +//============================================================================= +void HOMARD_Cas_i::SetPyram( CORBA::Long Pyram ) +{ + MESSAGE ("SetPyram, Pyram = " << Pyram ); + ASSERT( myHomardCas ); + myHomardCas->SetPyram( Pyram ); +} +//============================================================================= +CORBA::Long HOMARD_Cas_i::GetPyram() +{ + MESSAGE ("GetPyram"); + ASSERT( myHomardCas ); + return myHomardCas->GetPyram(); +} //============================================================================= std::string HOMARD_Cas_i::Dump() const { diff --git a/src/HOMARD_I/HOMARD_Cas_i.hxx b/src/HOMARD_I/HOMARD_Cas_i.hxx index fc19e9f0..3c7a2007 100644 --- a/src/HOMARD_I/HOMARD_Cas_i.hxx +++ b/src/HOMARD_I/HOMARD_Cas_i.hxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_CAS_I_HXX_ #define _HOMARD_CAS_I_HXX_ @@ -5,12 +24,18 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Cas) +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" +#include "Utils_CorbaException.hxx" + #include class HOMARD_Cas; -class HOMARD_Cas_i: public virtual POA_HOMARD::HOMARD_Cas, - public virtual PortableServer::ServantBase +class HOMARD_Cas_i: + public virtual Engines_Component_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 ); @@ -40,6 +65,9 @@ public: HOMARD::ListBoundaryGroupType* GetBoundaryGroup(); void AddBoundaryGroup( const char* Boundary, const char* Group); + void SetPyram( CORBA::Long Pyram ); + CORBA::Long GetPyram(); + std::string Dump() const; bool Restore( const std::string& stream ); diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index cc2ac949..9415aa68 100755 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HOMARD_Gen_i.hxx" #include "HOMARD_Cas_i.hxx" #include "HOMARD_Hypothesis_i.hxx" @@ -31,19 +50,37 @@ using namespace std; +//======================================================================= +//function : RemoveTabulation +//purpose : +//======================================================================= +std::string RemoveTabulation( std::string theScript ) +{ + std::string::size_type aPos = 0; + while( aPos < theScript.length() ) + { + aPos = theScript.find( "\n\t", aPos ); + if( aPos == std::string::npos ) + break; + theScript.replace( aPos, 2, "\n" ); + aPos++; + } + return theScript; +} + //============================================================================= /*! * 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"); +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("constructor"); _thisObj = this; _id = _poa->activate_object(_thisObj); @@ -63,15 +100,15 @@ HOMARD_Gen_i::~HOMARD_Gen_i() } //============================================================================= /*! - * Ajoute le composant homard dans l etude si necessaire + * 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()); + MESSAGE("addInStudy: ajout eventuel du composant HOMARD dans 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)) @@ -81,15 +118,15 @@ void HOMARD_Gen_i::addInStudy(SALOMEDS::Study_ptr theStudy) 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_var Catalogue = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN); SALOME_ModuleCatalog::Acomponent_var Comp = Catalogue->GetComponent(ComponentDataType()); - if (!Comp->_is_nil()) + if (!Comp->_is_nil()) { aName->SetValue(ComponentDataType()); } @@ -126,7 +163,7 @@ SALOMEDS::Study_ptr HOMARD_Gen_i::GetCurrentStudy() } //============================================================================= -int HOMARD_Gen_i::GetCurrentStudyID() +CORBA::Long HOMARD_Gen_i::GetCurrentStudyID() //============================================================================= { return myCurrentStudy->_is_nil() ? -1 : myCurrentStudy->StudyId(); @@ -135,15 +172,8 @@ int HOMARD_Gen_i::GetCurrentStudyID() //============================================================================= 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 ; - }; + MESSAGE( "AssociateCaseIter : " << nomCas << " ," << nomIter << "," << labelIter ); + IsValidStudy () ; HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas]; if (CORBA::is_nil(myCase)) @@ -178,7 +208,7 @@ void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, co aStudyBuilder->NewCommand(); SALOMEDS::SObject_var newStudyIter = aStudyBuilder->NewObject(aCasSO); - PublishInStudyAttr(aStudyBuilder, newStudyIter, nomIter , labelIter, + PublishInStudyAttr(aStudyBuilder, newStudyIter, nomIter , labelIter, "iter_non_calculee.png", _orb->object_to_string(myIteration)) ; aStudyBuilder->CommitCommand(); @@ -187,10 +217,10 @@ void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, co } //===================================================================================== -void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const bool EtatCalcul) +void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCalcul) //===================================================================================== { - MESSAGE( "SetEtatIter, nomIter = " << nomIter << " etat " << EtatCalcul ); + MESSAGE( "SetEtatIter : nomIter = " << nomIter << " etat " << EtatCalcul ); HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter]; if (CORBA::is_nil(myIteration)) { @@ -215,21 +245,50 @@ void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const bool EtatCalcul) }; 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) ; + const char* icone ; + if ( number == 0 ) + icone = "iter0.png" ; + else if (EtatCalcul) + icone = "iter_calculee.png" ; + else + icone = "iter_non_calculee.png" ; + PublishInStudyAttr(aStudyBuilder, aIterSO, NULL , NULL, icone, NULL) ; aStudyBuilder->CommitCommand(); } //===================================================================================== +void HOMARD_Gen_i::InvalideBoundary(const char* BoundaryName) +//===================================================================================== +{ + MESSAGE( "InvalideBoundary : BoundaryName = " << BoundaryName ); + HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName]; + if (CORBA::is_nil(myBoundary)) + { + SALOME::ExceptionStruct es; + es.type = SALOME::BAD_PARAM; + es.text = "Invalid Boundary "; + throw SALOME::SALOME_Exception(es); + return ; + }; + SALOME::ExceptionStruct es; + es.type = SALOME::BAD_PARAM; + es.text = "No change is allowed in boundary. Ask for evolution."; + throw SALOME::SALOME_Exception(es); + return ; +/* HOMARD::listeHypo* maListe = myBoundary->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::InvalideZone(const char* ZoneName) //===================================================================================== { - MESSAGE( "InvalideZone, ZoneName = " << ZoneName ); + MESSAGE( "InvalideZone : ZoneName = " << ZoneName ); HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName]; if (CORBA::is_nil(myZone)) { @@ -251,7 +310,7 @@ void HOMARD_Gen_i::InvalideZone(const char* ZoneName) void HOMARD_Gen_i::InvalideHypo(const char* nomHypo) //===================================================================================== { - MESSAGE( "InvalideHypo, nomHypo = " << nomHypo ); + MESSAGE( "InvalideHypo : nomHypo = " << nomHypo ); HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo]; if (CORBA::is_nil(myHypo)) { @@ -275,7 +334,7 @@ void HOMARD_Gen_i::InvalideHypo(const char* nomHypo) void HOMARD_Gen_i::InvalideIter(const char* nomIter) //===================================================================================== { - MESSAGE("InvalideIter, nomIter = " << nomIter); + MESSAGE("InvalideIter : nomIter = " << nomIter); SetEtatIter(nomIter,false); HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter]; if (CORBA::is_nil(myIteration)) @@ -297,7 +356,7 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter) 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()) + for (; aIter->More(); aIter->Next()) { SALOMEDS::SObject_var so = aIter->Value(); SALOMEDS::GenericAttribute_var anAttr; @@ -337,18 +396,10 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter) } // //===================================================================================== -void HOMARD_Gen_i::AssociateHypoZone(const char* ZoneName, const char* nomHypothesis) +void HOMARD_Gen_i::AssociateHypoZone(const char* nomHypothesis, const char* ZoneName, CORBA::Long TypeUse) { - 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 ; - }; + MESSAGE ( "AssociateHypoZone : nomHypo = " << nomHypothesis << ", ZoneName= " << ZoneName << ", TypeUse = " << TypeUse); + IsValidStudy () ; HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis]; ASSERT(!CORBA::is_nil(myHypo)); @@ -367,22 +418,15 @@ void HOMARD_Gen_i::AssociateHypoZone(const char* ZoneName, const char* nomHypoth aStudyBuilder->CommitCommand(); myZone->AddHypo(nomHypothesis); - myHypo->AddZone(ZoneName); + myHypo->AddZone(ZoneName, TypeUse); + MESSAGE ( "Fin de AssociateHypoZone"); }; //===================================================================================== 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 ; - }; + MESSAGE ( "DissociateHypoZone : ZoneName= " << ZoneName << ", nomHypo = " << nomHypothesis); + IsValidStudy () ; HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis]; ASSERT(!CORBA::is_nil(myHypo)); @@ -402,7 +446,7 @@ void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypot { SALOMEDS::SObject_var aHypObj = it->Value(); SALOMEDS::SObject_var ptrObj; - if (aHypObj->ReferencedObject(ptrObj)) + if (aHypObj->ReferencedObject(ptrObj)) { if (std::string(ptrObj->GetName()) == std::string(aZoneSO->GetName())) { @@ -421,15 +465,8 @@ void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypot //============================================================================= 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 ; - }; + MESSAGE ( "AssociateIterIter : nomIter = " << nomIter << " nomIterParent = " << nomIterParent); + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent]; ASSERT(!CORBA::is_nil(myIterationParent)); @@ -443,16 +480,8 @@ void HOMARD_Gen_i::AssociateIterIter(const char* nomIterParent, const char* nomI //=================================================================================== 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 ; - }; + MESSAGE("AssociateIterHypo : nomHypo = " << nomHypo << " nomIter = " << nomIter); + IsValidStudy () ; HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo]; ASSERT(!CORBA::is_nil(myHypo)); @@ -472,7 +501,7 @@ void HOMARD_Gen_i::AssociateIterHypo(const char* nomIter, const char* nomHypo) aStudyBuilder->Addreference(aSubSO, aHypoSO); aStudyBuilder->CommitCommand(); - + myIteration->SetHypoName(nomHypo); myHypo->AddIteration(nomIter); }; @@ -490,17 +519,10 @@ CORBA::Boolean HOMARD_Gen_i::VerifieDir(const char* nomDir) } //============================================================================= -HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* MeshName, const char* FileName) +HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* MeshName, const char* MeshFile) { - 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; - }; + MESSAGE ( "CreateCase : nomCas = " << nomCas << ", MeshName = " << MeshName << ", MeshFile = " << MeshFile ); + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesCas).find(nomCas)!=(myContextMap[GetCurrentStudyID()]._mesCas).end()) { @@ -518,15 +540,15 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* myContextMap[GetCurrentStudyID()]._mesCas[nomCas] = myCase; - std::vector LesExtremes =GetBoundingBoxInMedFile(FileName); + std::vector LesExtremes =GetBoundingBoxInMedFile(MeshFile); HOMARD::extrema_var aSeq = new HOMARD::extrema(); - if (LesExtremes.size()!=10) { return false; } + 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 LesGroupes =GetListeGroupesInMedFile(FileName); + std::set LesGroupes =GetListeGroupesInMedFile(MeshFile); HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType; aSeqGroupe->length(LesGroupes.size()); std::set::const_iterator it; @@ -554,14 +576,17 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* anIter->SetDirName(DirName.str().c_str()); anIter->SetName(nomIter.c_str()); - anIter->SetMeshFile(FileName); + anIter->SetMeshFile(MeshFile); anIter->SetMeshName(MeshName); anIter->SetNumber(0); AssociateCaseIter (nomCas,nomIter.c_str(),"IterationHomard"); SetEtatIter(nomIter.c_str(),true); // - PublishResultInSmesh(FileName, 0); + PublishResultInSmesh(MeshFile, 0); + +// Valeurs par defaut des filtrages + myCase->SetPyram(0); return HOMARD::HOMARD_Cas::_duplicate(myCase); } @@ -569,14 +594,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* //============================================================================= 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; - }; + IsValidStudy () ; HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas]; if (CORBA::is_nil(myCase)) { @@ -586,20 +604,14 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::GetCas(const char* nomCas) 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; - }; + IsValidStudy () ; HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName]; ASSERT(!CORBA::is_nil(myZone)); return HOMARD::HOMARD_Zone::_duplicate(myZone); @@ -608,15 +620,9 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::GetZone(const char* ZoneName) //============================================================================= 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; - }; - + MESSAGE ( "GetHypothesis : nomHypothesis = " << nomHypothesis ); + IsValidStudy () ; + MESSAGE ( "GetHypothesis : GetCurrentStudyID() = " << GetCurrentStudyID() ); HOMARD::HOMARD_Hypothesis_var myHypothesis = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis]; ASSERT(!CORBA::is_nil(myHypothesis)); return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis); @@ -625,14 +631,7 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::GetHypothesis(const char* nomHypothe //============================================================================= 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; - }; + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration]; ASSERT(!CORBA::is_nil(myIteration)); return HOMARD::HOMARD_Iteration::_duplicate(myIteration); @@ -640,14 +639,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::GetIteration(const char* nomIteratio //============================================================================= 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; - }; + IsValidStudy () ; HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[nomBoundary]; ASSERT(!CORBA::is_nil(myBoundary)); @@ -657,15 +649,8 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::GetBoundary(const char* nomBoundary) //============================================================================= 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; - }; + MESSAGE ( "CreateHypothesis : nomHypothesis = " << nomHypothesis ); + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesHypotheses).find(nomHypothesis) != (myContextMap[GetCurrentStudyID()]._mesHypotheses).end()) { @@ -682,6 +667,11 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypo SALOMEDS::SObject_var aSO; PublishInStudy(myCurrentStudy, aSO, myHypothesis, nomHypothesis); +// Valeurs par defaut des options avancees + myHypothesis->SetNivMax(-1); + myHypothesis->SetDiamMin(-1.0); + myHypothesis->SetAdapInit(0); + return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis); } @@ -689,15 +679,8 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypo 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; - }; + MESSAGE ("CreateIteration : nomIteration = " << nomIteration << "nomIterParent = " << nomIterParent); + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent]; if (CORBA::is_nil(myIterationParent)) @@ -710,7 +693,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat }; const char* nomCas = GetCaseName(nomIterParent); - MESSAGE ("CreateIteration, nomCas = " << nomCas); + MESSAGE ("CreateIteration : nomCas = " << nomCas); HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas]; if (CORBA::is_nil(myCase)) { @@ -761,10 +744,10 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat // 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; + std::stringstream MeshFile; const char* nomDir = myCase->GetDirName(); - FileName << nomDir << "/maill." << iaux.str() << ".med"; - myIteration->SetMeshFile(FileName.str().c_str()); + MeshFile << nomDir << "/maill." << iaux.str() << ".med"; + myIteration->SetMeshFile(MeshFile.str().c_str()); // Association avec le cas et l'iteration precedente std::string label = "IterationHomard_" + std::string(nomIterParent); @@ -778,15 +761,8 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat //============================================================================= 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; - }; + MESSAGE ("CreateBoundary : BoundaryName = " << BoundaryName << ", BoundaryType = " << BoundaryType); + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesBoundarys).find(BoundaryName)!=(myContextMap[GetCurrentStudyID()]._mesBoundarys).end()) { @@ -806,24 +782,48 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryNam 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_Boundary_ptr HOMARD_Gen_i::CreateBoundaryDi(const char* BoundaryName, const char* MeshName, const char* MeshFile) +{ + MESSAGE ("CreateBoundaryDi : BoundaryName = " << BoundaryName << "MeshName = " << MeshName ); + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 0); + myBoundary->SetMeshFile( MeshFile ) ; + myBoundary->SetMeshName( MeshName ) ; return HOMARD::HOMARD_Boundary::_duplicate(myBoundary); } +//============================================================================= +HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryCylinder(const char* BoundaryName, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis, + CORBA::Double Rayon) +{ + MESSAGE ("CreateBoundaryCylinder : BoundaryName = " << BoundaryName ) ; + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 1) ; + myBoundary->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon ) ; + + return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ; +} +//============================================================================= +HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundarySphere(const char* BoundaryName, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Rayon) +{ + MESSAGE ("CreateBoundarySphere : BoundaryName = " << BoundaryName ) ; + HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 2) ; + myBoundary->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ) ; + + 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; - }; + MESSAGE ("CreateZone : ZoneName = " << ZoneName << ", ZoneType = " << ZoneType); + IsValidStudy () ; if ((myContextMap[GetCurrentStudyID()]._mesZones).find(ZoneName)!=(myContextMap[GetCurrentStudyID()]._mesZones).end()) { @@ -845,24 +845,166 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZone(const char* ZoneName, CORBA::Lo return HOMARD::HOMARD_Zone::_duplicate(myZone); } +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox(const char* ZoneName, + CORBA::Double Xmini, CORBA::Double Xmaxi, + CORBA::Double Ymini, CORBA::Double Ymaxi, + CORBA::Double Zmini, CORBA::Double Zmaxi) +{ + MESSAGE ("CreateZoneBox : ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 2) ; + myZone->SetBox ( Xmini, Xmaxi, Ymini, Ymaxi, Zmini, Zmaxi) ; + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} //============================================================================= -CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMenage) +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneSphere(const char* ZoneName, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, CORBA::Double Rayon) { - 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; - }; + MESSAGE ("CreateZoneSphere : ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 4) ; + myZone->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneCylinder(const char* ZoneName, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe, + CORBA::Double Rayon, CORBA::Double Haut) +{ + MESSAGE ("CreateZoneCylinder : ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 5) ; + myZone->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, Rayon, Haut ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZonePipe(const char* ZoneName, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe, + CORBA::Double Rayon, CORBA::Double Haut, CORBA::Double Rayonint) +{ + MESSAGE ("CreateZonePipe : ZoneName = " << ZoneName ) ; + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 7) ; + myZone->SetPipe( Xcentre, Ycentre, Zcentre, Xaxe, Yaxe, Zaxe, Rayon, Haut, Rayonint ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox2D(const char* ZoneName, + CORBA::Double Umini, CORBA::Double Umaxi, + CORBA::Double Vmini, CORBA::Double Vmaxi, + CORBA::Long Orient) +{ + MESSAGE ("CreateZoneBox2D : ZoneName = " << ZoneName ) ; +// MESSAGE ("Umini = " << Umini << ", Umaxi =" << Umaxi ) ; +// MESSAGE ("Vmini = " << Vmini << ", Vmaxi =" << Vmaxi ) ; +// MESSAGE ("Orient = " << Orient ) ; + + double Xmini, Xmaxi ; + double Ymini, Ymaxi ; + double Zmini, Zmaxi ; + if ( Orient == 1 ) + { Xmini = Umini ; + Xmaxi = Umaxi ; + Ymini = Vmini ; + Ymaxi = Vmaxi ; + Zmini = 0. ; + Zmaxi = 0. ; } + else if ( Orient == 2 ) + { Xmini = 0. ; + Xmaxi = 0. ; + Ymini = Umini ; + Ymaxi = Umaxi ; + Zmini = Vmini ; + Zmaxi = Vmaxi ; } + else if ( Orient == 3 ) + { Xmini = Vmini ; + Xmaxi = Vmaxi ; + Ymini = 0. ; + Ymaxi = 0. ; + Zmini = Umini ; + Zmaxi = Umaxi ; } + else { ASSERT( Orient >= 1 and Orient <= 3 ) ; } + + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 10+Orient) ; + myZone->SetBox ( Xmini, Xmaxi, Ymini, Ymaxi, Zmini, Zmaxi) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDisk(const char* ZoneName, + CORBA::Double Ucentre, CORBA::Double Vcentre, + CORBA::Double Rayon, + CORBA::Long Orient) +{ + MESSAGE ("CreateZoneDisk : ZoneName = " << ZoneName ) ; + double Xcentre ; + double Ycentre ; + double Zcentre ; + if ( Orient == 1 ) + { Xcentre = Ucentre ; + Ycentre = Vcentre ; + Zcentre = 0. ; } + else if ( Orient == 2 ) + { Xcentre = 0. ; + Ycentre = Ucentre ; + Zcentre = Vcentre ; } + else if ( Orient == 3 ) + { Xcentre = Vcentre ; + Ycentre = 0. ; + Zcentre = Ucentre ; } + else { ASSERT( Orient >= 1 and Orient <= 3 ) ; } + + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 30+Orient) ; + myZone->SetCylinder( Xcentre, Ycentre, Zcentre, 0., 0., 1., Rayon, 1. ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} +//============================================================================= +HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneName, + CORBA::Double Ucentre, CORBA::Double Vcentre, + CORBA::Double Rayon, CORBA::Double Rayonint, + CORBA::Long Orient) +{ + MESSAGE ("CreateZoneDiskWithHole : ZoneName = " << ZoneName ) ; + double Xcentre ; + double Ycentre ; + double Zcentre ; + if ( Orient == 1 ) + { Xcentre = Ucentre ; + Ycentre = Vcentre ; + Zcentre = 0. ; } + else if ( Orient == 2 ) + { Xcentre = 0. ; + Ycentre = Ucentre ; + Zcentre = Vcentre ; } + else if ( Orient == 3 ) + { Xcentre = Vcentre ; + Ycentre = 0. ; + Zcentre = Ucentre ; } + else { ASSERT( Orient >= 1 and Orient <= 3 ) ; } + + HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 60+Orient) ; + myZone->SetPipe( Xcentre, Ycentre, Zcentre, 0., 0., 1., Rayon, 1., Rayonint ) ; + + return HOMARD::HOMARD_Zone::_duplicate(myZone) ; +} + + + + +//============================================================================= +CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMenage) +{ + MESSAGE ( "Compute : calcul de " << nomIteration ); + IsValidStudy () ; HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration]; ASSERT(!CORBA::is_nil(myIteration)); -// on ne calcule pas l iteration 0 +// on ne calcule pas l iteration 0 int NumeIter = myIteration->GetNumber(); if ( NumeIter == 0 ) { @@ -870,7 +1012,7 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM 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; + return 1; }; // on verifie qu il y a une hypothese (erreur improbable); @@ -879,16 +1021,14 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; - es.text = "Invalid Study Context "; - es.text= "This iteration has no associated hypothese"; + es.text= "This iteration does not have any associated hypothesis."; throw SALOME::SALOME_Exception(es); - return 0; + return 2; } 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]; @@ -903,7 +1043,12 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM throw SALOME::SALOME_Exception(es); return 0; */ - Compute(nomIterationParent, etatMenage); + int codret = Compute(nomIterationParent, etatMenage); + if (codret != 0) + { + // GERALD -- QMESSAGE BOX + ASSERT("Pb au calcul de l'iteration precedente" == 0); + } }; const char* nomCas = myIteration->GetCaseName(); @@ -921,7 +1066,6 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM 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(); @@ -985,7 +1129,7 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM std::string text = "Directory : " + DirCompute.str() + "is not empty"; es.text = CORBA::string_dup(text.c_str()); throw SALOME::SALOME_Exception(es); - return false; + return 3; } } } @@ -1042,7 +1186,7 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM std::string text = "MeshFile : " + std::string(MeshFile) + " already exists "; es.text = CORBA::string_dup(text.c_str()); throw SALOME::SALOME_Exception(es); - return false; + return 4; } else { @@ -1055,7 +1199,7 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM std::string text = "PB with meshfile destruction "; es.text = CORBA::string_dup(text.c_str()); throw SALOME::SALOME_Exception(es); - return false; + return 5; } } } @@ -1063,7 +1207,7 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM { codret = 0 ; }; - + // D.4. Les types de raffinement et de deraffinement // Les appels corba sont lourds, il vaut mieux les grouper @@ -1088,27 +1232,40 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM if (TypeAdap == 0) { HOMARD::listeZonesHypo* ListZone = myHypo->GetZones(); - int numberOfZones = ListZone->length(); + int numberOfZonesx2 = ListZone->length(); + int NumZone ; - for (int NumZone = 0; NumZone< numberOfZones; NumZone++) + for (int iaux = 0; iaux< numberOfZonesx2; iaux++) { - std::string ZoneName = std::string((*ListZone)[NumZone]); + std::string ZoneName = std::string((*ListZone)[iaux]); 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 + std::string TypeUsestr = std::string((*ListZone)[iaux+1]); + int TypeUse = atoi( TypeUsestr.c_str() ); + MESSAGE ( "... ZoneType = " << ZoneType << ", TypeUse = "<GetCoords(); + if ( ZoneType == 2 or ( ZoneType>=11 and ZoneType <=13 ) ) // Cas d un parallelepipede ou d'un rectangle { - HOMARD::double_array* zone = myZone->GetBox(); - myDriver->TexteZone(NumZone+1, ZoneType, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5]); + myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], 0., 0., 0.); } - else if (ZoneType == 4) // Cas d une sphere + 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.); + myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], 0., 0., 0., 0., 0.); } + else if ( ZoneType == 5 or ( ZoneType>=31 and ZoneType <=33 ) ) // Cas d un cylindre ou d'un disque + { + myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], 0.); + } + else if ( ZoneType == 7 or ( ZoneType>=61 and ZoneType <=63 ) ) // Cas d un tuyau ou disque perce + { + myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], (*zone)[8]); + } + else { ASSERT("ZoneType est incorrect." == 0) ; } + iaux += 1 ; } } // E.3. Ajout des informations liees aux champs eventuels @@ -1137,11 +1294,14 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM double ThreshR = aInfosHypo->ThreshR; int TypeThC = aInfosHypo->TypeThC; double ThreshC = aInfosHypo->ThreshC; +// Saut entre mailles ou non ? + int UsField = aInfosHypo->UsField; + MESSAGE( ". UsField = " << UsField ); // L'usage des composantes int UsCmpI = aInfosHypo->UsCmpI; MESSAGE( ". UsCmpI = " << UsCmpI ); // - myDriver->TexteField(FieldName, FieldFile, TimeStep, Rank, TypeThR, ThreshR, TypeThC, ThreshC, UsCmpI); + myDriver->TexteField(FieldName, FieldFile, TimeStep, Rank, TypeThR, ThreshR, TypeThC, ThreshC, UsField, UsCmpI); // // Les composantes HOMARD::listeComposantsHypo* mescompo = myHypo->GetListComp(); @@ -1170,42 +1330,79 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM } // E.5. Ajout des informations liees a l'eventuel suivi de frontiere + // On ecrit d'abord la definition des frontieres, puis les liens avec les groupes + std::list ListeBoundaryTraitees ; 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); + int A_faire = 1 ; + std::list::const_iterator it = ListeBoundaryTraitees.begin(); + while (it != ListeBoundaryTraitees.end()) + { + MESSAGE ( "... BoundaryNameTraitee = " << *it); + if ( BoundaryName == *it ) { A_faire = 0 ; } + it++; + } + if ( A_faire == 1 ) + { +// Caracteristiques de la frontiere + HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName]; + ASSERT(!CORBA::is_nil(myBoundary)); + int BoundaryType = myBoundary->GetBoundaryType(); + MESSAGE ( "... BoundaryType = " << BoundaryType ); +// Ecriture selon le type + 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 // Cas d une frontiere analytique + { + NumBoundaryAnalytical++ ; + HOMARD::double_array* coor = myBoundary->GetCoords(); + if (BoundaryType == 1) // Cas d un cylindre + { + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*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 + { + myDriver->TexteBoundaryAn(BoundaryName, NumBoundaryAnalytical, BoundaryType, (*coor)[0], (*coor)[1], (*coor)[2], (*coor)[3], 0., 0., 0.); + BoundaryOption = BoundaryOption*3 ; + } + } +// Memorisation du traitement + ListeBoundaryTraitees.push_back( BoundaryName ); + } + } + 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 ); +// Recuperation du nom du groupe + std::string GroupName = std::string((*ListBoundaryGroupType)[NumBoundary+1]); + MESSAGE ( "... GroupName = " << GroupName); 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 ; + if ( GroupName.size() > 0 ) { myDriver->TexteBoundaryDiGr ( GroupName ) ; } } - else if (BoundaryType == 2) // Cas d une sphere + else // Cas d une frontiere analytique { 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->TexteBoundaryAnGr ( BoundaryName, NumBoundaryAnalytical, GroupName ) ; } } myDriver->TexteBoundaryOption(BoundaryOption); @@ -1244,6 +1441,16 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM } } } + // E.7. Ajout des options avancees + int Pyram = myCase->GetPyram(); + MESSAGE ( ". Pyram = " << Pyram ); + int NivMax = myHypo->GetNivMax(); + MESSAGE ( ". NivMax = " << NivMax ); + double DiamMin = myHypo->GetDiamMin() ; + MESSAGE ( ". DiamMin = " << DiamMin ); + int AdapInit = myHypo->GetAdapInit(); + MESSAGE ( ". AdapInit = " << AdapInit ); + myDriver->TexteAdvanced(Pyram, NivMax, DiamMin, AdapInit); // F. Ecriture du texte dans le fichier if (codret == 0) @@ -1253,11 +1460,12 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM // G. Execution // - int codretexec = 1 ; + int codretexec = 12 ; if (codret == 0) { codretexec = myDriver->ExecuteHomard(); // + MESSAGE ( "Erreur en executant HOMARD : " << codretexec ); if (codretexec == 0) { SetEtatIter(nomIteration,true); @@ -1297,7 +1505,7 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; std::string text = "Error during the adaptation.\n" ; - try + try { ifstream fichier(MessFile.c_str(), ios::in); string ligne; @@ -1318,8 +1526,7 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM delete myDriver; } // - if (codret == 0) { return true; } - else { return false; } + return codretexec ; } //=========================================================================== @@ -1351,33 +1558,33 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishInStudy(SALOMEDS::Study_ptr 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 "<length()<<" time(s)"); - std::cerr <<"This name "<length()<<" time(s)" << std::endl; - aResultSO = listSO[0]; - return aResultSO._retn(); - } + SALOMEDS::Study::ListOfSObject_var listSO = theStudy->FindObjectByName(theName, ComponentDataType()); + if (listSO->length() >= 1) + { + MESSAGE("This name "<length()<<" time(s)"); + std::cerr <<"This name "<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); + 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::SObject_ptr HOMARD_Gen_i::PublishCaseInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder, HOMARD::HOMARD_Cas_ptr theObject, const char* theName) { @@ -1395,20 +1602,20 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishCaseInStudy(SALOMEDS::Study_ptr theSt } SALOMEDS::SComponent_var theFatherHomard = theStudy->FindComponent(ComponentDataType()); - if (theFatherHomard->_is_nil()) + if (theFatherHomard->_is_nil()) { - MESSAGE("theFatherHomard->_is_nil()"); + MESSAGE("theFatherHomard->_is_nil()"); return aResultSO._retn(); } aResultSO = aStudyBuilder->NewObject(theFatherHomard); - PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "CasHomard", "cas_calcule.png", + 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::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder, HOMARD::HOMARD_Zone_ptr theObject, const char* theName) { @@ -1416,18 +1623,18 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theSt SALOMEDS::SObject_var aResultSO; SALOMEDS::GenericAttribute_var anAttr; - if (CORBA::is_nil(theObject)) + if (CORBA::is_nil(theObject)) { MESSAGE("HOMARD_Gen_i.cxx::theObject->_is_nil()"); return aResultSO._retn(); } - if (theStudy->_is_nil()) + 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()) + if (theFatherHomard->_is_nil()) { MESSAGE("theFatherHomard->_is_nil()"); return aResultSO._retn(); @@ -1441,28 +1648,63 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theSt SALOMEDS::SObject_var aSOZone; if (!theFatherHomard->FindSubObject(100, aSOZone)) { + MESSAGE("Ajout de la categorie des zones"); aSOZone = aStudyBuilder->NewObjectToTag(theFatherHomard, 100); PublishInStudyAttr(aStudyBuilder, aSOZone, "Zones", "ZoneList", "zone_icone_2.png", NULL ) ; } + else { MESSAGE("La categorie des zones existe deja."); } aResultSO = aStudyBuilder->NewObject(aSOZone); + const char* icone ; switch (ZoneType) { + case 11 : + { } + case 12 : + { } + case 13 : + { icone = "boxdxy_2.png" ; + break ; + } case 2 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", - "boxdxyz_2.png", _orb->object_to_string(theObject) ) ; - break; + { icone = "boxdxyz_2.png" ; + break ; } + case 31 : + { } + case 32 : + { } + case 33 : + { icone = "disk_2.png" ; + break ; + } case 4 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", - "spherepoint_2.png", _orb->object_to_string(theObject) ) ; - break; + { icone = "spherepoint_2.png" ; + break ; + } + case 5 : + { icone = "cylinderpointvector_2.png" ; + break ; + } + case 61 : + { } + case 62 : + { } + case 63 : + { icone = "diskwithhole_2.png" ; + break ; + } + case 7 : + { icone = "pipe_2.png" ; + break ; } } + PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "ZoneHomard", icone, _orb->object_to_string(theObject) ) ; + return aResultSO._retn(); } //============================================================================= -SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr theStudy, +SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder, HOMARD::HOMARD_Boundary_ptr theObject, const char* theName) { @@ -1485,35 +1727,41 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishBoundaryInStudy(SALOMEDS::Study_ptr t SALOMEDS::SObject_var aSOBoundary; if (!theFatherHomard->FindSubObject(101, aSOBoundary)) { + MESSAGE("Ajout de la categorie des boundarys"); aSOBoundary = aStudyBuilder->NewObjectToTag(theFatherHomard, 101); PublishInStudyAttr(aStudyBuilder, aSOBoundary, "Boundaries", "BoundList", "zone_icone_2.png", NULL ) ; } + else { MESSAGE("La categorie des boundarys existe deja."); } aResultSO = aStudyBuilder->NewObject(aSOBoundary); CORBA::Long BoundaryType = myBoundary->GetBoundaryType(); +// MESSAGE("BoundaryType : "<object_to_string(theObject)); - break; + { value = "BoundaryDiHomard" ; + icone = "mesh_tree_mesh.png" ; + break; } case 1 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "BoundaryAnHomard", "cylinderpointvector_2.png", - _orb->object_to_string(theObject)); - break; + { value = "BoundaryAnHomard" ; + icone = "cylinderpointvector_2.png" ; + break; } case 2 : - { PublishInStudyAttr(aStudyBuilder, aResultSO, theName, "BoundaryAnHomard", "spherepoint_2.png", - _orb->object_to_string(theObject)); - break; + { value = "BoundaryAnHomard" ; + icone = "spherepoint_2.png" ; + break; } } + PublishInStudyAttr(aStudyBuilder, aResultSO, theName, value, icone, _orb->object_to_string(theObject)); return aResultSO._retn(); } //============================================================================= -SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr theStudy, +SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder, HOMARD::HOMARD_Hypothesis_ptr theObject, const char* theName) { @@ -1524,7 +1772,7 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr // 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()) + if (theFatherHomard->_is_nil()) { MESSAGE("theFatherHomard->_is_nil()"); return aResultSO._retn(); @@ -1532,9 +1780,11 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishHypotheseInStudy(SALOMEDS::Study_ptr SALOMEDS::SObject_var aSOHypothese; if (!theFatherHomard->FindSubObject(0, aSOHypothese)) { + MESSAGE("Ajout de la categorie des hypotheses"); aSOHypothese = aStudyBuilder->NewObjectToTag(theFatherHomard, 0); PublishInStudyAttr(aStudyBuilder, aSOHypothese, "Hypothesis", "HypoList","hypotheses.png", NULL); } + else { MESSAGE("La categorie des hypotheses existe deja."); } // Creation du resultat dans l'etude aResultSO = aStudyBuilder->NewObject(aSOHypothese); @@ -1584,14 +1834,8 @@ void HOMARD_Gen_i::PublishInStudyAttr(SALOMEDS::StudyBuilder_var aStudyBuilder, //============================================================================= 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; - }; + MESSAGE("GetAllCases"); + IsValidStudy () ; HOMARD::listeCases_var ret = new HOMARD::listeCases; ret->length(myContextMap[GetCurrentStudyID()]._mesCas.size()); @@ -1609,14 +1853,8 @@ HOMARD::listeCases* HOMARD_Gen_i::GetAllCases() //============================================================================= 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; - }; + MESSAGE("GetAllHypotheses"); + IsValidStudy () ; HOMARD::listeHypotheses_var ret = new HOMARD::listeHypotheses; ret->length(myContextMap[GetCurrentStudyID()]._mesHypotheses.size()); @@ -1634,14 +1872,8 @@ HOMARD::listeHypotheses* HOMARD_Gen_i::GetAllHypotheses() //============================================================================= 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; - }; + MESSAGE("GetAllZones"); + IsValidStudy () ; HOMARD::listeZones_var ret = new HOMARD::listeZones; ret->length(myContextMap[GetCurrentStudyID()]._mesZones.size()); @@ -1659,20 +1891,14 @@ HOMARD::listeZones* HOMARD_Gen_i::GetAllZones() //============================================================================= 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; - }; + MESSAGE("GetAllIterations"); + IsValidStudy () ; HOMARD::listeIterations_var ret = new HOMARD::listeIterations; ret->length(myContextMap[GetCurrentStudyID()]._mesIterations.size()); std::map::const_iterator it; int i = 0; - for (it = myContextMap[GetCurrentStudyID()]._mesIterations.begin(); + for (it = myContextMap[GetCurrentStudyID()]._mesIterations.begin(); it != myContextMap[GetCurrentStudyID()]._mesIterations.end(); it++) { ret[i++] = CORBA::string_dup((*it).first.c_str()); @@ -1683,14 +1909,8 @@ HOMARD::listeIterations* HOMARD_Gen_i::GetAllIterations() //============================================================================= 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; - }; + MESSAGE("GetAllBoundarys"); + IsValidStudy () ; HOMARD::listeBoundarys_var ret = new HOMARD::listeBoundarys; ret->length(myContextMap[GetCurrentStudyID()]._mesBoundarys.size()); @@ -1741,7 +1961,7 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy { // On verifie que le fichier n est pas deja publie SALOMEDS::ChildIterator_var aIter = myCurrentStudy->NewChildIterator(aSmeshSO); - for (; aIter->More(); aIter->Next()) + for (; aIter->More(); aIter->Next()) { SALOMEDS::SObject_var aSO = aIter->Value(); SALOMEDS::GenericAttribute_var aGAttr; @@ -1771,9 +1991,9 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy // 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++) + for (int i = 0; i < mesMaillages->length(); i++) { - MESSAGE( ". Mise a jour des attributs"); + MESSAGE( ". Mise a jour des attributs du maillage"); 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(); @@ -1784,10 +2004,10 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy 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" ); } + const char* icone ; + if ( IconeType == 0 ) { icone = "mesh_tree_importedmesh.png" ; } + else { icone = "mesh_tree_mesh.png" ; } + anAttr2->SetPixMap( icone ); } } @@ -1814,7 +2034,7 @@ void HOMARD_Gen_i::DeleteResultInSmesh(const char* NomFich, const char* MeshName // 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()) + for (; aIter->More(); aIter->Next()) { SALOMEDS::SObject_var aSO = aIter->Value(); SALOMEDS::GenericAttribute_var aGAttr; @@ -1888,6 +2108,20 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No aStudyBuilder->CommitCommand(); } +//===================================================================================== +void HOMARD_Gen_i::IsValidStudy( ) +//===================================================================================== +{ + MESSAGE( "IsValidStudy" ); + if (CORBA::is_nil(myCurrentStudy)) + { + SALOME::ExceptionStruct es; + es.type = SALOME::BAD_PARAM; + es.text = "Invalid Study Context"; + throw SALOME::SALOME_Exception(es); + }; + return ; +} //=========================================================================== // @@ -1897,8 +2131,8 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No //=========================================================================== SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile) + const char* theURL, + CORBA::Boolean isMultiFile) { MESSAGE (" Save pour theURL = "<< theURL); SALOMEDS::TMPFile_var aStreamFile; @@ -1988,22 +2222,26 @@ SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent, } } // -> close file + MESSAGE ("close file"); f.close(); - // put temporary files to the stream + // put temporary files to the stream + MESSAGE ("put temporary files to the stream"); aStreamFile = SALOMEDS_Tool::PutFilesToStream(tmpDir.c_str(), aFileSeq.in(), isMultiFile); // remove temporary files + MESSAGE ("remove temporary files"); if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(tmpDir.c_str(), aFileSeq.in(), true); // return data stream + MESSAGE ("return data stream"); return aStreamFile._retn(); }; //=========================================================================== SALOMEDS::TMPFile* HOMARD_Gen_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile) + const char* theURL, + CORBA::Boolean isMultiFile) { // No specific ASCII persistence SALOMEDS::TMPFile_var aStreamFile = Save(theComponent, theURL, isMultiFile); @@ -2014,7 +2252,7 @@ SALOMEDS::TMPFile* HOMARD_Gen_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, - bool isMultiFile) + CORBA::Boolean isMultiFile) { MESSAGE (" Load pour theURL = "<< theURL); SALOMEDS::Study_var aStudy = theComponent->GetStudy(); @@ -2062,6 +2300,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, std::string bounSignature = HOMARD::GetSignature(HOMARD::Boundary); if (line.substr(0, caseSignature.size()) == caseSignature) { // re-create case + MESSAGE (" Recreation du cas" ); HOMARD::HOMARD_Cas_var aCase = newCase(); PortableServer::ServantBase_var aServant = GetServant(aCase); HOMARD_Cas_i* aCaseServant = dynamic_cast(aServant.in()); @@ -2071,6 +2310,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } } else if (line.substr(0, zoneSignature.size()) == zoneSignature) { + MESSAGE (" Recreation de la zone" ); // re-create zone HOMARD::HOMARD_Zone_var aZone = newZone(); PortableServer::ServantBase_var aServant = GetServant(aZone); @@ -2082,6 +2322,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } else if (line.substr(0, iterSignature.size()) == iterSignature) { // re-create iteration + MESSAGE (" Recreation de l iteration" ); HOMARD::HOMARD_Iteration_var aIter = newIteration(); PortableServer::ServantBase_var aServant = GetServant(aIter); HOMARD_Iteration_i* aIterServant = dynamic_cast(aServant.in()); @@ -2092,6 +2333,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } else if (line.substr(0, hypoSignature.size()) == hypoSignature) { // re-create hypothesis + MESSAGE (" Recreation de l hypothese" ); HOMARD::HOMARD_Hypothesis_var aHypo = newHypothesis(); PortableServer::ServantBase_var aServant = GetServant(aHypo); HOMARD_Hypothesis_i* aHypoServant = dynamic_cast(aServant.in()); @@ -2102,6 +2344,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } else if (line.substr(0, bounSignature.size()) == bounSignature) { // re-create boundary + MESSAGE (" Recreation de la frontiere" ); HOMARD::HOMARD_Boundary_var aBoundary = newBoundary(); PortableServer::ServantBase_var aServant = GetServant(aBoundary); HOMARD_Boundary_i* aBoundaryServant = dynamic_cast(aServant.in()); @@ -2117,7 +2360,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, f.close(); // Remove temporary files created from the stream - if (!isMultiFile) + if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(tmpDir.c_str(), aFileSeq.in(), true); return true; @@ -2127,7 +2370,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, CORBA::Boolean HOMARD_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, - bool isMultiFile) + CORBA::Boolean isMultiFile) { // No specific ASCII persistence return Load(theComponent, theStream, theURL, isMultiFile); @@ -2202,7 +2445,7 @@ char* HOMARD_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, }; //=========================================================================== -bool HOMARD_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) +CORBA::Boolean HOMARD_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) { if(CORBA::is_nil(myCurrentStudy)) return false; @@ -2232,7 +2475,7 @@ bool HOMARD_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) }; //=========================================================================== -CORBA::Boolean HOMARD_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) +CORBA::Boolean HOMARD_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) { // No Copy/Paste support return false; @@ -2325,6 +2568,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::newZone() //========================================================================== Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, CORBA::Boolean& isValidScript) { MESSAGE ("Entree dans DumpPython"); @@ -2343,10 +2587,15 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, aScript += "\"\"\"\n"; aScript += "__revision__ = \"V1.2\"\n"; aScript += "import HOMARD\n"; - aScript += "import salome\n"; + if( isMultiFile ) + aScript += "import salome\n"; aScript += "homard = salome.lcc.FindOrLoadComponent('FactoryServer','HOMARD')\n"; - aScript += "def RebuildData(theStudy):\n"; - aScript += "\thomard.SetCurrentStudy(theStudy)\n"; + if( isMultiFile ) { + aScript += "def RebuildData(theStudy):\n"; + aScript += "\thomard.SetCurrentStudy(theStudy)\n"; + } + else + aScript += "\thomard.SetCurrentStudy(salome.myStudy)\n"; if (myContextMap[GetCurrentStudyID()]._mesBoundarys.size() > 0) @@ -2371,8 +2620,8 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, aScript += "\n# ====================="; } std::map::const_iterator it_zone; - for ( it_zone = myContextMap[GetCurrentStudyID()]._mesZones.begin(); - it_zone != myContextMap[GetCurrentStudyID()]._mesZones.end(); ++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(); @@ -2415,7 +2664,7 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, std::string mesh0 = cMesh0.in(); CORBA::String_var cMeshName0= myIteration->GetMeshName(); std::string meshName0 = cMeshName0.in(); - dumpCas += meshName0 + std::string("', '")+ mesh0 + std::string("')\n"); + dumpCas += meshName0 + std::string("', '")+ mesh0 + std::string("')\n"); CORBA::String_var dumpCorbaCase = myCase->GetDumpPython(); std::string dumpCas2= dumpCorbaCase.in(); @@ -2426,8 +2675,8 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, aScript += "#\n# Creation of the iterations" ; aScript += "\n# =========================="; std::map::const_iterator it_iter; - for (it_iter = myContextMap[GetCurrentStudyID()]._mesIterations.begin(); - it_iter != myContextMap[GetCurrentStudyID()]._mesIterations.end(); ++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(); @@ -2435,6 +2684,12 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, aScript+=dumpIter; } + if( isMultiFile ) + aScript += "\n\tpass"; + aScript += "\n"; + + if( !isMultiFile ) // remove unnecessary tabulation + aScript = RemoveTabulation( aScript ); const size_t aLen = strlen(aScript.c_str()); char* aBuffer = new char[aLen+1]; @@ -2450,9 +2705,9 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, extern "C" { PortableServer::ObjectId* HOMARDEngine_factory(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, + PortableServer::POA_ptr poa, PortableServer::ObjectId* contId, - const char* instanceName, + const char* instanceName, const char* interfaceName) { MESSAGE("PortableServer::ObjectId* HOMARDEngine_factory()"); diff --git a/src/HOMARD_I/HOMARD_Gen_i.hxx b/src/HOMARD_I/HOMARD_Gen_i.hxx index b6dff452..4f646768 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.hxx +++ b/src/HOMARD_I/HOMARD_Gen_i.hxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_GEN_I_HXX_ #define _HOMARD_GEN_I_HXX_ @@ -23,26 +42,63 @@ 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); + 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(); + CORBA::Long 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_Zone_ptr CreateZone (const char* nomZone, CORBA::Long typeZone); + HOMARD::HOMARD_Zone_ptr CreateZoneBox (const char* nomZone, + CORBA::Double Xmini, CORBA::Double Xmaxi, + CORBA::Double Ymini, CORBA::Double Ymaxi, + CORBA::Double Zmini, CORBA::Double Zmaxi); + HOMARD::HOMARD_Zone_ptr CreateZoneSphere (const char* nomZone, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, CORBA::Double Rayon); + HOMARD::HOMARD_Zone_ptr CreateZoneCylinder (const char* nomZone, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe, + CORBA::Double Rayon, CORBA::Double Haut); + HOMARD::HOMARD_Zone_ptr CreateZonePipe (const char* nomZone, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe, + CORBA::Double Rayon, CORBA::Double Haut, CORBA::Double Rayonint); + HOMARD::HOMARD_Zone_ptr CreateZoneBox2D (const char* nomZone, + CORBA::Double Umini, CORBA::Double Umaxi, + CORBA::Double Vmini, CORBA::Double Vmaxi, + CORBA::Long Orient); + HOMARD::HOMARD_Zone_ptr CreateZoneDisk (const char* nomZone, + CORBA::Double Ucentre, CORBA::Double Vcentre, + CORBA::Double Rayon, + CORBA::Long Orient); + HOMARD::HOMARD_Zone_ptr CreateZoneDiskWithHole (const char* nomZone, + CORBA::Double Ucentre, CORBA::Double Vcentre, + CORBA::Double Rayon, CORBA::Double Rayonint, + CORBA::Long Orient); + + HOMARD::HOMARD_Boundary_ptr CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary); + HOMARD::HOMARD_Boundary_ptr CreateBoundaryDi (const char* nomBoundary, + const char* MeshName, const char* FileName); + HOMARD::HOMARD_Boundary_ptr CreateBoundaryCylinder (const char* nomBoundary, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis, + CORBA::Double Rayon); + HOMARD::HOMARD_Boundary_ptr CreateBoundarySphere (const char* nomBoundary, + CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, + CORBA::Double Rayon); HOMARD::HOMARD_Cas_ptr GetCas (const char* nomCas); HOMARD::HOMARD_Zone_ptr GetZone (const char* nomZone); @@ -54,14 +110,15 @@ public: 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 AssociateHypoZone(const char* nomHypothesis, const char* nomZone, CORBA::Long TypeUse); void DissociateHypoZone(const char* nomZone, const char* nomHypothesis); + void InvalideBoundary(const char* nomBoundary); void InvalideZone(const char* nomZone); void InvalideHypo(const char* nomHypo); void InvalideIter(const char* nomIter); - void SetEtatIter(const char* nomIter,const bool EtatCalcul); + void SetEtatIter(const char* nomIter,const CORBA::Boolean EtatCalcul); HOMARD::listeCases* GetAllCases(); HOMARD::listeHypotheses* GetAllHypotheses(); @@ -70,15 +127,17 @@ public: HOMARD::listeBoundarys* GetAllBoundarys(); char* GetCaseName(const char* nomIteration); - - CORBA::Boolean Compute(const char* nomIteration, CORBA::Long etatMenage); + + CORBA::Long 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); + void IsValidStudy(); + // --------------------------------------------------------------- // next functions are inherited from SALOMEDS::Driver interface // --------------------------------------------------------------- @@ -86,26 +145,26 @@ public: // --> Persistence virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, const char* theURL, - bool isMultiFile); - + CORBA::Boolean isMultiFile); + virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, const char* theURL, - bool isMultiFile); - - virtual bool Load(SALOMEDS::SComponent_ptr theComponent, + CORBA::Boolean isMultiFile); + + virtual CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, - bool isMultiFile); + CORBA::Boolean isMultiFile); - virtual bool LoadASCII(SALOMEDS::SComponent_ptr theComponent, + virtual CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, - bool isMultiFile); + CORBA::Boolean isMultiFile); virtual void Close(SALOMEDS::SComponent_ptr IORSComponent); - + virtual char* ComponentDataType(); - + virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, const char* IORString, CORBA::Boolean isMultiFile, @@ -115,9 +174,9 @@ public: const char* aLocalPersistentID, CORBA::Boolean isMultiFile, CORBA::Boolean isASCII); - + // --> Data publishing - virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR); + virtual CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR); virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject, @@ -126,7 +185,7 @@ public: // --> Copy/Paste virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject); - + virtual SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID); @@ -141,7 +200,7 @@ 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); @@ -163,6 +222,7 @@ private: virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, CORBA::Boolean& isValidScript); @@ -177,7 +237,7 @@ private: std::map _idmap; }; typedef std::map ContextMap; - + ::HOMARD_Gen* myHomard; SALOMEDS::Study_var myCurrentStudy; ContextMap myContextMap; diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx index 0118ff55..dd84483b 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HOMARD_Hypothesis_i.hxx" #include "HOMARD_Gen_i.hxx" #include "HOMARD_Hypothesis.hxx" @@ -159,6 +178,7 @@ HOMARD::InfosHypo* HOMARD_Hypothesis_i::GetField() aInfosHypo->ThreshR = CORBA::Double( myHomardHypothesis->GetThreshR() ); aInfosHypo->TypeThC = CORBA::Long( myHomardHypothesis->GetUnRefThrType() ); aInfosHypo->ThreshC = CORBA::Double( myHomardHypothesis->GetThreshC() ); + aInfosHypo->UsField = CORBA::Long( myHomardHypothesis->GetUseField() ); aInfosHypo->UsCmpI = CORBA::Long( myHomardHypothesis->GetUseCompI() ); return aInfosHypo; } @@ -191,10 +211,10 @@ void HOMARD_Hypothesis_i::AddIteration( const char* NomIteration ) } //============================================================================= -void HOMARD_Hypothesis_i::AddZone( const char* NomZone ) +void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse ) { ASSERT( myHomardHypothesis ); - myHomardHypothesis->AddZone( NomZone ); + myHomardHypothesis->AddZone( NomZone, TypeUse ); } //============================================================================= void HOMARD_Hypothesis_i::SupprZone (const char * NomZone) @@ -244,7 +264,7 @@ void HOMARD_Hypothesis_i::AddComp( const char* NomComposant ) //============================================================================= void HOMARD_Hypothesis_i::SupprComp() { - ASSERT( myHomardHypothesis ); + ASSERT( myHomardHypothesis ); myHomardHypothesis->SupprComp(); } @@ -339,6 +359,42 @@ HOMARD::listFieldInterpHypo* HOMARD_Hypothesis_i::GetListFieldInterp() } return aResult._retn(); } +//============================================================================= +void HOMARD_Hypothesis_i::SetNivMax( CORBA::Long NivMax ) +{ + ASSERT( myHomardHypothesis ); + myHomardHypothesis->SetNivMax( NivMax ); +} +//============================================================================= +CORBA::Long HOMARD_Hypothesis_i::GetNivMax() +{ + ASSERT( myHomardHypothesis ); + return myHomardHypothesis->GetNivMax(); +} +//============================================================================= +void HOMARD_Hypothesis_i::SetDiamMin( CORBA::Double DiamMin ) +{ + ASSERT( myHomardHypothesis ); + myHomardHypothesis->SetDiamMin( DiamMin ); +} +//============================================================================= +CORBA::Double HOMARD_Hypothesis_i::GetDiamMin() +{ + ASSERT( myHomardHypothesis ); + return myHomardHypothesis->GetDiamMin(); +} +//============================================================================= +void HOMARD_Hypothesis_i::SetAdapInit( CORBA::Long AdapInit ) +{ + ASSERT( myHomardHypothesis ); + myHomardHypothesis->SetAdapInit( AdapInit ); +} +//============================================================================= +CORBA::Long HOMARD_Hypothesis_i::GetAdapInit() +{ + ASSERT( myHomardHypothesis ); + return myHomardHypothesis->GetAdapInit(); +} //============================================================================= std::string HOMARD_Hypothesis_i::Dump() const diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx index d5268dfe..ea7649a3 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_HYPOTHESIS_I_HXX_ #define _HOMARD_HYPOTHESIS_I_HXX_ @@ -5,13 +24,19 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Hypothesis) +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" +#include "Utils_CorbaException.hxx" + #include class HOMARD_Hypothesis; -class HOMARD_Hypothesis_i: public virtual POA_HOMARD::HOMARD_Hypothesis, - public virtual PortableServer::ServantBase -{ +class HOMARD_Hypothesis_i: + public virtual Engines_Component_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(); @@ -41,7 +66,7 @@ public: HOMARD::InfosHypo* GetField(); void AddIteration( const char* NomIteration ); - void AddZone( const char* NomZone ); + void AddZone( const char* NomZone, CORBA::Long TypeUse ); void SupprZone( const char* NomZone ); void AddComp( const char* NomComposant ); void SupprComp(); @@ -60,6 +85,12 @@ public: void SupprFieldInterp(); HOMARD::listFieldInterpHypo* GetListFieldInterp(); + void SetNivMax( CORBA::Long NivMax ); + CORBA::Long GetNivMax(); + void SetDiamMin( CORBA::Double DiamMin ); + CORBA::Double GetDiamMin(); + void SetAdapInit( CORBA::Long AdapInit ); + CORBA::Long GetAdapInit(); std::string Dump() const; bool Restore( const std::string& stream ); diff --git a/src/HOMARD_I/HOMARD_Iteration_i.cxx b/src/HOMARD_I/HOMARD_Iteration_i.cxx index bbd7b184..a913cf92 100644 --- a/src/HOMARD_I/HOMARD_Iteration_i.cxx +++ b/src/HOMARD_I/HOMARD_Iteration_i.cxx @@ -1,8 +1,29 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HOMARD_Iteration_i.hxx" #include "HOMARD_Gen_i.hxx" #include "HOMARD_Iteration.hxx" #include "HOMARD_DriverTools.hxx" +#include "SALOMEDS_Tool.hxx" + #include "utilities.h" //============================================================================= @@ -22,9 +43,9 @@ HOMARD_Iteration_i::HOMARD_Iteration_i() */ //============================================================================= HOMARD_Iteration_i::HOMARD_Iteration_i( CORBA::ORB_ptr orb, - HOMARD::HOMARD_Gen_var engine ) + HOMARD::HOMARD_Gen_var engine ) { - MESSAGE( "HOMARD_Iteration_i" ); + MESSAGE("constructor"); _gen_i = engine; _orb = orb; myHomardIteration = new ::HOMARD_Iteration(); @@ -64,8 +85,6 @@ char* HOMARD_Iteration_i::GetDumpPython() return CORBA::string_dup( myHomardIteration->GetDumpPython().c_str() ); } -//============================================================================= - //============================================================================= void HOMARD_Iteration_i::SetEtat( CORBA::Boolean Etat ) { @@ -147,10 +166,17 @@ void HOMARD_Iteration_i::AddIteration( const char* NomIter ) } //============================================================================= -CORBA::Boolean HOMARD_Iteration_i::Compute() +CORBA::Long HOMARD_Iteration_i::Compute(CORBA::Long etatMenage) { + MESSAGE ( "Compute : calcul d'une iteration" ); ASSERT( myHomardIteration ); - return CORBA::Boolean( myHomardIteration->Compute() ); +// +// Nom de l'iteration + char* IterName = GetName() ; + MESSAGE ( ". IterName = " << IterName ); +// B. Calcul : on passe par la methode sur l'objet HOMARD +// Il serait plus elegant de tout faire ici, mais il est complexe de paser tout le contexte + return _gen_i->Compute(IterName, etatMenage) ; } //============================================================================= diff --git a/src/HOMARD_I/HOMARD_Iteration_i.hxx b/src/HOMARD_I/HOMARD_Iteration_i.hxx index 79906e17..85903274 100644 --- a/src/HOMARD_I/HOMARD_Iteration_i.hxx +++ b/src/HOMARD_I/HOMARD_Iteration_i.hxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_ITERATION_I_HXX_ #define _HOMARD_ITERATION_I_HXX_ @@ -5,17 +24,24 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Iteration) +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" +#include "Utils_CorbaException.hxx" + #include class HOMARD_Iteration; -class HOMARD_Iteration_i: public virtual POA_HOMARD::HOMARD_Iteration, - public virtual PortableServer::ServantBase -{ +class HOMARD_Iteration_i: + public virtual Engines_Component_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( CORBA::ORB_ptr orb, + HOMARD::HOMARD_Gen_var gen_i ); HOMARD_Iteration_i(); - + virtual ~HOMARD_Iteration_i(); void SetName( const char* NomIteration ); @@ -58,7 +84,7 @@ public: void SetHypoName( const char* NomHypo ); char* GetHypoName(); - CORBA::Boolean Compute(); + CORBA::Long Compute(CORBA::Long etatMenage); std::string Dump() const; bool Restore( const std::string& stream ); diff --git a/src/HOMARD_I/HOMARD_Zone_i.cxx b/src/HOMARD_I/HOMARD_Zone_i.cxx index 5bee195b..1dbab43d 100644 --- a/src/HOMARD_I/HOMARD_Zone_i.cxx +++ b/src/HOMARD_I/HOMARD_Zone_i.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HOMARD_Zone_i.hxx" #include "HOMARD_Gen_i.hxx" #include "HOMARD_Zone.hxx" @@ -87,11 +106,11 @@ void HOMARD_Zone_i::SetBox( double X0, double X1, double X2, double X3, double X } //============================================================================= -HOMARD::double_array* HOMARD_Zone_i::GetBox() +HOMARD::double_array* HOMARD_Zone_i::GetCoords() { ASSERT( myHomardZone ); HOMARD::double_array_var aResult = new HOMARD::double_array(); - std::vector mesCoor = myHomardZone->GetBox(); + std::vector mesCoor = myHomardZone->GetCoords(); aResult->length( mesCoor .size() ); std::vector::const_iterator it; int i = 0; @@ -101,24 +120,27 @@ HOMARD::double_array* HOMARD_Zone_i::GetBox() } //============================================================================= -void HOMARD_Zone_i::SetSphere( double Xcentre, double Ycentre, double ZCentre, double rayon ) +void HOMARD_Zone_i::SetSphere( double Xcentre, double Ycentre, double Zcentre, double Rayon ) { ASSERT( myHomardZone ); - myHomardZone->SetSphere( Xcentre, Ycentre, ZCentre, rayon ); + myHomardZone->SetSphere( Xcentre, Ycentre, Zcentre, Rayon ); } //============================================================================= -HOMARD::double_array* HOMARD_Zone_i::GetSphere() +void HOMARD_Zone_i::SetCylinder( double Xcentre, double Ycentre, double Zcentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut ) { ASSERT( myHomardZone ); - HOMARD::double_array_var aResult = new HOMARD::double_array(); - std::vector mesCoor = myHomardZone->GetSphere(); - aResult->length( mesCoor .size() ); - std::vector::const_iterator it; - int i = 0; - for ( it = mesCoor.begin(); it != mesCoor.end(); it++ ) - aResult[i++] = (*it); - return aResult._retn(); + myHomardZone->SetCylinder( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon, Haut ); +} +//============================================================================= +void HOMARD_Zone_i::SetPipe( double Xcentre, double Ycentre, double Zcentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut, double Rayonint ) +{ + ASSERT( myHomardZone ); + myHomardZone->SetPipe( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon, Haut, Rayonint ); } //============================================================================= @@ -146,8 +168,10 @@ HOMARD::double_array* HOMARD_Zone_i::GetLimit() //============================================================================= void HOMARD_Zone_i::AddHypo( const char* NomHypo ) { + MESSAGE ( " AddHypo, NomHypo= " << NomHypo); ASSERT( myHomardZone ); myHomardZone->AddHypo( NomHypo ); + MESSAGE ( " FIn de AddHypo"); } //============================================================================= diff --git a/src/HOMARD_I/HOMARD_Zone_i.hxx b/src/HOMARD_I/HOMARD_Zone_i.hxx index 1d5e72b6..63526668 100644 --- a/src/HOMARD_I/HOMARD_Zone_i.hxx +++ b/src/HOMARD_I/HOMARD_Zone_i.hxx @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef _HOMARD_Zone_I_HXX_ #define _HOMARD_Zone_I_HXX_ @@ -5,49 +24,61 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Zone) +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" +#include "Utils_CorbaException.hxx" + #include class HOMARD_Zone; -class HOMARD_Zone_i: public virtual POA_HOMARD::HOMARD_Zone, - public virtual PortableServer::ServantBase -{ +class HOMARD_Zone_i: + public virtual Engines_Component_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(); + + HOMARD::double_array* GetCoords(); + void SetBox( double Xmini, double Xmaxi, + double Ymini, double Ymaxi, + double Zmini, double Zmaxi ); + void SetSphere( double Xcentre, double Ycentre, double ZCentre, - double rayon ); - + double Rayon ); + + void SetCylinder( double Xcentre, double Ycentre, double ZCentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut ); + void SetPipe( double Xcentre, double Ycentre, double ZCentre, + double Xaxis, double Yaxis, double Zaxis, + double Rayon, double Haut, double Rayonint ); + 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; }; diff --git a/src/HOMARD_I/HomardMedCommun.cxx b/src/HOMARD_I/HomardMedCommun.cxx index bacc234a..8aab75c3 100644 --- a/src/HOMARD_I/HomardMedCommun.cxx +++ b/src/HOMARD_I/HomardMedCommun.cxx @@ -1,9 +1,29 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "HomardMedCommun.h" -using namespace std; + #include #include #include #include +#include extern "C" { @@ -15,69 +35,98 @@ extern "C" std::set GetListeGroupesInMedFile(const char * aFile) // ======================================================================= { - std::set ListeGroupes; - int MedIdt = MEDouvrir(const_cast(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; + std::set ListeGroupes; + med_idt medIdt = MEDfileOpen(aFile,MED_ACC_RDONLY); + if ( medIdt < 0 ) { return ListeGroupes; }; - med_int mdim; - med_maillage type; - med_int numMaillage=1; - if ( MEDmaaInfo(MedIdt,numMaillage,maa,&mdim,&type,desc) < 0 ) { return ListeGroupes; }; + char meshname[MED_NAME_SIZE+1]; + med_int spacedim,meshdim; + med_mesh_type meshtype; + char descriptionription[MED_COMMENT_SIZE+1]; + char dtunit[MED_SNAME_SIZE+1]; + med_sorting_type sortingtype; + med_int nstep; + med_axis_type axistype; + int naxis = MEDmeshnAxis(medIdt,1); + char *axisname=new char[naxis*MED_SNAME_SIZE+1]; + char *axisunit=new char[naxis*MED_SNAME_SIZE+1]; + med_err aRet = MEDmeshInfo(medIdt, + 1, + meshname, + &spacedim, + &meshdim, + &meshtype, + descriptionription, + dtunit, + &sortingtype, + &nstep, + &axistype, + axisname, + axisunit); + if ( aRet < 0 ) { return ListeGroupes; }; + med_int nfam, ngro, natt; - if ((nfam = MEDnFam(MedIdt,maa)) < 0) { return ListeGroupes; }; - for (int i=0;i 0) { continue;} // On ne garde que les familles d elts + if ((natt = MEDnFamily23Attribute(medIdt,meshname,i+1)) < 0) + { + // GERALD -- QMESSAGE BOX + std::cerr << " Error : Families are unreadable" << std::endl; + std::cerr << "Pb avec la famille : " << i+1 << std::endl; + break; + } - for (int j=0;j 0) { continue;} // On ne garde que les familles d elts - } - free(gro); - } - MEDfermer(MedIdt); - return ListeGroupes; + for (int j=0;j GetBoundingBoxInMedFile(const char * aFile) std::vector LesExtremes; - // Ouverture du Fichier Med - int MedIdt = MEDouvrir(const_cast(aFile),MED_LECTURE); - if (MedIdt <0) + // Ouverture du Fichier Med + med_idt medIdt = MEDfileOpen(aFile,MED_ACC_RDONLY); + if (medIdt <0) { // GERALD -- QMESSAGE BOX std::cerr << "Error : mesh is unreadable" << std::endl; @@ -102,8 +151,8 @@ std::vector GetBoundingBoxInMedFile(const char * aFile) } // Le fichier Med est lisible - // Boucle sur les noms de maillage - int numberOfMeshes = MEDnMaa(MedIdt) ; + // Boucle sur les noms de maillage + med_int numberOfMeshes = MEDnMesh(medIdt) ; if (numberOfMeshes != 1 ) { // GERALD -- QMESSAGE BOX @@ -111,40 +160,70 @@ std::vector GetBoundingBoxInMedFile(const char * aFile) 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; + char meshname[MED_NAME_SIZE+1]; + med_int spacedim,meshdim; + med_mesh_type meshtype; + char descriptionription[MED_COMMENT_SIZE+1]; + char dtunit[MED_SNAME_SIZE+1]; + med_sorting_type sortingtype; + med_int nstep; + med_axis_type axistype; + int naxis = MEDmeshnAxis(medIdt,1); + char *axisname=new char[naxis*MED_SNAME_SIZE+1]; + char *axisunit=new char[naxis*MED_SNAME_SIZE+1]; + med_err aRet = MEDmeshInfo(medIdt, + 1, + meshname, + &spacedim, + &meshdim, + &meshtype, + descriptionription, + dtunit, + &sortingtype, + &nstep, + &axistype, + axisname, + axisunit); - if (MEDmaaInfo(MedIdt,numMaillage,maa,&dim,&type,desc) < 0) + if (aRet < 0) { // GERALD -- QMESSAGE BOX - std::cerr << "Error : mesh " << numMaillage << " is unreadable" << std::endl; + std::cerr << "Error : mesh is unreadable" << std::endl; return LesExtremes; } - med_int nnoe = MEDnEntMaa(MedIdt,maa,MED_COOR,MED_NOEUD,(med_geometrie_element)0,(med_connectivite)0); + med_bool chgt,trsf; + med_int nnoe = MEDmeshnEntity(medIdt, + meshname, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + MED_COORDINATE, + MED_NO_CMODE, + &chgt, + &trsf); if ( nnoe < 0) { // GERALD -- QMESSAGE BOX - std::cerr << "Error : mesh " << numMaillage << " is unreadable" << std::endl; + std::cerr << "Error : mesh 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); + med_float* coo = (med_float*) malloc(sizeof(med_float)*nnoe*spacedim); - MEDnoeudsLire(MedIdt,maa,dim,coo,MED_NO_INTERLACE,&rep, - nomcoo,unicoo,nomnoe,&inonoe,numnoe,&inunoe, - nufano,nnoe); + aRet = MEDmeshNodeCoordinateRd(medIdt, + meshname, + MED_NO_DT, + MED_NO_IT, + MED_NO_INTERLACE, + coo); + if ( aRet < 0) + { + // GERALD -- QMESSAGE BOX + std::cerr << "Error : mesh coordinates are unreadable" << std::endl; + return LesExtremes; + } med_float xmin,xmax,ymin,ymax,zmin,zmax; @@ -152,17 +231,17 @@ std::vector GetBoundingBoxInMedFile(const char * aFile) xmax=coo[0]; for (int i=1;i 1) + if (spacedim > 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]); + ymin = std::min(ymin,coo[i]); + ymax = std::max(ymax,coo[i]); } } else @@ -173,13 +252,13 @@ std::vector GetBoundingBoxInMedFile(const char * aFile) zmax=0; } // - if (dim > 2) + if (spacedim > 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]); + zmin = std::min(zmin,coo[i]); + zmax = std::max(zmax,coo[i]); } } else @@ -187,7 +266,7 @@ std::vector GetBoundingBoxInMedFile(const char * aFile) zmin=0; zmax=0; } - MEDfermer(MedIdt); + MEDfileClose(medIdt); MESSAGE( "_______________________________________"); MESSAGE( "xmin : " << xmin << " xmax : " << xmax ); @@ -206,8 +285,8 @@ std::vector GetBoundingBoxInMedFile(const char * aFile) LesExtremes.push_back(0); - double max1=max ( LesExtremes[1] - LesExtremes[0] , LesExtremes[4] - LesExtremes[3] ) ; - double max2=max ( max1 , LesExtremes[7] - LesExtremes[6] ) ; + double max1=std::max ( LesExtremes[1] - LesExtremes[0] , LesExtremes[4] - LesExtremes[3] ) ; + double max2=std::max ( max1 , LesExtremes[7] - LesExtremes[6] ) ; LesExtremes.push_back(max2); // LesExtremes[0] = Xmini du maillage diff --git a/src/HOMARD_I/HomardMedCommun.h b/src/HOMARD_I/HomardMedCommun.h index 9f9c65df..e6bac47d 100644 --- a/src/HOMARD_I/HomardMedCommun.h +++ b/src/HOMARD_I/HomardMedCommun.h @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef HOMARDMEDCOMMUN_H #define HOMARDMEDCOMMUN_H @@ -5,11 +24,6 @@ #include #include -extern "C" -{ -#include -} - std::vector GetBoundingBoxInMedFile( const char * aFile); std::set GetListeGroupesInMedFile(const char * aFile); diff --git a/src/HOMARD_I/Makefile.am b/src/HOMARD_I/Makefile.am index 121b9410..c71252bb 100644 --- a/src/HOMARD_I/Makefile.am +++ b/src/HOMARD_I/Makefile.am @@ -1,25 +1,21 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 # -# 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 @@ -58,7 +54,7 @@ libHOMARDEngine_la_CPPFLAGS = \ $(CORBA_CXXFLAGS) \ $(CORBA_INCLUDES) \ $(KERNEL_CXXFLAGS) \ - $(MED2_INCLUDES) \ + $(MED3_INCLUDES) \ $(SMESH_CXXFLAGS) \ $(GEOM_CXXFLAGS) \ -I$(srcdir)/../HOMARD \ @@ -67,14 +63,14 @@ libHOMARDEngine_la_CPPFLAGS = \ -I$(GEOM_ROOT_DIR)/include/salome \ -I$(SMESH_ROOT_DIR)/include/salome \ -I$(MED_ROOT_DIR)/include/salome \ - -I$(top_builddir)/salome_adm/unix + -I$(top_builddir)/adm_local/unix libHOMARDEngine_la_LDFLAGS = \ ../../idl/libSalomeIDLHOMARD.la \ ../HOMARD/libHOMARDImpl.la \ $(KERNEL_LDFLAGS) \ - $(MED2_LIBS) \ + $(MED3_LIBS) \ -lSalomeContainer \ -lSalomeNS \ -lRegistry \ @@ -83,4 +79,5 @@ libHOMARDEngine_la_LDFLAGS = \ -lTOOLSDS \ -lSalomeGenericObj \ $(SMESH_LDFLAGS) \ + -lSalomeIDLSMESH \ -lSMESHClient diff --git a/src/HOMARD_I/driver_gen_i.cxx b/src/HOMARD_I/driver_gen_i.cxx deleted file mode 100644 index d5fefbeb..00000000 --- a/src/HOMARD_I/driver_gen_i.cxx +++ /dev/null @@ -1,245 +0,0 @@ -#include -#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 deleted file mode 100644 index 06a3a11e..00000000 --- a/src/HOMARD_I/driver_gen_i.h +++ /dev/null @@ -1,86 +0,0 @@ -#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 index e5d2ac8d..d8e9f312 100644 --- a/src/HOMARD_SCRIPTS/Makefile.am +++ b/src/HOMARD_SCRIPTS/Makefile.am @@ -1,25 +1,21 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 # -# 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 diff --git a/src/HOMARD_SCRIPTS/testHomard.py b/src/HOMARD_SCRIPTS/testHomard.py index fe29d76d..9b1125e4 100644 --- a/src/HOMARD_SCRIPTS/testHomard.py +++ b/src/HOMARD_SCRIPTS/testHomard.py @@ -1,3 +1,26 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# File : Makefile.in +# Author : Nicolas REJNERI, Paul RASCLE +# Modified by : Alexander BORODIN (OCN) - autotools usage +# Module : HOMARD + import salome homard=salome.lcc.FindOrLoadComponent("FactoryServer","HOMARD") import os diff --git a/src/HOMARD_SCRIPTS/test_homard.py b/src/HOMARD_SCRIPTS/test_homard.py index 3eb14582..05011893 100644 --- a/src/HOMARD_SCRIPTS/test_homard.py +++ b/src/HOMARD_SCRIPTS/test_homard.py @@ -1,3 +1,26 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# File : Makefile.in +# Author : Nicolas REJNERI, Paul RASCLE +# Modified by : Alexander BORODIN (OCN) - autotools usage +# Module : HOMARD + import salome salome.salome_init() diff --git a/src/HOMARD_SWIG/HOMARD_shared_modules.py b/src/HOMARD_SWIG/HOMARD_shared_modules.py index bf867226..3c137daf 100644 --- a/src/HOMARD_SWIG/HOMARD_shared_modules.py +++ b/src/HOMARD_SWIG/HOMARD_shared_modules.py @@ -1,3 +1,26 @@ +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# File : Makefile.in +# Author : Nicolas REJNERI, Paul RASCLE +# Modified by : Alexander BORODIN (OCN) - autotools usage +# Module : HOMARD + """ """ diff --git a/src/HOMARD_SWIG/Makefile.am b/src/HOMARD_SWIG/Makefile.am index 6ec5d6d0..1ae4a823 100644 --- a/src/HOMARD_SWIG/Makefile.am +++ b/src/HOMARD_SWIG/Makefile.am @@ -1,25 +1,21 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 # -# 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 diff --git a/src/HOMARD_SWIG/libHOMARD_Swig.i b/src/HOMARD_SWIG/libHOMARD_Swig.i index 2cc7e284..94110abb 100644 --- a/src/HOMARD_SWIG/libHOMARD_Swig.i +++ b/src/HOMARD_SWIG/libHOMARD_Swig.i @@ -1,3 +1,22 @@ +// Copyright (C) 2011-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + %module libHOMARD_Swig diff --git a/src/Makefile.am b/src/Makefile.am index 61e5565f..7ea558eb 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,23 +1,20 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 # -# 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # File : Makefile.in # Author : (CEA) diff --git a/tests/Makefile.am b/tests/Makefile.am index ed66236a..d52be622 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,37 +1,53 @@ -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D # -# 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 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. # -# 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 +# 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.en.pdf \ test_1.py \ test_1.00.med \ test_1.01.med \ test_1.02.med \ test_1.apad.03.bilan \ test_2.pdf \ + test_2.en.pdf \ test_2.py \ test_2.00.med \ test_2.fr.med \ - test_2.apad.03.bilan + test_2.apad.03.bilan \ + test_3.pdf \ + test_3.en.pdf \ + test_3.py \ + test_3.00.med \ + test_3.fr.med \ + test_3.apad.02.bilan + +EXTRA_DIST += \ + test_1.odt \ + test_1.en.odt \ + test_1.png \ + test_2.odt \ + test_2.en.odt \ + test_2.png \ + test_3.odt \ + test_3.en.odt \ + test_3.png diff --git a/tests/test_1.00.med b/tests/test_1.00.med index 767d4f62..316e1405 100644 Binary files a/tests/test_1.00.med and b/tests/test_1.00.med differ diff --git a/tests/test_1.01.med b/tests/test_1.01.med index 91d7fb34..661ce231 100644 Binary files a/tests/test_1.01.med and b/tests/test_1.01.med differ diff --git a/tests/test_1.02.med b/tests/test_1.02.med index 4e94dcdd..1a9688c1 100644 Binary files a/tests/test_1.02.med and b/tests/test_1.02.med differ diff --git a/tests/test_1.en.odt b/tests/test_1.en.odt new file mode 100644 index 00000000..a728ba78 Binary files /dev/null and b/tests/test_1.en.odt differ diff --git a/tests/test_1.en.pdf b/tests/test_1.en.pdf new file mode 100644 index 00000000..a0642bc0 Binary files /dev/null and b/tests/test_1.en.pdf differ diff --git a/tests/test_1.odt b/tests/test_1.odt index 578a8f13..257405ff 100644 Binary files a/tests/test_1.odt and b/tests/test_1.odt differ diff --git a/tests/test_1.pdf b/tests/test_1.pdf index 1aaaa2cd..d663a40a 100644 Binary files a/tests/test_1.pdf and b/tests/test_1.pdf differ diff --git a/tests/test_1.py b/tests/test_1.py index abbd6d93..01a07768 100644 --- a/tests/test_1.py +++ b/tests/test_1.py @@ -1,10 +1,28 @@ # -*- coding: iso-8859-1 -*- +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# """ Python script for HOMARD Copyright EDF-R&D 2010 Test test_1 """ -__revision__ = "V1.2" +__revision__ = "V1.6" ###################################################################################### Test_Name = "test_1" @@ -32,68 +50,84 @@ def homard_exec(theStudy): Python script for HOMARD Copyright EDF-R&D 2010 """ - homard.SetCurrentStudy(theStudy) + error = 0 # -# 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) + while not error : + # + homard.SetCurrentStudy(theStudy) + # + # Creation of the zones + # ===================== + # Creation of the box Zone_1 + Zone_1 = homard.CreateZoneBox('Zone_1', -0.01, 1.01, -0.01, 0.4, -0.01, 0.6) -# Creation of the 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 sphere Zone_2 + Zone_2 = homard.CreateZoneSphere('Zone_2', 0.5, 0.6, 0.7, 0.75) + # + # Creation of the hypotheses + # ========================== + # 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) + a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.SetTypeFieldInterp(2) + a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.AddFieldInterp('RESU____DEPL____________________') + a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM.AddFieldInterp('RESU____ERRE_ELEM_SIGM__________') + # 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('Zones_1_et_2', 'Zone_1', 1) + homard.AssociateHypoZone('Zones_1_et_2', 'Zone_2', 1) + # + # Creation of the cases + # ===================== + # Creation of the case zzzz121b + Case_1 = homard.CreateCase('zzzz121b', 'MAILL', os.path.join(Rep_Test, Test_Name + '.00.med')) + 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') + error = I1.Compute(1) + if error : + error = 1 + break -# 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 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') + error = I2.Compute(1) + if error : + error = 2 + break -# 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 + # 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') + error = I3.Compute(1) + if error : + error = 3 + break + # + break + # + return error ###################################################################################### @@ -102,11 +136,11 @@ 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') + error_main = homard_exec(salome.myStudy) + if error_main : + raise Exception('Pb in homard_exec at iteration %d' %error_main ) except : - raise Exception('Pb in homard_exec') + raise Exception('Pb in homard_exec at iteration %d' %error_main ) sys.exit(1) # # Test of the result @@ -116,12 +150,14 @@ 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) +mess_error_ref = "\nReference file: " + test_file try : file = open (test_file, "r") mess_ref = file.readlines() file.close() except : - raise Exception('Reference file does not exist.') + mess_error = mess_error_ref + "\nThis file does not exist.\n" + raise Exception(mess_error) sys.exit(2) # test_file = os.path.join(Rep_Test_Resu, rep_test_file, test_file_suff) @@ -130,12 +166,16 @@ if os.path.isfile (test_file) : mess = file.readlines() file.close() else : - raise Exception('Result file does not exist.') + mess_error = "\nResult file: " + test_file + mess_error += "\nThis file does not exist.\n" + raise Exception(mess_error) sys.exit(2) nblign = len(mess_ref) if ( len(mess) != nblign ): - raise Exception('The number of lines of the files are not the same.') + mess_error = mess_error_ref + "\nResult file: " + test_file + mess_error += "\nThe number of lines of the files are not the same.\n" + raise Exception(mess_error) sys.exit(2) for num in range(nblign) : diff --git a/tests/test_2.00.med b/tests/test_2.00.med index 05e3849b..b4ada0fe 100644 Binary files a/tests/test_2.00.med and b/tests/test_2.00.med differ diff --git a/tests/test_2.en.odt b/tests/test_2.en.odt new file mode 100644 index 00000000..44de3cf7 Binary files /dev/null and b/tests/test_2.en.odt differ diff --git a/tests/test_2.en.pdf b/tests/test_2.en.pdf new file mode 100644 index 00000000..75a9e87a Binary files /dev/null and b/tests/test_2.en.pdf differ diff --git a/tests/test_2.fr.med b/tests/test_2.fr.med index 48ceb7d0..33315ed5 100644 Binary files a/tests/test_2.fr.med and b/tests/test_2.fr.med differ diff --git a/tests/test_2.odt b/tests/test_2.odt index 76858ccb..03c61778 100644 Binary files a/tests/test_2.odt and b/tests/test_2.odt differ diff --git a/tests/test_2.pdf b/tests/test_2.pdf index 62a67c0b..0a058f33 100644 Binary files a/tests/test_2.pdf and b/tests/test_2.pdf differ diff --git a/tests/test_2.png b/tests/test_2.png index 1762c1b3..dced743d 100644 Binary files a/tests/test_2.png and b/tests/test_2.png differ diff --git a/tests/test_2.py b/tests/test_2.py index 5ff9f386..60110999 100644 --- a/tests/test_2.py +++ b/tests/test_2.py @@ -1,10 +1,28 @@ # -*- coding: iso-8859-1 -*- +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# """ Python script for HOMARD Copyright EDF-R&D 2010 Test test_2 """ -__revision__ = "V1.2" +__revision__ = "V1.5" ###################################################################################### Test_Name = "test_2" @@ -32,59 +50,73 @@ 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') + error = 0 # -# 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 ') + while not error : + # + homard.SetCurrentStudy(theStudy) + # + # Creation of the boundaries + # ========================== + # Creation of the discrete boundary Boundary_1 + Boundary_1 = homard.CreateBoundaryDi('internal_boundary', 'plaque', os.path.join(Rep_Test, Test_Name + '.fr.med')) + # + # Creation of the hypotheses + # ========================== + # Creation of the hypothesis Hypo_1 + Hypo_1 = homard.CreateHypothesis('Hypo_1') + Hypo_1.SetAdapRefinUnRef(-1, 1, 0) + Hypo_1.AddGroup('EG') + Hypo_1.AddGroup('BANDE') -# Creation of the hypothesis Hypo_2 - 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 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') + error = Iter_1.Compute(1) + if error : + error = 1 + break -# 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_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') + error = Iter_2.Compute(1) + if error : + error = 2 + break -# 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 + # 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') + error = Iter_3.Compute(1) + if error : + error = 3 + break + # + break + # + return error ###################################################################################### @@ -93,11 +125,11 @@ 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') + error_main = homard_exec(salome.myStudy) + if error_main : + raise Exception('Pb in homard_exec at iteration %d' %error_main ) except : - raise Exception('Pb in homard_exec') + raise Exception('Pb in homard_exec at iteration %d' %error_main ) sys.exit(1) # # Test of the result @@ -107,12 +139,14 @@ 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) +mess_error_ref = "\nReference file: " + test_file try : file = open (test_file, "r") mess_ref = file.readlines() file.close() except : - raise Exception('Reference file does not exist.') + mess_error = mess_error_ref + "\nThis file does not exist.\n" + raise Exception(mess_error) sys.exit(2) # test_file = os.path.join(Rep_Test_Resu, rep_test_file, test_file_suff) @@ -121,12 +155,16 @@ if os.path.isfile (test_file) : mess = file.readlines() file.close() else : - raise Exception('Result file does not exist.') + mess_error = "\nResult file: " + test_file + mess_error += "\nThis file does not exist.\n" + raise Exception(mess_error) sys.exit(2) nblign = len(mess_ref) if ( len(mess) != nblign ): - raise Exception('The number of lines of the files are not the same.') + mess_error = mess_error_ref + "\nResult file: " + test_file + mess_error += "\nThe number of lines of the files are not the same.\n" + raise Exception(mess_error) sys.exit(2) for num in range(nblign) : diff --git a/tests/test_3.00.med b/tests/test_3.00.med new file mode 100644 index 00000000..c76b750e Binary files /dev/null and b/tests/test_3.00.med differ diff --git a/tests/test_3.apad.02.bilan b/tests/test_3.apad.02.bilan new file mode 100644 index 00000000..c89aabd3 --- /dev/null +++ b/tests/test_3.apad.02.bilan @@ -0,0 +1,62 @@ + + +ANALYSE DU MAILLAGE +=================== + + Maillage apres adaptation + MOYEU + Date de creation : mardi 1 fevrier 2011 a 17 h 21 mn 12 s + Dimension : 3 + Degre : 1 + C'est un maillage obtenu apres 2 adaptations. + Le niveau minimum actif est : 2 + Le niveau maximum atteint est : 2 + + Direction | Unite | Minimum | Maximum + --------------------------------------------------------------- + x | m | -36.603 | 536.60 + y | m | -75.000 | 125.00 + z | m | -125.00 | 75.000 + + + NOMBRE D'ENTITES DU CALCUL + ========================== + + + ************************************************************ + * Noeuds * + ************************************************************ + * Nombre total * 3710 * + ************************************************************ + + ************************************************************ + * Segments * + ************************************************************ + * Nombre total * 156 * + * . dont aretes isolees * 0 * + * . dont aretes de bord de regions 2D * 0 * + * . dont aretes internes aux faces/volumes * 156 * + ************************************************************ + + ************************************************************ + * Triangles * + ************************************************************ + * Nombre total * 3232 * + * . dont triangles de regions 2D * 0 * + * . dont triangles de bord * 3232 * + * . dont triangles internes aux volumes * 0 * + ************************************************************ + * . du niveau 0 * 0 * + * . du niveau 1 * 0 * + * . du niveau 2 * 3232 * + ************************************************************ + + ************************************************************ + * Tetraedres * + ************************************************************ + * Nombre total * 17280 * + ************************************************************ + * . du niveau 0 * 0 * + * . du niveau 1 * 0 * + * . du niveau 2 * 17280 * + ************************************************************ diff --git a/tests/test_3.en.odt b/tests/test_3.en.odt new file mode 100644 index 00000000..83d4bd2c Binary files /dev/null and b/tests/test_3.en.odt differ diff --git a/tests/test_3.en.pdf b/tests/test_3.en.pdf new file mode 100644 index 00000000..7b1f6e32 Binary files /dev/null and b/tests/test_3.en.pdf differ diff --git a/tests/test_3.fr.med b/tests/test_3.fr.med new file mode 100644 index 00000000..99b15ca6 Binary files /dev/null and b/tests/test_3.fr.med differ diff --git a/tests/test_3.odt b/tests/test_3.odt new file mode 100644 index 00000000..a3f0c93e Binary files /dev/null and b/tests/test_3.odt differ diff --git a/tests/test_3.pdf b/tests/test_3.pdf new file mode 100644 index 00000000..c05d06ff Binary files /dev/null and b/tests/test_3.pdf differ diff --git a/tests/test_3.png b/tests/test_3.png new file mode 100644 index 00000000..19c94e8a Binary files /dev/null and b/tests/test_3.png differ diff --git a/tests/test_3.py b/tests/test_3.py new file mode 100644 index 00000000..5e7cdcc4 --- /dev/null +++ b/tests/test_3.py @@ -0,0 +1,181 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2011-2012 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" +Python script for HOMARD +Copyright EDF-R&D 2011 +Test test_3 +""" +__revision__ = "V1.3" + +###################################################################################### +Test_Name = "test_3" +n_iter_test_file = 2 +###################################################################################### +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 + """ + error = 0 +# + while not error : +# + homard.SetCurrentStudy(theStudy) +# +# Creation of the boundaries +# ========================== +# Creation of the discrete boundary + Boundary_1 = homard.CreateBoundaryDi('courbes', 'COURBES', os.path.join(Rep_Test, Test_Name + '.fr.med')) +# +# Creation of the external cylinder + Boundary_2 = homard.CreateBoundaryCylinder('cyl_ext', 50.0, 25., -25., 1., 0., 0., 100.) +# +# Creation of the internal cylinder + Boundary_3 = homard.CreateBoundaryCylinder('cyl_int', 50.0, 25., -25., 1., 0., 0., 50.) +# +# Creation of the first sphere + Boundary_4 = homard.CreateBoundarySphere('sphere_1', 50.0, 25., -25., 100.) +# +# Creation of the second sphere + Boundary_5 = homard.CreateBoundarySphere('sphere_2', 450.0, 25., -25., 100.) +# +# Creation of the hypotheses +# ========================== +# Uniform refinement + Hypo = homard.CreateHypothesis('Hypo') + Hypo.SetAdapRefinUnRef(-1, 1, 0) +# +# Creation of the cases +# ===================== +# Creation of the case Case_1 + Case_1 = homard.CreateCase('Case_1', 'MOYEU', os.path.join(Rep_Test, Test_Name + '.00.med')) + Case_1.SetDirName(Rep_Test_Resu) + Case_1.SetConfType(1) + Case_1.AddBoundaryGroup('courbes', '') + Case_1.AddBoundaryGroup('cyl_ext', 'EXT') + Case_1.AddBoundaryGroup('cyl_int', 'INT') + Case_1.AddBoundaryGroup('sphere_1', 'END_1') + Case_1.AddBoundaryGroup('sphere_2', 'END_2') +# +# Creation of the iterations +# ========================== +# Creation of the iteration Iter_1 + Iter_1 = homard.CreateIteration('Iter_1', Case_1.GetIter0Name() ) + Iter_1.SetMeshName('MOYEU_1') + Iter_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med')) + homard.AssociateIterHypo('Iter_1', 'Hypo') + error = Iter_1.Compute(1) + if error : + error = 1 + break + +# Creation of the iteration Iter_2 + Iter_2 = homard.CreateIteration('Iter_2', 'Iter_1') + Iter_2.SetMeshName('MOYEU_2') + Iter_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med')) + homard.AssociateIterHypo('Iter_2', 'Hypo') + error = Iter_2.Compute(1) + if error : + error = 2 + break +# + break +# + return error + +###################################################################################### + +homard = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD') +# +# Exec of HOMARD-SALOME +# +try : + error_main = homard_exec(salome.myStudy) + if error_main : + raise Exception('Pb in homard_exec at iteration %d' %error_main ) +except : + if error_main : + raise Exception('Pb in homard_exec at iteration %d' %error_main ) + 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) +mess_error_ref = "\nReference file: " + test_file +try : + file = open (test_file, "r") + mess_ref = file.readlines() + file.close() +except : + mess_error = mess_error_ref + "\nThis file does not exist.\n" + raise Exception(mess_error) + 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 : + mess_error = "\nResult file: " + test_file + mess_error += "\nThis file does not exist.\n" + raise Exception(mess_error) + sys.exit(2) + +nblign = len(mess_ref) +if ( len(mess) != nblign ): + mess_error = mess_error_ref + "\nResult file: " + test_file + mess_error += "\nThe number of lines of the files are not the same.\n" + raise Exception(mess_error) + 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) +