From 9cb8b276c2a6be4f33f979b23d9dd86de51fff83 Mon Sep 17 00:00:00 2001 From: Mathieu Courtois Date: Wed, 27 Nov 2024 14:34:41 +0100 Subject: [PATCH 01/19] [#34254] defi_group: remove dependencies on inputs --- code_aster/CodeCommands/defi_group.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code_aster/CodeCommands/defi_group.py b/code_aster/CodeCommands/defi_group.py index 537a311e03..8a7ea575a2 100644 --- a/code_aster/CodeCommands/defi_group.py +++ b/code_aster/CodeCommands/defi_group.py @@ -1,6 +1,6 @@ # coding: utf-8 -# Copyright (C) 1991 - 2022 EDF R&D www.code-aster.org +# Copyright (C) 1991 - 2024 EDF R&D www.code-aster.org # # This file is part of Code_Aster. # @@ -52,5 +52,12 @@ def post_exec(self, keywords): self._result.build() + def add_dependencies(self, keywords): + """The output mesh has no dependency on inputs. + + Arguments: + keywords (dict): User's keywords. + """ + DEFI_GROUP = GroupDefinition.run From 049cceea44dd578b17325d6ff4fe41f9b65e15b3 Mon Sep 17 00:00:00 2001 From: Mathieu Courtois Date: Wed, 27 Nov 2024 18:15:19 +0100 Subject: [PATCH 02/19] [#34254] medcoupling should be checked even if med is not found --- waftools/med_cfg.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/waftools/med_cfg.py b/waftools/med_cfg.py index 30ff61211c..6007d2a88f 100644 --- a/waftools/med_cfg.py +++ b/waftools/med_cfg.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -111,6 +111,13 @@ def configure(self): self.define("ASTER_HAVE_MED", 1) self.env.BUILD_MED = True + try: + self.env.stash() + self.check_medcoupling() + except Errors.ConfigurationError: + self.reset_msg() + self.env.revert() + ############################################################################### @@ -239,7 +246,6 @@ def check_med(self): self.check_sizeof_med_idt() self.check_med_version() self.check_med_python() - self.check_medcoupling() @Configure.conf From efbace5a701295717632b7799d943a269615da62 Mon Sep 17 00:00:00 2001 From: Mathieu Courtois Date: Sat, 30 Nov 2024 09:10:22 +0100 Subject: [PATCH 03/19] [#34263] update use of matplotlib api --- code_aster/Objects/table_graph.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/code_aster/Objects/table_graph.py b/code_aster/Objects/table_graph.py index ba89184bb5..a9cbe4a461 100644 --- a/code_aster/Objects/table_graph.py +++ b/code_aster/Objects/table_graph.py @@ -48,7 +48,6 @@ class Graph: - """Cette classe définit l'objet Graph pour Code_Aster. Important : Utiliser les méthodes dédiées à la manipulation des données @@ -362,7 +361,6 @@ def __repr__(self): class TraceGraph: - """ Cette classe définit le tracé d'un objet Graph dans un fichier. @@ -497,7 +495,6 @@ def Trace(self): # ------------------------------------------------------------------------------ # ------------------------------------------------------------------------ class TraceTableau(TraceGraph): - """ Impression d'un objet Graph sous forme d'un tableau de colonnes, on suppose que les courbes partagent la même liste d'abscisse à 'EPSILON' @@ -582,7 +579,6 @@ def Trace(self): class TraceXmgrace(TraceGraph): - """ Impression d'un objet Graph au format XMGRACE. Attribut supplémentaire : .PILOTE @@ -1046,7 +1042,6 @@ def Trace(self): class TraceAgraf(TraceGraph): - """ Impression d'un objet Graph au format AGRAF. """ @@ -1277,8 +1272,7 @@ def Trace(self): alpha=1.0, zorder=10, ) - table_props = agg.properties() - table_cells = table_props["child_artists"] + table_cells = agg.get_children() for cell in table_cells: txt = cell.get_text().get_text() if "Freq" in txt or "Damp" in txt: @@ -1307,8 +1301,7 @@ def Trace(self): zorder=10, fontsize=32, ) - table_props = legend.properties() - table_cells = table_props["child_artists"] + table_cells = legend.get_children() table_cells[2].set_height(0.05) table_cells[1].set_height(0.05) table_cells[0].set_height(0.1) From 4677f60c06a8f784f9f210a58c139650e07bfde2 Mon Sep 17 00:00:00 2001 From: Mathieu Courtois Date: Mon, 2 Dec 2024 09:26:29 +0100 Subject: [PATCH 04/19] [#34264] fix maximum number of iterations --- astest/zzzz239a.comm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/astest/zzzz239a.comm b/astest/zzzz239a.comm index ba1173ba62..1eb57a29fb 100644 --- a/astest/zzzz239a.comm +++ b/astest/zzzz239a.comm @@ -156,12 +156,10 @@ U1 = STAT_NON_LINE( # Test des itérations iterations = RECU_TABLE(CO=U1, NOM_PARA="ITER_GLOB") -tab_iter = iterations.EXTR_TABLE().dict_CREA_TABLE() -val_itermax = max(tab_iter["LISTE"][1]["LISTE_I"]) -print("Nombre iteration max", val_itermax) +tab_iter = iterations.EXTR_TABLE() +val_itermax = max(tab_iter.ITER_GLOB.values()) test = CA.TestCase() -test.assertLessEqual(val_itermax, 8) - +test.assertLessEqual(val_itermax, 10) FIN() From 13d6c1ee63e1389502e345eef3e46e363ab84d4d Mon Sep 17 00:00:00 2001 From: Veronique Le Corvec Date: Fri, 29 Nov 2024 14:29:19 +0100 Subject: [PATCH 05/19] [#34216] Update CALC_VALE with cronos value --- astest/ssll501b.comm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astest/ssll501b.comm b/astest/ssll501b.comm index 7ea0e3c7a2..7e3d4ccaef 100644 --- a/astest/ssll501b.comm +++ b/astest/ssll501b.comm @@ -245,7 +245,7 @@ TEST_RESU( RESULTAT=RESU, REFERENCE="SOURCE_EXTERNE", PRECISION=0.03, - VALE_CALC=-364953.18753, + VALE_CALC=-364952.84948, VALE_REFE=-3.55000e5, NOM_CHAM="EFGE_NOEU", NOM_CMP="MT", From 804156e659ee90fab49d74b170f645c9d8696508 Mon Sep 17 00:00:00 2001 From: Veronique Le Corvec Date: Fri, 29 Nov 2024 15:19:22 +0100 Subject: [PATCH 06/19] [#34213] Update PRECISION ssll04a --- astest/ssll04a.comm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/astest/ssll04a.comm b/astest/ssll04a.comm index 6f3fc37860..8e9c56d3ed 100644 --- a/astest/ssll04a.comm +++ b/astest/ssll04a.comm @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -243,7 +243,7 @@ TEST_RESU( VALE_REFE=-2.9762e-02, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=3.791801e-01 / 100.0, + PRECISION=0.005, ), _F( NUME_ORDRE=1, @@ -255,7 +255,7 @@ TEST_RESU( VALE_REFE=1.6071e-01, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=4.050915e-01 / 100.0, + PRECISION=0.005, ), _F( NUME_ORDRE=1, @@ -267,7 +267,7 @@ TEST_RESU( VALE_REFE=-3.7004e-01, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=3.877914e-01 / 100.0, + PRECISION=0.005, ), ) ) @@ -284,7 +284,7 @@ TEST_RESU( VALE_REFE=8437.5, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=4.024140e-01 / 100, + PRECISION=0.005, ), _F( NUME_ORDRE=1, @@ -296,7 +296,7 @@ TEST_RESU( VALE_REFE=-1562.5, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=3.666341e-01 / 100, + PRECISION=0.005, ), _F( NUME_ORDRE=1, @@ -308,7 +308,7 @@ TEST_RESU( VALE_REFE=-3125, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=3.795008e-01 / 100, + PRECISION=0.005, ), _F( NUME_ORDRE=1, @@ -320,7 +320,7 @@ TEST_RESU( VALE_REFE=1562.5, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=3.795008e-01 / 100, + PRECISION=0.005, ), _F( NUME_ORDRE=1, @@ -332,7 +332,7 @@ TEST_RESU( VALE_REFE=8437.5, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=3.895462e-01 / 100, + PRECISION=0.005, ), _F( NUME_ORDRE=1, @@ -344,7 +344,7 @@ TEST_RESU( VALE_REFE=3125, REFERENCE="SOURCE_EXTERNE", CRITERE="RELATIF", - PRECISION=3.795010e-01 / 100, + PRECISION=0.005, ), ) ) From 28c4e10d008213b29847cc434346fca4cd63c7ac Mon Sep 17 00:00:00 2001 From: Veronique Le Corvec Date: Fri, 29 Nov 2024 16:10:49 +0100 Subject: [PATCH 07/19] [#34262] Ignore Alarm for sequentiel tests --- astest/erreu11a.export | 2 +- astest/ssna102g.comm | 4 ++-- astest/ssnp158b.comm | 2 +- astest/zzzz253a.comm | 4 ++-- astest/zzzz505b.py | 4 +--- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/astest/erreu11a.export b/astest/erreu11a.export index 2e61f5963e..66143dd0a2 100644 --- a/astest/erreu11a.export +++ b/astest/erreu11a.export @@ -3,7 +3,7 @@ P memory_limit 1000 P ncpus 1 P mpi_nbcpu 1 P mpi_nbnoeud 1 -P testlist submit verification sequential +P testlist submit verification parallel F comm erreu11a.comm D 1 F mmed erreu11a.mmed D 20 diff --git a/astest/ssna102g.comm b/astest/ssna102g.comm index 492074dafb..d50871471d 100644 --- a/astest/ssna102g.comm +++ b/astest/ssna102g.comm @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -17,7 +17,7 @@ # along with code_aster. If not, see . # -------------------------------------------------------------------- -DEBUT(CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="EXCEPTION"), DEBUG=_F(SDVERI="OUI")) +DEBUT(CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="ALARME"), DEBUG=_F(SDVERI="OUI")) # -------------------------------------------------------------------- # LECTURE DU MAILLAGE ET CREATION DE GROUPES DE NOEUDS diff --git a/astest/ssnp158b.comm b/astest/ssnp158b.comm index 5488912ce6..520b62fb25 100644 --- a/astest/ssnp158b.comm +++ b/astest/ssnp158b.comm @@ -17,7 +17,7 @@ # along with code_aster. If not, see . # -------------------------------------------------------------------- -DEBUT(CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="EXCEPTION")) +DEBUT(CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="ALARME")) NbIncr = 20 DT = 10.0 / NbIncr diff --git a/astest/zzzz253a.comm b/astest/zzzz253a.comm index fb4180670b..0fcd09e77c 100644 --- a/astest/zzzz253a.comm +++ b/astest/zzzz253a.comm @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -17,7 +17,7 @@ # along with code_aster. If not, see . # -------------------------------------------------------------------- -DEBUT(CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="EXCEPTION"), DEBUG=_F(SDVERI="OUI")) +DEBUT(CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="ALARME"), DEBUG=_F(SDVERI="OUI")) # =============================================================================================================== # # La structure est un barreau de longueur 10. diff --git a/astest/zzzz505b.py b/astest/zzzz505b.py index be8d87be94..e97a3a2e25 100644 --- a/astest/zzzz505b.py +++ b/astest/zzzz505b.py @@ -22,9 +22,7 @@ from code_aster import CA from code_aster.Utilities import haveMPI -DEBUT( - CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="EXCEPTION"), DEBUG=_F(SDVERI="OUI"), INFO=1 -) +DEBUT(CODE=_F(NIV_PUB_WEB="INTERNET"), ERREUR=_F(ALARME="ALARME"), DEBUG=_F(SDVERI="OUI"), INFO=1) test = CA.TestCase() From eff3b39a4dc52db3b7d03385c8312e169fbfe588 Mon Sep 17 00:00:00 2001 From: Etienne Cheignon Date: Fri, 29 Nov 2024 10:13:42 +0100 Subject: [PATCH 08/19] [#34211] Fix error in copich.F90 --- astest/zzzz511a.comm | 32 ++++++++++++++++++++++++++++++++ bibfor/utilitai/copich.F90 | 4 ++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/astest/zzzz511a.comm b/astest/zzzz511a.comm index ba89571c98..d7b08d28f6 100644 --- a/astest/zzzz511a.comm +++ b/astest/zzzz511a.comm @@ -243,6 +243,38 @@ evol_me = STAT_NON_LINE( ), ) +# pour vérifier la correction de issue34211 +# ----------------------------------------- +CALC_CHAMP( + reuse=evol_me, + RESULTAT=evol_me, + DEFORMATION=("EPSI_ELGA"), + TOUT_ORDRE="OUI", + GROUP_MA=("massif", "grille", "coque"), +) + +CALC_CHAMP( + reuse=evol_me, + RESULTAT=evol_me, + DEFORMATION=("EPSI_ELNO"), + TOUT_ORDRE="OUI", + GROUP_MA=("massif",), +) + +evol_cyl = MODI_REPERE( + RESULTAT=evol_me, + MODI_CHAM=( + _F(NOM_CHAM="EPSI_ELGA", TYPE_CHAM="TENS_3D"), + _F(NOM_CHAM="EPSI_ELNO", TYPE_CHAM="TENS_3D"), + ), + REPERE="CYLINDRIQUE", + AFFE=_F(ORIGINE=(10000.0, 0.0, 0.0), AXE_Z=(0.0, 0.0, 1.0), TOUT="OUI"), +) + +IMPR_RESU(UNITE=6, FORMAT="RESULTAT", RESU=(_F(RESULTAT=evol_cyl, NOM_CHAM="EPSI_ELGA"),)) +# fin de la vérification + + iterations = RECU_TABLE(CO=evol_me, NOM_PARA="ITER_GLOB") diff --git a/bibfor/utilitai/copich.F90 b/bibfor/utilitai/copich.F90 index 464f3c0625..dbcfb1cf89 100644 --- a/bibfor/utilitai/copich.F90 +++ b/bibfor/utilitai/copich.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -125,7 +125,7 @@ subroutine copich(base, ch1z, ch2z) call getres(nomu, concep, cmd) call dismoi('NOM_LIGREL', ch2, 'CHAM_ELEM', repk=ligr) if (ligr(1:8) .ne. nomu .and. ligr(9:15) .ne. '.MODELE') then - noojb = '12345678.LIGR000000' + noojb = '12345678.LIGR000000.LIEL' call gnomsd(' ', noojb, 14, 19) ligr2 = noojb(1:19) call copisd('LIGREL', base, ligr, ligr2) From c6226c4a306add29f4d891ac4fa34324b2664b48 Mon Sep 17 00:00:00 2001 From: Etienne Cheignon Date: Thu, 28 Nov 2024 18:55:53 +0100 Subject: [PATCH 09/19] [#33857] Add fields RESI_NOEU and RESI_RELA_NOEU to thermical results --- astest/ttlp100b.comm | 8 ++++++-- bibfor/resu_util/rscrsd.F90 | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/astest/ttlp100b.comm b/astest/ttlp100b.comm index b5f0dc80f7..79b1846752 100644 --- a/astest/ttlp100b.comm +++ b/astest/ttlp100b.comm @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -137,9 +137,13 @@ RESUTHER = THER_NON_LINE( EXCIT=(_F(CHARGE=CHATHER), _F(CHARGE=CHATIMP)), INCREMENT=_F(LIST_INST=LINST, NUME_INST_FIN=15), ETAT_INIT=_F(CHAM_NO=TEMPINIT), - ARCHIVAGE=_F(PAS_ARCH=10), + ARCHIVAGE=_F(PAS_ARCH=10, CHAM_EXCLU=("FLUX_ELGA")), ) +IMPR_RESU(UNITE=6, FORMAT="RESULTAT", RESU=_F(RESULTAT=RESUTHER)) + +FIN() + RESUTHER = THER_NON_LINE( reuse=RESUTHER, RESULTAT=RESUTHER, diff --git a/bibfor/resu_util/rscrsd.F90 b/bibfor/resu_util/rscrsd.F90 index d2e01c3bae..5f861dd3b8 100644 --- a/bibfor/resu_util/rscrsd.F90 +++ b/bibfor/resu_util/rscrsd.F90 @@ -65,7 +65,7 @@ subroutine rscrsd(baseZ, resultNameZ, resultTypeZ, nbStore) ! ------------------------------------------------------------------ ! For thermic ! ------------------------------------------------------------------ - integer, parameter :: nbFieldTher = 23 + integer, parameter :: nbFieldTher = 25 character(len=16), parameter :: fieldTher(nbFieldTher) = (/ & 'TEMP ', & 'FLUX_ELGA ', 'FLUX_ELNO ', 'FLUX_NOEU ', & @@ -75,7 +75,8 @@ subroutine rscrsd(baseZ, resultNameZ, resultTypeZ, nbStore) 'HYDR_ELGA ', 'HYDR_ELNO ', 'HYDR_NOEU ', & 'SOUR_ELGA ', 'COMPORTHER ', 'COMPORMETA ', & 'ERTH_ELEM ', 'ERTH_ELNO ', 'ERTH_NOEU ', & - 'TEMP_ELGA ', 'HHO_TEMP '/) + 'TEMP_ELGA ', 'HHO_TEMP ', & + 'RESI_NOEU ', 'RESI_RELA_NOEU '/) ! ------------------------------------------------------------------ ! For external state variables From 9d68acb82ed56bdcc68dfd61ab7db058d9b23fe4 Mon Sep 17 00:00:00 2001 From: Etienne Cheignon Date: Fri, 29 Nov 2024 11:22:56 +0100 Subject: [PATCH 10/19] [#33926] Use MOHR_COULOMB without giving parameter ALPHA --- astest/ssnv232a.comm | 4 ++-- bibfor/comport/lcmohr.F90 | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/astest/ssnv232a.comm b/astest/ssnv232a.comm index 0c31a4e9e6..50ac1118ab 100644 --- a/astest/ssnv232a.comm +++ b/astest/ssnv232a.comm @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -60,7 +60,7 @@ TEMPS1 = DEFI_LIST_REEL( # ESSAI TRIAXIAL NON DRAINE CYCLIQUE # *********************************************************************** SOL = DEFI_MATERIAU( - ELAS=_F(E=YOUNG, NU=POISSON, ALPHA=0.0), MOHR_COULOMB=_F(PHI=33.0, ANGDIL=27.0, COHESION=1.0e3) + ELAS=_F(E=YOUNG, NU=POISSON), MOHR_COULOMB=_F(PHI=33.0, ANGDIL=27.0, COHESION=1.0e3) ) COEF1 = DEFI_FONCTION(NOM_PARA="INST", PROL_DROITE="CONSTANT", VALE=(0.0, 0.0, temps_max, 0.0)) diff --git a/bibfor/comport/lcmohr.F90 b/bibfor/comport/lcmohr.F90 index 60951f8f14..faee345a44 100644 --- a/bibfor/comport/lcmohr.F90 +++ b/bibfor/comport/lcmohr.F90 @@ -182,10 +182,13 @@ subroutine lcmohr(ndim, & ! ! Reading material linear elastic properties nomres(1) = 'ALPHA ' - nomres(2) = 'E ' - nomres(3) = 'NU ' call rcvala(imate, ' ', 'ELAS', 0, ' ', & - [0.d0], 3, nomres, rprops, icode, 2) + [0.d0], 1, nomres, rprops, icode, 0) + if (icode(1) .ne. 0) rprops(1) = 0.d0 + nomres(1) = 'E ' + nomres(2) = 'NU ' + call rcvala(imate, ' ', 'ELAS', 0, ' ', & + [0.d0], 2, nomres, rprops(2:3), icode(2:3), 2) ! ! Reading material Mohr-Coulomb properties nomres(1) = 'PHI ' From 26fd1320fc37bd055ed15177b1c3c9373ffe4934 Mon Sep 17 00:00:00 2001 From: Etienne Cheignon Date: Fri, 29 Nov 2024 16:16:50 +0100 Subject: [PATCH 11/19] [#31442] Extend keyword AXIS to all TYPE_RESU_MECA in POST_RCCM --- bibfor/include/asterfort/rcevol.h | 5 +++-- bibfor/op/op0165.F90 | 14 +++++++++++--- bibfor/postrele/rcevol.F90 | 14 ++++++-------- code_aster/Cata/Commands/post_rccm.py | 16 ++++++++-------- code_aster/Messages/postrccm.py | 9 ++++++++- 5 files changed, 36 insertions(+), 22 deletions(-) diff --git a/bibfor/include/asterfort/rcevol.h b/bibfor/include/asterfort/rcevol.h index b6b57e9cab..4cd6e84081 100644 --- a/bibfor/include/asterfort/rcevol.h +++ b/bibfor/include/asterfort/rcevol.h @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2017 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -19,11 +19,12 @@ ! ! interface - subroutine rcevol(typtab, nommat, symax, nbopt, option) + subroutine rcevol(typtab, nommat, symax, nbopt, option, lsymm) character(len=16) :: typtab character(len=8) :: nommat real(kind=8) :: symax integer :: nbopt character(len=16) :: option(*) + aster_logical, intent(in) :: lsymm end subroutine rcevol end interface diff --git a/bibfor/op/op0165.F90 b/bibfor/op/op0165.F90 index 0990e0d36d..c78c6a96f4 100644 --- a/bibfor/op/op0165.F90 +++ b/bibfor/op/op0165.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -47,7 +47,8 @@ subroutine op0165() character(len=16) :: typtab, typmec, kopt(4) character(len=24) :: option integer :: n1, nbopt, icodre - character(len=8) :: nommat + character(len=8) :: nommat, symm + aster_logical :: lsymm ! ! DEB ------------------------------------------------------------------ ! @@ -58,6 +59,13 @@ subroutine op0165() call getvtx(' ', 'TYPE_RESU', scal=typtab, nbret=n1) ! call getvtx(' ', 'TYPE_RESU_MECA', scal=typmec, nbret=n1) +! + call getvtx(' ', 'AXIS', scal=symm, nbret=n1) + lsymm = .false. + if (symm .eq. 'OUI') lsymm = .true. + if (lsymm .and. typmec .ne. 'EVOLUTION') then + call utmess('F', 'POSTRCCM_59') + end if ! ! ------------------------------------------------------------------ ! @@ -79,7 +87,7 @@ subroutine op0165() call utmess('F', 'POSTRCCM_7', sk='RCCM') end if ! - call rcevol(typtab, nommat, symax, nbopt, kopt) + call rcevol(typtab, nommat, symax, nbopt, kopt, lsymm) ! ! ------------------------------------------------------------------ ! diff --git a/bibfor/postrele/rcevol.F90 b/bibfor/postrele/rcevol.F90 index a1b67cc845..bd198a1862 100644 --- a/bibfor/postrele/rcevol.F90 +++ b/bibfor/postrele/rcevol.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ ! along with code_aster. If not, see . ! -------------------------------------------------------------------- ! -subroutine rcevol(typtab, nommat, symax, nbopt, option) +subroutine rcevol(typtab, nommat, symax, nbopt, option, lsymm) implicit none #include "asterf_types.h" #include "jeveux.h" @@ -40,6 +40,7 @@ subroutine rcevol(typtab, nommat, symax, nbopt, option) real(kind=8) :: symax character(len=8) :: nommat character(len=16) :: typtab, option(*) + aster_logical, intent(in) :: lsymm ! ! OPERATEUR POST_RCCM: TYPE_ANALYSE = 'COMPOSANT' ! TYPE_RESU_MECA = 'EVOLUTION' @@ -48,8 +49,8 @@ subroutine rcevol(typtab, nommat, symax, nbopt, option) ! integer :: i, j, n1, nbinti, jinti, nbtran real(kind=8) :: para(3), sm - aster_logical :: lpmpb, lsn, lfatig, flexio, lrocht, lamorc, kemixt, lsymm - character(len=8) :: typeke, symm + aster_logical :: lpmpb, lsn, lfatig, flexio, lrocht, lamorc, kemixt + character(len=8) :: typeke character(len=16) :: kinti character(len=24) :: cinst, csili, csiex, csno, csne, csneo, csnee, cspo character(len=24) :: cspe, cfao, cfae, cnoc, cresu, cresp, intitu, cspto @@ -109,11 +110,8 @@ subroutine rcevol(typtab, nommat, symax, nbopt, option) flexio = .false. lrocht = .false. lamorc = .false. - lsymm = .false. ! - call getvtx(' ', 'AXIS', scal=symm, nbret=n1) - if (symm .eq. 'OUI') then - lsymm = .true. + if (lsymm) then call utmess('I', 'POSTRCCM_58') end if ! diff --git a/code_aster/Cata/Commands/post_rccm.py b/code_aster/Cata/Commands/post_rccm.py index b210e816c5..172be5c704 100644 --- a/code_aster/Cata/Commands/post_rccm.py +++ b/code_aster/Cata/Commands/post_rccm.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -37,6 +37,13 @@ TYPE_RESU_MECA=SIMP( statut="o", typ="TXM", into=("EVOLUTION", "ZE200a", "ZE200b", "B3200", "B3600") ), + AXIS=SIMP( + statut="f", + typ="TXM", + defaut="NON", + into=("NON", "OUI"), + fr=tr("Indiquer si le modèle est axisymétrique"), + ), # ====================================================================== b_evolution=BLOC( condition="""equal_to("TYPE_RESU_MECA", 'EVOLUTION') and not equal_to("TYPE_RESU","SYSTUS")""", @@ -60,13 +67,6 @@ into=("KE_MECA", "KE_MIXTE"), fr=tr("Ke meca seul ou partition mecanique + thermique"), ), - AXIS=SIMP( - statut="f", - typ="TXM", - defaut="NON", - into=("NON", "OUI"), - fr=tr("Indiquer si le modèle est axisymétrique"), - ), RAYON_MOYEN=SIMP( statut="f", typ="R", defaut=-1.0, fr=tr("La courbure attribuées à la ligne coupe") ), diff --git a/code_aster/Messages/postrccm.py b/code_aster/Messages/postrccm.py index 0e7b42bf91..df212415d7 100644 --- a/code_aster/Messages/postrccm.py +++ b/code_aster/Messages/postrccm.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2022 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -368,6 +368,13 @@ 58: _( """ La prise en compte de l'axisymétrie est activée, la concordance avec le modèle n'est pas vérifiée par le code +""" + ), + 59: _( + """ +L'axisymétrie est correctement prise en compte uniquement +pour la valeur EVOLUTION de TYPE_RESU_MECA. Pour les autres valeurs les +calculs axisymétriques sont interdits. """ ), } From 14779aca5b8961692ecba644cc714b82bb285573 Mon Sep 17 00:00:00 2001 From: Etienne Cheignon Date: Mon, 2 Dec 2024 14:19:38 +0100 Subject: [PATCH 12/19] [#33857] Fix an error with COMB_FOURIER --- astest/ttlp100b.comm | 4 ---- bibfor/resu_util/rscrsd.F90 | 7 +++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/astest/ttlp100b.comm b/astest/ttlp100b.comm index 79b1846752..1895a7f7d8 100644 --- a/astest/ttlp100b.comm +++ b/astest/ttlp100b.comm @@ -140,10 +140,6 @@ RESUTHER = THER_NON_LINE( ARCHIVAGE=_F(PAS_ARCH=10, CHAM_EXCLU=("FLUX_ELGA")), ) -IMPR_RESU(UNITE=6, FORMAT="RESULTAT", RESU=_F(RESULTAT=RESUTHER)) - -FIN() - RESUTHER = THER_NON_LINE( reuse=RESUTHER, RESULTAT=RESUTHER, diff --git a/bibfor/resu_util/rscrsd.F90 b/bibfor/resu_util/rscrsd.F90 index 5f861dd3b8..679d7220d3 100644 --- a/bibfor/resu_util/rscrsd.F90 +++ b/bibfor/resu_util/rscrsd.F90 @@ -417,7 +417,8 @@ subroutine rscrsd(baseZ, resultNameZ, resultTypeZ, nbStore) nbField = nbFieldMeca+nbFieldTher ! Beware : TEMP_ELGA is in fieldMeca and fieldTher ! Do not create twice - nbField = nbField-1 +! RESI_NOEU and RESI_RELA_NOEU too + nbField = nbField-3 ! call jeecra(resultName//'.DESC', 'NOMMAX', nbField) call jeecra(resultName//'.DESC', 'DOCU', cval='COFO') @@ -425,7 +426,9 @@ subroutine rscrsd(baseZ, resultNameZ, resultTypeZ, nbStore) call jecroc(jexnom(resultName//'.DESC', fieldMeca(iField))) end do do iField = 1, nbFieldTher - if (fieldTher(iField) (1:9) .ne. 'TEMP_ELGA') then + if (fieldTher(iField) (1:9) .ne. 'TEMP_ELGA' & + .and. fieldTher(iField) (1:9) .ne. 'RESI_NOEU' & + .and. fieldTher(iField) (1:14) .ne. 'RESI_RELA_NOEU') then call jecroc(jexnom(resultName//'.DESC', fieldTher(iField))) end if end do From fbc6b9ff439e069552f8c13cda091d8fc2be3049 Mon Sep 17 00:00:00 2001 From: Nicolas Sellenet Date: Tue, 3 Dec 2024 11:26:53 +0100 Subject: [PATCH 13/19] [#34218] change MAX_CHILDS in aster_mpi.h --- bibc/include/aster_mpi.h | 2 +- bibfor/parallel/build_tree_comm.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bibc/include/aster_mpi.h b/bibc/include/aster_mpi.h index 18d968c878..bb790b0636 100644 --- a/bibc/include/aster_mpi.h +++ b/bibc/include/aster_mpi.h @@ -54,7 +54,7 @@ * - nbchild: number of childs * - name: for nicer print and debug */ -#define MAX_CHILDS 200 +#define MAX_CHILDS 2000 #define NAME_LENGTH 16 #ifdef __cplusplus diff --git a/bibfor/parallel/build_tree_comm.F90 b/bibfor/parallel/build_tree_comm.F90 index 7af8a1a8b7..f5ab924c3e 100644 --- a/bibfor/parallel/build_tree_comm.F90 +++ b/bibfor/parallel/build_tree_comm.F90 @@ -85,7 +85,6 @@ subroutine build_tree_comm(domdist, nbdom, pgid, mpicou, comm, tag) goto 999 end if ! - ASSERT(nbdom < 100) comm(1:nbdom) = -1 tag(1:nbdom) = -1 nb_comm = 0 @@ -97,6 +96,7 @@ subroutine build_tree_comm(domdist, nbdom, pgid, mpicou, comm, tag) valtmp = pgid(domdist(i_dom)+1) if (valtmp > rank) then nbdom_inf = nbdom_inf+1 + ASSERT(nbdom_inf .le. 50) domtmp(nbdom_inf) = valtmp end if end do From 823827307c8a1ddccbd34ffd0df4d3ed6696bd9c Mon Sep 17 00:00:00 2001 From: Mathieu Courtois Date: Mon, 2 Dec 2024 13:52:18 +0100 Subject: [PATCH 14/19] [#34263] prefer use ASTER_COMM_WORLD --- astest/zzzz155a.py | 2 +- astest/zzzz155i.py | 2 +- astest/zzzz503o.py | 2 +- code_aster/ObjectsExt/parallelmesh_ext.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/astest/zzzz155a.py b/astest/zzzz155a.py index 0480706ae0..46bcb02bd6 100644 --- a/astest/zzzz155a.py +++ b/astest/zzzz155a.py @@ -30,7 +30,7 @@ def checkJoints(mesh): - comm = MPI.COMM_WORLD + comm = MPI.ASTER_COMM_WORLD l2G = mesh.getLocalToGlobalNodeIds() j = 0 diff --git a/astest/zzzz155i.py b/astest/zzzz155i.py index 1c49676771..0d49fae9c5 100644 --- a/astest/zzzz155i.py +++ b/astest/zzzz155i.py @@ -30,7 +30,7 @@ def checkJoints(mesh): - comm = MPI.COMM_WORLD + comm = MPI.ASTER_COMM_WORLD l2G = mesh.getLocalToGlobalNodeIds() j = 0 diff --git a/astest/zzzz503o.py b/astest/zzzz503o.py index 1e63d1ddec..000d864640 100644 --- a/astest/zzzz503o.py +++ b/astest/zzzz503o.py @@ -44,7 +44,7 @@ def checkJoints(mesh): - comm = MPI.COMM_WORLD + comm = MPI.ASTER_COMM_WORLD l2G = mesh.getLocalToGlobalNodeIds() j = 0 diff --git a/code_aster/ObjectsExt/parallelmesh_ext.py b/code_aster/ObjectsExt/parallelmesh_ext.py index 211b986018..0a541cf662 100644 --- a/code_aster/ObjectsExt/parallelmesh_ext.py +++ b/code_aster/ObjectsExt/parallelmesh_ext.py @@ -160,7 +160,7 @@ def checkConsistency(self, filename): return MPI.ASTER_COMM_WORLD.bcast(test, root=0) def checkJoints(self): - comm = MPI.COMM_WORLD + comm = MPI.ASTER_COMM_WORLD rank = MPI.ASTER_COMM_WORLD.Get_rank() l2G = self.getLocalToGlobalNodeIds() graph = CommGraph() From f9f9039a17f90616edf509759bc8aa1354711947 Mon Sep 17 00:00:00 2001 From: Mathieu Courtois Date: Wed, 4 Dec 2024 10:11:23 +0100 Subject: [PATCH 15/19] [#34263] add salome_meca _std build environment --- env.d/salome_meca_std.sh | 38 ++++++++++++++++++++++++++++++++++++++ mfront/wscript | 4 ++-- run_aster/run.py | 1 + 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 env.d/salome_meca_std.sh diff --git a/env.d/salome_meca_std.sh b/env.d/salome_meca_std.sh new file mode 100644 index 0000000000..8586ca382c --- /dev/null +++ b/env.d/salome_meca_std.sh @@ -0,0 +1,38 @@ +# This file set the environment for code_aster. +# Configuration to use prerequisites from salome_meca installation + +if [ ! -z "${ROOT_SALOME_INSTALL}" ]; then + export DEVTOOLS_COMPUTER_ID=salome_meca + export BUILD=std + export ENABLE_MPI=0 + + libpaths=$( sed -e 's/:/ /g' <<< "${LD_LIBRARY_PATH}" ) + components=( "HDF5" "MED:MEDFILE" "MFRONT:MFRONT_TESTING" "MGIS:MGIS_TESTING" + "METIS:METIS_ASTER" "SCOTCH:SCOTCH_TESTING" + "MUMPS:MUMPS_TESTING" ) + # "PARMETIS" "PETSC" "PETSC4PY" "NUMPY" "MPI" + for comp in ${components[@]} + do + prod=$(awk -F: '{if (NF==2) {print $2} else {print $1}}' <<< "${comp}") + comp=$(awk -F: '{print $1}' <<< "${comp}") + rootdir="$(eval echo \$${prod}_ROOT_DIR)" + if [ "${comp}" = "MUMPS" ] || [ "${comp}" = "SCOTCH" ]; then + rootdir="${rootdir}/SEQ" + fi + export LIBPATH_${comp}="${rootdir}/lib" + export INCLUDES_${comp}="${rootdir}/include" + if [ -z "${INCLUDES}" ]; then + export INCLUDES="${rootdir}/include" + else + export INCLUDES="${INCLUDES}:${rootdir}/include" + fi + if [ "${comp}" = "MUMPS" ]; then + export INCLUDES_MUMPS="${INCLUDES_MUMPS} ${rootdir}/include_seq" + export INCLUDES="${INCLUDES}:${rootdir}/include_seq" + fi + done + export TFELHOME="${MFRONT_TESTING_ROOT_DIR}" + export TFELVERS="4.2.0" +else + echo "SALOME environment not found, please use 'salome shell' before starting configure." +fi diff --git a/mfront/wscript b/mfront/wscript index 5f0dcf0607..444eca5cbc 100644 --- a/mfront/wscript +++ b/mfront/wscript @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -89,7 +89,7 @@ def build(self): @Configure.conf def check_mgis(self): opts = self.options - if opts.enable_mfront == False: + if opts.enable_mfront is False: raise Errors.ConfigurationError("MGIS disabled") # for MGIS self.check_mgis_headers() diff --git a/run_aster/run.py b/run_aster/run.py index a3edb2bd07..67584c9e08 100644 --- a/run_aster/run.py +++ b/run_aster/run.py @@ -278,6 +278,7 @@ def _get_cmdline_exec(self, commfile, idx): else: cmd.append(CFG.get("python_interactive", python)) wrapped = CFG.get("python_interactive_is_wrapped") + # 'python3 -m mpi4py -i' does not work cmd.append("-i") # To show executed lines with trace module: # import sys From 078d448a9f6a6bd4fa95dcfbc5d960dcffdfaf2b Mon Sep 17 00:00:00 2001 From: Francesco Bettonte Date: Wed, 4 Dec 2024 13:44:17 +0100 Subject: [PATCH 16/19] [#34274] Use time instead of rank in calc_mate_homo --- astest/zzzz142a.comm | 11 ++++- .../MateHomo/mate_homo_massif.py | 40 ++++++++++--------- .../MacroCommands/MateHomo/mate_homo_ops.py | 2 +- .../MateHomo/mate_homo_plaque.py | 22 +++++----- .../MateHomo/mate_homo_utilities.py | 31 ++++++++------ 5 files changed, 61 insertions(+), 45 deletions(-) diff --git a/astest/zzzz142a.comm b/astest/zzzz142a.comm index 670b43ccbf..9ee929dd87 100644 --- a/astest/zzzz142a.comm +++ b/astest/zzzz142a.comm @@ -46,7 +46,7 @@ for VARFIELD, PHENOM in (("DEPL", "MECANIQUE"), ("TEMP", "THERMIQUE")): ZERO = DEFI_CONSTANTE(VALE=0.0) FCONST = DEFI_FONCTION( - NOM_PARA=VARC, VALE=(vale_varc, 1), PROL_GAUCHE="CONSTANT", PROL_DROITE="CONSTANT" + NOM_PARA=VARC, VALE=(vale_varc, 1), PROL_GAUCHE="EXCLU", PROL_DROITE="EXCLU" ) MATE = DEFI_MATERIAU( @@ -70,6 +70,12 @@ for VARFIELD, PHENOM in (("DEPL", "MECANIQUE"), ("TEMP", "THERMIQUE")): AFFE=_F(GROUP_MA=group_ma[MODELISATION], NOM_CMP=VARC, VALE=vale_varc), ) + RESUVARC = CREA_RESU( + OPERATION="AFFE", + TYPE_RESU="EVOL_VARC", + AFFE=_F(NOM_CHAM=VARC, CHAM_GD=FIELDVARC, INST=vale_varc), + ) + FIELD = CREA_CHAMP( TYPE_CHAM="NOEU_%s_R" % VARFIELD, OPERATION="AFFE", @@ -81,7 +87,7 @@ for VARFIELD, PHENOM in (("DEPL", "MECANIQUE"), ("TEMP", "THERMIQUE")): ), ) - affevarckw = {"TOUT": "OUI", "NOM_VARC": VARC, "CHAM_GD": FIELDVARC} + affevarckw = {"TOUT": "OUI", "NOM_VARC": VARC, "EVOL": RESUVARC} if VARC == "TEMP": affevarckw["VALE_REF"] = 20 @@ -94,6 +100,7 @@ for VARFIELD, PHENOM in (("DEPL", "MECANIQUE"), ("TEMP", "THERMIQUE")): EPOT = POST_ELEM( CHAM_GD=FIELD, + INST=vale_varc, MODELE=MOD, CHAM_MATER=CHMAT, ENER_POT=_F(GROUP_MA=group_ma[MODELISATION]), diff --git a/code_aster/MacroCommands/MateHomo/mate_homo_massif.py b/code_aster/MacroCommands/MateHomo/mate_homo_massif.py index df10c45dae..a75ef9b4cf 100644 --- a/code_aster/MacroCommands/MateHomo/mate_homo_massif.py +++ b/code_aster/MacroCommands/MateHomo/mate_homo_massif.py @@ -364,36 +364,38 @@ def calc_tabpara_massif(DEPLMATE, volume_ver, ls_group_ma, varc_name, ls_varc, * CORR_THER22 = fields["CORR_THER22"] CORR_THER33 = fields["CORR_THER33"] - ranks_meca = CORR_MECA11.getAccessParameters()["NUME_ORDRE"] - ranks_ther = CORR_THER11.getAccessParameters()["NUME_ORDRE"] + insts_meca = CORR_MECA11.getAccessParameters()["INST"] + insts_ther = CORR_THER11.getAccessParameters()["INST"] - ASSERT(len(ranks_meca) == len(ranks_ther) == len(ls_varc)) + ASSERT(len(insts_meca) == len(insts_ther) == len(ls_varc)) dictpara = utilities.create_empty_dictpara([varc_name] + PARAMASSIF) loimel = calc_loimel_massif(DEPLMATE, ls_group_ma) tda = utilities.get_temp_def_alpha(DEPLMATE) - for i, (rank_meca, rank_ther) in enumerate(zip(ranks_meca, ranks_ther)): + for i, (inst_meca, inst_ther) in enumerate(zip(insts_meca, insts_ther)): - work_dila_11 = utilities.cross_work(CORR_MECA11, CORR_DILA, rank_meca, ls_group_ma) - work_dila_22 = utilities.cross_work(CORR_MECA22, CORR_DILA, rank_meca, ls_group_ma) - work_dila_33 = utilities.cross_work(CORR_MECA33, CORR_DILA, rank_meca, ls_group_ma) + ASSERT(inst_meca == inst_ther) - work_ther_11 = utilities.cross_work(CORR_THER11, CORR_THER11, rank_ther, ls_group_ma) - work_ther_22 = utilities.cross_work(CORR_THER22, CORR_THER22, rank_ther, ls_group_ma) - work_ther_33 = utilities.cross_work(CORR_THER33, CORR_THER33, rank_ther, ls_group_ma) + work_dila_11 = utilities.cross_work(CORR_MECA11, CORR_DILA, inst_meca, ls_group_ma) + work_dila_22 = utilities.cross_work(CORR_MECA22, CORR_DILA, inst_meca, ls_group_ma) + work_dila_33 = utilities.cross_work(CORR_MECA33, CORR_DILA, inst_meca, ls_group_ma) - work_meca_11_11 = utilities.cross_work(CORR_MECA11, CORR_MECA11, rank_meca, ls_group_ma) - work_meca_22_22 = utilities.cross_work(CORR_MECA22, CORR_MECA22, rank_meca, ls_group_ma) - work_meca_33_33 = utilities.cross_work(CORR_MECA33, CORR_MECA33, rank_meca, ls_group_ma) + work_ther_11 = utilities.cross_work(CORR_THER11, CORR_THER11, inst_ther, ls_group_ma) + work_ther_22 = utilities.cross_work(CORR_THER22, CORR_THER22, inst_ther, ls_group_ma) + work_ther_33 = utilities.cross_work(CORR_THER33, CORR_THER33, inst_ther, ls_group_ma) - work_meca_11_22 = utilities.cross_work(CORR_MECA11, CORR_MECA22, rank_meca, ls_group_ma) - work_meca_11_33 = utilities.cross_work(CORR_MECA11, CORR_MECA33, rank_meca, ls_group_ma) - work_meca_22_33 = utilities.cross_work(CORR_MECA22, CORR_MECA33, rank_meca, ls_group_ma) + work_meca_11_11 = utilities.cross_work(CORR_MECA11, CORR_MECA11, inst_meca, ls_group_ma) + work_meca_22_22 = utilities.cross_work(CORR_MECA22, CORR_MECA22, inst_meca, ls_group_ma) + work_meca_33_33 = utilities.cross_work(CORR_MECA33, CORR_MECA33, inst_meca, ls_group_ma) - work_meca_12_12 = utilities.cross_work(CORR_MECA12, CORR_MECA12, rank_meca, ls_group_ma) - work_meca_23_23 = utilities.cross_work(CORR_MECA23, CORR_MECA23, rank_meca, ls_group_ma) - work_meca_31_31 = utilities.cross_work(CORR_MECA31, CORR_MECA31, rank_meca, ls_group_ma) + work_meca_11_22 = utilities.cross_work(CORR_MECA11, CORR_MECA22, inst_meca, ls_group_ma) + work_meca_11_33 = utilities.cross_work(CORR_MECA11, CORR_MECA33, inst_meca, ls_group_ma) + work_meca_22_33 = utilities.cross_work(CORR_MECA22, CORR_MECA33, inst_meca, ls_group_ma) + + work_meca_12_12 = utilities.cross_work(CORR_MECA12, CORR_MECA12, inst_meca, ls_group_ma) + work_meca_23_23 = utilities.cross_work(CORR_MECA23, CORR_MECA23, inst_meca, ls_group_ma) + work_meca_31_31 = utilities.cross_work(CORR_MECA31, CORR_MECA31, inst_meca, ls_group_ma) ######################## # Matrice homogeneisee diff --git a/code_aster/MacroCommands/MateHomo/mate_homo_ops.py b/code_aster/MacroCommands/MateHomo/mate_homo_ops.py index 6e52369acc..f280ec132f 100644 --- a/code_aster/MacroCommands/MateHomo/mate_homo_ops.py +++ b/code_aster/MacroCommands/MateHomo/mate_homo_ops.py @@ -46,7 +46,7 @@ def mate_homo_ops(self, **kwargs): ) varc_name = ls_varc["NOM_VARC"] - varc_values = ls_varc["VALE"] + varc_values = sorted(ls_varc["VALE"]) mesh, group_tout, volume_ver, dirthick = prepare_mesh_syme(meshin, affe_groups, affe_all) diff --git a/code_aster/MacroCommands/MateHomo/mate_homo_plaque.py b/code_aster/MacroCommands/MateHomo/mate_homo_plaque.py index a089765370..06cd202f27 100644 --- a/code_aster/MacroCommands/MateHomo/mate_homo_plaque.py +++ b/code_aster/MacroCommands/MateHomo/mate_homo_plaque.py @@ -253,41 +253,41 @@ def calc_tabpara_plaque( CORR_MECA22_FLEX = fields["CORR_MECA22_FLEX"] CORR_MECA12_FLEX = fields["CORR_MECA12_FLEX"] - ranks_meca = CORR_MECA11_MEMB.getAccessParameters()["NUME_ORDRE"] + insts_meca = CORR_MECA11_MEMB.getAccessParameters()["INST"] - ASSERT(len(ranks_meca) == len(ls_varc)) + ASSERT(len(insts_meca) == len(ls_varc)) dictpara = utilities.create_empty_dictpara([varc_name] + PARAPLAQUE) loimel = calc_loimel_plaque(DEPLMATE, ls_group_ma, dir_plaque) h = dirthick[dir_plaque] tda = utilities.get_temp_def_alpha(DEPLMATE) - for i, rank_meca in enumerate(ranks_meca): + for i, inst_meca in enumerate(insts_meca): work_meca_11_11_mm = utilities.cross_work( - CORR_MECA11_MEMB, CORR_MECA11_MEMB, rank_meca, ls_group_ma + CORR_MECA11_MEMB, CORR_MECA11_MEMB, inst_meca, ls_group_ma ) work_meca_22_22_mm = utilities.cross_work( - CORR_MECA22_MEMB, CORR_MECA22_MEMB, rank_meca, ls_group_ma + CORR_MECA22_MEMB, CORR_MECA22_MEMB, inst_meca, ls_group_ma ) work_meca_11_22_mm = utilities.cross_work( - CORR_MECA11_MEMB, CORR_MECA22_MEMB, rank_meca, ls_group_ma + CORR_MECA11_MEMB, CORR_MECA22_MEMB, inst_meca, ls_group_ma ) work_meca_12_12_mm = utilities.cross_work( - CORR_MECA12_MEMB, CORR_MECA12_MEMB, rank_meca, ls_group_ma + CORR_MECA12_MEMB, CORR_MECA12_MEMB, inst_meca, ls_group_ma ) work_meca_11_11_ff = utilities.cross_work( - CORR_MECA11_FLEX, CORR_MECA11_FLEX, rank_meca, ls_group_ma + CORR_MECA11_FLEX, CORR_MECA11_FLEX, inst_meca, ls_group_ma ) work_meca_22_22_ff = utilities.cross_work( - CORR_MECA22_FLEX, CORR_MECA22_FLEX, rank_meca, ls_group_ma + CORR_MECA22_FLEX, CORR_MECA22_FLEX, inst_meca, ls_group_ma ) work_meca_11_22_ff = utilities.cross_work( - CORR_MECA11_FLEX, CORR_MECA22_FLEX, rank_meca, ls_group_ma + CORR_MECA11_FLEX, CORR_MECA22_FLEX, inst_meca, ls_group_ma ) work_meca_12_12_ff = utilities.cross_work( - CORR_MECA12_FLEX, CORR_MECA12_FLEX, rank_meca, ls_group_ma + CORR_MECA12_FLEX, CORR_MECA12_FLEX, inst_meca, ls_group_ma ) lambda_meca_mm = loimel["LAME1_mm"][i] diff --git a/code_aster/MacroCommands/MateHomo/mate_homo_utilities.py b/code_aster/MacroCommands/MateHomo/mate_homo_utilities.py index 8f19489f2a..fa01089660 100644 --- a/code_aster/MacroCommands/MateHomo/mate_homo_utilities.py +++ b/code_aster/MacroCommands/MateHomo/mate_homo_utilities.py @@ -190,11 +190,10 @@ def parse_mater_groups(type_homo, ls_affe, varc_name, ls_group_tout): def prepare_alpha_loads(ls_affe_mod_mate, varc_values): """ Cette fonction sert récuperer les coeff ALPHA affecté sur differents zones - pour en créer une fonction de INST qui servira dans le affe_char_meca pour + pour en créer une fonction de INST qui servira dans le affe_char_meca pour le calcul des correcteurs de dilatation """ - ls_insts = [inst for inst, value in enumerate(varc_values)] ls_alpha_calc = [] for item in ls_affe_mod_mate: @@ -206,7 +205,7 @@ def prepare_alpha_loads(ls_affe_mod_mate, varc_values): f_alpha_time.setParameterName("INST") f_alpha_time.setInterpolation(pro[1]) f_alpha_time.setExtrapolation(pro[4]) - f_alpha_time.setValues(ls_insts, [f_alpha_temp(t) for t in varc_values]) + f_alpha_time.setValues(varc_values, [f_alpha_temp(t) for t in varc_values]) ls_alpha_calc.append({"GROUP_MA": group_ma_affe, "FONC_ALPHA_TIME": f_alpha_time}) return ls_alpha_calc @@ -238,10 +237,10 @@ def setup_calcul(type_homo, mesh, ls_group_tout, ls_affe, varc_name, varc_values MAILLAGE=mesh, AFFE=_F(GROUP_MA=ls_group_tout, NOM_CMP="TEMP", VALE=value), ), - INST=inst, + INST=value, NOM_CHAM="TEMP", ) - for inst, value in enumerate(varc_values) + for value in varc_values ], ) @@ -265,7 +264,7 @@ def setup_calcul(type_homo, mesh, ls_group_tout, ls_affe, varc_name, varc_values MODELE=MODTH, AFFE=[_F(**affekw) for affekw in ls_affe_mod_calc], AFFE_VARC=_F(**affevarckw) ) - L_INST = DEFI_LIST_REEL(VALE=list(range(len(varc_values)))) + L_INST = DEFI_LIST_REEL(VALE=varc_values) # Calcul des lois de melange # ====================================================================== @@ -281,7 +280,7 @@ def setup_calcul(type_homo, mesh, ls_group_tout, ls_affe, varc_name, varc_values return DEPLMATE, MODME, CHMATME, MODTH, CHMATTH, L_INST, ls_alpha_calc -def cross_work(RESU1, RESU2, N_ORDRE, ls_group_tout): +def cross_work(RESU1, RESU2, INST, ls_group_tout): """ Cette fonction sert à effectuer le calcul du travail croisé des correcteurs au travers d'un calcul de l'énergie potentielle d'un correcteur ou de leur combinaison @@ -305,11 +304,11 @@ def cross_work(RESU1, RESU2, N_ORDRE, ls_group_tout): TYPE_CHAM="NOEU_%s_R" % CH_TYPE, OPERATION="EXTR", NOM_CHAM=CH_TYPE, - NUME_ORDRE=N_ORDRE, + INST=INST, ) EPOT_CH1 = POST_ELEM( - CHAM_GD=CH1, MODELE=MOD, CHAM_MATER=CHMAT, ENER_POT=_F(GROUP_MA=ls_group_tout) + CHAM_GD=CH1, INST=INST, MODELE=MOD, CHAM_MATER=CHMAT, ENER_POT=_F(GROUP_MA=ls_group_tout) ) epot_ch1 = abs(sum(EPOT_CH1.EXTR_TABLE().values()["TOTALE"])) @@ -323,16 +322,24 @@ def cross_work(RESU1, RESU2, N_ORDRE, ls_group_tout): TYPE_CHAM="NOEU_%s_R" % CH_TYPE, OPERATION="EXTR", NOM_CHAM=CH_TYPE, - NUME_ORDRE=N_ORDRE, + INST=INST, ) EPOT_CH2 = POST_ELEM( - CHAM_GD=CH2, MODELE=MOD, CHAM_MATER=CHMAT, ENER_POT=_F(GROUP_MA=ls_group_tout) + CHAM_GD=CH2, + INST=INST, + MODELE=MOD, + CHAM_MATER=CHMAT, + ENER_POT=_F(GROUP_MA=ls_group_tout), ) epot_ch2 = abs(sum(EPOT_CH2.EXTR_TABLE().values()["TOTALE"])) EPOT_SOMME = POST_ELEM( - CHAM_GD=CH1 + CH2, MODELE=MOD, CHAM_MATER=CHMAT, ENER_POT=_F(GROUP_MA=ls_group_tout) + CHAM_GD=CH1 + CH2, + INST=INST, + MODELE=MOD, + CHAM_MATER=CHMAT, + ENER_POT=_F(GROUP_MA=ls_group_tout), ) epot_chsomme = abs(sum(EPOT_SOMME.EXTR_TABLE().values()["TOTALE"])) From 75fff5505c74bebcf7dcfbbdcd258273a5553905 Mon Sep 17 00:00:00 2001 From: Francesco Bettonte Date: Thu, 5 Dec 2024 10:20:27 +0100 Subject: [PATCH 17/19] [#34274] INST is mandatory for POST_ELEM with VARC --- code_aster/CodeCommands/post_elem.py | 17 ++++++++++++++++- code_aster/Messages/postelem.py | 5 ++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/code_aster/CodeCommands/post_elem.py b/code_aster/CodeCommands/post_elem.py index 95c8efb068..3135a62762 100644 --- a/code_aster/CodeCommands/post_elem.py +++ b/code_aster/CodeCommands/post_elem.py @@ -1,6 +1,6 @@ # coding: utf-8 -# Copyright (C) 1991 - 2023 EDF R&D www.code-aster.org +# Copyright (C) 1991 - 2024 EDF R&D www.code-aster.org # # This file is part of Code_Aster. # @@ -21,6 +21,7 @@ from ..Objects import Table from ..Supervis import ExecuteCommand +from ..Messages import UTMESS class PostElem(ExecuteCommand): @@ -28,6 +29,20 @@ class PostElem(ExecuteCommand): command_name = "POST_ELEM" + def adapt_syntax(self, keywords): + """Perform checks of syntax based on argument content's. + + Arguments: + keywords (dict): Keywords arguments of user's keywords. + """ + + chamgd = keywords.get("CHAM_GD") + chmater = keywords.get("CHAM_MATER") + + if chamgd and chmater: + if chmater.hasExternalStateVariable() and keywords.get("INST") is None: + UTMESS("F", "POSTELEM_7") + def create_result(self, keywords): """Initialize the result. diff --git a/code_aster/Messages/postelem.py b/code_aster/Messages/postelem.py index 9cb7d8cd38..2e4fe74b78 100644 --- a/code_aster/Messages/postelem.py +++ b/code_aster/Messages/postelem.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2022 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -53,6 +53,9 @@ 6: _( """La sélection des composantes par NOM_VARI n'est possible que sur une structure de données de type résultat et non sur un champ isolé.""" ), + 7: _( + """Vous utilisez la commande sur une structure de données de type champ (CHAM_GD) et le champ matériau donné par CHAM_MATER contient une variable de commande. Or, dans ce cas, il est obligatoire de renseigner INST.""" + ), 10: _( """Pour le calcul de l'option MASS_INER sur la géométrie déformée, il faut que le résultat contienne plus d'un numéro d'ordre""" ), From 8f76fa3f82f23c895ef692f92beb9eada643d5cc Mon Sep 17 00:00:00 2001 From: Mathieu Courtois Date: Thu, 5 Dec 2024 17:35:26 +0100 Subject: [PATCH 18/19] [ci] make jobs interruptible --- .gitlabci/gitlab-ci-pleiade.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlabci/gitlab-ci-pleiade.yml b/.gitlabci/gitlab-ci-pleiade.yml index ff3a49f163..563746edd5 100644 --- a/.gitlabci/gitlab-ci-pleiade.yml +++ b/.gitlabci/gitlab-ci-pleiade.yml @@ -25,6 +25,8 @@ workflow: - if: $CI_COMMIT_REF_NAME =~ $reg_debugging variables: BUILD: debug + auto_cancel: + on_new_commit: interruptible stages: - setup @@ -35,6 +37,7 @@ image: name: ${IMAGE_URL} prepare: + interruptible: true stage: setup script: - .gitlabci/prepare.sh @@ -45,6 +48,7 @@ prepare: expire_in: 6 hours compile: + interruptible: true stage: build needs: ["prepare"] script: @@ -64,6 +68,7 @@ compile: expire_in: 3 days doc_html: + interruptible: true stage: build needs: ["prepare", "compile"] script: @@ -76,6 +81,7 @@ doc_html: - if: $CI_MERGE_REQUEST_IID minimal_build: + interruptible: true stage: test needs: ["prepare", "compile", "check_source"] script: @@ -84,6 +90,7 @@ minimal_build: - if: $CI_MERGE_REQUEST_IID check_source: + interruptible: true stage: test needs: ["prepare", "compile"] script: @@ -96,6 +103,7 @@ check_source: - if: $CI_MERGE_REQUEST_IID check_issues: + interruptible: true stage: test needs: ["prepare", "check_source"] script: @@ -104,6 +112,7 @@ check_issues: - if: $CI_MERGE_REQUEST_IID minimal_test: + interruptible: true stage: test needs: ["prepare", "compile"] script: @@ -123,6 +132,7 @@ minimal_test: - if: $CI_MERGE_REQUEST_IID verification_test: + interruptible: true stage: test tags: - hulk @@ -153,6 +163,7 @@ verification_test: - if: $CI_COMMIT_REF_NAME !~ $reg_debugging known_failures_test: + interruptible: true stage: test needs: ["prepare", "compile", "minimal_test"] script: @@ -173,6 +184,7 @@ known_failures_test: - if: $CI_MERGE_REQUEST_IID debugging_test: + interruptible: true stage: test needs: ["prepare", "compile"] script: From 2b78492b01fa7e9c0d68d2978978d59c6cfdcef9 Mon Sep 17 00:00:00 2001 From: krande Date: Sat, 7 Dec 2024 08:46:43 +0100 Subject: [PATCH 19/19] update code aster --- conda/recipe.yaml | 4 ++-- pixi.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/recipe.yaml b/conda/recipe.yaml index 320e92ce3c..9f5f76d65f 100644 --- a/conda/recipe.yaml +++ b/conda/recipe.yaml @@ -2,8 +2,8 @@ schema_version: 1 context: name: code-aster - version: 17.1.16 - win_build: 2 + version: 17.1.18 + win_build: 1 build: 200 mpi_prefix: nompi build_type: debug diff --git a/pixi.toml b/pixi.toml index 1523868347..60381c94a0 100644 --- a/pixi.toml +++ b/pixi.toml @@ -1,6 +1,6 @@ [project] name = "code-aster" -version = "17.1.12" +version = "17.1.18" description = "A pixi project for building the windows variant of code aster" channels = ["https://repo.prefix.dev/code-aster", "conda-forge"] platforms = ["win-64"]