using array size not to rely on correctly set variable, cleaning crystallite data after use
This commit is contained in:
parent
98cc56968e
commit
bb415e8a02
|
@ -171,7 +171,10 @@ subroutine crystallite_init
|
||||||
IO_write_jobFile, &
|
IO_write_jobFile, &
|
||||||
IO_error
|
IO_error
|
||||||
use material
|
use material
|
||||||
use config
|
use config, only: &
|
||||||
|
crystalliteConfig, &
|
||||||
|
crystallite_name, &
|
||||||
|
config_deallocate
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_initialFi, &
|
constitutive_initialFi, &
|
||||||
constitutive_microstructure ! derived (shortcut) quantities of given state
|
constitutive_microstructure ! derived (shortcut) quantities of given state
|
||||||
|
@ -259,15 +262,15 @@ subroutine crystallite_init
|
||||||
allocate(crystallite_clearToCutback(iMax,eMax), source=.true.)
|
allocate(crystallite_clearToCutback(iMax,eMax), source=.true.)
|
||||||
allocate(crystallite_neighborEnforcedCutback(iMax,eMax), source=.false.)
|
allocate(crystallite_neighborEnforcedCutback(iMax,eMax), source=.false.)
|
||||||
allocate(crystallite_output(maxval(crystallite_Noutput), &
|
allocate(crystallite_output(maxval(crystallite_Noutput), &
|
||||||
material_Ncrystallite)) ; crystallite_output = ''
|
size(crystalliteConfig))) ; crystallite_output = ''
|
||||||
allocate(crystallite_outputID(maxval(crystallite_Noutput), &
|
allocate(crystallite_outputID(maxval(crystallite_Noutput), &
|
||||||
material_Ncrystallite), source=undefined_ID)
|
size(crystalliteConfig)), source=undefined_ID)
|
||||||
allocate(crystallite_sizePostResults(material_Ncrystallite),source=0_pInt)
|
allocate(crystallite_sizePostResults(size(crystalliteConfig)),source=0_pInt)
|
||||||
allocate(crystallite_sizePostResult(maxval(crystallite_Noutput), &
|
allocate(crystallite_sizePostResult(maxval(crystallite_Noutput), &
|
||||||
material_Ncrystallite), source=0_pInt)
|
size(crystalliteConfig)), source=0_pInt)
|
||||||
|
|
||||||
|
|
||||||
do c = 1_pInt, material_Ncrystallite
|
do c = 1_pInt, size(crystalliteConfig)
|
||||||
#if defined(__GFORTRAN__)
|
#if defined(__GFORTRAN__)
|
||||||
str = ['GfortranBug86277']
|
str = ['GfortranBug86277']
|
||||||
str = crystalliteConfig(c)%getStrings('(output)',defaultVal=str)
|
str = crystalliteConfig(c)%getStrings('(output)',defaultVal=str)
|
||||||
|
@ -329,7 +332,7 @@ subroutine crystallite_init
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
||||||
do r = 1_pInt,material_Ncrystallite
|
do r = 1_pInt,size(crystalliteConfig)
|
||||||
do o = 1_pInt,crystallite_Noutput(r)
|
do o = 1_pInt,crystallite_Noutput(r)
|
||||||
select case(crystallite_outputID(o,r))
|
select case(crystallite_outputID(o,r))
|
||||||
case(phase_ID,texture_ID,volume_ID,grainrotationx_ID,grainrotationy_ID,grainrotationz_ID)
|
case(phase_ID,texture_ID,volume_ID,grainrotationx_ID,grainrotationy_ID,grainrotationz_ID)
|
||||||
|
@ -354,14 +357,14 @@ subroutine crystallite_init
|
||||||
|
|
||||||
crystallite_maxSizePostResults = &
|
crystallite_maxSizePostResults = &
|
||||||
maxval(crystallite_sizePostResults(microstructure_crystallite),microstructure_active)
|
maxval(crystallite_sizePostResults(microstructure_crystallite),microstructure_active)
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! write description file for crystallite output
|
! write description file for crystallite output
|
||||||
if (worldrank == 0_pInt) then
|
if (worldrank == 0_pInt) then
|
||||||
call IO_write_jobFile(FILEUNIT,'outputCrystallite')
|
call IO_write_jobFile(FILEUNIT,'outputCrystallite')
|
||||||
|
|
||||||
do r = 1_pInt,material_Ncrystallite
|
do r = 1_pInt,size(crystalliteConfig)
|
||||||
if (any(microstructure_crystallite(mesh_element(4,:)) == r)) then
|
if (any(microstructure_crystallite(mesh_element(4,:)) == r)) then
|
||||||
write(FILEUNIT,'(/,a,/)') '['//trim(crystallite_name(r))//']'
|
write(FILEUNIT,'(/,a,/)') '['//trim(crystallite_name(r))//']'
|
||||||
do o = 1_pInt,crystallite_Noutput(r)
|
do o = 1_pInt,crystallite_Noutput(r)
|
||||||
|
@ -373,6 +376,8 @@ subroutine crystallite_init
|
||||||
close(FILEUNIT)
|
close(FILEUNIT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
call config_deallocate('material.config/crystallite')
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! initialize
|
! initialize
|
||||||
!$OMP PARALLEL DO PRIVATE(myNcomponents)
|
!$OMP PARALLEL DO PRIVATE(myNcomponents)
|
||||||
|
|
Loading…
Reference in New Issue