Commits

Mickael Abbas  committed 88b84de

[#22479] Correct bug for incremental elasticity if comportment is not given by user

  • Participants
  • Parent commits 8d7e6ab

Comments (0)

Files changed (6)

File bibfor/algorith/cgleco.F90

             limpel = .true.
             compor = '&&CGLECO.COMPOR'
             call comp_init(mesh, compor, 'V', nb_cmp)
-            call comp_meca_elas(compor, nb_cmp)
+            call comp_meca_elas(compor, nb_cmp, l_etat_init)
         endif
     else
 !

File bibfor/algorith/dyna_comp_fuse.F90

     integer :: ibid, nb_cmp
     character(len=19) :: comp_elas
     character(len=19) :: comp_elas_s, comp_noli_s, comp_fuse_s
-    logical :: l_cplx
+    logical :: l_cplx, l_etat_init
 !
     data l_cumu      /.false.,.false./
     data coef_real   /1.d0, 1.d0/
 !
 ! --------------------------------------------------------------------------------------------------
 !
-    comp_elas = '&&DYNA_COMP_ELAS'
+    comp_elas   = '&&DYNA_COMP_ELAS'
     comp_elas_s = '&&DYNA_COMP_ELAS_S'
     comp_noli_s = '&&DYNA_COMP_NOLI_S'
     comp_fuse_s = '&&DYNA_COMP_FUSE_S'
     l_cplx      = .false.
+    l_etat_init = .false.
 !
 ! - Create ELAS COMPOR <CARTE>
 !
     call comp_init(mesh, comp_elas, 'V', nb_cmp)
-    call comp_meca_elas(comp_elas, nb_cmp)
+    call comp_meca_elas(comp_elas, nb_cmp, l_etat_init)
 !
 ! - Transform ELAS COMPOR <CARTE> in <CHAM_ELEM_S>
 !

File bibfor/include/asterfort/comp_meca_elas.h

 ! 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
 !
 interface
-    subroutine comp_meca_elas(comp_elas, nb_cmp)
+    subroutine comp_meca_elas(comp_elas, nb_cmp, l_etat_init)
         character(len=19) , intent(in) :: comp_elas
         integer, intent(in) :: nb_cmp
+        logical, intent(in) :: l_etat_init
     end subroutine comp_meca_elas
 end interface
 

File bibfor/include/asterfort/get_elasth_para.h

File contents unchanged.

File bibfor/modelisa/comp_meca_elas.F90

-subroutine comp_meca_elas(comp_elas, nb_cmp)
+subroutine comp_meca_elas(comp_elas, nb_cmp, l_etat_init)
 !
     implicit none
 !
 ! ======================================================================
 ! person_in_charge: mickael.abbas at edf.fr
 !
-      character(len=19) , intent(in) :: comp_elas
-      integer, intent(in) :: nb_cmp
+    character(len=19) , intent(in) :: comp_elas
+    integer, intent(in) :: nb_cmp
+    logical, intent(in) :: l_etat_init
 !
 ! --------------------------------------------------------------------------------------------------
 !
 !
 ! --------------------------------------------------------------------------------------------------
 !
-! In  comp_elas : name of ELAS <CARTE> COMPOR
-! In  nb_cmp    : number of components in ELAS <CARTE> COMPOR
+! In  comp_elas   : name of ELAS <CARTE> COMPOR
+! In  nb_cmp      : number of components in ELAS <CARTE> COMPOR
+! In  l_etat_init : .true. if initial state is defined
 !
 ! --------------------------------------------------------------------------------------------------
 !
     p_compelas_valv(1)  = 'ELAS'
     p_compelas_valv(2)  = '1'
     p_compelas_valv(3)  = 'PETIT'
-    p_compelas_valv(4)  = 'COMP_ELAS'
+    if (l_etat_init) then
+        p_compelas_valv(4)  = 'COMP_INCR' 
+    else
+        p_compelas_valv(4)  = 'COMP_ELAS'
+    endif
     p_compelas_valv(5)  = 'ANALYTIQUE'
     write (p_compelas_valv(6) ,'(I16)') 1
 ! 99999 = Not affected

File bibfor/nonlinear/nmdocc.F90

 !
 ! - Set ELASTIQUE COMPOR
 !
-    call comp_meca_elas(compor, nb_cmp)
+    call comp_meca_elas(compor, nb_cmp, l_etat_init)
 !
 ! - Default ELASTIQUE COMPOR <CARTE> on all mesh
 !