fixed bug in nonlocal state init that was introduced in rev 2438 and used to reset states from other constitutions

This commit is contained in:
Christoph Kords 2013-05-24 13:43:44 +00:00
parent c0539d2383
commit ab997f19ac
2 changed files with 7 additions and 6 deletions

View File

@ -134,7 +134,8 @@ subroutine constitutive_init
myNgrains
integer(pInt), dimension(:,:), pointer :: thisSize
character(len=64), dimension(:,:), pointer :: thisOutput
logical :: knownPlasticity
logical :: knownPlasticity, nonlocalConstitutionPresent
nonlocalConstitutionPresent = .false.
!--------------------------------------------------------------------------------------------------
@ -378,6 +379,7 @@ subroutine constitutive_init
constitutive_sizePostResults(g,i,e) = constitutive_dislotwin_sizePostResults(myInstance)
case (constitutive_nonlocal_label)
nonlocalConstitutionPresent = .true.
if(myNgrains/=1_pInt) call IO_error(252_pInt, e,i,g)
allocate(constitutive_state0(g,i,e)%p(constitutive_nonlocal_sizeState(myInstance)))
allocate(constitutive_partionedState0(g,i,e)%p(constitutive_nonlocal_sizeState(myInstance)))
@ -412,6 +414,7 @@ subroutine constitutive_init
enddo
enddo
enddo
if (nonlocalConstitutionPresent) &
call constitutive_nonlocal_stateInit(constitutive_state0(1,1:iMax,1:eMax))
do e = 1_pInt,mesh_NcpElems ! loop over elements
myNgrains = homogenization_Ngrains(mesh_element(3,e))

View File

@ -1044,7 +1044,6 @@ integer(pInt) el, &
ip, &
e, &
i, &
g, &
idx, &
ns, & ! short notation for total number of active slip systems
f, & ! index of lattice family
@ -1070,9 +1069,8 @@ maxNinstance = int(count(phase_plasticity == CONSTITUTIVE_NONLOCAL_LABEL),pInt)
do e = 1_pInt,mesh_NcpElems
do i = 1_pInt,FE_Nips(FE_geomtype(mesh_element(2,e)))
do g = 1_pInt,homogenization_Ngrains(mesh_element(3,e))
state(g,i,e)%p = 0.0_pReal
enddo
if (CONSTITUTIVE_NONLOCAL_LABEL == phase_plasticity(material_phase(1,i,e))) &
state(1,i,e)%p = 0.0_pReal
enddo
enddo