simplified

This commit is contained in:
Martin Diehl 2021-06-24 15:08:31 +02:00
parent 95c9434a21
commit b4265149c8
3 changed files with 8 additions and 7 deletions

View File

@ -61,9 +61,6 @@ module phase
grain grain
end type tDebugOptions end type tDebugOptions
logical, dimension(:), allocatable, public :: & ! ToDo: should be protected (bug in Intel Compiler)
phase_localPlasticity !< flags phases with local constitutive law
type(tPlasticState), allocatable, dimension(:), public :: & type(tPlasticState), allocatable, dimension(:), public :: &
plasticState plasticState
type(tState), allocatable, dimension(:), public :: & type(tState), allocatable, dimension(:), public :: &

View File

@ -274,7 +274,6 @@ module subroutine mechanical_init(materials,phases)
! initialize plasticity ! initialize plasticity
allocate(plasticState(phases%length)) allocate(plasticState(phases%length))
allocate(phase_plasticity(phases%length),source = PLASTICITY_undefined_ID) allocate(phase_plasticity(phases%length),source = PLASTICITY_undefined_ID)
allocate(phase_localPlasticity(phases%length), source=.true.)
call plastic_init() call plastic_init()

View File

@ -13,6 +13,9 @@ submodule(phase:plastic) nonlocal
IPareaNormal => geometry_plastic_nonlocal_IPareaNormal0, & IPareaNormal => geometry_plastic_nonlocal_IPareaNormal0, &
geometry_plastic_nonlocal_disable geometry_plastic_nonlocal_disable
logical, dimension(:), allocatable :: &
phase_localPlasticity
type :: tGeometry type :: tGeometry
real(pReal), dimension(:), allocatable :: V_0 real(pReal), dimension(:), allocatable :: V_0
end type tGeometry end type tGeometry
@ -211,6 +214,9 @@ module function plastic_nonlocal_init() result(myPlasticity)
phases => config_material%get('phase') phases => config_material%get('phase')
allocate(phase_localPlasticity(phases%length),source=.true.)
allocate(geom(phases%length)) allocate(geom(phases%length))
allocate(param(phases%length)) allocate(param(phases%length))
@ -230,8 +236,8 @@ module function plastic_nonlocal_init() result(myPlasticity)
mech => phase%get('mechanical') mech => phase%get('mechanical')
pl => mech%get('plastic') pl => mech%get('plastic')
phase_localPlasticity(ph) = .not. pl%get_asBool('nonlocal') plasticState(ph)%nonlocal = pl%get_asBool('nonlocal')
phase_localPlasticity(ph) = .not. plasticState(ph)%nonlocal
#if defined (__GFORTRAN__) #if defined (__GFORTRAN__)
prm%output = output_as1dString(pl) prm%output = output_as1dString(pl)
#else #else
@ -417,7 +423,6 @@ module function plastic_nonlocal_init() result(myPlasticity)
allocate(geom(ph)%V_0(Nmembers)) allocate(geom(ph)%V_0(Nmembers))
call storeGeometry(ph) call storeGeometry(ph)
plasticState(ph)%nonlocal = pl%get_asBool('nonlocal')
if(plasticState(ph)%nonlocal .and. .not. allocated(IPneighborhood)) & if(plasticState(ph)%nonlocal .and. .not. allocated(IPneighborhood)) &
call IO_error(212,ext_msg='IPneighborhood does not exist') call IO_error(212,ext_msg='IPneighborhood does not exist')